Hi,
When I append some extra attribute to attributes of
PKCS8_PRIV_KEY_INFO, the i2d_PKCS8_PRIV_KEY_INFO cause a Segment fault
error.
But if I use PKCS8_add_key_usage, every thing is ok.
The code is
if (!X509at_add1_attr_by_NID(&p8info->attributes, NID_commonName,
V_ASN1_OCTET_STRING, "hello", 5)) {
ERR_print_errors(bio_err);
goto end;
}
if (!(p8 = PKCS8_encrypt(-1, default_cipher, "password",
strlen("password"),
NULL, 0, PKCS12_DEFAULT_ITER, p8info))) {
ERR_print_errors(bio_err);
goto end;
}
Is this a bug or I should not append any attribute except for key_usage?
The openssl version is 1.0 and compiled on Mac OS X 10.6.
Thanks!
______________________________________________________________________
OpenSSL Project http://www.openssl.org
Development Mailing List [email protected]
Automated List Manager [email protected]