mirror of
https://github.com/refraction-networking/utls.git
synced 2025-04-03 20:17:36 +03:00
Merge branch 'golang-tls-upstream', remove Android
I tested all fingerprints and confirmed that Chrome and Firefox are working as intended. Android fingerprints were grossly unpopular, which could a result of incorrect merge, but either way we'll remove them for now.
This commit is contained in:
commit
9656990081
114 changed files with 4011 additions and 4132 deletions
30
u_public.go
30
u_public.go
|
@ -138,7 +138,7 @@ type ClientHelloMsg struct {
|
|||
SupportedPoints []uint8
|
||||
TicketSupported bool
|
||||
SessionTicket []uint8
|
||||
SignatureAndHashes []SignatureAndHash
|
||||
SupportedSignatureAlgorithms []SignatureScheme
|
||||
SecureRenegotiation []byte
|
||||
SecureRenegotiationSupported bool
|
||||
AlpnProtocols []string
|
||||
|
@ -164,7 +164,7 @@ func (chm *ClientHelloMsg) getPrivatePtr() *clientHelloMsg {
|
|||
supportedPoints: chm.SupportedPoints,
|
||||
ticketSupported: chm.TicketSupported,
|
||||
sessionTicket: chm.SessionTicket,
|
||||
signatureAndHashes: sigAndHashGetMakePrivate(chm.SignatureAndHashes),
|
||||
supportedSignatureAlgorithms: chm.SupportedSignatureAlgorithms,
|
||||
secureRenegotiation: chm.SecureRenegotiation,
|
||||
secureRenegotiationSupported: chm.SecureRenegotiationSupported,
|
||||
alpnProtocols: chm.AlpnProtocols,
|
||||
|
@ -192,7 +192,7 @@ func (chm *clientHelloMsg) getPublicPtr() *ClientHelloMsg {
|
|||
SupportedPoints: chm.supportedPoints,
|
||||
TicketSupported: chm.ticketSupported,
|
||||
SessionTicket: chm.sessionTicket,
|
||||
SignatureAndHashes: sigAndHashMakePublic(chm.signatureAndHashes),
|
||||
SupportedSignatureAlgorithms: chm.supportedSignatureAlgorithms,
|
||||
SecureRenegotiation: chm.secureRenegotiation,
|
||||
SecureRenegotiationSupported: chm.secureRenegotiationSupported,
|
||||
AlpnProtocols: chm.alpnProtocols,
|
||||
|
@ -200,30 +200,6 @@ func (chm *clientHelloMsg) getPublicPtr() *ClientHelloMsg {
|
|||
}
|
||||
}
|
||||
|
||||
// SignatureAndHash mirrors the TLS 1.2, SignatureAndHashAlgorithm struct. See
|
||||
// RFC 5246, section A.4.1.
|
||||
type SignatureAndHash struct {
|
||||
Hash, Signature uint8
|
||||
}
|
||||
|
||||
func sigAndHashGetMakePrivate(sahSlice []SignatureAndHash) []signatureAndHash {
|
||||
res := []signatureAndHash{}
|
||||
for _, sah := range sahSlice {
|
||||
res = append(res, signatureAndHash{hash: sah.Hash,
|
||||
signature: sah.Signature})
|
||||
}
|
||||
return res
|
||||
}
|
||||
|
||||
func sigAndHashMakePublic(sahSlice []signatureAndHash) []SignatureAndHash {
|
||||
res := []SignatureAndHash{}
|
||||
for _, sah := range sahSlice {
|
||||
res = append(res, SignatureAndHash{Hash: sah.hash,
|
||||
Signature: sah.signature})
|
||||
}
|
||||
return res
|
||||
}
|
||||
|
||||
// A CipherSuite is a specific combination of key agreement, cipher and MAC
|
||||
// function. All cipher suites currently assume RSA key agreement.
|
||||
type CipherSuite struct {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue