Hi,

I'm using windows  VC++ and I´m  having problems filling in an x509
structure from a DER encoded binary
certificate.  The execution of the program bellow stop when I call
d2i_X509_fp(fp,&x509Cert).

Please help.

Thanks,
   Geiza


 #include <stdio.h>
 #include <openssl/x509.h>

 void main(void)
 {
    X509 * x509Cert = NULL;
    FILE *fp;
    EVP_PKEY *      pkey;

    long version;
    char * s;

    if ((fp=fopen("C:\\SuperUsu.cer","rb")) != NULL)
    {

      d2i_X509_fp(fp, &x509Cert);

      if (x509Cert!=NULL)
         printf("\nReading success!\n");
      else
      {
        printf ("\nError reading certificate!");
        exit (1);
     }

 }


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

Reply via email to