Class Index | File Index

Classes


Class KJUR.asn1.ocsp.CertID


Extends KJUR.asn1.ASN1Object.
ASN.1 CertID class for OCSP
Defined in: asn1ocsp-1.0.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
ASN.1 CertID class for OCSP
CertID ASN.1 class is defined in RFC 6960 4.1.1.
Fields borrowed from class KJUR.asn1.ASN1Object:
hL, hT, hTLV, hV, isModified
Method Summary
Method Attributes Method Name and Description
 
setByCert(issuerCert, subjectCert, algName)
set CertID ASN.1 object by PEM certificates.
 
setByValue(issuerNameHashHex, issuerKeyHashHex, serialNumberHex, algName)
set CertID ASN.1 object by values.
Methods borrowed from class KJUR.asn1.ASN1Object:
getEncodedHex, getLengthHexFromValue, getValueHex
Class Detail
KJUR.asn1.ocsp.CertID(params)
ASN.1 CertID class for OCSP
CertID ASN.1 class is defined in RFC 6960 4.1.1.
CertID ::= SEQUENCE {
  hashAlgorithm   AlgorithmIdentifier,
  issuerNameHash  OCTET STRING, -- Hash of issuer's DN
  issuerKeyHash   OCTET STRING, -- Hash of issuer's public key
  serialNumber    CertificateSerialNumber }
// default constructor
o = new KJUR.asn1.ocsp.CertID();
// constructor with certs (sha1 is used by default)
o = new KJUR.asn1.ocsp.CertID({issuerCert: "-----BEGIN...", subjectCert: "-----BEGIN..."});
// constructor with certs and sha256
o = new KJUR.asn1.ocsp.CertID({issuerCert: "-----BEGIN...", subjectCert: "-----BEGIN...", alg: "sha256"});
// constructor with values
o = new KJUR.asn1.ocsp.CertID({namehash: "1a...", keyhash: "ad...", serial: "1234", alg: "sha256"});
Parameters:
{Array} params
associative array of parameters
Since:
jsrsasign 6.1.0 asn1ocsp 1.0.0
Method Detail
setByCert(issuerCert, subjectCert, algName)
set CertID ASN.1 object by PEM certificates.
o = new KJUR.asn1.ocsp.CertID();
o.setByCert("-----BEGIN...", "-----BEGIN..."); // sha1 is used by default
o.setByCert("-----BEGIN...", "-----BEGIN...", "sha256");
Parameters:
{String} issuerCert
string of PEM issuer certificate
{String} subjectCert
string of PEM subject certificate to be verified by OCSP
{String} algName
hash algorithm name used for above arguments (ex. "sha1") DEFAULT: sha1
Since:
jsrsasign 6.1.0 asn1ocsp 1.0.0

setByValue(issuerNameHashHex, issuerKeyHashHex, serialNumberHex, algName)
set CertID ASN.1 object by values.
o = new KJUR.asn1.ocsp.CertID();
o.setByValue("1fac...", "fd3a...", "1234"); // sha1 is used by default
o.setByValue("1fac...", "fd3a...", "1234", "sha256");
Parameters:
{String} issuerNameHashHex
hexadecimal string of hash value of issuer name
{String} issuerKeyHashHex
hexadecimal string of hash value of issuer public key
{String} serialNumberHex
hexadecimal string of certificate serial number to be verified
{String} algName
hash algorithm name used for above arguments (ex. "sha1") DEFAULT: sha1
Since:
jsrsasign 6.1.0 asn1ocsp 1.0.0

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