JavaScript HSM API Dinamo
    Preparing search index...

    Interface Pix

    interface Pix {
        PIXSign(
            flags: PIX_SIGN_RNS,
            keyId: string,
            certId: string,
            unsignedPixEnvelope: Buffer,
        ): Promise<Buffer<ArrayBufferLike>>;
        PIXVerify(
            chainId: string,
            crlId: string | null,
            flags: number,
            signedPixEnvelope: Buffer,
        ): Promise<void>;
        PIXDictSign(
            keyId: string,
            certId: string,
            unsignedDictEnvelope: Buffer,
        ): Promise<Buffer<ArrayBufferLike>>;
        PIXDictVerify(
            chainId: string,
            crlId: string | null,
            flags: number,
            signedDictEnvelope: Buffer,
        ): Promise<void>;
        PIXJWSSign(
            keyId: string,
            flags: number,
            header: Buffer,
            payload: Buffer,
        ): Promise<Buffer<ArrayBufferLike>>;
        PIXJWSCheck(
            chainId: string,
            crlId: string | null,
            jws: Buffer,
            flags: number,
        ): Promise<{ header: Buffer; payload: Buffer }>;
        PIXPost(
            url: string,
            headers: Record<string, string>,
            body: string | Buffer<ArrayBufferLike>,
            hsmOptions?: PixHsmHttpOptions,
            flags?: number,
        ): Promise<PixHttpResponse>;
        PIXPut(
            url: string,
            headers: Record<string, string>,
            body: string | Buffer<ArrayBufferLike>,
            hsmOptions?: PixHsmHttpOptions,
            flags?: number,
        ): Promise<PixHttpResponse>;
        PIXGet(
            url: string,
            headers: Record<string, string>,
            hsmOptions?: PixHsmHttpOptions,
            flags?: number,
        ): Promise<PixHttpResponse>;
        PIXDelete(
            url: string,
            headers: Record<string, string>,
            hsmOptions?: PixHsmHttpOptions,
            flags?: number,
        ): Promise<PixHttpResponse>;
    }
    Index
    • Write " PIX" on an envelope.

      Parameters

      • flags: PIX_SIGN_RNS

        Control flags for the subscription operation.

      • keyId: string

        The identifier of the key to be used for the signature.

      • certId: string

        The identifier of the certificate to be used.

      • unsignedPixEnvelope: Buffer

        The envelope marked " PIX " is unsigned.

      Returns Promise<Buffer<ArrayBufferLike>>

      A promise that’s settled with the signed “ PIX ” envelope.

    • Check for a signed " PIX " envelope.

      Parameters

      • chainId: string

        The certificate chain identifier.

      • crlId: string | null

        The Revoked Certificates List identifier (optional).

      • flags: number

        Control indicators for the verification operation.

      • signedPixEnvelope: Buffer

        The signed " PIX " envelope is to be verified.

      Returns Promise<void>

      A promise that resolves if the verification is successful.

    • Sign a dictionary entry at PIX.

      Parameters

      • keyId: string

        The identifier of the key to be used for the signature.

      • certId: string

        The identifier of the certificate to be used.

      • unsignedDictEnvelope: Buffer

        The unsigned dictionary envelope.

      Returns Promise<Buffer<ArrayBufferLike>>

      A promise fulfilled with the signed dictionary envelope.

    • Checks a signed dictionary entry PIX .

      Parameters

      • chainId: string

        The certificate chain identifier.

      • crlId: string | null

        The Revoked Certificates List identifier (optional).

      • flags: number

        Control indicators for the verification operation.

      • signedDictEnvelope: Buffer

        The signed dictionary envelope to be checked.

      Returns Promise<void>

      A promise that resolves if the verification is successful.

    • Generate a JWS signature.

      Parameters

      • keyId: string

        The identifier of the key to be used for the signature.

      • flags: number

        Control indicators for the JWS generation.

      • header: Buffer

        The JWS header.

      • payload: Buffer

        The JWS payload.

      Returns Promise<Buffer<ArrayBufferLike>>

      A promise that resolves to the generated JWS.

    • Verifies a JWS signature.

      Parameters

      • chainId: string

        The certificate chain identifier.

      • crlId: string | null

        The Revoked Certificates List identifier (optional).

      • jws: Buffer

        The JWS to be verified.

      • flags: number

        Control indicators for verification.

      Returns Promise<{ header: Buffer; payload: Buffer }>

      A promise that resolves with the JWS header and payload if the verification is successful.

    • mTLS Network Operation - POST. Delegates the HTTP POST request to native_host (dinamonh), which performs the mTLS handshake and the entire network operation outside the Node process, using the HSM private key referenced by hsmOptions.

      Parameters

      • url: string

        The destination URL of the request.

      • headers: Record<string, string>

        The HTTP headers of the request.

      • body: string | Buffer<ArrayBufferLike>

        The body of the request.

      • OptionalhsmOptions: PixHsmHttpOptions

        HSM key/certificate/chain FQNs and other session parameters used by ` native_host ` for the mTLS handshake.

      • Optional flags: number

        Request control flags (see the enumsPIX_HTTP_FLAGS).

      Returns Promise<PixHttpResponse>

      A promise that resolves with the complete object returned by the ` native_host ` operation— { status, rcode, http_status, response_headers, response_body } —and not just with the body of the HTTP response (see PixHttpResponse).

    • mTLS Network Operation - PUT. Delegates the HTTP PUT request to native_host (dinamonh), which performs the mTLS handshake and the network operation entirely outside the Node process, using the HSM private key referenced by hsmOptions.

      Parameters

      • url: string

        The destination URL of the request.

      • headers: Record<string, string>

        The HTTP headers of the request.

      • body: string | Buffer<ArrayBufferLike>

        The body of the request.

      • OptionalhsmOptions: PixHsmHttpOptions

        HSM key/certificate/chain FQNs and other session parameters used by ` native_host ` for the mTLS handshake.

      • Optional flags: number

        Request control flags (see the enumsPIX_HTTP_FLAGS).

      Returns Promise<PixHttpResponse>

      A promise that resolves with the complete object returned by the ` native_host ` operation— { status, rcode, http_status, response_headers, response_body } —and not just with the body of the HTTP response (see PixHttpResponse).

    • mTLS Network Operation - GET. Delegates the HTTP GET request to native_host (dinamonh), which performs the mTLS handshake and the entire network operation outside the Node process, using the HSM private key referenced by hsmOptions.

      Parameters

      • url: string

        The destination URL of the request.

      • headers: Record<string, string>

        The HTTP headers of the request.

      • OptionalhsmOptions: PixHsmHttpOptions

        HSM key/certificate/chain FQNs and other session parameters used by ` native_host ` for the mTLS handshake.

      • Optional flags: number

        Request control flags (see the enumsPIX_HTTP_FLAGS).

      Returns Promise<PixHttpResponse>

      A promise that resolves with the complete object returned by the ` native_host ` operation— { status, rcode, http_status, response_headers, response_body } —and not just with the body of the HTTP response (see PixHttpResponse).

    • mTLS Network Operation - DELETE. Delegates the HTTP DELETE request to native_host (dinamonh), which performs the mTLS handshake and the entire network operation outside the Node process, using the HSM private key referenced by hsmOptions.

      Parameters

      • url: string

        The destination URL of the request.

      • headers: Record<string, string>

        The HTTP headers of the request.

      • OptionalhsmOptions: PixHsmHttpOptions

        HSM key/certificate/chain FQNs and other session parameters used by ` native_host ` for the mTLS handshake.

      • Optional flags: number

        Request control flags (see the enumsPIX_HTTP_FLAGS).

      Returns Promise<PixHttpResponse>

      A promise that resolves with the complete object returned by the ` native_host ` operation— { status, rcode, http_status, response_headers, response_body } —and not just with the body of the HTTP response (see PixHttpResponse).