Class Index | File Index

Classes


Class KJUR.asn1.x509.SubjectKeyIdentifier


Extends KJUR.asn1.x509.Extension.
SubjectKeyIdentifier ASN.1 structure class
Defined in: asn1x509-1.0.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
SubjectKeyIdentifier extension ASN.1 structure class This class represents ASN.1 structure for SubjectKeyIdentifier in RFC 5280.
Fields borrowed from class KJUR.asn1.ASN1Object:
hL, hT, hTLV, hV, isModified, params
Method Summary
Method Attributes Method Name and Description
 
set keyIdentifier value by DEROctetString parameter, key object or PEM file
  • {str: "123"} - by raw string
  • {hex: "01af.
Methods borrowed from class KJUR.asn1.ASN1Object:
getEncodedHex, getLengthHexFromValue, getValueHex, tohex
Class Detail
KJUR.asn1.x509.SubjectKeyIdentifier(params)
SubjectKeyIdentifier extension ASN.1 structure class This class represents ASN.1 structure for SubjectKeyIdentifier in RFC 5280. Constructor of this class may have following parameters:
  • kid - When key object (RSA, KJUR.crypto.ECDSA/DSA) or PEM string of subject public key or certificate is specified, key identifier will be automatically calculated by the method specified in RFC 5280. When a hexadecimal string is specifed, kid will be set explicitly by it.
  • critical - boolean to specify criticality of this extension however conforming CA must mark this extension as non-critical in RFC 5280.
d-ce-subjectKeyIdentifier OBJECT IDENTIFIER ::=  { id-ce 14 }
SubjectKeyIdentifier ::= KeyIdentifier
KeyIdentifier ::= OCTET STRING
// set by hexadecimal string
e = new KJUR.asn1.x509.SubjectKeyIdentifier({kid: {hex: '89ab'}});
// set by PEM public key or certificate string
e = new KJUR.asn1.x509.SubjectKeyIdentifier({kid: "-----BEGIN CERTIFICATE..."});
// set by public key object
pubkey = KEYUTIL.getKey("-----BEGIN CERTIFICATE...");
e = new KJUR.asn1.x509.SubjectKeyIdentifier({kid: pubkey});
Parameters:
{Array} params
associative array of parameters (ex. {kid: {hex: '89ab...'}, critical: true})
Since:
asn1x509 1.1.7 jsrsasign 8.0.14
Method Detail
setKIDByParam(param)
set keyIdentifier value by DEROctetString parameter, key object or PEM file NOTE1: Automatic key identifier calculation is supported since jsrsasign 8.0.16.
o = new KJUR.asn1.x509.SubjectKeyIdentifier();
// set by hexadecimal string
o.setKIDByParam({hex: '1ad9...'});
// set by SubjectPublicKeyInfo of PEM certificate string
o.setKIDByParam("-----BEGIN CERTIFICATE...");
// set by PKCS#8 PEM public key string
o.setKIDByParam("-----BEGIN PUBLIC KEY...");
// set by public key object
pubkey = KEYUTIL.getKey("-----BEGIN CERTIFICATE...");
o.setKIDByParam(pubkey);
Parameters:
{Array} param
array of KJUR.asn1.DERInteger parameter
Since:
asn1x509 1.1.7 jsrsasign 8.0.14
See:
KEYUTIL.getKeyID

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