The only problem was I didn't know it existed, haha. I'm still fairly new to OpenSSL so as robust as it is sometimes I end up doing things the long way.
Anyways I put it in and edited out some of the other functions, compiled and ran and it looks great. The output matches the Subject Key Identifier as hoped, thanks! -John Larson -----Original Message----- From: owner-openssl-us...@openssl.org [mailto:owner-openssl-us...@openssl.org] On Behalf Of Victor Duchovni Sent: Wednesday, March 11, 2009 12:21 PM To: openssl-users@openssl.org Subject: Re: Obtaining EC Public Key from X509 PEM endcoded cert On Wed, Mar 11, 2009 at 12:10:47PM -0700, Larson, John wrote: > As the subject says I'm grabbing a public key from a PEMK encoded X509 > cert and I compute the SHA-1 hash over this to create a signer id. This > is done by using PEM_read_X509 to read the PEM cert into an x509 struct, > using X509_get_pubkey to obtain the public key as an EVP_PKEY from the > x509 struct and finally using i2d_PUBKEY to take the EVP_PKEY and > convert it to DER format. What's wrong with: int X509_pubkey_digest(const X509 *data,const EVP_MD *type, unsigned char *md, unsigned int *len); -- Viktor. ______________________________________________________________________ OpenSSL Project http://www.openssl.org User Support Mailing List openssl-users@openssl.org Automated List Manager majord...@openssl.org ______________________________________________________________________ OpenSSL Project http://www.openssl.org User Support Mailing List openssl-users@openssl.org Automated List Manager majord...@openssl.org