equal
deleted
inserted
replaced
56 * as long as possible. This is until we open an SSL/TLS connection and the |
56 * as long as possible. This is until we open an SSL/TLS connection and the |
57 * data structures need to be initialized or until SunJSSE is initialized in |
57 * data structures need to be initialized or until SunJSSE is initialized in |
58 * FIPS mode. |
58 * FIPS mode. |
59 * |
59 * |
60 */ |
60 */ |
61 public abstract class SunJSSE extends java.security.Provider { |
61 public class SunJSSE extends java.security.Provider { |
62 |
62 |
63 private static final long serialVersionUID = 3231825739635378733L; |
63 private static final long serialVersionUID = 3231825739635378733L; |
64 |
64 |
65 private static String info = "Sun JSSE provider" + |
65 private static String info = "Sun JSSE provider" + |
66 "(PKCS12, SunX509/PKIX key/trust factories, " + |
66 "(PKCS12, SunX509/PKIX key/trust factories, " + |
67 "SSLv3/TLSv1/TLSv1.1/TLSv1.2/TLSv1.3/DTLSv1.0/DTLSv1.2)"; |
67 "SSLv3/TLSv1/TLSv1.1/TLSv1.2/TLSv1.3/DTLSv1.0/DTLSv1.2)"; |
68 |
68 |
69 protected SunJSSE() { |
69 public SunJSSE() { |
70 super("SunJSSE", PROVIDER_VER, info); |
70 super("SunJSSE", PROVIDER_VER, info); |
71 subclassCheck(); |
|
72 registerAlgorithms(); |
71 registerAlgorithms(); |
73 } |
72 } |
74 |
73 |
75 private void registerAlgorithms() { |
74 private void registerAlgorithms() { |
76 AccessController.doPrivileged((PrivilegedAction<Void>) () -> { |
75 AccessController.doPrivileged((PrivilegedAction<Void>) () -> { |
134 * KeyStore |
133 * KeyStore |
135 */ |
134 */ |
136 ps("KeyStore", "PKCS12", |
135 ps("KeyStore", "PKCS12", |
137 "sun.security.pkcs12.PKCS12KeyStore", null, null); |
136 "sun.security.pkcs12.PKCS12KeyStore", null, null); |
138 } |
137 } |
139 |
|
140 // com.sun.net.ssl.internal.ssl.Provider has been deprecated since JDK 9 |
|
141 @SuppressWarnings("deprecation") |
|
142 private void subclassCheck() { |
|
143 if (getClass() != com.sun.net.ssl.internal.ssl.Provider.class) { |
|
144 throw new AssertionError("Illegal subclass: " + getClass()); |
|
145 } |
|
146 } |
|
147 } |
138 } |