Class KeyStoreX509CredentialAdapter

    • Field Detail

      • log

        private org.slf4j.Logger log
        Class logger.
      • keyStore

        private final KeyStore keyStore
        Keystore that contains the credential to be exposed.
      • credentialAlias

        private final String credentialAlias
        Alias to the credential to be exposed.
      • keyPassword

        private final char[] keyPassword
        Password for the key to be exposed.
    • Constructor Detail

      • KeyStoreX509CredentialAdapter

        public KeyStoreX509CredentialAdapter​(@Nonnull @ParameterName(name="store")
                                             KeyStore store,
                                             @Nonnull @ParameterName(name="alias")
                                             String alias,
                                             @Nullable @ParameterName(name="password")
                                             char[] password)
        Constructor.
        Parameters:
        store - store containing key to be exposed
        alias - alias to the credential to be exposed
        password - password to the key to be exposed
    • Method Detail

      • getCRLs

        @Nullable
        public Collection<X509CRL> getCRLs()
        Gets a collection of CRLs associated with the credential.
        Specified by:
        getCRLs in interface X509Credential
        Returns:
        CRLs associated with the credential
      • getEntityCertificateChain

        @Nonnull
        public Collection<X509Certificate> getEntityCertificateChain()
        Gets an immutable collection of certificates in the entity's trust chain. The entity certificate is contained within this list. No specific ordering of the certificates is guaranteed.
        Specified by:
        getEntityCertificateChain in interface X509Credential
        Returns:
        entities certificate chain
      • getCredentialType

        @Nonnull
        public Class<? extends Credential> getCredentialType()
        Get the primary type of the credential instance. This will usually be the primary sub-interface of Credential implemented by an implementation.
        Specified by:
        getCredentialType in interface Credential
        Returns:
        the credential type
      • setEntityId

        public void setEntityId​(@Nullable
                                String newEntityID)
        Sets the ID of the entity this credential is for.
        Overrides:
        setEntityId in class AbstractCredential
        Parameters:
        newEntityID - ID of the entity this credential is for
      • setUsageType

        public void setUsageType​(@Nonnull
                                 UsageType newUsageType)
        Sets the usage type for this credential.
        Overrides:
        setUsageType in class AbstractCredential
        Parameters:
        newUsageType - usage type for this credential