8130696: Security Providers need to have their version numbers updated for JDK 9
Reviewed-by: ascarpino, mullan, valeriep, weijun, wetmore
--- a/jdk/src/java.base/share/classes/com/sun/crypto/provider/SunJCE.java Mon Jul 13 13:40:02 2015 -0700
+++ b/jdk/src/java.base/share/classes/com/sun/crypto/provider/SunJCE.java Mon Jul 20 09:40:49 2015 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2015, 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
@@ -104,7 +104,7 @@
public SunJCE() {
/* We are the "SunJCE" provider */
- super("SunJCE", 1.9d, info);
+ super("SunJCE", 9.0d, info);
final String BLOCK_MODES = "ECB|CBC|PCBC|CTR|CTS|CFB|OFB" +
"|CFB8|CFB16|CFB24|CFB32|CFB40|CFB48|CFB56|CFB64" +
--- a/jdk/src/java.base/share/classes/sun/security/provider/MD4.java Mon Jul 13 13:40:02 2015 -0700
+++ b/jdk/src/java.base/share/classes/sun/security/provider/MD4.java Mon Jul 20 09:40:49 2015 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2015, 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 @@
private final static Provider md4Provider;
static {
- md4Provider = new Provider("MD4Provider", 1.9d, "MD4 MessageDigest") {
+ md4Provider = new Provider("MD4Provider", 9.0d, "MD4 MessageDigest") {
private static final long serialVersionUID = -8850464997518327965L;
};
AccessController.doPrivileged(new PrivilegedAction<Void>() {
--- a/jdk/src/java.base/share/classes/sun/security/provider/Sun.java Mon Jul 13 13:40:02 2015 -0700
+++ b/jdk/src/java.base/share/classes/sun/security/provider/Sun.java Mon Jul 20 09:40:49 2015 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1996, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 2015, 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
@@ -47,7 +47,7 @@
public Sun() {
/* We are the SUN provider */
- super("SUN", 1.9d, INFO);
+ super("SUN", 9.0d, INFO);
// if there is no security manager installed, put directly into
// the provider. Otherwise, create a temporary map and use a
--- a/jdk/src/java.base/share/classes/sun/security/provider/VerificationProvider.java Mon Jul 13 13:40:02 2015 -0700
+++ b/jdk/src/java.base/share/classes/sun/security/provider/VerificationProvider.java Mon Jul 20 09:40:49 2015 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1996, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 2015, 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 VerificationProvider() {
- super("SunJarVerification", 1.9d, "Jar Verification Provider");
+ super("SunJarVerification", 9.0d, "Jar Verification Provider");
// register all algorithms normally registered by the Sun and SunRsaSign
// providers, but only if they are missing
if (ACTIVE == false) {
--- a/jdk/src/java.base/share/classes/sun/security/rsa/SunRsaSign.java Mon Jul 13 13:40:02 2015 -0700
+++ b/jdk/src/java.base/share/classes/sun/security/rsa/SunRsaSign.java Mon Jul 20 09:40:49 2015 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2015, 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 @@
private static final long serialVersionUID = 866040293550393045L;
public SunRsaSign() {
- super("SunRsaSign", 1.9d, "Sun RSA signature provider");
+ super("SunRsaSign", 9.0d, "Sun RSA signature provider");
// if there is no security manager installed, put directly into
// the provider. Otherwise, create a temporary map and use a
--- a/jdk/src/java.base/share/classes/sun/security/ssl/JsseJce.java Mon Jul 13 13:40:02 2015 -0700
+++ b/jdk/src/java.base/share/classes/sun/security/ssl/JsseJce.java Mon Jul 20 09:40:49 2015 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2001, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2015, 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
@@ -95,7 +95,7 @@
private static final long serialVersionUID = -3284138292032213752L;
SunCertificates(final Provider p) {
- super("SunCertificates", 1.9d, "SunJSSE internal");
+ super("SunCertificates", 9.0d, "SunJSSE internal");
AccessController.doPrivileged(new PrivilegedAction<Object>() {
@Override
public Object run() {
--- a/jdk/src/java.base/share/classes/sun/security/ssl/SunJSSE.java Mon Jul 13 13:40:02 2015 -0700
+++ b/jdk/src/java.base/share/classes/sun/security/ssl/SunJSSE.java Mon Jul 20 09:40:49 2015 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1999, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2015, 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
@@ -104,7 +104,7 @@
// standard constructor
protected SunJSSE() {
- super("SunJSSE", 1.9d, info);
+ super("SunJSSE", 9.0d, info);
subclassCheck();
if (Boolean.TRUE.equals(fips)) {
throw new ProviderException
@@ -132,7 +132,7 @@
private SunJSSE(java.security.Provider cryptoProvider,
String providerName) {
- super("SunJSSE", 1.9d, fipsInfo + providerName + ")");
+ super("SunJSSE", 9.0d, fipsInfo + providerName + ")");
subclassCheck();
if (cryptoProvider == null) {
// Calling Security.getProvider() will cause other providers to be
--- a/jdk/src/java.naming/share/classes/sun/security/provider/certpath/ldap/JdkLDAP.java Mon Jul 13 13:40:02 2015 -0700
+++ b/jdk/src/java.naming/share/classes/sun/security/provider/certpath/ldap/JdkLDAP.java Mon Jul 20 09:40:49 2015 -0700
@@ -69,7 +69,7 @@
}
public JdkLDAP() {
- super("JdkLDAP", 1.9d, "JdkLDAP Provider (implements LDAP CertStore)");
+ super("JdkLDAP", 9.0d, "JdkLDAP Provider (implements LDAP CertStore)");
final Provider p = this;
AccessController.doPrivileged(new PrivilegedAction<Void>() {
--- a/jdk/src/java.security.jgss/share/classes/sun/security/jgss/SunProvider.java Mon Jul 13 13:40:02 2015 -0700
+++ b/jdk/src/java.security.jgss/share/classes/sun/security/jgss/SunProvider.java Mon Jul 20 09:40:49 2015 -0700
@@ -101,7 +101,7 @@
public SunProvider() {
/* We are the Sun JGSS provider */
- super("SunJGSS", 1.9d, INFO);
+ super("SunJGSS", 9.0d, INFO);
final Provider p = this;
AccessController.doPrivileged(new PrivilegedAction<Void>() {
--- a/jdk/src/java.security.jgss/share/classes/sun/security/jgss/wrapper/SunNativeProvider.java Mon Jul 13 13:40:02 2015 -0700
+++ b/jdk/src/java.security.jgss/share/classes/sun/security/jgss/wrapper/SunNativeProvider.java Mon Jul 20 09:40:49 2015 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2015, 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 SunNativeProvider() {
/* We are the Sun NativeGSS provider */
- super(NAME, 1.9d, INFO);
+ super(NAME, 9.0d, INFO);
if (MECH_MAP != null) {
AccessController.doPrivileged(new PutAllAction(this, MECH_MAP));
--- a/jdk/src/java.security.sasl/share/classes/com/sun/security/sasl/Provider.java Mon Jul 13 13:40:02 2015 -0700
+++ b/jdk/src/java.security.sasl/share/classes/com/sun/security/sasl/Provider.java Mon Jul 20 09:40:49 2015 -0700
@@ -98,7 +98,7 @@
}
public Provider() {
- super("SunSASL", 1.9d, info);
+ super("SunSASL", 9.0d, info);
final Provider p = this;
AccessController.doPrivileged(new PrivilegedAction<Void>() {
--- a/jdk/src/java.smartcardio/share/classes/sun/security/smartcardio/SunPCSC.java Mon Jul 13 13:40:02 2015 -0700
+++ b/jdk/src/java.smartcardio/share/classes/sun/security/smartcardio/SunPCSC.java Mon Jul 20 09:40:49 2015 -0700
@@ -65,7 +65,7 @@
}
public SunPCSC() {
- super("SunPCSC", 1.9d, "Sun PC/SC provider");
+ super("SunPCSC", 9.0d, "Sun PC/SC provider");
final Provider p = this;
AccessController.doPrivileged(new PrivilegedAction<Void>() {
--- a/jdk/src/java.xml.crypto/share/classes/org/jcp/xml/dsig/internal/dom/XMLDSigRI.java Mon Jul 13 13:40:02 2015 -0700
+++ b/jdk/src/java.xml.crypto/share/classes/org/jcp/xml/dsig/internal/dom/XMLDSigRI.java Mon Jul 20 09:40:49 2015 -0700
@@ -28,7 +28,7 @@
* ===========================================================================
*/
/*
- * Copyright (c) 2005, 2015 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved.
*/
/*
* $Id: XMLDSigRI.java 1400021 2012-10-19 10:16:04Z coheigea $
@@ -129,7 +129,7 @@
public XMLDSigRI() {
/* We are the XMLDSig provider */
- super("XMLDSig", 1.9d, INFO);
+ super("XMLDSig", 9.0d, INFO);
final Provider p = this;
AccessController.doPrivileged(new PrivilegedAction<Void>() {
--- a/jdk/src/jdk.crypto.ec/share/classes/sun/security/ec/SunEC.java Mon Jul 13 13:40:02 2015 -0700
+++ b/jdk/src/jdk.crypto.ec/share/classes/sun/security/ec/SunEC.java Mon Jul 20 09:40:49 2015 -0700
@@ -142,7 +142,7 @@
}
public SunEC() {
- super("SunEC", 1.9d, "Sun Elliptic Curve provider (EC, ECDSA, ECDH)");
+ super("SunEC", 9.0d, "Sun Elliptic Curve provider (EC, ECDSA, ECDH)");
AccessController.doPrivileged(new PrivilegedAction<Void>() {
public Void run() {
putEntries(useFullImplementation);
--- a/jdk/src/jdk.crypto.mscapi/windows/classes/sun/security/mscapi/SunMSCAPI.java Mon Jul 13 13:40:02 2015 -0700
+++ b/jdk/src/jdk.crypto.mscapi/windows/classes/sun/security/mscapi/SunMSCAPI.java Mon Jul 20 09:40:49 2015 -0700
@@ -124,7 +124,7 @@
}
public SunMSCAPI() {
- super("SunMSCAPI", 1.9d, INFO);
+ super("SunMSCAPI", 9.0d, INFO);
final Provider p = this;
AccessController.doPrivileged(new PrivilegedAction<Void>() {
--- a/jdk/src/jdk.crypto.pkcs11/share/classes/sun/security/pkcs11/SunPKCS11.java Mon Jul 13 13:40:02 2015 -0700
+++ b/jdk/src/jdk.crypto.pkcs11/share/classes/sun/security/pkcs11/SunPKCS11.java Mon Jul 20 09:40:49 2015 -0700
@@ -90,7 +90,7 @@
}
public SunPKCS11() {
- super("SunPKCS11", 1.9d, "Unconfigured and unusable PKCS11 provider");
+ super("SunPKCS11", 9.0d, "Unconfigured and unusable PKCS11 provider");
p11 = null;
config = null;
slotID = 0;
@@ -128,7 +128,7 @@
// Used by Secmod
SunPKCS11(Config c) {
- super("SunPKCS11-" + c.getName(), 1.9d, c.getDescription());
+ super("SunPKCS11-" + c.getName(), 9.0d, c.getDescription());
this.config = c;
if (debug != null) {
--- a/jdk/src/jdk.crypto.ucrypto/solaris/classes/com/oracle/security/ucrypto/UcryptoProvider.java Mon Jul 13 13:40:02 2015 -0700
+++ b/jdk/src/jdk.crypto.ucrypto/solaris/classes/com/oracle/security/ucrypto/UcryptoProvider.java Mon Jul 20 09:40:49 2015 -0700
@@ -224,7 +224,7 @@
}
public UcryptoProvider() {
- super("OracleUcrypto", 1.9d, "Provider using Oracle Ucrypto API");
+ super("OracleUcrypto", 9.0d, "Provider using Oracle Ucrypto API");
AccessController.doPrivileged(new PrivilegedAction<>() {
public Void run() {
--- a/jdk/src/jdk.deploy.osx/macosx/classes/apple/security/AppleProvider.java Mon Jul 13 13:40:02 2015 -0700
+++ b/jdk/src/jdk.deploy.osx/macosx/classes/apple/security/AppleProvider.java Mon Jul 20 09:40:49 2015 -0700
@@ -74,7 +74,7 @@
public AppleProvider() {
/* We are the Apple provider */
- super("Apple", 1.9d, info);
+ super("Apple", 9.0d, info);
final Provider p = this;
AccessController.doPrivileged(new PrivilegedAction<Void>() {
--- a/jdk/src/jdk.security.jgss/share/classes/com/sun/security/sasl/gsskerb/JdkSASL.java Mon Jul 13 13:40:02 2015 -0700
+++ b/jdk/src/jdk.security.jgss/share/classes/com/sun/security/sasl/gsskerb/JdkSASL.java Mon Jul 20 09:40:49 2015 -0700
@@ -73,7 +73,7 @@
}
public JdkSASL() {
- super("JdkSASL", 1.9d, info);
+ super("JdkSASL", 9.0d, info);
final Provider p = this;
AccessController.doPrivileged(new PrivilegedAction<Void>() {
--- a/jdk/test/java/security/Provider/ProviderVersionCheck.java Mon Jul 13 13:40:02 2015 -0700
+++ b/jdk/test/java/security/Provider/ProviderVersionCheck.java Mon Jul 20 09:40:49 2015 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2015, 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
@@ -27,7 +27,7 @@
/*
* @test
- * @bug 8030823
+ * @bug 8030823 8130696
* @run main/othervm ProviderVersionCheck
* @summary Verify all providers in the default Providers list have the proper
* version for the release
@@ -42,7 +42,7 @@
for (Provider p: Security.getProviders()) {
System.out.print(p.getName() + " ");
- if (p.getVersion() != 1.9d) {
+ if (p.getVersion() != 9.0d) {
System.out.println("failed. " + "Version received was " +
p.getVersion());
failure = true;
--- a/jdk/test/sun/security/util/Oid/S11N.java Mon Jul 13 13:40:02 2015 -0700
+++ b/jdk/test/sun/security/util/Oid/S11N.java Mon Jul 20 09:40:49 2015 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2015, 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
@@ -23,7 +23,7 @@
/*
* @test
- * @bug 4811968 6908628 8006564
+ * @bug 4811968 6908628 8006564 8130696
* @modules java.base/sun.misc
* java.base/sun.security.util
* @run main S11N check
@@ -66,8 +66,11 @@
public static void main(String[] args) throws Exception {
if (args[0].equals("check")) {
- int version = Integer.valueOf(System.getProperty("java.version")
- .split("\\.")[1]);
+ String jv = System.getProperty("java.version");
+ // java.version format: $VNUM\-$PRE
+ String [] va = (jv.split("-")[0]).split("\\.");
+ String v = (va.length == 1 || !va[0].equals("1")) ? va[0] : va[1];
+ int version = Integer.valueOf(v);
System.out.println("version is " + version);
if (version >= 7) {
for (String oid: SMALL) {