/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/**
* Algorithm constraints for disabled algorithms property
*
* See the "jdk.certpath.disabledAlgorithms" specification in java.security
* for the syntax of the disabled algorithm string.
*/
new TLSDisabledAlgConstraints();
new X509DisabledAlgConstraints();
private boolean enabledX509DisabledAlgConstraints = true;
}
boolean withDefaultCertPathConstraints) {
}
if (!withDefaultCertPathConstraints) {
enabledX509DisabledAlgConstraints = false;
}
}
boolean withDefaultCertPathConstraints) {
}
if (!withDefaultCertPathConstraints) {
enabledX509DisabledAlgConstraints = false;
}
}
boolean withDefaultCertPathConstraints) {
}
if (!withDefaultCertPathConstraints) {
enabledX509DisabledAlgConstraints = false;
}
}
boolean withDefaultCertPathConstraints) {
}
if (!withDefaultCertPathConstraints) {
enabledX509DisabledAlgConstraints = false;
}
}
boolean permitted = true;
if (peerAlgConstraints != null) {
}
}
if (permitted) {
}
if (permitted && enabledX509DisabledAlgConstraints) {
}
return permitted;
}
boolean permitted = true;
if (peerAlgConstraints != null) {
}
}
if (permitted) {
}
if (permitted && enabledX509DisabledAlgConstraints) {
}
return permitted;
}
boolean permitted = true;
if (peerAlgConstraints != null) {
}
}
if (permitted) {
}
if (permitted && enabledX509DisabledAlgConstraints) {
}
return permitted;
}
static private class SupportedSignatureAlgorithmConstraints
implements AlgorithmConstraints {
// supported signature algorithms
if (supportedAlgorithms != null) {
} else {
this.supportedAlgorithms = null;
}
}
throw new IllegalArgumentException(
"No algorithm name specified");
}
throw new IllegalArgumentException(
"No cryptographic primitive specified");
}
if (supportedAlgorithms == null ||
return false;
}
// trim the MGF part: <digest>with<encryption>and<mgf>
if (position > 0) {
}
return true;
}
}
return false;
}
return true;
}
throw new IllegalArgumentException(
"No algorithm name specified");
}
}
}
static private class BasicDisabledAlgConstraints
extends DisabledAlgorithmConstraints {
super(propertyName);
}
boolean forCertPathOnly) {
switch (keyExchange) {
case K_NULL:
if (!forCertPathOnly) {
}
break;
case K_RSA:
break;
case K_RSA_EXPORT:
break;
case K_DH_RSA:
break;
case K_DH_DSS:
break;
case K_DHE_DSS:
break;
case K_DHE_RSA:
break;
case K_DH_ANON:
if (!forCertPathOnly) {
}
break;
case K_ECDH_ECDSA:
break;
case K_ECDH_RSA:
break;
case K_ECDHE_ECDSA:
break;
case K_ECDHE_RSA:
break;
case K_ECDH_ANON:
if (!forCertPathOnly) {
}
break;
case K_KRB5:
if (!forCertPathOnly) {
}
break;
case K_KRB5_EXPORT:
if (!forCertPathOnly) {
}
break;
default:
// ignore
}
return components;
}
}
return components;
}
}
return components;
}
}
static private class TLSDisabledAlgConstraints
extends BasicDisabledAlgConstraints {
}
try {
} catch (IllegalArgumentException iae) {
// ignore: unknown or unsupported ciphersuite
}
if (cipherSuite != null) {
}
}
}
return components;
}
}
return super.decomposes(algorithm);
}
}
static private class X509DisabledAlgConstraints
extends BasicDisabledAlgConstraints {
}
try {
} catch (IllegalArgumentException iae) {
// ignore: unknown or unsupported ciphersuite
}
if (cipherSuite != null) {
}
// Certification path algorithm constraints do not apply
// to cipherSuite.cipher and cipherSuite.macAlg.
return components;
}
}
return super.decomposes(algorithm);
}
}
}