1.1 KiB
1.1 KiB
browser-csr
Create a CSR (Certificate Signing Request) in the browser that supports SAN altnames.
Used for Let's Encrypt v2 with greenlock-browser.js.
Usage
<script src="/js/browser-csr.js"></script>
CSR.generate({
/* A WebCrypto-generated keypair */
keypair: {}
/* Subject & SANS altnames */
, domains: [ 'example.com', 'www.example.com' ]
, format: 'rfc7515' // unpadded urlsafe base64
}).then(function (csrweb64) {
console.log(csrweb64);
});
Dependencies
<script src="https://coolaj86.com/assets/media/examples/pkijs.org/v1.3.33/org/pkijs/common.js"></script>
<script src="https://coolaj86.com/assets/media/examples/pkijs.org/v1.3.33/org/pkijs/asn1.js"></script>
<script src="https://coolaj86.com/assets/media/examples/pkijs.org/v1.3.33/org/pkijs/x509_schema.js"></script>
<script src="https://coolaj86.com/assets/media/examples/pkijs.org/v1.3.33/org/pkijs/x509_simpl.js"></script>