|
|
@@ -215,6 +215,25 @@ type ClientSessionCache interface { |
|
|
|
Put(sessionKey string, cs *ClientSessionState) |
|
|
|
} |
|
|
|
|
|
|
|
// SignatureScheme identifies a signature algorithm supported by TLS. See |
|
|
|
// https://tools.ietf.org/html/draft-ietf-tls-tls13-18#section-4.2.3. |
|
|
|
type SignatureScheme uint16 |
|
|
|
|
|
|
|
const ( |
|
|
|
PKCS1WithSHA1 SignatureScheme = 0x0201 |
|
|
|
PKCS1WithSHA256 SignatureScheme = 0x0401 |
|
|
|
PKCS1WithSHA384 SignatureScheme = 0x0501 |
|
|
|
PKCS1WithSHA512 SignatureScheme = 0x0601 |
|
|
|
|
|
|
|
PSSWithSHA256 SignatureScheme = 0x0804 |
|
|
|
PSSWithSHA384 SignatureScheme = 0x0805 |
|
|
|
PSSWithSHA512 SignatureScheme = 0x0806 |
|
|
|
|
|
|
|
ECDSAWithP256AndSHA256 SignatureScheme = 0x0403 |
|
|
|
ECDSAWithP384AndSHA384 SignatureScheme = 0x0503 |
|
|
|
ECDSAWithP521AndSHA512 SignatureScheme = 0x0603 |
|
|
|
) |
|
|
|
|
|
|
|
// ClientHelloInfo contains information from a ClientHello message in order to |
|
|
|
// guide certificate selection in the GetCertificate callback. |
|
|
|
type ClientHelloInfo struct { |
|
|
@@ -244,7 +263,7 @@ type ClientHelloInfo struct { |
|
|
|
// is willing to verify. SignatureSchemes is set only if the Signature |
|
|
|
// Algorithms Extension is being used (see |
|
|
|
// https://tools.ietf.org/html/rfc5246#section-7.4.1.4.1). |
|
|
|
SignatureSchemes []uint16 |
|
|
|
SignatureSchemes []SignatureScheme |
|
|
|
|
|
|
|
// SupportedProtos lists the application protocols supported by the client. |
|
|
|
// SupportedProtos is set only if the Application-Layer Protocol |
|
|
|