EldoS | Feel safer!

Software components for data protection, secure storage and transfer

certificate Extensions SubjectAlternativeName adding

Posted: 05/11/2009 02:28:03
by Janusz W (Standard support level)
Joined: 03/27/2009
Posts: 8

I have problem with adding IpAddress to SubjectAlternativeName extension.
I useSecureBlackBox, version 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 = "";
m_certificate.Extensions.Included = SBX509Ext.Unit.ceAuthorityKeyIdentifier | SBX509Ext.Unit.ceKeyUsage
| SBX509Ext.Unit.ceSubjectAlternativeName;

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

Posted: 05/11/2009 05:14:46
by Ken Ivanov (Team)

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

ip.NameType = TSBGeneralName.gnIPAddress;
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.



Topic viewed 1860 times

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


Back to top

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

Got it!