SunJSSE Provider Class Test


How to test SunJSSE Provider Classes?



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,, shows you how to test SunJSSE Provider Classes:

// Copyright (c)

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());

    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());

Run the above program, you will see:

fyicenter> java

JSSE provider name specified in ssl.ServerSocketFactory.provider:

Class names of default JSSE provider:

Class names of SunJSSE provider:

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

Where jsse.jar in JDK

Downloading jsse.jar - Java Secure Socket Extension

⇑⇑ FAQ for jsse.jar - Java Secure Socket Extension

2023-01-23, 378🔥, 1💬