Class RocketSSL


  • public class RocketSSL
    extends Object
    Utility class for handling SSL (TLS 1.2 and 1.3) certificates and contexts. Used for setting up secure connections with custom certificates.
    • Constructor Detail

      • RocketSSL

        public RocketSSL()
    • Method Detail

      • getSSLContext

        public SSLContext getSSLContext​(RocketSSL.SSLCertificate SSLCertificate)
        Gets the SSL context for the given certificate information.
        Parameters:
        SSLCertificate - the certificate information
        Returns:
        the SSL context, or null if an error occurred
      • getSSLContext

        public SSLContext getSSLContext​(String fileName,
                                        String certPass)
        Gets the SSL context for the given certificate file and password.
        Parameters:
        fileName - the certificate file path
        certPass - the certificate password
        Returns:
        the SSL context, or null if an error occurred
      • configureSsl

        public static boolean configureSsl​(RocketClient client,
                                           RocketRestConfig config)
        Configures SSL for a client if the provided config implements SSLAware and has a custom certificate enabled.
        Parameters:
        client - The client to configure
        config - The configuration that might contain SSL settings
        Returns:
        true if SSL was successfully configured, false otherwise