Class KJUR.asn1.csr.CSRUtil
Certification Request (CSR/PKCS#10) utilities class
Defined in: asn1csr-1.0.js.
Constructor Attributes | Constructor Name and Description |
---|---|
Certification Request (CSR/PKCS#10) utilities class
|
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:
|
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:
- subject - parameter to be passed to KJUR.asn1.x509.X500Name
- sbjpubkey - parameter to be passed to KEYUTIL.getKey
- sigalg - signature algorithm name (ex. SHA256withRSA)
- sbjprvkey - parameter to be passed to KEYUTIL.getKey
// 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