On Wed, 19 Feb 2025 15:48:10 GMT, Matthew Donovan <mdono...@openjdk.org> wrote:
> This PR updates the CertificateBuilder with a new method that creates a new > instance with common fields (subject name, public key, serial number, > validity, and key uses) filled-in. One test, IPIdentities.java, is updated to > show how the method can be used to create various certificates. I attached > screenshots that compare the old hard-coded certificates (left) with the new > generated certificates. > >  >  >  test/jdk/sun/net/www/protocol/https/HttpsURLConnection/IPIdentities.java line 35: > 33: * @run main/othervm IPIdentities > 34: * @author Xuelei Fan > 35: */ I think you might be missing ` * @modules java.base/sun.security.x509 java.base/sun.security.util` here test/lib/jdk/test/lib/security/CertificateBuilder.java line 113: > 111: SecureRandom random = new SecureRandom(); > 112: > 113: boolean [] keyUsage = new boolean[]{false, false, false, Wouldn't it be easier to just use `var keyUsage = new boolean[KeyUsage.values().length]`? ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/23700#discussion_r1963390414 PR Review Comment: https://git.openjdk.org/jdk/pull/23700#discussion_r1963390219