HEllo, here is the solution of my problem :

I want to have this extension in my X509v3 certificate :

X509v3 Authority Key Identifier:
keyid:6B:FC:14:20:72:EE:15:6E:D1:29:7A:4D:40:69:90:F7:AE:B1:3A:FF
DirName:/O=o/OU=ou/CN=vn/dnQualifier=a/wUIHLuFW7RKXpNQGmQ966xOv8=
serial:01

To made this possible, you will need to write this code : (_d_cert is a X509*)

X509_EXTENSION *ex;                 // create a new extension
X509V3_CTX ctx;                    // create a context
X509V3_set_ctx(&ctx, _d_cert , _d_cert, NULL, NULL, 0); // here, it's mean self signed certificate ex = X509V3_EXT_conf_nid(NULL, &ctx, NID_authority_key_identifier , "issuer:always,keyid:always" );
if (ex == NULL)
   return 0; // run badly :(

X509_add_ext(_d_cert,ex, -1); // add it to the certificate extension (at the end of the stack)
X509_EXTENSION_free(ex);            // free temp extension
return 1;
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    openssl-users@openssl.org
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to