Class Index | File Index

Classes


Class KJUR.asn1.csr.CSRUtil

Certification Request (CSR/PKCS#10) utilities class
Defined in: asn1csr-1.0.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
Certification Request (CSR/PKCS#10) utilities class
Method Summary
Method Attributes Method Name and Description
<static>  
KJUR.asn1.csr.CSRUtil.newCSRPEM(param)
generate a PEM format of CSR/PKCS#10 certificate signing request This method can generate a CSR certificate signing request by a simple JSON object which has following parameters:
Class Detail
KJUR.asn1.csr.CSRUtil()
Certification Request (CSR/PKCS#10) utilities class
Method Detail
<static> KJUR.asn1.csr.CSRUtil.newCSRPEM(param)
generate a PEM format of CSR/PKCS#10 certificate signing request This method can generate a CSR certificate signing request by a simple JSON object which has following parameters:
// 1) by key object
pem = KJUR.asn1.csr.CSRUtil.newCSRPEM({
  subject: {str: '/C=US/O=Test/CN=example.com'},
  sbjpubkey: pubKeyObj,
  sigalg: "SHA256withRSA",
  sbjprvkey: prvKeyObj
});

// 2) by private/public key PEM 
pem = KJUR.asn1.csr.CSRUtil.newCSRPEM({
  subject: {str: '/C=US/O=Test/CN=example.com'},
  sbjpubkey: pubKeyPEM,
  sigalg: "SHA256withRSA",
  sbjprvkey: prvKeyPEM
});

// 3) with generateKeypair
kp = KEYUTIL.generateKeypair("RSA", 2048);
pem = KJUR.asn1.csr.CSRUtil.newCSRPEM({
  subject: {str: '/C=US/O=Test/CN=example.com'},
  sbjpubkey: kp.pubKeyObj,
  sigalg: "SHA256withRSA",
  sbjprvkey: kp.prvKeyObj
});
Parameters:
{Array} param
parameter to generate CSR
Since:
jsrsasign 4.8.7 asn1csr 1.0.0

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