EldoS | Feel safer!

Software components for data protection, secure storage and transfer

certificate Extensions SubjectAlternativeName adding

Also by EldoS: Solid File System
A virtual file system that offers a feature-rich storage for application documents and data with built-in compression and encryption.
#9973
Posted: 05/11/2009 02:28:03
by Janusz W (Standard support level)
Joined: 03/27/2009
Posts: 8

Hello,
I have problem with adding IpAddress to SubjectAlternativeName extension.
I useSecureBlackBox, version 5.2.0.124. In this version in TELGeneralNames I see only get_Names(idx) method, so I try to use it as follows:
...
int idx=m_certificate.Extensions.SubjectAlternativeName.Content.Add();
SBX509Ext.TElGeneralName ip=m_certificate.Extensions.SubjectAlternativeName.Content.get_Names(idx);
ip.IpAddress = "10.10.10.10";
...
m_certificate.Extensions.Included = SBX509Ext.Unit.ceAuthorityKeyIdentifier | SBX509Ext.Unit.ceKeyUsage
| SBX509Ext.Unit.ceSubjectAlternativeName;
...

Before generating certificate I can see property IpAddress in
m_certificate.Extensions.SubjectAlternativeName.Content.get_Names(0)
but after generating, this property is null.
Property m_certificate.Extensions.SubjectAlternativeName.Content.Count is still 1.

Sincerelly
Janusz
#9974
Posted: 05/11/2009 05:14:46
by Ken Ivanov (EldoS Corp.)

Remember to set the TElGeneralName.NameType property according to the content being stored:

ip.NameType = TSBGeneralName.gnIPAddress;
#9975
Posted: 05/11/2009 06:54:06
by Janusz W (Standard support level)
Joined: 03/27/2009
Posts: 8

Thank you very much!
It helped. Your support is very good.
Sincerely
Janusz

Reply

Statistics

Topic viewed 1629 times

Number of guests: 1, registered members: 0, in total hidden: 0




|

Back to top

As of July 15, 2016 EldoS Corporation will operate as a division of /n software inc. For more information, please read the announcement.

Got it!