Enum EndpointIdentificationAlgorithm

    • Method Detail

      • values

        public static EndpointIdentificationAlgorithm[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (EndpointIdentificationAlgorithm c : EndpointIdentificationAlgorithm.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static EndpointIdentificationAlgorithm valueOf​(String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        IllegalArgumentException - if this enum type has no constant with the specified name
        NullPointerException - if the argument is null
      • select

        public static EndpointIdentificationAlgorithm select​(boolean checkIdentity,
                                                             Set<String> trustedNameSet)
        Choose the algorithm to be used based on configuration.
        Parameters:
        checkIdentity - - from 'verifyHostName' of the client.yml
        trustedNameSet - - from 'trustedNames' of the client.yml
        Returns:
        the algorithm to be used.
      • setup

        public static void setup​(SSLEngine engine,
                                 EndpointIdentificationAlgorithm identityAlg)
        set EndpointIdentificationAlgorithm to SSLEngine EndpointIdentificationAlgorithm.APIS is not set because it'll cause unsupported algorithm exceptions
        Parameters:
        engine - - ssl engine
        identityAlg - - EndpointIdentificationAlgorithm to be used
      • setup

        public static void setup​(Socket socket,
                                 EndpointIdentificationAlgorithm identityAlg)
        set EndpointIdentificationAlgorithm to SSLSocket EndpointIdentificationAlgorithm.APIS is not set because it'll cause unsupported algorithm exceptions
        Parameters:
        socket - - ssl socket
        identityAlg - - EndpointIdentificationAlgorithm to be used