problem with pkcs12_parse

Previous Topic Next Topic
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

problem with pkcs12_parse

Alicia Asín
Hi all,
I've installed openssl 0.9.8a version and I'm using new features from
pkcs12_create (cert maybe null). Everytime I call PKCS12_parse it
transforms pkey address into 0x0, so it's impossible to recover values
from pk12 object. I've searched some example codes and they seem the
same as mine, but...

For the moment, my code looks like:

        EVP_PKEY *pkey, pkey1;  
     pkey = EVP_PKEY_new();
     if (EVP_PKEY_assign_RSA(pkey, rsa) == 0) {  
           return NULL;
     if ((pk12 = PKCS12_create(pass,"clave",pkey,NULL,NULL,0,0,0,0,0))
== NULL) {
        return NULL;

        ... [other things]

     pkey1 = EVP_PKEY_new();
     if (PKCS12_parse(pk12,pass , &pkey1,NULL, NULL) != 1)  
           printf("%s\n", ERR_error_string(ERR_get_error(), NULL));
     if ((rsa = EVP_PKEY_get1_RSA(pkey1)) == NULL)
             printf("RSA = NULL: %s\n",
ERR_error_string(ERR_get_error(), NULL));
Any idea???

Alicia Asín

OpenSSL Project                       
User Support Mailing List                    [hidden email]
Automated List Manager                           [hidden email]