We are developing an HTTPS client that talks to a sever (IIS) that requires
a client certificate.  For authorization purposes, we requested a certificate
from the server through Netscape.  Then we exported this certificate as a PKCS12
file.

    Here is an excerpt from the code and where it fails:
-----------------------------------------------------------------
 FILE* fpkcs = fopen ("./cert.p12", "r");
 PKCS12* pkcs = d2i_PKCS12_fp (fpkcs, NULL);

 X509 crt;
 EVP_PKEY pky;
 X509* cert = &crt;
 EVP_PKEY* pkey = &pky;

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

 if (cert == NULL) /* FAILS HERE */
  cout << "Certificate not created" << endl;
 if (pkey == NULL)
  cout << "PrivateKey not created" << endl;
-----------------------------------------------------------------

    If anybody could enlighten us on what may be happening, we would greatly
appreciate it.

dlgrasse

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

Reply via email to