Adding the Authority Key ID extension to a certificate

View: New views
1 Messages — Rating Filter:   Alert me  

Adding the Authority Key ID extension to a certificate

by Silviu V :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello everybody,

I need to copy the Subject Key ID (SKID) from the CA certificate to the Authority Key ID (AKID) of a new certificate.
I have extracted the SKID with

AUTHORITY_KEYID *akid = X509_get_ext_d2i(ca_cert, NID_subject_key_identifier, NULL, NULL);

How can I "put" akid in an X509_EXTENSION so that I can add the latter to a new certificate with X509_add_ext(x, ex_akid, -1) ?

Thanks a lot,

--
Silviu
LightInTheBox - Buy quality products at wholesale price!