Hello,
I try to set a "X509v3 Authority Key Identifier" extension with this
value :
"keyid:6B:FC:14:20:72:EE:15:6E:D1:29:7A:4D:40:69:90:F7:AE:B1:3A:FF\nDirName:/O=O/OU=DC.OU/CN=.ROOT.CN/dnQualifier=a/wUIHLuFW7RKXpNQGmQ966xOv8=\nserial:01\0"
With this code :
X509* _d_cert ; // loaded from a file
X509_EXTENSION *ex;
X509V3_CTX ctx;
X509V3_set_ctx_nodb(&ctx);
X509V3_set_ctx(&ctx, _d_cert, _d_cert, NULL, NULL, 0); // self signed
ex = X509V3_EXT_conf_nid(NULL, &ctx, 90 , value);
if (ex == NULL)
cout << "Error, extensions can't be set");
When i use this code (valid) to see the extension :
BIO *bio = BIO_new(BIO_s_mem());
int len = 0;
char buffer[20000];
if(!X509V3_EXT_print(bio, ex, 0, 0)) // read the text of this extention
M_ASN1_OCTET_STRING_print(bio,ex->value);
len = BIO_read(bio, buffer, BUFFER_SIZE);// here buffer contain the
text, len the lenght of it.
buffer[len] = '\0'; // add the EOT sign
cout << buffer << endl;
I only got this :
"keyid:6B:FC:14:20:72:EE:15:6E:D1:29:7A:4D:40:69:90:F7:AE:B1:3A:FF"
How can i fix my problem ?
Thank's in advance
pierre delcour.
[EMAIL PROTECTED]
______________________________________________________________________
OpenSSL Project http://www.openssl.org
User Support Mailing List openssl-users@openssl.org
Automated List Manager [EMAIL PROTECTED]