X509 *pCert = {Your Cert Object}
BUF_MEM *pBuffMem = NULL;
char * pCertString = NULL;
pBioCert = BIO_new(BIO_s_mem());
if ( pBioCert == NULL) {
dwError = MEMORY_ERR;
BAIL_ON_ERROR(dwError);
}
dwError = X509_print(pBioCert, pCert);
BIO_get_mem_ptr(pBioCert, &pBuffMem);
dwError = AllocateMemory(pBuffMem->length, (void*)& pCertString);
BAIL_ON_ERROR(dwError);
memcpy(pCertString, pBuffMem->data, pBuffMem->length - 1);
You have the cert in the OpenSSL printable format now in pCertString
--Anu
On Mon, Oct 21, 2013 at 6:49 AM, Salz, Rich <[email protected]> wrote:
> **Ø **What is openssl function equivalent to "openssl x509 -in test.crt
> -text -noout"****
>
> ** **
>
> ** **
>
> Look in apps/x509.c****
>
> ** **
>
> -- ****
>
> Principal Security Engineer****
>
> Akamai Technology****
>
> Cambridge, MA****
>
> ** **
>