diff options
author | David Benjamin <davidben@google.com> | 2016-07-14 00:26:02 +0300 |
---|---|---|
committer | David Benjamin <davidben@google.com> | 2016-07-14 01:17:44 +0300 |
commit | c87ebdec57cbd550c139827744995220d09aa41a (patch) | |
tree | c5fd16f49d08b28da3768e19caf5438f3a5bdddb | |
parent | c78aa4a351e4eeaefffd9feb7adb99dfef2a9400 (diff) |
Fix up TLS 1.3 PSK placeholder logic in the Go code.
We need EnableAllCiphers to make progress so, temporarily, defer the PSK
error. Also flip a true/false bug in the OCSP stapling logic.
Change-Id: Iad597c84393e1400c42b8b290eedc16f73f5ed30
Reviewed-on: https://boringssl-review.googlesource.com/8766
Commit-Queue: David Benjamin <davidben@google.com>
Reviewed-by: Steven Valdez <svaldez@google.com>
Reviewed-by: David Benjamin <davidben@google.com>
-rw-r--r-- | ssl/test/runner/handshake_server.go | 12 |
1 files changed, 5 insertions, 7 deletions
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 } |