Categories:
Audio (13)
Biotech (29)
Bytecode (36)
Database (77)
Framework (7)
Game (7)
General (507)
Graphics (53)
I/O (35)
IDE (2)
JAR Tools (102)
JavaBeans (21)
JDBC (121)
JDK (426)
JSP (20)
Logging (108)
Mail (58)
Messaging (8)
Network (84)
PDF (97)
Report (7)
Scripting (84)
Security (32)
Server (121)
Servlet (26)
SOAP (24)
Testing (54)
Web (15)
XML (322)
Collections:
Other Resources:
SunJSSE Provider Class Test
How to test SunJSSE Provider Classes?
✍: FYIcenter.com
SunJSSE Provider Classes are hidden in some library files in JDK 9 and newer releases.
They were stored in jsse.jar JDK 8 and older releases.
The following sample program, SunJsseClassTest.java, shows you how to test SunJSSE Provider Classes:
// Copyright (c) FYIcenter.com
import java.net.*;
import java.io.*;
import javax.net.ssl.*;
public class SunJsseClassTest {
public static void main(String[] args) throws Exception {
System.out.println("JSSE provider name specified in ssl.ServerSocketFactory.provider:");
String provider = System.getProperty("ssl.ServerSocketFactory.provider");
System.out.println(" "+provider);
System.out.println("Class names of default JSSE provider:");
SSLServerSocketFactory factory = (SSLServerSocketFactory) SSLServerSocketFactory.getDefault();
SSLServerSocket socket = (SSLServerSocket)factory.createServerSocket(1443);
System.out.println(" "+factory.getClass().getName());
System.out.println(" "+socket.getClass().getName());
socket.close();
System.out.println("Class names of SunJSSE provider:");
SSLContext context = SSLContext.getInstance("SSL", "SunJSSE");
context.init(null, null, null);
factory = context.getServerSocketFactory();
socket = (SSLServerSocket)factory.createServerSocket(1443);
System.out.println(" "+factory.getClass().getName());
System.out.println(" "+socket.getClass().getName());
socket.close();
}
}
Run the above program, you will see:
fyicenter> java SunJsseClassTest.java JSSE provider name specified in ssl.ServerSocketFactory.provider: null Class names of default JSSE provider: sun.security.ssl.SSLServerSocketFactoryImpl sun.security.ssl.SSLServerSocketImpl Class names of SunJSSE provider: sun.security.ssl.SSLServerSocketFactoryImpl sun.security.ssl.SSLServerSocketImpl
The output confirms that SunJSSE classes are available. And they are used as the default provider for SSL protocol.
⇒ Downloading jsse.jar (JDK 8) Java Secure Socket Extension
2023-01-23, ∼1094🔥, 1💬
Popular Posts:
What Is javax.websocket-api-1.1. jar?javax.websocket-api-1.1. jaris the JAR file for Java API for We...
Where to get the Java source code for Connector/J 8.0 Core Impl module? Java source code files for C...
What Is log4j-1.2.15.jar? I got the JAR file from apache-log4j-1.2.15.zip. log4j-1.2.15.jar is the v...
JDK 11 jdk.crypto.ec.jmod is the JMOD file for JDK 11 Crypto EC module. JDK 11 Crypto EC module comp...
JDK 17 java.base.jmod is the JMOD file for JDK 17 Base module. JDK 17 Base module compiled class fil...