imin macho wrote:
hi

i'm really new to this openSSL thingy. is there any function we can use to read/extract CA's name from client certificate? thank you.
Macho,
You may use following code. Here cert is X509*.
Cheers,
Kaushalye

   BIO *out;
   unsigned char *issuer, *result;
   int n;
   out = BIO_new(BIO_s_mem());
   X509_NAME_print_ex(out, X509_get_issuer_name(cert), 0,0);
   n = BIO_get_mem_data(out, &issuer);
   result = (char *) malloc (n+1);
   result[n]='\0';
   memcpy(result,issuer,n);
   printf("Issuer : %s\n",result);
   BIO_free(out);
   out = NULL;


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

Reply via email to