Class Index | File Index

Classes


Class KJUR.asn1.x509.X509Util

X.509 certificate and CRL utilities class
Defined in: asn1x509-1.0.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
X.509 certificate and CRL utilities class
Method Summary
Method Attributes Method Name and Description
<static>  
KJUR.asn1.x509.X509Util.getPKCS8PubKeyPEMfromRSAKey(rsaKey)
get PKCS#8 PEM public key string from RSAKey object
<static>  
KJUR.asn1.x509.X509Util.newCertPEM(param)
issue a certificate in PEM format This method can issue a certificate by a simple JSON object.
Class Detail
KJUR.asn1.x509.X509Util()
X.509 certificate and CRL utilities class
Method Detail
<static> KJUR.asn1.x509.X509Util.getPKCS8PubKeyPEMfromRSAKey(rsaKey)
get PKCS#8 PEM public key string from RSAKey object
var pem = KJUR.asn1.x509.X509Util.getPKCS8PubKeyPEMfromRSAKey(pubKey);
Parameters:
{RSAKey} rsaKey
RSA public key of RSAKey object

<static> KJUR.asn1.x509.X509Util.newCertPEM(param)
issue a certificate in PEM format This method can issue a certificate by a simple JSON object. Signature value will be provided by signing with private key using 'cakey' parameter or hexa decimal signature value by 'sighex' parameter. NOTE: When using DSA or ECDSA CA signing key, use 'paramempty' in 'sigalg' to ommit parameter field of AlgorithmIdentifer. In case of RSA, parameter NULL will be specified by default.
var certPEM = KJUR.asn1.x509.X509Util.newCertPEM(
{ serial: {int: 4},
  sigalg: {name: 'SHA1withECDSA', paramempty: true},
  issuer: {str: '/C=US/O=a'},
  notbefore: {'str': '130504235959Z'},
  notafter: {'str': '140504235959Z'},
  subject: {str: '/C=US/O=b'},
  sbjpubkey: pubKeyPEM,
  ext: [
    {basicConstraints: {cA: true, critical: true}},
    {keyUsage: {bin: '11'}},
  ],
  cakey: [prvkey, pass]}
);
// -- or --
var certPEM = KJUR.asn1.x509.X509Util.newCertPEM(
{ serial: {int: 1},
  sigalg: {name: 'SHA1withRSA', paramempty: true},
  issuer: {str: '/C=US/O=T1'},
  notbefore: {'str': '130504235959Z'},
  notafter: {'str': '140504235959Z'},
  subject: {str: '/C=US/O=T1'},
  sbjpubkey: pubKeyObj,
  sighex: '0102030405..'}
);
Parameters:
{Array} param
parameter to issue a certificate
Since:
asn1x509 1.0.6

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