diff --git a/ssl/test/runner/handshake_server.go b/ssl/test/runner/handshake_server.go index fbc88e30..8690aeb0 100644 --- a/ssl/test/runner/handshake_server.go +++ b/ssl/test/runner/handshake_server.go @@ -328,13 +328,9 @@ Curves: hs.writeClientHash(hs.clientHello.marshal()) // Resolve PSK and compute the early secret. - var psk []byte - if hs.suite.flags&suitePSK != 0 { - return errors.New("tls: PSK ciphers not implemented for TLS 1.3") - } else { - psk = hs.finishedHash.zeroSecret() - hs.finishedHash.setResumptionContext(hs.finishedHash.zeroSecret()) - } + // TODO(davidben): Implement PSK in TLS 1.3. + psk := hs.finishedHash.zeroSecret() + hs.finishedHash.setResumptionContext(hs.finishedHash.zeroSecret()) earlySecret := hs.finishedHash.extractKey(hs.finishedHash.zeroSecret(), psk) @@ -392,6 +388,8 @@ Curves: c.in.updateKeys(deriveTrafficAEAD(c.vers, hs.suite, handshakeTrafficSecret, handshakePhase, clientWrite), c.vers) if hs.suite.flags&suitePSK != 0 { + return errors.New("tls: PSK ciphers not implemented for TLS 1.3") + } else { if hs.clientHello.ocspStapling { encryptedExtensions.extensions.ocspResponse = hs.cert.OCSPStaple }