Kent Watsen <kent+pyt...@watsen.net> added the comment:

I don't understand the concern issues being raised for this patch, and also may 
have a use-case not mentioned yet.

For the concern issue, as I understand it, the ability to call getpeercert() or 
the proposed getpeercertchain() is only after the TLS session has been 
established.  As such, the SSL socket already established that there exists a 
valid chain of trust.  Thus these methods are primarily to provide visibility 
into what the peer passed *after* it had been authenticated, right?

That said, the reason I want to access the entire certificate chain passed by 
the client (i.e., client cert auth) is in order to validate that the client's 
cert (which may include some intermediates) authenticates to a specific trust 
anchor, rather than the bag of trust anchors loaded into the SSLContext (via 
load_verify_locations()) in order to authenticate a multiplicity of clients, 
each potentially leading to a different trust anchor.  

Not having getpeercertchain() means that all no client cert may contain a 
chain, i.e., the clients only ever transmit the end-entity cert itself.  This 
is unfortunate because the underlying SSL socket actually allows clients to 
send chains, it's just the lack being able to access the peercertchain in my 
code that seems to limit the solution.

----------
nosy: +kwatsen

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue18233>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to