Richard,
 
 
dlgrasse>  FILE* fpkcs = fopen ("./cert.p12", "r");

You should read them as binary.  On a Unix system, that won't matter,
but...
    I've had it both ways to make sure.  As you said, it didn't matter.
 
dlgrasse>  X509 crt;
dlgrasse>  EVP_PKEY pky;
dlgrasse>  X509* cert = &crt;
dlgrasse>  EVP_PKEY* pkey = &pky;

Hmm, you really only need to initialise them to NULL, but it doesn't
really matter...
    Once again, I did have it both ways at different times.  I wasn't sure whether the PKCS12_parse method created it's own structure and assigned my argument to it, or if it assigned values to my structure.  In either case, it didn't matter.
 
You forget to check the return value.  You'd better do this:

        int ret = PKCS12_parse (pkcs, "project15", &pkey, &cert, NULL);

        if (!ret) {
                ERR_print_errors_fp(stderr);
        } else {
                /* the rest of your stuff */
        }
    Here is the output from the ERR_print_errors_fp call.
 
27084:error:2306B076::lib(35) :func(107) :reason(118):p12_mutl.c:80:
27084:error:2307E06D::lib(35) :func(126) :reason(109):p12_mutl.c:105:
27084:error:23076071::lib(35) :func(118) :reason(113):p12_kiss.c:99:
    Unfortunately, this doesn't help me out much.  Any ideas?

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

Reply via email to