RequesterCertificate (Bouncy Castle Library 1.85 API Specification)
Date: 2026-07-12

org.bouncycastle.asn1.cms

## Class RequesterCertificate

- java.lang.Object
- - org.bouncycastle.asn1.ASN1Object
  - - org.bouncycastle.asn1.cms.RequesterCertificate

- All Implemented Interfaces:
    ASN1Encodable, Encodable

      public class RequesterCertificate
      extends ASN1Object

  RFC 9763 sec. 4 `RequesterCertificate` CSR attribute value carrying the `id-aa-relatedCertRequest` request.

       RequesterCertificate ::= SEQUENCE {
           certID        IssuerAndSerialNumber,
           requestTime   BinaryTime,
           locationInfo  UniformResourceIdentifiers,
           signature     BIT STRING }

       UniformResourceIdentifiers ::= SEQUENCE SIZE (1..MAX) OF URI
       URI ::= IA5String

  The `signature` field carries a digital signature, computed with the private key associated with the certificate identified by `certID`, over the concatenation of the DER-encoded `certID` and the DER-encoded `requestTime` (RFC 9763 sec. 4.1, "concatenation of DER-encoded IssuerAndSerialNumber and BinaryTime" — NOT a SEQUENCE wrapper). The locations in `locationInfo` are HTTP(S) URIs or `data:` URIs (RFC 2397) from which the CA can retrieve the related certificate.

  No AlgorithmIdentifier field accompanies the signature; the verifier must derive the signature algorithm from the related certificate itself (its SubjectPublicKeyInfo plus any policy the CA applies).

  Identified by `PKCSObjectIdentifiers.id_aa_relatedCertRequest` (OID 1.2.840.113549.1.9.16.2.60); it is the value of that PKCS#9 attribute in a `CertificationRequestInfo`.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `RequesterCertificate(IssuerAndSerialNumber certID, BinaryTime requestTime, java.lang.String[] locationInfo, byte[] signature)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `IssuerAndSerialNumber` | `getCertID()`
    `static RequesterCertificate` | `getInstance(java.lang.Object obj)`
    `java.lang.String[]` | `getLocationInfo()`
    `BinaryTime` | `getRequestTime()`
    `ASN1BitString` | `getSignature()`
    `ASN1Primitive` | `toASN1Primitive()` Method providing a primitive representation of this object suitable for encoding.

    - ### Methods inherited from class org.bouncycastle.asn1.ASN1Object

      `encodeTo, encodeTo, equals, getEncoded, getEncoded, hasEncodedTagValue, hashCode`

    - ### Methods inherited from class java.lang.Object

      `clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### RequesterCertificate

          public RequesterCertificate(IssuerAndSerialNumber certID,
                                      BinaryTime requestTime,
                                      java.lang.String[] locationInfo,
                                      byte[] signature)

  - ### Method Detail

    - #### getInstance

          public static RequesterCertificate getInstance(java.lang.Object obj)

    - #### getCertID

          public IssuerAndSerialNumber getCertID()

    - #### getRequestTime

          public BinaryTime getRequestTime()

    - #### getLocationInfo

          public java.lang.String[] getLocationInfo()

      Returns:
        the URIs from which the related certificate can be retrieved, in the encoded order. Per RFC 9763 sec. 4 these are typically HTTP/HTTPS URLs or `data:` URIs (RFC 2397).

    - #### getSignature

          public ASN1BitString getSignature()

    - #### toASN1Primitive

          public ASN1Primitive toASN1Primitive()

      Description copied from class: `ASN1Object`
      Method providing a primitive representation of this object suitable for encoding.
      Specified by:
        `toASN1Primitive` in interface `ASN1Encodable`
      Specified by:
        `toASN1Primitive` in class `ASN1Object`
      Returns:
        a primitive representation of this object.