Class ChainingCertificateProvider

  • All Implemented Interfaces:
    CertificateProvider

    public class ChainingCertificateProvider
    extends Object
    implements CertificateProvider
    Chain two or more certificate provider, asking each of them until found for the requested certificate.
    Since:
    6.0RC1
    Version:
    $Id: 77a43f57520bac84f947fcc6caf2197d5023cc5b $
    • Constructor Detail

      • ChainingCertificateProvider

        public ChainingCertificateProvider​(CertificateProvider... providers)
        Create a new chaining certificate provider from the given providers.
        Parameters:
        providers - providers to be chained in order.
    • Method Detail

      • getCertificate

        public CertifiedPublicKey getCertificate​(byte[] keyIdentifier)
        Description copied from interface: CertificateProvider
        Return if available a certificate matching the given keyIdentifier.
        Specified by:
        getCertificate in interface CertificateProvider
        Parameters:
        keyIdentifier - the subject key identifier of the certificate.
        Returns:
        a matching certificate or null if none were found.
      • getCertificate

        public CertifiedPublicKey getCertificate​(PrincipalIndentifier issuer,
                                                 BigInteger serial,
                                                 byte[] keyIdentifier)
        Description copied from interface: CertificateProvider
        Return if available a certificate matching the given keyIdentifier.
        Specified by:
        getCertificate in interface CertificateProvider
        Parameters:
        issuer - the subject of the issuer of the certificate.
        serial - the serial number attributed by the issuer to the certificate.
        keyIdentifier - the subject key identifier of the certificate.
        Returns:
        a matching certificate or null if none were found.