mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 15:24:43 +02:00
8211866: TLS 1.3 CertificateRequest message sometimes offers disallowed signature algorithms
Reviewed-by: xuelei
This commit is contained in:
parent
b6e77e4285
commit
180a8773fb
2 changed files with 10 additions and 14 deletions
|
@ -243,18 +243,16 @@ final class CertSignAlgsExtension {
|
|||
}
|
||||
|
||||
// Produce the extension.
|
||||
if (shc.localSupportedSignAlgs == null) {
|
||||
shc.localSupportedSignAlgs =
|
||||
List<SignatureScheme> sigAlgs =
|
||||
SignatureScheme.getSupportedAlgorithms(
|
||||
shc.algorithmConstraints, shc.activeProtocols);
|
||||
}
|
||||
shc.algorithmConstraints,
|
||||
List.of(shc.negotiatedProtocol));
|
||||
|
||||
int vectorLen = SignatureScheme.sizeInRecord() *
|
||||
shc.localSupportedSignAlgs.size();
|
||||
int vectorLen = SignatureScheme.sizeInRecord() * sigAlgs.size();
|
||||
byte[] extData = new byte[vectorLen + 2];
|
||||
ByteBuffer m = ByteBuffer.wrap(extData);
|
||||
Record.putInt16(m, vectorLen);
|
||||
for (SignatureScheme ss : shc.localSupportedSignAlgs) {
|
||||
for (SignatureScheme ss : sigAlgs) {
|
||||
Record.putInt16(m, ss.id);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue