7122707: Security Providers need to have their version numbers updated for JDK8
Reviewed-by: xuelei
This commit is contained in:
parent
2f5f83e38c
commit
bae7582243
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2011, 2013, 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
|
||||
@ -43,7 +43,7 @@ public final class AppleProvider extends Provider {
|
||||
|
||||
public AppleProvider() {
|
||||
/* We are the Apple provider */
|
||||
super("Apple", 1.1, info);
|
||||
super("Apple", 1.8d, info);
|
||||
|
||||
AccessController.<Object>doPrivileged(new java.security.PrivilegedAction<Object>() {
|
||||
public Object run() {
|
||||
|
@ -104,7 +104,7 @@ public final class SunJCE extends Provider {
|
||||
|
||||
public SunJCE() {
|
||||
/* We are the "SunJCE" provider */
|
||||
super("SunJCE", 1.7d, info);
|
||||
super("SunJCE", 1.8d, info);
|
||||
|
||||
final String BLOCK_MODES = "ECB|CBC|PCBC|CTR|CTS|CFB|OFB" +
|
||||
"|CFB8|CFB16|CFB24|CFB32|CFB40|CFB48|CFB56|CFB64" +
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2003, 2013, 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
|
||||
@ -53,7 +53,7 @@ public final class Provider extends java.security.Provider {
|
||||
" server mechanisms for: DIGEST-MD5, GSSAPI, CRAM-MD5, NTLM)";
|
||||
|
||||
public Provider() {
|
||||
super("SunSASL", 1.7d, info);
|
||||
super("SunSASL", 1.8d, info);
|
||||
|
||||
AccessController.doPrivileged(new PrivilegedAction<Void>() {
|
||||
public Void run() {
|
||||
|
@ -28,7 +28,7 @@
|
||||
* ===========================================================================
|
||||
*/
|
||||
/*
|
||||
* Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2005, 2013 Oracle and/or its affiliates. All rights reserved.
|
||||
*/
|
||||
/*
|
||||
* $Id: XMLDSigRI.java 1400021 2012-10-19 10:16:04Z coheigea $
|
||||
@ -61,7 +61,7 @@ public final class XMLDSigRI extends Provider {
|
||||
|
||||
public XMLDSigRI() {
|
||||
/* We are the XMLDSig provider */
|
||||
super("XMLDSig", 1.8, INFO);
|
||||
super("XMLDSig", 1.8d, INFO);
|
||||
|
||||
final Map<Object, Object> map = new HashMap<Object, Object>();
|
||||
map.put("XMLSignatureFactory.DOM",
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2009, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2009, 2013, 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
|
||||
@ -67,7 +67,7 @@ public final class SunEC extends Provider {
|
||||
}
|
||||
|
||||
public SunEC() {
|
||||
super("SunEC", 1.7d, "Sun Elliptic Curve provider (EC, ECDSA, ECDH)");
|
||||
super("SunEC", 1.8d, "Sun Elliptic Curve provider (EC, ECDSA, ECDH)");
|
||||
|
||||
// if there is no security manager installed, put directly into
|
||||
// the provider. Otherwise, create a temporary map and use a
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2000, 2006, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2000, 2013, 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
|
||||
@ -62,7 +62,7 @@ public final class SunProvider extends Provider {
|
||||
|
||||
public SunProvider() {
|
||||
/* We are the Sun JGSS provider */
|
||||
super("SunJGSS", 1.7d, INFO);
|
||||
super("SunJGSS", 1.8d, INFO);
|
||||
|
||||
AccessController.doPrivileged(
|
||||
new java.security.PrivilegedAction<Void>() {
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2005, 2013, 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
|
||||
@ -120,7 +120,7 @@ public final class SunNativeProvider extends Provider {
|
||||
|
||||
public SunNativeProvider() {
|
||||
/* We are the Sun NativeGSS provider */
|
||||
super(NAME, 1.0, INFO);
|
||||
super(NAME, 1.8d, INFO);
|
||||
|
||||
if (MECH_MAP != null) {
|
||||
AccessController.doPrivileged(new PutAllAction(this, MECH_MAP));
|
||||
|
@ -94,7 +94,7 @@ public final class SunPKCS11 extends AuthProvider {
|
||||
}
|
||||
|
||||
public SunPKCS11() {
|
||||
super("SunPKCS11-Dummy", 1.7d, "SunPKCS11-Dummy");
|
||||
super("SunPKCS11-Dummy", 1.8d, "SunPKCS11-Dummy");
|
||||
throw new ProviderException
|
||||
("SunPKCS11 requires configuration file argument");
|
||||
}
|
||||
@ -127,7 +127,7 @@ public final class SunPKCS11 extends AuthProvider {
|
||||
public SunPKCS11(String configName, InputStream configStream) {
|
||||
super("SunPKCS11-" +
|
||||
Config.getConfig(configName, configStream).getName(),
|
||||
1.7d, Config.getConfig(configName, configStream).getDescription());
|
||||
1.8d, Config.getConfig(configName, configStream).getDescription());
|
||||
this.configName = configName;
|
||||
this.config = Config.removeConfig(configName);
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2005, 2013, 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
|
||||
@ -65,7 +65,7 @@ public final class MD4 extends DigestBase {
|
||||
private final static Provider md4Provider;
|
||||
|
||||
static {
|
||||
md4Provider = new Provider("MD4Provider", 1.0d, "MD4 MessageDigest") {
|
||||
md4Provider = new Provider("MD4Provider", 1.8d, "MD4 MessageDigest") {
|
||||
private static final long serialVersionUID = -8850464997518327965L;
|
||||
};
|
||||
AccessController.doPrivileged(new PrivilegedAction<Void>() {
|
||||
|
@ -47,7 +47,7 @@ public final class Sun extends Provider {
|
||||
|
||||
public Sun() {
|
||||
/* We are the SUN provider */
|
||||
super("SUN", 1.8, INFO);
|
||||
super("SUN", 1.8d, INFO);
|
||||
|
||||
// if there is no security manager installed, put directly into
|
||||
// the provider. Otherwise, create a temporary map and use a
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1996, 2011, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1996, 2013, 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
|
||||
@ -61,7 +61,7 @@ public final class VerificationProvider extends Provider {
|
||||
}
|
||||
|
||||
public VerificationProvider() {
|
||||
super("SunJarVerification", 1.7, "Jar Verification Provider");
|
||||
super("SunJarVerification", 1.8d, "Jar Verification Provider");
|
||||
// register all algorithms normally registered by the Sun and SunRsaSign
|
||||
// providers, but only if they are missing
|
||||
if (ACTIVE == false) {
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2003, 2011, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2003, 2013, 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
|
||||
@ -43,7 +43,7 @@ public final class SunRsaSign extends Provider {
|
||||
private static final long serialVersionUID = 866040293550393045L;
|
||||
|
||||
public SunRsaSign() {
|
||||
super("SunRsaSign", 1.7d, "Sun RSA signature provider");
|
||||
super("SunRsaSign", 1.8d, "Sun RSA signature provider");
|
||||
|
||||
// if there is no security manager installed, put directly into
|
||||
// the provider. Otherwise, create a temporary map and use a
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2005, 2013, 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
|
||||
@ -40,7 +40,7 @@ public final class SunPCSC extends Provider {
|
||||
private static final long serialVersionUID = 6168388284028876579L;
|
||||
|
||||
public SunPCSC() {
|
||||
super("SunPCSC", 1.7d, "Sun PC/SC provider");
|
||||
super("SunPCSC", 1.8d, "Sun PC/SC provider");
|
||||
AccessController.doPrivileged(new PrivilegedAction<Void>() {
|
||||
public Void run() {
|
||||
put("TerminalFactory.PC/SC", "sun.security.smartcardio.SunPCSC$Factory");
|
||||
|
@ -110,7 +110,7 @@ final class JsseJce {
|
||||
private static final long serialVersionUID = -3284138292032213752L;
|
||||
|
||||
SunCertificates(final Provider p) {
|
||||
super("SunCertificates", 1.0d, "SunJSSE internal");
|
||||
super("SunCertificates", 1.8d, "SunJSSE internal");
|
||||
AccessController.doPrivileged(new PrivilegedAction<Object>() {
|
||||
@Override
|
||||
public Object run() {
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1999, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1999, 2013, 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
|
||||
@ -131,7 +131,7 @@ public abstract class SunJSSE extends java.security.Provider {
|
||||
|
||||
private SunJSSE(java.security.Provider cryptoProvider,
|
||||
String providerName) {
|
||||
super("SunJSSE", 1.6d, fipsInfo + providerName + ")");
|
||||
super("SunJSSE", 1.8d, fipsInfo + providerName + ")");
|
||||
subclassCheck();
|
||||
if (cryptoProvider == null) {
|
||||
// Calling Security.getProvider() will cause other providers to be
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2005, 2013, 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
|
||||
@ -56,7 +56,7 @@ public final class SunMSCAPI extends Provider {
|
||||
}
|
||||
|
||||
public SunMSCAPI() {
|
||||
super("SunMSCAPI", 1.7d, INFO);
|
||||
super("SunMSCAPI", 1.8d, INFO);
|
||||
|
||||
// if there is no security manager installed, put directly into
|
||||
// the provider. Otherwise, create a temporary map and use a
|
||||
|
60
jdk/test/java/security/Provider/ProviderVersionCheck.java
Normal file
60
jdk/test/java/security/Provider/ProviderVersionCheck.java
Normal file
@ -0,0 +1,60 @@
|
||||
/*
|
||||
* Copyright (c) 2013, 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
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
import java.security.Provider;
|
||||
import java.security.Security;
|
||||
import java.lang.Exception;
|
||||
|
||||
/*
|
||||
* @test
|
||||
* @bug 7122707
|
||||
* @run main/othervm ProviderVersionCheck
|
||||
* @summary Verify all providers in the default Providers list have the proper
|
||||
* version for the release
|
||||
* @author Anthony Scarpino
|
||||
*/
|
||||
|
||||
public class ProviderVersionCheck {
|
||||
|
||||
public static void main(String arg[]) throws Exception{
|
||||
|
||||
boolean failure = false;
|
||||
|
||||
for (Provider p: Security.getProviders()) {
|
||||
System.out.print(p.getName() + " ");
|
||||
if (p.getVersion() != 1.8d) {
|
||||
System.out.println("failed. " + "Version received was " +
|
||||
p.getVersion());
|
||||
failure = true;
|
||||
} else {
|
||||
System.out.println("passed.");
|
||||
}
|
||||
}
|
||||
|
||||
if (failure) {
|
||||
throw new Exception("Provider(s) failed to have the expected " +
|
||||
"version value.");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user