Hi,
I need to add the following in the certificate request.
id-ce-subjectAltName OBJECT IDENTIFIER ::= { id-ce 17 }subjectAltName = GeneralNamesotherName [0] OtherNameOtherName ::= Sequence {Id-on-hardwareModuleName OBJECT IDENTIFIER ::= iso(1) identified-organization(3) dod(6)internet(1) security(5) mechanisms(5) pkix(7) on(8) 4HardwareModuleName ::= SEQUENCE {hwType OBJECT IDENTIFIERhwSerialNum OCTET STRING}}
I able to generate the certificate required using openSSl cmd line with conf where following was added in config file
[ v3_req ]# Extensions to add to a certificate requestbasicConstraints = CA:FALSEkeyUsage = nonRepudiation, digitalSignature, keyEnciphermentsubjectAltName=otherName:1.3.6.1.5.5.7.8.4;SEQ:hmodname[hmodname]hwType = OID:1.3.6.1.4.1.47196.6.3.2.2hwSerialNum = FORMAT:HEX,OCT:01020304
I need to do add subject alt name in certificate request using openSSL API.( not using config file)
I have tried to use GENERAL_NAME_set0_othername , but I am not able to add an inner sequence.
Can someone suggest how we can add this using OpenSSL APIs
Regards
Manish