mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 23:34:52 +02:00
8212885: TLS 1.3 resumed session does not retain peer certificate chain
Reviewed-by: xuelei, wetmore
This commit is contained in:
parent
65dc116bf6
commit
acd81b508e
5 changed files with 134 additions and 17 deletions
|
@ -415,6 +415,16 @@ final class PreSharedKeyExtension {
|
|||
result = false;
|
||||
}
|
||||
|
||||
// Make sure that the server handshake context's localSupportedSignAlgs
|
||||
// field is populated. This is particularly important when
|
||||
// client authentication was used in an initial session and it is
|
||||
// now being resumed.
|
||||
if (shc.localSupportedSignAlgs == null) {
|
||||
shc.localSupportedSignAlgs =
|
||||
SignatureScheme.getSupportedAlgorithms(
|
||||
shc.algorithmConstraints, shc.activeProtocols);
|
||||
}
|
||||
|
||||
// Validate the required client authentication.
|
||||
if (result &&
|
||||
(shc.sslConfig.clientAuthType == CLIENT_AUTH_REQUIRED)) {
|
||||
|
@ -763,7 +773,7 @@ final class PreSharedKeyExtension {
|
|||
SecretKey earlySecret = hkdf.extract(zeros, psk, "TlsEarlySecret");
|
||||
|
||||
byte[] label = ("tls13 res binder").getBytes();
|
||||
MessageDigest md = MessageDigest.getInstance(hashAlg.toString());;
|
||||
MessageDigest md = MessageDigest.getInstance(hashAlg.name);
|
||||
byte[] hkdfInfo = SSLSecretDerivation.createHkdfInfo(
|
||||
label, md.digest(new byte[0]), hashAlg.hashLength);
|
||||
return hkdf.expand(earlySecret,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue