On Sun, Feb 10, 2013 at 11:31 PM, Daniel Black
<daniel.s...@internode.on.net> wrote:
> On 11/02/13 14:12, Jeffrey Walton wrote:
>> Hi All,
>>
>> I'm trying to extract a public key (subjectPublicKeyInfo) form an X509
>> certificate.
>>
>
> from apps/x509.c in the openssl source:
>
> x=load_cert(bio_err,infile,informat,NULL,e,"Certificate");
> ...
>
>         EVP_PKEY *pkey;
>
>         pkey=X509_get_pubkey(x);
>         if (pkey == NULL)
>           {
>           BIO_printf(bio_err,"Error getting public key\n");
>           ERR_print_errors(bio_err);
>           goto end;
>           }
>         PEM_write_bio_PUBKEY(STDout, pkey);
Thanks Daniel. I found those after sending the email by grepping
through s_client.c.

Is there anything built into OpenSSL to write out a DER encoding of
subjectPublicKeyInfo?

Jeff
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    openssl-users@openssl.org
Automated List Manager                           majord...@openssl.org

Reply via email to