8309966: Enhanced TLS connections

Reviewed-by: mschoene, hchao, rhalade, jnimeh
This commit is contained in:
Sean Mullan 2023-08-08 19:06:37 +00:00 committed by Henry Jen
parent adca97b659
commit 7c80cb26df
6 changed files with 96 additions and 169 deletions

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 2002, 2020, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2002, 2023, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -25,12 +25,10 @@
package java.security.cert;
import java.util.*;
import java.util.Date;
import sun.security.provider.certpath.CertPathHelper;
import sun.security.x509.GeneralNameInterface;
/**
* Helper class that allows the Sun CertPath provider to access
* implementation dependent APIs in CertPath framework.
@ -55,11 +53,6 @@ class CertPathHelperImpl extends CertPathHelper {
}
}
protected void implSetPathToNames(X509CertSelector sel,
Set<GeneralNameInterface> names) {
sel.setPathToNamesInternal(names);
}
protected void implSetDateAndTime(X509CRLSelector sel, Date date, long skew) {
sel.setDateAndTime(date, skew);
}

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 2000, 2022, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2000, 2023, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -87,10 +87,6 @@ public class X509CertSelector implements CertSelector {
private static final ObjectIdentifier ANY_EXTENDED_KEY_USAGE =
ObjectIdentifier.of(KnownOIDs.anyExtendedKeyUsage);
static {
CertPathHelperImpl.initialize();
}
private BigInteger serialNumber;
private X500Principal issuer;
private X500Principal subject;
@ -1127,14 +1123,6 @@ public class X509CertSelector implements CertSelector {
}
}
// called from CertPathHelper
void setPathToNamesInternal(Set<GeneralNameInterface> names) {
// set names to non-null dummy value
// this breaks getPathToNames()
pathToNames = Collections.<List<?>>emptySet();
pathToGeneralNames = names;
}
/**
* Adds a name to the pathToNames criterion. The {@code X509Certificate}
* must not include name constraints that would prohibit building a