Interface TlsCertificate

  • All Known Implementing Classes:
    BcTlsCertificate, JcaTlsCertificate

    public interface TlsCertificate
    Interface providing the functional representation of a single X.509 certificate.
    • Method Detail

      • createEncryptor

        TlsEncryptor createEncryptor​(int tlsCertificateRole)
                              throws java.io.IOException
        Return an encryptor based on the public key in this certificate.
        Parameters:
        tlsCertificateRole - TlsCertificateRole
        Returns:
        a TlsEncryptor based on this certificate's public key.
        Throws:
        java.io.IOException
      • createVerifier

        TlsVerifier createVerifier​(short signatureAlgorithm)
                            throws java.io.IOException
        Parameters:
        signatureAlgorithm - SignatureAlgorithm
        Throws:
        java.io.IOException
      • createVerifier

        TlsVerifier createVerifier​(int signatureScheme)
                            throws java.io.IOException
        Parameters:
        signatureScheme - SignatureScheme
        Throws:
        java.io.IOException
      • getEncoded

        byte[] getEncoded()
                   throws java.io.IOException
        Throws:
        java.io.IOException
      • getExtension

        byte[] getExtension​(org.bouncycastle.asn1.ASN1ObjectIdentifier extensionOID)
                     throws java.io.IOException
        Throws:
        java.io.IOException
      • getSerialNumber

        java.math.BigInteger getSerialNumber()
      • getSigAlgOID

        java.lang.String getSigAlgOID()
        Returns:
        the OID of this certificate's 'signatureAlgorithm', as a String.
      • getSigAlgParams

        org.bouncycastle.asn1.ASN1Encodable getSigAlgParams()
                                                     throws java.io.IOException
        Throws:
        java.io.IOException
      • getLegacySignatureAlgorithm

        short getLegacySignatureAlgorithm()
                                   throws java.io.IOException
        Returns:
        SignatureAlgorithm
        Throws:
        java.io.IOException
      • supportsSignatureAlgorithm

        boolean supportsSignatureAlgorithm​(short signatureAlgorithm)
                                    throws java.io.IOException
        Parameters:
        signatureAlgorithm - SignatureAlgorithm
        Returns:
        true if (and only if) this certificate can be used to verify the given signature algorithm.
        Throws:
        java.io.IOException
      • supportsSignatureAlgorithmCA

        boolean supportsSignatureAlgorithmCA​(short signatureAlgorithm)
                                      throws java.io.IOException
        Throws:
        java.io.IOException
      • checkUsageInRole

        TlsCertificate checkUsageInRole​(int tlsCertificateRole)
                                 throws java.io.IOException
        Parameters:
        tlsCertificateRole - TlsCertificateRole
        Throws:
        java.io.IOException