PKI-Lite - v1.0.5
    Preparing search index...

    Represents an OCSP (Online Certificate Status Protocol) request.

    An OCSP request is used to check the revocation status of X.509 certificates in real-time. It can request the status of one or more certificates and optionally include a signature to authenticate the requestor.

    OCSPRequest ::= SEQUENCE {
        tbsRequest              TBSRequest,
        optionalSignature   [0] EXPLICIT Signature OPTIONAL
    }
    
    // Create OCSP request for a certificate
    const request = await OCSPRequest.forCertificate({
    certificate: clientCert,
    issuerCertificate: caCert
    })

    // Send to OCSP responder
    const response = await fetch('http://ocsp.example.com', {
    method: 'POST',
    body: request.toDer(),
    headers: { 'Content-Type': 'application/ocsp-request' }
    })

    // Parse response
    const ocspResponse = OCSPResponse.fromDer(new Uint8Array(await response.arrayBuffer()))

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    optionalSignature?: OCSPSignature

    Optional signature to authenticate the requestor.

    tbsRequest: TBSRequest

    The "to be signed" request containing the certificate status queries.

    Accessors

    • get pemHeader(): string

      Gets the PEM header name for this object type. Converts the class name to uppercase for use in PEM encoding.

      Returns string

    • get pkiType(): string

      Gets the PKI type name for this object (typically the class name). Used for PEM headers and debugging output.

      Returns string

    Methods

    • Compares this PKI object with another for equality. Two objects are considered equal if their DER encodings are identical.

      Parameters

      • other: PkiBase<any>

        The other PKI object to compare with

      Returns boolean

      true if the objects are equal, false otherwise

    • Returns a human-readable string representation of this object. By default, returns the same as toString(), but subclasses can override for more user-friendly output.

      Returns string

      A human-readable string representation