Generate a CSR (Certificate Signing Request) for a Free SSL Certificate in your browser! Uses as few dependencies as possible from the PKI.js and ASN1.js suites.
Go to file
AJ ONeal e0308f43eb update greenlock.html link 2018-04-30 17:35:11 -06:00
LICENSE add LICENSE 2018-04-30 17:33:34 -06:00
README.md update greenlock.html link 2018-04-30 17:35:11 -06:00
csr.js v1.0.0-alpha 2018-04-30 17:31:26 -06:00
package.json v1.0.0-alpha 2018-04-30 17:31:26 -06:00

README.md

browser-csr

Create a CSR (Certificate Signing Request) in the browser that supports SAN altnames.

Used for Let's Encrypt v2 with greenlock.html.

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

pkijs@v1.3.33

<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>