emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Network security manager


From: Lars Magne Ingebrigtsen
Subject: Re: Network security manager
Date: Sun, 23 Nov 2014 21:41:17 +0100
User-agent: Gnus/5.130012 (Ma Gnus v0.12) Emacs/25.0.50 (gnu/linux)

Lars Magne Ingebrigtsen <address@hidden> writes:

> Anyway, to implement the algorithm as is, we'd have to replicate most of
> gnutls_x509_crt_get_key_id to get at the md5.  That's not a major issue,
> but...

Actually, looking at that code, it's longwinded, but seems to boils down
to just this:

  result = asn1_der_coding (crt->cert, "tbsCertificate.subjectPublicKeyInfo",
                            pubkey.data, &pubkey.size, NULL);
  result = gnutls_fingerprint (GNUTLS_DIG_SHA1, &pubkey,
                               output_data, output_data_size);

So re-implementing this to get both the MD5 and the SHA1 is actually
pretty easy.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no



reply via email to

[Prev in Thread] Current Thread [Next in Thread]