From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Lars Magne Ingebrigtsen Newsgroups: gmane.emacs.devel Subject: Re: Network security manager Date: Sun, 23 Nov 2014 21:41:17 +0100 Message-ID: References: <87sihg7r73.fsf@alrua-karlstad.karlstad.toke.dk> <87a93oilxl.fsf@lifelogs.com> <87fvdg6xnn.fsf@alrua-karlstad.karlstad.toke.dk> <878uj86wr4.fsf@alrua-karlstad.karlstad.toke.dk> <87r3x05fze.fsf@alrua-karlstad.karlstad.toke.dk> <87d28k5f17.fsf@alrua-karlstad.karlstad.toke.dk> <87wq6r4tii.fsf@alrua-karlstad.karlstad.toke.dk> <87ioibmm46.fsf@galex-713.eu> <87d28jml4q.fsf@galex-713.eu> <878uj1vf72.fsf@galex-713.eu> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1416775325 13459 80.91.229.3 (23 Nov 2014 20:42:05 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 23 Nov 2014 20:42:05 +0000 (UTC) Cc: Toke =?iso-8859-1?Q?H=F8iland-J=F8rgensen?= , emacs-devel@gnu.org To: "Garreau\, Alexandre" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Nov 23 21:41:59 2014 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Xsdyn-0007Mm-9c for ged-emacs-devel@m.gmane.org; Sun, 23 Nov 2014 21:41:57 +0100 Original-Received: from localhost ([::1]:49976 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xsdym-0004zi-UT for ged-emacs-devel@m.gmane.org; Sun, 23 Nov 2014 15:41:56 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:49343) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xsdyd-0004xl-ID for emacs-devel@gnu.org; Sun, 23 Nov 2014 15:41:53 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XsdyT-0002do-Kk for emacs-devel@gnu.org; Sun, 23 Nov 2014 15:41:47 -0500 Original-Received: from hermes.netfonds.no ([80.91.224.195]:58722) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XsdyT-0002db-Di for emacs-devel@gnu.org; Sun, 23 Nov 2014 15:41:37 -0500 Original-Received: from cm-84.215.51.58.getinternet.no ([84.215.51.58] helo=stories.gnus.org) by hermes.netfonds.no with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.72) (envelope-from ) id 1Xsdy9-0000E5-JL; Sun, 23 Nov 2014 21:41:17 +0100 Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAGFBMVEVDVlJaiIwQDRKwwcJG cG1PfHxVg4dejZHinuCYAAACcklEQVQ4jV2UTXPaMBCGVWPKFbUd6eoK2lyZUaZcXWJ6po6lXqsZ vFyjkER/v+9KhjDdYQZ7H+2H9sOiEReZn63tilx1LV7ahb2CthVihtc2v33F0313tXm4njOP1m7d MOyzzQW4vasaPI7O+ZgGmPzU+k+3d5CDQfQfozvbJ7GwOXbWj7Rb2yKP9ncBUHtPNJpV1t/DZgLQ Ein5l51ZuznbjRVIuWNlkFLLnbljgN9MIDDRSUYJSaliwhYAzlHQEiSmJGNvZtDazQIZIQBOa+hT jBpk+8EeZgg8Qh+TxnEdZYrVHWfEwIegU9Qyxsh/obLL+WElEDpInbIfTkCpfraZw8ITMmW9ZpSk ouPKPlcLBooTUjk6PHmHxlS18CqEkCI7YneByO0eLJx5CtlVLIFkb+b9d2vn2QK3SEiUuTTGdN8+ W1uATvqUw6cvAKY+263g6ymcPaUsrwzQl63IBVGSJpAt0Jel8M4HgKALUBkYawRaymnJCaDwRQR3 NVBSUhbQ34CAUpAvzvTTBWBCSEetKKRSyRuQ2x1LkJh2E0BrQ1BBxRLiTS4voOPZkae3AtARTpbB 6y8KpEK6ANWb7TMD83HEXNEUQgU6mqPDGrRmTWNQqEi+I/pB1foF096aZkReJwTHkEjoh64WTScq 02C01Akp8zwSeedqwb6aJU+pf5N5TGBxEMY0NXbtgH0iinzLkC0G7hWW+FONS3pUHoVEUli2Al6q mlcNPjgj1gMgeCNMDV+uLA/x0jnoO1HKgqV1o88pQeCjgLrLNq6onRu6DPA14ZXfu3d1W08g2zDa T98SwaB8Z7pbwTdmsvgfCfEPlJMfc+H2xKYAAAAASUVORK5CYII= X-Now-Playing: Moby's _Play_: "Machete" X-Hashcash: 1:23:141123:galex-713@galex-713.eu::3cslNZnA41wus7T5:000000000000000000000000000000000000000EiUz X-Hashcash: 1:23:141123:emacs-devel@gnu.org::DsTGP4Mu44op3J7J:000000000000000000000000000000000000000000FiLj X-Hashcash: 1:23:141123:toke@toke.dk::50QGJwSWI4tTyC8y:00000mFl/ In-Reply-To: (Lars Magne Ingebrigtsen's message of "Sun, 23 Nov 2014 21:36:51 +0100") User-Agent: Gnus/5.130012 (Ma Gnus v0.12) Emacs/25.0.50 (gnu/linux) X-MailScanner-ID: 1Xsdy9-0000E5-JL MailScanner-NULL-Check: 1417380077.7951@vA84obtL6tqdVQkzCE2ZXw X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.224.195 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:178126 Archived-At: Lars Magne Ingebrigtsen 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