Class BrokerSSLUtil


  • public class BrokerSSLUtil
    extends java.lang.Object
    • Constructor Summary

      Constructors 
      Constructor Description
      BrokerSSLUtil()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static BrokerSSLCertificate getSSLCertificate​(java.lang.String keystoreFilename, java.lang.String password, KeystoreType keystoreType, java.lang.String requestedDn)
      Get the SSL certificate for a specific distinguished name from a keystore.
      static java.lang.String[] getSSLKeystoreDns​(java.lang.String keystoreFilename, java.lang.String password, KeystoreType keystoreType)
      Get the list of distinguished names from a keystore file.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • BrokerSSLUtil

        public BrokerSSLUtil()
    • Method Detail

      • getSSLKeystoreDns

        public static java.lang.String[] getSSLKeystoreDns​(java.lang.String keystoreFilename,
                                                           java.lang.String password,
                                                           KeystoreType keystoreType)
                                                    throws BrokerException
        Get the list of distinguished names from a keystore file. This does NOT work for Spyrus certificate files.
        Parameters:
        keystoreFilename - name of the file containing the keystore
        password - the password to decrypt the keystore
        keystoreType - the type of keystore file
        Returns:
        the list of distinguished names
        Throws:
        BrokerFileNotFoundException - If the keystore file is not found or readable.
        BrokerNullParameterException - If the keystore file or password are null.
        BrokerKeystoreException - If access to the keystore or certificates causes an error.
        BrokerException
      • getSSLCertificate

        public static BrokerSSLCertificate getSSLCertificate​(java.lang.String keystoreFilename,
                                                             java.lang.String password,
                                                             KeystoreType keystoreType,
                                                             java.lang.String requestedDn)
                                                      throws BrokerException
        Get the SSL certificate for a specific distinguished name from a keystore. This does NOT work for Spyrus certificate files.
        Parameters:
        keystoreFilename - name of the file containing the keystore
        password - the password to decrypt the keystore
        keystoreType - the type of keystore file
        requestedDn - the distinguished name of the certificate to find
        Returns:
        the certificate
        Throws:
        BrokerFileNotFoundException - If the keystore file is not found or readable.
        BrokerNullParameterException - If the keystore file or password are null.
        BrokerKeystoreException - If access to the keystore or certificates causes an error.
        BrokerException