Class PKCS10CertificationRequest

    • Constructor Summary

      Constructors 
      Constructor Description
      PKCS10CertificationRequest​(byte[] encoded)
      Create a PKCS10CertificationRequestHolder from the passed in bytes.
      PKCS10CertificationRequest​(org.bouncycastle.asn1.pkcs.CertificationRequest certificationRequest)
      Create a PKCS10CertificationRequestHolder from an underlying ASN.1 structure.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean equals​(java.lang.Object o)  
      org.bouncycastle.asn1.pkcs.Attribute[] getAttributes()
      Return the attributes, if any associated with this request.
      org.bouncycastle.asn1.pkcs.Attribute[] getAttributes​(org.bouncycastle.asn1.ASN1ObjectIdentifier type)
      Return an array of attributes matching the passed in type OID.
      byte[] getEncoded()  
      byte[] getSignature()
      Return the bytes making up the signature associated with this request.
      org.bouncycastle.asn1.x509.AlgorithmIdentifier getSignatureAlgorithm()
      Return the details of the signature algorithm used to create this request.
      org.bouncycastle.asn1.x500.X500Name getSubject()
      Return the subject on this request.
      org.bouncycastle.asn1.x509.SubjectPublicKeyInfo getSubjectPublicKeyInfo()
      Return the SubjectPublicKeyInfo describing the public key this request is carrying.
      int hashCode()  
      boolean isSignatureValid​(ContentVerifierProvider verifierProvider)
      Validate the signature on the PKCS10 certification request in this holder.
      org.bouncycastle.asn1.pkcs.CertificationRequest toASN1Structure()
      Return the underlying ASN.1 structure for this request.
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • PKCS10CertificationRequest

        public PKCS10CertificationRequest​(org.bouncycastle.asn1.pkcs.CertificationRequest certificationRequest)
        Create a PKCS10CertificationRequestHolder from an underlying ASN.1 structure.
        Parameters:
        certificationRequest - the underlying ASN.1 structure representing a request.
      • PKCS10CertificationRequest

        public PKCS10CertificationRequest​(byte[] encoded)
                                   throws java.io.IOException
        Create a PKCS10CertificationRequestHolder from the passed in bytes.
        Parameters:
        encoded - BER/DER encoding of the CertificationRequest structure.
        Throws:
        java.io.IOException - in the event of corrupted data, or an incorrect structure.
    • Method Detail

      • toASN1Structure

        public org.bouncycastle.asn1.pkcs.CertificationRequest toASN1Structure()
        Return the underlying ASN.1 structure for this request.
        Returns:
        a CertificateRequest object.
      • getSubject

        public org.bouncycastle.asn1.x500.X500Name getSubject()
        Return the subject on this request.
        Returns:
        the X500Name representing the request's subject.
      • getSignatureAlgorithm

        public org.bouncycastle.asn1.x509.AlgorithmIdentifier getSignatureAlgorithm()
        Return the details of the signature algorithm used to create this request.
        Returns:
        the AlgorithmIdentifier describing the signature algorithm used to create this request.
      • getSignature

        public byte[] getSignature()
        Return the bytes making up the signature associated with this request.
        Returns:
        the request signature bytes.
      • getSubjectPublicKeyInfo

        public org.bouncycastle.asn1.x509.SubjectPublicKeyInfo getSubjectPublicKeyInfo()
        Return the SubjectPublicKeyInfo describing the public key this request is carrying.
        Returns:
        the public key ASN.1 structure contained in the request.
      • getAttributes

        public org.bouncycastle.asn1.pkcs.Attribute[] getAttributes()
        Return the attributes, if any associated with this request.
        Returns:
        an array of Attribute, zero length if none present.
      • getAttributes

        public org.bouncycastle.asn1.pkcs.Attribute[] getAttributes​(org.bouncycastle.asn1.ASN1ObjectIdentifier type)
        Return an array of attributes matching the passed in type OID.
        Parameters:
        type - the type of the attribute being looked for.
        Returns:
        an array of Attribute of the requested type, zero length if none present.
      • getEncoded

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

        public boolean isSignatureValid​(ContentVerifierProvider verifierProvider)
                                 throws PKCSException
        Validate the signature on the PKCS10 certification request in this holder.
        Parameters:
        verifierProvider - a ContentVerifierProvider that can generate a verifier for the signature.
        Returns:
        true if the signature is valid, false otherwise.
        Throws:
        PKCSException - if the signature cannot be processed or is inappropriate.
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object