Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
crypto/tls: do not require extended key usage extension #5987
Currently, Go's server TLS implementation requires clientAuth extendedKeyUsage on any client certificate when client verification is enabled, with no way to turn it off and still have client certificate verification. (handshake_server.go, processCertsFromClient) However, from RFC5280: "Certificate using applications MAY require that the extended key usage extension be present and that a particular purpose be indicated in order for the certificate to be acceptable to that application." This says to me that a specific application should be able to choose this behavior, not have it be forced on them by the TLS library. Specifically, OpenSSL does *not* require this. Can we make this optional, or perhaps only require the clientAuth extendedKeyUsage iff the extendedKeyUsage field is actually used and not the default empty? Or even better, support verify callbacks like OpenSSL or GnuTLS?