Class Index | File Index

Classes


Class KJUR.asn1.ocsp.OCSPParser

OCSP request and response parser
Defined in: asn1ocsp-1.0.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
OCSP request and response parser
This class provides ASN.1 parser for OCSP related ASN.1 data.
Method Summary
Method Attributes Method Name and Description
 
parse ASN.1 CertID of OCSP
CertID ::= SEQUENCE {
  hashAlgorithm   AlgorithmIdentifier,
  issuerNameHash  OCTET STRING, -- Hash of issuer's DN
  issuerKeyHash   OCTET STRING, -- Hash of issuer's public key
  serialNumber    CertificateSerialNumber }
 
parse ASN.1 OCSPRequest
OCSPRequest ::= SEQUENCE {
  tbsRequest              TBSRequest,
  optionalSignature  [0]  EXPLICIT Signature OPTIONAL }
TBSRequest  ::=  SEQUENCE {
  version            [0]  EXPLICIT Version DEFAULT v1,
  requestorName      [1]  EXPLICIT GeneralName OPTIONAL,
  requestList             SEQUENCE OF Request,
  requestExtensions  [2]  EXPLICIT Extensions OPTIONAL }
 
parse ASN.1 Request of OCSP
Request ::= SEQUENCE {
  reqCert                  CertID,
  singleRequestExtensions  [0] EXPLICIT Extensions OPTIONAL }      
 
parse ASN.1 SEQUENCE OF Request in OCSP
TBSRequest  ::=  SEQUENCE {
  version            [0]  EXPLICIT Version DEFAULT v1,
  requestorName      [1]  EXPLICIT GeneralName OPTIONAL,
  requestList             SEQUENCE OF Request,
  requestExtensions  [2]  EXPLICIT Extensions OPTIONAL }
Request ::= SEQUENCE {
  reqCert                  CertID,
  singleRequestExtensions  [0] EXPLICIT Extensions OPTIONAL }      
 
parse ASN.1 TBSRequest of OCSP
TBSRequest  ::=  SEQUENCE {
  version            [0]  EXPLICIT Version DEFAULT v1,
  requestorName      [1]  EXPLICIT GeneralName OPTIONAL,
  requestList             SEQUENCE OF Request,
  requestExtensions  [2]  EXPLICIT Extensions OPTIONAL }
Class Detail
KJUR.asn1.ocsp.OCSPParser()
OCSP request and response parser
This class provides ASN.1 parser for OCSP related ASN.1 data. Currntly only OCSP request parsers are available.
Since:
jsrsasign 9.1.6 asn1ocsp 1.1.0
Method Detail
getCertID(h)
parse ASN.1 CertID of OCSP
CertID ::= SEQUENCE {
  hashAlgorithm   AlgorithmIdentifier,
  issuerNameHash  OCTET STRING, -- Hash of issuer's DN
  issuerKeyHash   OCTET STRING, -- Hash of issuer's public key
  serialNumber    CertificateSerialNumber }
o = new KJUR.asn1.ocsp.OCSPParser();
o.getCertID("30...") →
{ alg: "sha1"
  issname: "...hex...",
  isskey: "...hex...",
  sbjsn: "...hex..." }
Parameters:
{String} h
hexadecimal string of CertID
Since:
jsrsasign 9.1.6 asn1ocsp 1.1.0
Returns:
JSON object of CertID parameter
See:
KJUR.asn1.ocsp.CertID

{Array} getOCSPRequest(h)
parse ASN.1 OCSPRequest
OCSPRequest ::= SEQUENCE {
  tbsRequest              TBSRequest,
  optionalSignature  [0]  EXPLICIT Signature OPTIONAL }
TBSRequest  ::=  SEQUENCE {
  version            [0]  EXPLICIT Version DEFAULT v1,
  requestorName      [1]  EXPLICIT GeneralName OPTIONAL,
  requestList             SEQUENCE OF Request,
  requestExtensions  [2]  EXPLICIT Extensions OPTIONAL }
o = new KJUR.asn1.ocsp.OCSPParser();
o.getOCSPRequest("30...") →
{ array: [{
   "alg": "sha1",
   "issname": "105fa67a80089db5279f35ce830b43889ea3c70d",
   "isskey": "0f80611c823161d52f28e78d4638b42ce1c6d9e2",
   "sbjsn": "0fef62075d715dc5e1d8bd03775c9686"
}]}
Parameters:
{String} h
hexadecimal string of ASN.1 OCSPRequest
Since:
jsrsasign 9.1.6 asn1ocsp 1.1.0
Returns:
{Array} array of JSON object of OCSPRequest parameter

getRequest(h)
parse ASN.1 Request of OCSP
Request ::= SEQUENCE {
  reqCert                  CertID,
  singleRequestExtensions  [0] EXPLICIT Extensions OPTIONAL }      
o = new KJUR.asn1.ocsp.OCSPParser();
o.getRequest("30...") →
{ alg: "sha1"
  issname: "...hex...",
  isskey: "...hex...",
  sbjsn: "...hex...",
  ext: [<>...]
}
Parameters:
{String} h
hexadecimal string of ASN.1 Request of OCSP
Since:
jsrsasign 9.1.6 asn1ocsp 1.1.0
Returns:
JSON object of Request parameter

{Array} getRequestList(h)
parse ASN.1 SEQUENCE OF Request in OCSP
TBSRequest  ::=  SEQUENCE {
  version            [0]  EXPLICIT Version DEFAULT v1,
  requestorName      [1]  EXPLICIT GeneralName OPTIONAL,
  requestList             SEQUENCE OF Request,
  requestExtensions  [2]  EXPLICIT Extensions OPTIONAL }
Request ::= SEQUENCE {
  reqCert                  CertID,
  singleRequestExtensions  [0] EXPLICIT Extensions OPTIONAL }      
o = new KJUR.asn1.ocsp.OCSPParser();
o.getRequestList("30...") →
[{ alg: "sha1"
  issname: "...hex...",
  isskey: "...hex...",
  sbjsn: "...hex...",
  ext: [<>...]
}]
Parameters:
{String} h
hexadecimal string of ASN.1 SEQUENCE OF Request in OCSP
Since:
jsrsasign 9.1.6 asn1ocsp 1.1.0
Returns:
{Array} array of JSON object of Request parameter

{Array} getTBSRequest(h)
parse ASN.1 TBSRequest of OCSP
TBSRequest  ::=  SEQUENCE {
  version            [0]  EXPLICIT Version DEFAULT v1,
  requestorName      [1]  EXPLICIT GeneralName OPTIONAL,
  requestList             SEQUENCE OF Request,
  requestExtensions  [2]  EXPLICIT Extensions OPTIONAL }
o = new KJUR.asn1.ocsp.OCSPParser();
o.getTBSRequest("30...") →
{array: [{
  "alg": "sha1",
  "issname": "105fa67a80089db5279f35ce830b43889ea3c70d",
  "isskey": "0f80611c823161d52f28e78d4638b42ce1c6d9e2",
  "sbjsn": "0fef62075d715dc5e1d8bd03775c9686"
}]}
Parameters:
{String} h
hexadecimal string of ASN.1 TBSRequest of OCSP
Since:
jsrsasign 9.1.6 asn1ocsp 1.1.0
Returns:
{Array} array of JSON object of TBSRequest parameter

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