From ae2bb641735447496bed334c495e4868b981fe32 Mon Sep 17 00:00:00 2001 From: David Benjamin Date: Thu, 28 Jan 2021 12:09:59 -0500 Subject: [PATCH] Use ID instead of Id in Go. A linter was complaining about some instance, so just fix the lot of it. Change-Id: I7e23cbada6e42da887d740b84a05de9f104a86ab Reviewed-on: https://boringssl-review.googlesource.com/c/boringssl/+/45284 Reviewed-by: Adam Langley Commit-Queue: David Benjamin --- ssl/test/runner/common.go | 18 +++++----- ssl/test/runner/handshake_client.go | 48 +++++++++++++-------------- ssl/test/runner/handshake_messages.go | 38 ++++++++++----------- ssl/test/runner/handshake_server.go | 32 +++++++++--------- ssl/test/runner/runner.go | 46 ++++++++++++------------- 5 files changed, 91 insertions(+), 91 deletions(-) diff --git a/ssl/test/runner/common.go b/ssl/test/runner/common.go index ae974d094..733debd04 100644 --- a/ssl/test/runner/common.go +++ b/ssl/test/runner/common.go @@ -284,7 +284,7 @@ const ( // ClientSessionState contains the state needed by clients to resume TLS // sessions. type ClientSessionState struct { - sessionId []uint8 // Session ID supplied by the server. nil if the session has a ticket. + sessionID []uint8 // Session ID supplied by the server. nil if the session has a ticket. sessionTicket []uint8 // Encrypted ticket used for session resumption with server vers uint16 // SSL/TLS version negotiated for the session wireVersion uint16 // Wire SSL/TLS version negotiated for the session @@ -325,10 +325,10 @@ type ClientSessionCache interface { type ServerSessionCache interface { // Get searches for a sessionState associated with the given session // ID. On return, ok is true if one was found. - Get(sessionId string) (session *sessionState, ok bool) + Get(sessionID string) (session *sessionState, ok bool) // Put adds the sessionState to the cache with the given session ID. - Put(sessionId string, session *sessionState) + Put(sessionID string, session *sessionState) } // CertCompressionAlg is a certificate compression algorithm, specified as a @@ -1726,9 +1726,9 @@ type ProtocolBugs struct { // used on this connection, or zero if there are no special requirements. ExpectedCompressedCert uint16 - // SendCertCompressionAlgId, if not zero, sets the algorithm ID that will be + // SendCertCompressionAlgID, if not zero, sets the algorithm ID that will be // sent in the compressed certificate message. - SendCertCompressionAlgId uint16 + SendCertCompressionAlgID uint16 // SendCertUncompressedLength, if not zero, sets the uncompressed length that // will be sent in the compressed certificate message. @@ -2099,12 +2099,12 @@ type lruServerSessionCache struct { lruSessionCache } -func (c *lruServerSessionCache) Put(sessionId string, session *sessionState) { - c.lruSessionCache.Put(sessionId, session) +func (c *lruServerSessionCache) Put(sessionID string, session *sessionState) { + c.lruSessionCache.Put(sessionID, session) } -func (c *lruServerSessionCache) Get(sessionId string) (*sessionState, bool) { - cs, ok := c.lruSessionCache.Get(sessionId) +func (c *lruServerSessionCache) Get(sessionID string) (*sessionState, bool) { + cs, ok := c.lruSessionCache.Get(sessionID) if !ok { return nil, false } diff --git a/ssl/test/runner/handshake_client.go b/ssl/test/runner/handshake_client.go index 6bbdc61bd..586cbe5df 100644 --- a/ssl/test/runner/handshake_client.go +++ b/ssl/test/runner/handshake_client.go @@ -60,7 +60,7 @@ func fixClientHellos(hello *clientHelloMsg, in []byte) ([]byte, error) { } hello.random = newHello.random - hello.sessionId = newHello.sessionId + hello.sessionID = newHello.sessionID // Replace |ret|'s key shares with those of |hello|. For simplicity, we // require their lengths match, which is satisfied by matching the @@ -280,9 +280,9 @@ func (c *Conn) clientHandshake() error { hello.cipherSuites = make([]uint16, 0, len(possibleCipherSuites)) NextCipherSuite: - for _, suiteId := range possibleCipherSuites { + for _, suiteID := range possibleCipherSuites { for _, suite := range cipherSuites { - if suite.id != suiteId { + if suite.id != suiteID { continue } // Don't advertise TLS 1.2-only cipher suites unless @@ -290,7 +290,7 @@ NextCipherSuite: if maxVersion < VersionTLS12 && suite.flags&suiteTLS12 != 0 { continue } - hello.cipherSuites = append(hello.cipherSuites, suiteId) + hello.cipherSuites = append(hello.cipherSuites, suiteID) continue NextCipherSuite } } @@ -399,20 +399,20 @@ NextCipherSuite: // A random session ID is used to detect when the // server accepted the ticket and is resuming a session // (see RFC 5077). - sessionIdLen := 16 + sessionIDLen := 16 if c.config.Bugs.TicketSessionIDLength != 0 { - sessionIdLen = c.config.Bugs.TicketSessionIDLength + sessionIDLen = c.config.Bugs.TicketSessionIDLength } if c.config.Bugs.EmptyTicketSessionID { - sessionIdLen = 0 + sessionIDLen = 0 } - hello.sessionId = make([]byte, sessionIdLen) - if _, err := io.ReadFull(c.config.rand(), hello.sessionId); err != nil { + hello.sessionID = make([]byte, sessionIDLen) + if _, err := io.ReadFull(c.config.rand(), hello.sessionID); err != nil { c.sendAlert(alertInternalError) return errors.New("tls: short read from Rand: " + err.Error()) } } else { - hello.sessionId = session.sessionId + hello.sessionID = session.sessionID } } } @@ -421,15 +421,15 @@ NextCipherSuite: // ID. Although BoringSSL always enables compatibility mode, other // implementations make it conditional on the ClientHello. We test // BoringSSL's expected behavior with SendClientHelloSessionID. - if len(hello.sessionId) == 0 && maxVersion >= VersionTLS13 { - hello.sessionId = make([]byte, 32) - if _, err := io.ReadFull(c.config.rand(), hello.sessionId); err != nil { + if len(hello.sessionID) == 0 && maxVersion >= VersionTLS13 { + hello.sessionID = make([]byte, 32) + if _, err := io.ReadFull(c.config.rand(), hello.sessionID); err != nil { c.sendAlert(alertInternalError) return errors.New("tls: short read from Rand: " + err.Error()) } } if c.config.Bugs.MockQUICTransport != nil && !c.config.Bugs.CompatModeWithQUIC { - hello.sessionId = []byte{} + hello.sessionID = []byte{} } if c.config.Bugs.SendCipherSuites != nil { @@ -448,7 +448,7 @@ NextCipherSuite: hello.hasEarlyData = false } if c.config.Bugs.SendClientHelloSessionID != nil { - hello.sessionId = c.config.Bugs.SendClientHelloSessionID + hello.sessionID = c.config.Bugs.SendClientHelloSessionID } var helloBytes []byte @@ -459,7 +459,7 @@ NextCipherSuite: vers: hello.vers, cipherSuites: hello.cipherSuites, // No session resumption for V2ClientHello. - sessionId: nil, + sessionID: nil, challenge: hello.random[1:], } helloBytes = v2Hello.marshal() @@ -837,7 +837,7 @@ NextCipherSuite: if c.config.Bugs.RequireSessionTickets && len(hs.session.sessionTicket) == 0 { return errors.New("tls: new session used session IDs instead of tickets") } - if c.config.Bugs.RequireSessionIDs && len(hs.session.sessionId) == 0 { + if c.config.Bugs.RequireSessionIDs && len(hs.session.sessionID) == 0 { return errors.New("tls: new session used session tickets instead of IDs") } sessionCache.Put(cacheKey, hs.session) @@ -858,7 +858,7 @@ NextCipherSuite: func (hs *clientHandshakeState) doTLS13Handshake() error { c := hs.c - if !bytes.Equal(hs.hello.sessionId, hs.serverHello.sessionId) { + if !bytes.Equal(hs.hello.sessionID, hs.serverHello.sessionID) { return errors.New("tls: session IDs did not match.") } @@ -1805,14 +1805,14 @@ func (hs *clientHandshakeState) processServerExtensions(serverExtensions *server } func (hs *clientHandshakeState) serverResumedSession() bool { - // If the server responded with the same sessionId then it means the + // If the server responded with the same sessionID then it means the // sessionTicket is being used to resume a TLS session. // - // Note that, if hs.hello.sessionId is a non-nil empty array, this will + // Note that, if hs.hello.sessionID is a non-nil empty array, this will // accept an empty session ID from the server as resumption. See // EmptyTicketSessionID. - return hs.session != nil && hs.hello.sessionId != nil && - bytes.Equal(hs.serverHello.sessionId, hs.hello.sessionId) + return hs.session != nil && hs.hello.sessionID != nil && + bytes.Equal(hs.serverHello.sessionID, hs.hello.sessionID) } func (hs *clientHandshakeState) processServerHello() (bool, error) { @@ -1903,8 +1903,8 @@ func (hs *clientHandshakeState) readSessionTicket() error { if c.config.Bugs.ExpectNewTicket { return errors.New("tls: expected new ticket") } - if hs.session == nil && len(hs.serverHello.sessionId) > 0 { - session.sessionId = hs.serverHello.sessionId + if hs.session == nil && len(hs.serverHello.sessionID) > 0 { + session.sessionID = hs.serverHello.sessionID hs.session = session } return nil diff --git a/ssl/test/runner/handshake_messages.go b/ssl/test/runner/handshake_messages.go index 0e60797b2..443f5ab59 100644 --- a/ssl/test/runner/handshake_messages.go +++ b/ssl/test/runner/handshake_messages.go @@ -296,7 +296,7 @@ type clientHelloMsg struct { isDTLS bool vers uint16 random []byte - sessionId []byte + sessionID []byte cookie []byte cipherSuites []uint16 compressionMethods []uint8 @@ -366,8 +366,8 @@ func (m *clientHelloMsg) marshal() []byte { hello := handshakeMsg.addU24LengthPrefixed() hello.addU16(m.vers) hello.addBytes(m.random) - sessionId := hello.addU8LengthPrefixed() - sessionId.addBytes(m.sessionId) + sessionID := hello.addU8LengthPrefixed() + sessionID.addBytes(m.sessionID) if m.isDTLS { cookie := hello.addU8LengthPrefixed() cookie.addBytes(m.cookie) @@ -770,8 +770,8 @@ func (m *clientHelloMsg) unmarshal(data []byte) bool { reader := byteReader(data[4:]) if !reader.readU16(&m.vers) || !reader.readBytes(&m.random, 32) || - !reader.readU8LengthPrefixedBytes(&m.sessionId) || - len(m.sessionId) > 32 { + !reader.readU8LengthPrefixedBytes(&m.sessionID) || + len(m.sessionID) > 32 { return false } if m.isDTLS { @@ -1094,7 +1094,7 @@ type serverHelloMsg struct { supportedVersOverride uint16 omitSupportedVers bool random []byte - sessionId []byte + sessionID []byte cipherSuite uint16 hasKeyShare bool keyShare keyShareEntry @@ -1133,8 +1133,8 @@ func (m *serverHelloMsg) marshal() []byte { } hello.addBytes(m.random) - sessionId := hello.addU8LengthPrefixed() - sessionId.addBytes(m.sessionId) + sessionID := hello.addU8LengthPrefixed() + sessionID.addBytes(m.sessionID) hello.addU16(m.cipherSuite) hello.addU8(m.compressionMethod) @@ -1206,7 +1206,7 @@ func (m *serverHelloMsg) unmarshal(data []byte) bool { if !ok { return false } - if !reader.readU8LengthPrefixedBytes(&m.sessionId) || + if !reader.readU8LengthPrefixedBytes(&m.sessionID) || !reader.readU16(&m.cipherSuite) || !reader.readU8(&m.compressionMethod) { return false @@ -1714,7 +1714,7 @@ type helloRetryRequestMsg struct { raw []byte vers uint16 isServerHello bool - sessionId []byte + sessionID []byte cipherSuite uint16 compressionMethod uint8 hasSelectedGroup bool @@ -1734,8 +1734,8 @@ func (m *helloRetryRequestMsg) marshal() []byte { retryRequest := retryRequestMsg.addU24LengthPrefixed() retryRequest.addU16(VersionTLS12) retryRequest.addBytes(tls13HelloRetryRequest) - sessionId := retryRequest.addU8LengthPrefixed() - sessionId.addBytes(m.sessionId) + sessionID := retryRequest.addU8LengthPrefixed() + sessionID.addBytes(m.sessionID) retryRequest.addU16(m.cipherSuite) retryRequest.addU8(m.compressionMethod) @@ -1781,7 +1781,7 @@ func (m *helloRetryRequestMsg) unmarshal(data []byte) bool { var random []byte var compressionMethod byte if !reader.readBytes(&random, 32) || - !reader.readU8LengthPrefixedBytes(&m.sessionId) || + !reader.readU8LengthPrefixedBytes(&m.sessionID) || !reader.readU16(&m.cipherSuite) || !reader.readU8(&compressionMethod) || compressionMethod != 0 { @@ -2583,7 +2583,7 @@ type v2ClientHelloMsg struct { raw []byte vers uint16 cipherSuites []uint16 - sessionId []byte + sessionID []byte challenge []byte } @@ -2592,7 +2592,7 @@ func (m *v2ClientHelloMsg) marshal() []byte { return m.raw } - length := 1 + 2 + 2 + 2 + 2 + len(m.cipherSuites)*3 + len(m.sessionId) + len(m.challenge) + length := 1 + 2 + 2 + 2 + 2 + len(m.cipherSuites)*3 + len(m.sessionID) + len(m.challenge) x := make([]byte, length) x[0] = 1 @@ -2600,8 +2600,8 @@ func (m *v2ClientHelloMsg) marshal() []byte { x[2] = uint8(m.vers) x[3] = uint8((len(m.cipherSuites) * 3) >> 8) x[4] = uint8(len(m.cipherSuites) * 3) - x[5] = uint8(len(m.sessionId) >> 8) - x[6] = uint8(len(m.sessionId)) + x[5] = uint8(len(m.sessionID) >> 8) + x[6] = uint8(len(m.sessionID)) x[7] = uint8(len(m.challenge) >> 8) x[8] = uint8(len(m.challenge)) y := x[9:] @@ -2611,8 +2611,8 @@ func (m *v2ClientHelloMsg) marshal() []byte { y[i*3+2] = uint8(spec) } y = y[len(m.cipherSuites)*3:] - copy(y, m.sessionId) - y = y[len(m.sessionId):] + copy(y, m.sessionID) + y = y[len(m.sessionID):] copy(y, m.challenge) m.raw = x diff --git a/ssl/test/runner/handshake_server.go b/ssl/test/runner/handshake_server.go index e75a984da..85561fca7 100644 --- a/ssl/test/runner/handshake_server.go +++ b/ssl/test/runner/handshake_server.go @@ -289,11 +289,11 @@ func (hs *serverHandshakeState) readClientHello() error { } } - if config.Bugs.MockQUICTransport != nil && len(hs.clientHello.sessionId) > 0 { + if config.Bugs.MockQUICTransport != nil && len(hs.clientHello.sessionID) > 0 { return fmt.Errorf("tls: QUIC client did not disable compatibility mode") } if config.Bugs.ExpectNoTLS12Session { - if len(hs.clientHello.sessionId) > 0 && c.vers >= VersionTLS13 { + if len(hs.clientHello.sessionID) > 0 && c.vers >= VersionTLS13 { return fmt.Errorf("tls: client offered an unexpected session ID") } if len(hs.clientHello.sessionTicket) > 0 { @@ -376,7 +376,7 @@ func (hs *serverHandshakeState) doTLS13Handshake() error { hs.hello = &serverHelloMsg{ isDTLS: c.isDTLS, vers: c.wireVersion, - sessionId: hs.clientHello.sessionId, + sessionID: hs.clientHello.sessionID, compressionMethod: config.Bugs.SendCompressionMethod, versOverride: config.Bugs.SendServerHelloVersion, supportedVersOverride: config.Bugs.SendServerSupportedVersionExtension, @@ -553,7 +553,7 @@ ResendHelloRetryRequest: } helloRetryRequest := &helloRetryRequestMsg{ vers: c.wireVersion, - sessionId: hs.clientHello.sessionId, + sessionID: hs.clientHello.sessionID, cipherSuite: cipherSuite, compressionMethod: config.Bugs.SendCompressionMethod, duplicateExtensions: config.Bugs.DuplicateHelloRetryRequestExtensions, @@ -932,7 +932,7 @@ ResendHelloRetryRequest: return fmt.Errorf("expected to send compressed cert with alg %d, but picked %d", expected, id) } - if override := config.Bugs.SendCertCompressionAlgId; override != 0 { + if override := config.Bugs.SendCertCompressionAlgID; override != 0 { id = override } @@ -1250,7 +1250,7 @@ func (hs *serverHandshakeState) processClientHello() (isResume bool, err error) copy(hs.hello.random[len(hs.hello.random)-8:], downgradeJDK11) } - if len(hs.clientHello.sessionId) == 0 && c.config.Bugs.ExpectClientHelloSessionID { + if len(hs.clientHello.sessionID) == 0 && c.config.Bugs.ExpectClientHelloSessionID { return false, errors.New("tls: expected non-empty session ID from client") } @@ -1305,11 +1305,11 @@ Curves: // For test purposes, check that the peer never offers a session when // renegotiating. - if c.cipherSuite != nil && len(hs.clientHello.sessionId) > 0 && c.config.Bugs.FailIfResumeOnRenego { + if c.cipherSuite != nil && len(hs.clientHello.sessionID) > 0 && c.config.Bugs.FailIfResumeOnRenego { return false, errors.New("tls: offered resumption on renegotiation") } - if c.config.Bugs.FailIfSessionOffered && (len(hs.clientHello.sessionTicket) > 0 || len(hs.clientHello.sessionId) > 0) { + if c.config.Bugs.FailIfSessionOffered && (len(hs.clientHello.sessionTicket) > 0 || len(hs.clientHello.sessionID) > 0) { return false, errors.New("tls: client offered a session ticket or ID") } @@ -1556,8 +1556,8 @@ func (hs *serverHandshakeState) checkForResumption() bool { } var ok bool - sessionId := string(hs.clientHello.sessionId) - if hs.sessionState, ok = c.config.ServerSessionCache.Get(sessionId); !ok { + sessionID := string(hs.clientHello.sessionID) + if hs.sessionState, ok = c.config.ServerSessionCache.Get(sessionID); !ok { return false } } @@ -1613,7 +1613,7 @@ func (hs *serverHandshakeState) doResumeHandshake() error { } // We echo the client's session ID in the ServerHello to let it know // that we're doing a resumption. - hs.hello.sessionId = hs.clientHello.sessionId + hs.hello.sessionID = hs.clientHello.sessionID hs.hello.extensions.ticketSupported = c.config.Bugs.RenewTicketOnResume if c.config.Bugs.SendSCTListOnResume != nil { @@ -1671,14 +1671,14 @@ func (hs *serverHandshakeState) doFullHandshake() error { // Generate a session ID if we're to save the session. if !hs.hello.extensions.ticketSupported && config.ServerSessionCache != nil { - hs.hello.sessionId = make([]byte, 32) - if _, err := io.ReadFull(config.rand(), hs.hello.sessionId); err != nil { + hs.hello.sessionID = make([]byte, 32) + if _, err := io.ReadFull(config.rand(), hs.hello.sessionID); err != nil { c.sendAlert(alertInternalError) return errors.New("tls: short read from Rand: " + err.Error()) } } if config.Bugs.EchoSessionIDInFullHandshake { - hs.hello.sessionId = hs.clientHello.sessionId + hs.hello.sessionID = hs.clientHello.sessionID } hs.finishedHash = newFinishedHash(c.wireVersion, c.isDTLS, hs.suite) @@ -2013,8 +2013,8 @@ func (hs *serverHandshakeState) sendSessionTicket() error { } if !hs.hello.extensions.ticketSupported || hs.c.config.Bugs.SkipNewSessionTicket { - if c.config.ServerSessionCache != nil && len(hs.hello.sessionId) != 0 { - c.config.ServerSessionCache.Put(string(hs.hello.sessionId), &state) + if c.config.ServerSessionCache != nil && len(hs.hello.sessionID) != 0 { + c.config.ServerSessionCache.Put(string(hs.hello.sessionID), &state) } return nil } diff --git a/ssl/test/runner/runner.go b/ssl/test/runner/runner.go index 04d4d3e48..e3931d798 100644 --- a/ssl/test/runner/runner.go +++ b/ssl/test/runner/runner.go @@ -15940,8 +15940,8 @@ func addCertCompressionTests() { } const ( - shrinkingAlgId = 0xff01 - expandingAlgId = 0xff02 + shrinkingAlgID = 0xff01 + expandingAlgID = 0xff02 ) for _, ver := range tlsVersions { @@ -15990,7 +15990,7 @@ func addCertCompressionTests() { config: Config{ MinVersion: ver.version, MaxVersion: ver.version, - CertCompressionAlgs: map[uint16]CertCompressionAlg{expandingAlgId: expanding}, + CertCompressionAlgs: map[uint16]CertCompressionAlg{expandingAlgID: expanding}, }, }) @@ -16004,9 +16004,9 @@ func addCertCompressionTests() { config: Config{ MinVersion: ver.version, MaxVersion: ver.version, - CertCompressionAlgs: map[uint16]CertCompressionAlg{expandingAlgId: expanding}, + CertCompressionAlgs: map[uint16]CertCompressionAlg{expandingAlgID: expanding}, Bugs: ProtocolBugs{ - ExpectedCompressedCert: expandingAlgId, + ExpectedCompressedCert: expandingAlgID, }, }, }) @@ -16018,15 +16018,15 @@ func addCertCompressionTests() { config: Config{ MinVersion: ver.version, MaxVersion: ver.version, - CertCompressionAlgs: map[uint16]CertCompressionAlg{shrinkingAlgId: shrinking}, + CertCompressionAlgs: map[uint16]CertCompressionAlg{shrinkingAlgID: shrinking}, Bugs: ProtocolBugs{ - ExpectedCompressedCert: shrinkingAlgId, + ExpectedCompressedCert: shrinkingAlgID, }, }, }) // With both algorithms configured, the server should pick its most - // preferable. (Which is expandingAlgId.) + // preferable. (Which is expandingAlgID.) testCases = append(testCases, testCase{ testType: serverTest, name: "CertCompressionPriority-" + ver.name, @@ -16035,11 +16035,11 @@ func addCertCompressionTests() { MinVersion: ver.version, MaxVersion: ver.version, CertCompressionAlgs: map[uint16]CertCompressionAlg{ - shrinkingAlgId: shrinking, - expandingAlgId: expanding, + shrinkingAlgID: shrinking, + expandingAlgID: expanding, }, Bugs: ProtocolBugs{ - ExpectedCompressedCert: expandingAlgId, + ExpectedCompressedCert: expandingAlgID, }, }, }) @@ -16052,10 +16052,10 @@ func addCertCompressionTests() { MinVersion: ver.version, MaxVersion: ver.version, CertCompressionAlgs: map[uint16]CertCompressionAlg{ - expandingAlgId: expanding, + expandingAlgID: expanding, }, Bugs: ProtocolBugs{ - ExpectedCompressedCert: expandingAlgId, + ExpectedCompressedCert: expandingAlgID, }, }, }) @@ -16068,27 +16068,27 @@ func addCertCompressionTests() { MinVersion: ver.version, MaxVersion: ver.version, CertCompressionAlgs: map[uint16]CertCompressionAlg{ - shrinkingAlgId: shrinking, + shrinkingAlgID: shrinking, }, Bugs: ProtocolBugs{ - ExpectedCompressedCert: shrinkingAlgId, + ExpectedCompressedCert: shrinkingAlgID, }, }, }) testCases = append(testCases, testCase{ testType: clientTest, - name: "CertCompressionBadAlgIdClient-" + ver.name, + name: "CertCompressionBadAlgIDClient-" + ver.name, flags: []string{"-install-cert-compression-algs"}, config: Config{ MinVersion: ver.version, MaxVersion: ver.version, CertCompressionAlgs: map[uint16]CertCompressionAlg{ - shrinkingAlgId: shrinking, + shrinkingAlgID: shrinking, }, Bugs: ProtocolBugs{ - ExpectedCompressedCert: shrinkingAlgId, - SendCertCompressionAlgId: 1234, + ExpectedCompressedCert: shrinkingAlgID, + SendCertCompressionAlgID: 1234, }, }, shouldFail: true, @@ -16103,10 +16103,10 @@ func addCertCompressionTests() { MinVersion: ver.version, MaxVersion: ver.version, CertCompressionAlgs: map[uint16]CertCompressionAlg{ - shrinkingAlgId: shrinking, + shrinkingAlgID: shrinking, }, Bugs: ProtocolBugs{ - ExpectedCompressedCert: shrinkingAlgId, + ExpectedCompressedCert: shrinkingAlgID, SendCertUncompressedLength: 12, }, }, @@ -16122,10 +16122,10 @@ func addCertCompressionTests() { MinVersion: ver.version, MaxVersion: ver.version, CertCompressionAlgs: map[uint16]CertCompressionAlg{ - shrinkingAlgId: shrinking, + shrinkingAlgID: shrinking, }, Bugs: ProtocolBugs{ - ExpectedCompressedCert: shrinkingAlgId, + ExpectedCompressedCert: shrinkingAlgID, SendCertUncompressedLength: 1 << 20, }, },