On Sat, Jun 29, 2002 at 10:41:34PM +0200, davide wrote:
> On Fri, 28 Jun 2002 09:15:40 +0300
> Vadim Fedukovich <[EMAIL PROTECTED]> wrote:
> 
> > On Thu, Jun 27, 2002 at 11:14:09PM +0200, davide wrote:
> > > Hi,
> > > How could I get a fingerprint from a RSA key?
> > 
> > DER-encode RSA public key and apply SHA1 on it,
> > output that 20 bytes as "%02x".
> 
> OK for apply SHA1, but I don't know (and cannot find doc)
> how to DER-encode RSA public key, could anyone help me?

It was done as

X509_PUBKEY *pk;
ASN1_OCTET_STRING *oc;
oc = ASN1_item_pack(pk, ASN1_ITEM_rptr(X509_PUBKEY), NULL);

regards,
Vadim
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    [EMAIL PROTECTED]
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to