Class BasicX509Credential

    • Constructor Detail

      • BasicX509Credential

        public BasicX509Credential​(@Nonnull @ParameterName(name="entityCertificate")
                                   X509Certificate entityCertificate)
        Constructor.
        Parameters:
        entityCertificate - the credential entity certificate
      • BasicX509Credential

        public BasicX509Credential​(@Nonnull @ParameterName(name="entityCertificate")
                                   X509Certificate entityCertificate,
                                   @ParameterName(name="privateKey") @Nonnull
                                   PrivateKey privateKey)
        Constructor.
        Parameters:
        entityCertificate - the credential entity certificate
        privateKey - the credential private key
    • 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
      • setCRLs

        public void setCRLs​(@Nullable
                            Collection<X509CRL> newCRLs)
        Sets the CRLs for this credential.
        Parameters:
        newCRLs - CRLs for this credential
      • setEntityCertificate

        public void setEntityCertificate​(@Nonnull
                                         X509Certificate newEntityCertificate)
        Sets the entity certificate for this credential.
        Parameters:
        newEntityCertificate - entity certificate for this credential
      • setPublicKey

        public void setPublicKey​(PublicKey newPublicKey)
        This operation is unsupported for X.509 credentials. The public key will be retrieved automatically from the entity certificate.
        Specified by:
        setPublicKey in interface MutableCredential
        Overrides:
        setPublicKey in class BasicCredential
        Parameters:
        newPublicKey - not supported
      • 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
      • setEntityCertificateChain

        public void setEntityCertificateChain​(@Nonnull
                                              Collection<X509Certificate> newCertificateChain)
        Sets the entity certificate chain for this credential. This MUST include the entity certificate.
        Parameters:
        newCertificateChain - entity certificate chain for this credential