Class CipherSuitePredicate

    • Constructor Detail

      • CipherSuitePredicate

        CipherSuitePredicate()
    • Method Detail

      • matchTrue

        public static CipherSuitePredicate matchTrue()
        Match all possible cipher suites.
        Returns:
        the true predicate
      • matchFalse

        public static CipherSuitePredicate matchFalse()
        Match no possible cipher suites.
        Returns:
        the false predicate
      • matchAll

        public static CipherSuitePredicate matchAll​(CipherSuitePredicate... predicates)
        Match all of the given predicates.
        Parameters:
        predicates - the predicates
        Returns:
        a predicate that is true when all nested predicates are true
      • matchAny

        public static CipherSuitePredicate matchAny​(CipherSuitePredicate... predicates)
        Match any of the given predicates.
        Parameters:
        predicates - the predicates
        Returns:
        a predicate that is true when any nested predicate is true
      • matchNot

        public static CipherSuitePredicate matchNot​(CipherSuitePredicate predicate)
        Invert the given predicate.
        Parameters:
        predicate - the predicate
        Returns:
        a predicate which is true when the nested predicate is false, and vice-versa
      • withoutNulls

        static <T> T[] withoutNulls​(T[] orig)
      • matchEncryption

        public static CipherSuitePredicate matchEncryption​(Encryption encryption)
        Return a predicate which matches the given encryption scheme.
        Parameters:
        encryption - the encryption scheme
        Returns:
        the predicate
      • matchEncryption

        public static CipherSuitePredicate matchEncryption​(Encryption... encryptions)
        Return a predicate which matches any of the given encryption schemes.
        Parameters:
        encryptions - the encryption schemes
        Returns:
        the predicate
      • matchEncryption

        public static CipherSuitePredicate matchEncryption​(EnumSet<Encryption> encryptions)
        Return a predicate which matches any of the given encryption schemes.
        Parameters:
        encryptions - the encryption schemes
        Returns:
        the predicate
      • matchAuthentication

        public static CipherSuitePredicate matchAuthentication​(Authentication authentication)
        Return a predicate which matches the given authentication scheme.
        Parameters:
        authentication - the authentication scheme
        Returns:
        the predicate
      • matchAuthentication

        public static CipherSuitePredicate matchAuthentication​(Authentication... authentications)
        Return a predicate which matches any of the given authentication schemes.
        Parameters:
        authentications - the authentication schemes
        Returns:
        the predicate
      • matchAuthentication

        public static CipherSuitePredicate matchAuthentication​(EnumSet<Authentication> authentications)
        Return a predicate which matches any of the given authentication schemes.
        Parameters:
        authentications - the authentication schemes
        Returns:
        the predicate
      • matchKeyAgreement

        public static CipherSuitePredicate matchKeyAgreement​(KeyAgreement keyAgreement)
        Return a predicate which matches the given key exchange scheme.
        Parameters:
        keyAgreement - the key exchange scheme
        Returns:
        the predicate
      • matchKeyExchange

        public static CipherSuitePredicate matchKeyExchange​(KeyAgreement... keyAgreements)
        Return a predicate which matches any of the given key exchange schemes.
        Parameters:
        keyAgreements - the key exchange schemes
        Returns:
        the predicate
      • matchKeyExchange

        public static CipherSuitePredicate matchKeyExchange​(EnumSet<KeyAgreement> keyAgreements)
        Return a predicate which matches any of the given key exchange schemes.
        Parameters:
        keyAgreements - the key exchange schemes
        Returns:
        the predicate
      • matchDigest

        public static CipherSuitePredicate matchDigest​(Digest digest)
        Return a predicate which matches the given digest scheme.
        Parameters:
        digest - the digest scheme
        Returns:
        the predicate
      • matchDigest

        public static CipherSuitePredicate matchDigest​(Digest... digests)
        Return a predicate which matches any of the given digest schemes.
        Parameters:
        digests - the digest schemes
        Returns:
        the predicate
      • matchDigest

        public static CipherSuitePredicate matchDigest​(EnumSet<Digest> digests)
        Return a predicate which matches any of the given digest schemes.
        Parameters:
        digests - the digest schemes
        Returns:
        the predicate
      • matchProtocol

        public static CipherSuitePredicate matchProtocol​(Protocol protocol)
        Return a predicate which matches the given protocol.
        Parameters:
        protocol - the protocol
        Returns:
        the predicate
      • matchProtocol

        public static CipherSuitePredicate matchProtocol​(Protocol... protocols)
        Return a predicate which matches any of the given protocols.
        Parameters:
        protocols - the protocols
        Returns:
        the predicate
      • matchProtocol

        public static CipherSuitePredicate matchProtocol​(EnumSet<Protocol> protocols)
        Return a predicate which matches any of the given protocols.
        Parameters:
        protocols - the protocols
        Returns:
        the predicate
      • matchLevel

        public static CipherSuitePredicate matchLevel​(SecurityLevel level)
        Return a predicate which matches the given security level.
        Parameters:
        level - the security level
        Returns:
        the predicate
      • matchLevel

        public static CipherSuitePredicate matchLevel​(SecurityLevel... levels)
        Return a predicate which matches any of the given security levels.
        Parameters:
        levels - the security levels
        Returns:
        the predicate
      • matchLevel

        public static CipherSuitePredicate matchLevel​(EnumSet<SecurityLevel> levels)
        Return a predicate which matches any of the given security levels.
        Parameters:
        levels - the security levels
        Returns:
        the predicate
      • matchLevelLessThan

        public static CipherSuitePredicate matchLevelLessThan​(SecurityLevel level)
        Return a predicate which matches all security levels less than the given level.
        Parameters:
        level - the security level to compare against
        Returns:
        the predicate
      • matchFips

        public static CipherSuitePredicate matchFips()
        Return a predicate which matches all FIPS cipher suites.
        Returns:
        the predicate
      • matchNonFips

        public static CipherSuitePredicate matchNonFips()
        Return a predicate which matches all non-FIPS cipher suites.
        Returns:
        the predicate
      • matchExport

        public static CipherSuitePredicate matchExport()
        Return a predicate which matches all exportable cipher suites.
        Returns:
        the predicate
      • matchNonExport

        public static CipherSuitePredicate matchNonExport()
        Return a predicate which matches all non-exportable cipher suites.
        Returns:
        the predicate
      • matchName

        public static CipherSuitePredicate matchName​(String name)
        Return a predicate which matches a cipher suite with the given name. The cipher suite name must be a standard or OpenSSL-style mechanism name identifying a single mechanism.
        Returns:
        the predicate
      • matchDefaultDeletes

        public static CipherSuitePredicate matchDefaultDeletes()
        Return a predicate which matches all cipher suites that would be fully deleted in the default selector configuration.
        Returns:
        the predicate
      • matchAnonDH

        public static CipherSuitePredicate matchAnonDH()
        Match all anonymous ciphers which use Diffie-Hellman key exchange.
        Returns:
        the predicate
      • matchOpenSslAll

        public static CipherSuitePredicate matchOpenSslAll()
        Match all cipher suites except for anonymous and encryptionless suites, which must be explicitly enabled.
        Returns:
        the predicate
      • matchOpenSslComplementOfAll

        public static CipherSuitePredicate matchOpenSslComplementOfAll()
        Match all cipher suites included by matchOpenSslAll() but are disabled by default (generally, anonymous Diffie-Hellman suites including elliptic curve suites).
        Returns:
        the predicate
      • matchOpenSslDefaultDeletes

        public static CipherSuitePredicate matchOpenSslDefaultDeletes()
        Match all of the cipher suites which are automatically deleted by OpenSSL when using the special DEFAULT rule.
        Returns:
        the predicate
      • matchOpenSslComplementOfDefault

        public static CipherSuitePredicate matchOpenSslComplementOfDefault()
        Match all of the cipher suites which are added by OpenSSL when using the special COMPLEMENTOFDEFAULT rule.
        Returns:
        the predicate
      • toString

        public final String toString()
        Get the string representation of this predicate.
        Overrides:
        toString in class Object
        Returns:
        the string representation of this predicate
      • isAlwaysTrue

        boolean isAlwaysTrue()
      • isAlwaysFalse

        boolean isAlwaysFalse()