RFR: JDK-8311644 Server should not send bad_certificate alert when the client does not send any certificates
Anthony Scarpino
ascarpino at openjdk.org
Thu Feb 22 22:34:55 UTC 2024
On Tue, 13 Feb 2024 12:32:17 GMT, John Jiang <jjiang at openjdk.org> wrote:
>> Hi,
>>
>> I need a code review of what is really a text change. This changes the alert type returned during some TLS CertificateMessage failures to what is recommended in [RFC 8446](https://tools.ietf.org/html/rfc8446). An additional change was to add the alert description to the thrown exception. This makes it easier for the user to know the alert type and makes testing easier. Two of the three changes are tested as the final one is too hard to test. A few tests needed change as they did string comparing on exception messages.
>>
>> Tony
>
> test/jdk/javax/net/ssl/templates/TLSBase.java line 105:
>
>> 103: char[] pwd = passwd.toCharArray();
>> 104: KeyStore ks = KeyStore.getInstance(KeyStore.getDefaultType());
>> 105: ks.load(fis, pwd);
>
> Should this input stream be closed?
`fis` can be null, so I'd need a check. Since this is just a quick test, it is not using many resources and decided to let exiting of the test close it.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/17717#discussion_r1500020252
More information about the security-dev
mailing list