7022855: Export "PKIX" as the standard algorithm name of KeyManagerFactory
Export the existing "NewSunX509" algorithm implementation using the standard name "PKIX" Reviewed-by: weijun, wetmore
This commit is contained in:
parent
85935bc056
commit
7705e63e30
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 1996, 2010, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 1996, 2011, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -378,7 +378,8 @@ final class ClientHandshaker extends Handshaker {
|
|||||||
if (!isNegotiable(mesgVersion)) {
|
if (!isNegotiable(mesgVersion)) {
|
||||||
throw new SSLHandshakeException(
|
throw new SSLHandshakeException(
|
||||||
"Server chose " + mesgVersion +
|
"Server chose " + mesgVersion +
|
||||||
", but client does not support or disables " + mesgVersion);
|
", but that protocol version is not enabled or not supported " +
|
||||||
|
"by the client.");
|
||||||
}
|
}
|
||||||
|
|
||||||
handshakeHash.protocolDetermined(mesgVersion);
|
handshakeHash.protocolDetermined(mesgVersion);
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 1999, 2011, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -195,6 +195,8 @@ public abstract class SunJSSE extends java.security.Provider {
|
|||||||
"sun.security.ssl.KeyManagerFactoryImpl$SunX509");
|
"sun.security.ssl.KeyManagerFactoryImpl$SunX509");
|
||||||
put("KeyManagerFactory.NewSunX509",
|
put("KeyManagerFactory.NewSunX509",
|
||||||
"sun.security.ssl.KeyManagerFactoryImpl$X509");
|
"sun.security.ssl.KeyManagerFactoryImpl$X509");
|
||||||
|
put("Alg.Alias.KeyManagerFactory.PKIX", "NewSunX509");
|
||||||
|
|
||||||
put("TrustManagerFactory.SunX509",
|
put("TrustManagerFactory.SunX509",
|
||||||
"sun.security.ssl.TrustManagerFactoryImpl$SimpleFactory");
|
"sun.security.ssl.TrustManagerFactoryImpl$SimpleFactory");
|
||||||
put("TrustManagerFactory.PKIX",
|
put("TrustManagerFactory.PKIX",
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2003, 2011, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -23,8 +23,9 @@
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* @test
|
* @test
|
||||||
* @bug 4898428
|
* @bug 4898428 7022855
|
||||||
* @summary verify getInstance() works using Provider.getService()
|
* @summary verify getInstance() works using Provider.getService()
|
||||||
|
* Export "PKIX" as the standard algorithm name of KeyManagerFactory
|
||||||
* @author Andreas Sterbenz
|
* @author Andreas Sterbenz
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@ -61,6 +62,20 @@ public class GetInstance {
|
|||||||
kmf = KeyManagerFactory.getInstance("SunX509", p);
|
kmf = KeyManagerFactory.getInstance("SunX509", p);
|
||||||
same(p, kmf.getProvider());
|
same(p, kmf.getProvider());
|
||||||
|
|
||||||
|
kmf = KeyManagerFactory.getInstance("NewSunX509");
|
||||||
|
same(p, kmf.getProvider());
|
||||||
|
kmf = KeyManagerFactory.getInstance("NewSunX509", "SunJSSE");
|
||||||
|
same(p, kmf.getProvider());
|
||||||
|
kmf = KeyManagerFactory.getInstance("NewSunX509", p);
|
||||||
|
same(p, kmf.getProvider());
|
||||||
|
|
||||||
|
kmf = KeyManagerFactory.getInstance("PKIX");
|
||||||
|
same(p, kmf.getProvider());
|
||||||
|
kmf = KeyManagerFactory.getInstance("PKIX", "SunJSSE");
|
||||||
|
same(p, kmf.getProvider());
|
||||||
|
kmf = KeyManagerFactory.getInstance("PKIX", p);
|
||||||
|
same(p, kmf.getProvider());
|
||||||
|
|
||||||
TrustManagerFactory tmf;
|
TrustManagerFactory tmf;
|
||||||
tmf = TrustManagerFactory.getInstance("SunX509");
|
tmf = TrustManagerFactory.getInstance("SunX509");
|
||||||
same(p, tmf.getProvider());
|
same(p, tmf.getProvider());
|
||||||
@ -69,6 +84,34 @@ public class GetInstance {
|
|||||||
tmf = TrustManagerFactory.getInstance("SunX509", p);
|
tmf = TrustManagerFactory.getInstance("SunX509", p);
|
||||||
same(p, tmf.getProvider());
|
same(p, tmf.getProvider());
|
||||||
|
|
||||||
|
tmf = TrustManagerFactory.getInstance("PKIX");
|
||||||
|
same(p, tmf.getProvider());
|
||||||
|
tmf = TrustManagerFactory.getInstance("PKIX", "SunJSSE");
|
||||||
|
same(p, tmf.getProvider());
|
||||||
|
tmf = TrustManagerFactory.getInstance("PKIX", p);
|
||||||
|
same(p, tmf.getProvider());
|
||||||
|
|
||||||
|
tmf = TrustManagerFactory.getInstance("SunPKIX");
|
||||||
|
same(p, tmf.getProvider());
|
||||||
|
tmf = TrustManagerFactory.getInstance("SunPKIX", "SunJSSE");
|
||||||
|
same(p, tmf.getProvider());
|
||||||
|
tmf = TrustManagerFactory.getInstance("SunPKIX", p);
|
||||||
|
same(p, tmf.getProvider());
|
||||||
|
|
||||||
|
tmf = TrustManagerFactory.getInstance("X509");
|
||||||
|
same(p, tmf.getProvider());
|
||||||
|
tmf = TrustManagerFactory.getInstance("X509", "SunJSSE");
|
||||||
|
same(p, tmf.getProvider());
|
||||||
|
tmf = TrustManagerFactory.getInstance("X509", p);
|
||||||
|
same(p, tmf.getProvider());
|
||||||
|
|
||||||
|
tmf = TrustManagerFactory.getInstance("X.509");
|
||||||
|
same(p, tmf.getProvider());
|
||||||
|
tmf = TrustManagerFactory.getInstance("X.509", "SunJSSE");
|
||||||
|
same(p, tmf.getProvider());
|
||||||
|
tmf = TrustManagerFactory.getInstance("X.509", p);
|
||||||
|
same(p, tmf.getProvider());
|
||||||
|
|
||||||
testComSun();
|
testComSun();
|
||||||
|
|
||||||
long stop = System.currentTimeMillis();
|
long stop = System.currentTimeMillis();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user