Subject: bug#33780: network-stream.el: network-stream-certificate always returns nil

From: Vinothan Shankar <[email-masked]>
Date: Mon, 17 Dec 2018 19:02:08 +0000

network-stream-certificate will *always* return nil, regardless of
whether there actually is a client-certificate value-pair specified,
because (plist-get :client-certificate parameters) is always nil.  This
is because plist-get takes the plist as the first argument, and the key
as the second; trying to find a list in a token is always going to be
nil.

This makes it impossible to use client certificates with Emacs's built-
in network-stream support, at least without overriding functions.

The error is in net/network-stream.el.  It has been there since the
function was first written in 2011, according to git blame.

I surmise that this, in combination with there being no support for
client certificates in network-stream-tls (though it's available in
network-stream-starttls) is part of the reason there are so many
conflicting guides on, for example, using client-certificate SASL with 
ERC.