Class Index | File Index


Class KJUR.asn1.ocsp.BasicOCSPResponse

Extends KJUR.asn1.ASN1Object.
BasicOCSPResponse ASN.1 class encoder
Defined in: asn1ocsp-1.0.js.

Class Summary
Constructor Attributes Constructor Name and Description
BasicOCSPResponse ASN.1 class encoder
OCSPResponse ASN.1 class is defined in RFC 6960 4.2.1.
Fields borrowed from class KJUR.asn1.ASN1Object:
hL, hT, hTLV, hV, isModified, params
Methods borrowed from class KJUR.asn1.ASN1Object:
getEncodedHex, getLengthHexFromValue, getValueHex, tohex
Class Detail
BasicOCSPResponse ASN.1 class encoder
OCSPResponse ASN.1 class is defined in RFC 6960 4.2.1.
BasicOCSPResponse       ::= SEQUENCE {
   tbsResponseData      ResponseData,
   signatureAlgorithm   AlgorithmIdentifier,
   signature            BIT STRING,
   certs            [0] EXPLICIT SEQUENCE OF Certificate OPTIONAL }
This constructor accepts all parameter of KJUR.asn1.ocsp.ResponseData. Further more following properties are available:
  • {ASN1Object}tbsresp (OPTION) - KJUR.asn1.ASN1Object or its sub class object for tbsReponseData, genelally KJUR.asn1.ocsp.ResponseData. When "tbsresp" not specified, tbsresp will be set by other parameters internally.
  • {String}sigalg - signatureAlgrithm name (ex. "SHA256withRSA")
  • {Object}reskey (OPTION) - specifies OCSP response signing private key. Parameter "reskey" or "sighex" shall be specified. Following values can be specified:
    • PKCS#1/5 or PKCS#8 PEM string of private key
    • RSAKey/DSA/ECDSA key object. KEYUTIL.getKey is useful to generate a key object.
  • {String}sighex (OPTION) - hexadecimal string of signature value (i.e. ASN.1 value(V) of signatureValue BIT STRING without unused bits)
  • {Array}certs (OPTION) - array of PEM or hexadecimal string of certificate such as OCSP responder certificate
// response data will be signed by "reskey"
new KJUR.asn1.ocsp.BasicOCSPResponse({
  sigalg: "SHA256withRSA",
  reskey: <>,
  certs: [<>,...] });

// explicitly specify "signature" by "sighex"
new KJUR.asn1.ocsp.BasicOCSPResponse({
  sigalg: "SHA256withRSA",
  sighex: "12abcd...",
  certs: [<>,...] });

// explicitly specify "tbsResponseData" and sign
new KJUR.asn1.ocsp.BasicOCSPResponse({
{ tbsresp: <>,
  sigalg: "SHA256withRSA",
  reskey: <>,
  certs: [<>,...] }
{Array} params
JSON object of constructor parameters
jsrsasign 9.1.6 asn1ocsp 1.1.0

© 2012-2023 Kenji Urushima, All rights reserved
Documentation generated by JsDoc Toolkit 2.4.0