Richard Levitte - VMS Whacker wrote:

In message <[EMAIL PROTECTED]> on Mon, 20 Dec 2004 15:13:08 +0530, sravan <[EMAIL 
PROTECTED]> said:

sravan> Hello all,
sravan> sravan> I have a doubt regd the following function, which is defined in apps.c
sravan> sravan> X509 *load_cert(BIO *err, const char *file, int format, const char sravan> *pass, ENGINE *e, const char *cert_descrip)
sravan> sravan> In this function, if the certificate format is PKCS12, then the sravan> following code is exectued:
sravan> sravan> else if (format == FORMAT_PKCS12)
sravan> {
sravan> PKCS12 *p12 = d2i_PKCS12_bio(cert, NULL);
sravan> sravan> PKCS12_parse(p12, NULL, NULL, &x, NULL);
sravan> PKCS12_free(p12);
sravan> p12 = NULL;
sravan> }
sravan> sravan> My doubt here is, why a NULL is being passed(as password) to sravan> PKCS12_parse() funtion. Where as the online documentation for
sravan> the PKCS12_parse function gives it's prototype as
sravan> int |PKCS12_parse(PKCS12| *p12, const char *pass, EVP_PKEY **pkey,
sravan> X509 **cert, |STACK_OF(X509)| **ca)


Is the certificate usually protected with a password?


yes. it is a p12 certificate protected with a password. since a NULL is being passed to PKCS12_parse(), the function is failing.
but if i pass the password then it is working. so, i wanted to know if this is a bug or is there any other reason.


Personally, I find it quite troubling that the PKCS12_parse() function
doesn't take a password callback and a callback argument, the same way
PEM_read_bio_X509_AUX() does...


btw, can you please throw some light on the use of password call backs in openssl. atleast some pointers to help topics will do.

thnx
Sravan

______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    [EMAIL PROTECTED]
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to