diff --git a/ssl/test/runner/handshake_server.go b/ssl/test/runner/handshake_server.go index 9b4bff89..64edd016 100644 --- a/ssl/test/runner/handshake_server.go +++ b/ssl/test/runner/handshake_server.go @@ -342,19 +342,23 @@ func (hs *serverHandshakeState) readClientHello() error { } } - if config.Bugs.IgnorePeerSignatureAlgorithmPreferences { - hs.clientHello.signatureAlgorithms = config.signSignatureAlgorithms() - } - if config.Bugs.IgnorePeerCurvePreferences { - hs.clientHello.supportedCurves = config.curvePreferences() - } - if config.Bugs.IgnorePeerCipherPreferences { - hs.clientHello.cipherSuites = config.cipherSuites() - } + applyBugsToClientHello(hs.clientHello, config) return nil } +func applyBugsToClientHello(clientHello *clientHelloMsg, config *Config) { + if config.Bugs.IgnorePeerSignatureAlgorithmPreferences { + clientHello.signatureAlgorithms = config.signSignatureAlgorithms() + } + if config.Bugs.IgnorePeerCurvePreferences { + clientHello.supportedCurves = config.curvePreferences() + } + if config.Bugs.IgnorePeerCipherPreferences { + clientHello.cipherSuites = config.cipherSuites() + } +} + func (hs *serverHandshakeState) doTLS13Handshake() error { c := hs.c config := c.config @@ -587,6 +591,8 @@ ResendHelloRetryRequest: } hs.writeClientHash(newClientHello.marshal()) + applyBugsToClientHello(newClientHello, config) + // Check that the new ClientHello matches the old ClientHello, // except for relevant modifications. //