Proof of Concept to generate certificate signing requests in a web browser using node-forge.
This repository has been archived on 2022-07-28. You can view files and clone it, but cannot push or open issues or pull requests.
Find a file
2020-11-30 00:56:44 +01:00
src Add PKCS#12 creation 2020-11-30 00:45:57 +01:00
.gitignore Add signer backend 2020-11-30 00:22:43 +01:00
ca.cnf Add signer backend 2020-11-30 00:22:43 +01:00
COPYING Add GPL-2 license text 2020-11-22 11:47:19 +01:00
go.mod Add signer backend 2020-11-30 00:22:43 +01:00
gulpfile.js Add initial implementation 2020-11-22 11:42:18 +01:00
main.go Add signer backend 2020-11-30 00:22:43 +01:00
package-lock.json Update package-lock.json, use UTF8 for common name 2020-11-22 20:56:03 +01:00
package.json Add initial implementation 2020-11-22 11:42:18 +01:00
README.md Update README.md for the Go backend 2020-11-30 00:56:44 +01:00
setup_example_ca.sh Add signer backend 2020-11-30 00:22:43 +01:00

Browser PKCS#10 CSR generation PoC

This repository contains a small proof of concept implementation of browser based PKCS#10 certificate signing request and PKCS#12 key store generation using node-forge.

The backend is implemented in Go and utilizes openssl for the signing operations.

Running

  1. Clone the repository

    git clone https://git.dittberner.info/jan/browser_csr_generation.git
    
  2. Get dependencies and build assets

    cd browser_csr_generation
    npm install --global gulp-cli
    npm install
    gulp
    
  3. Setup the example CA and a server certificate and key

    ./setup_example_ca.sh
    openssl req -new -x509 -days 365 -subj "/CN=localhost" -addext subjectAltName=DNS:localhost -newkey rsa:3072 \
      -nodes -out server.crt.pem -keyout server.key.pem
    
  4. Run the Go based backend

    go run main.go
    

    Open https://localhost:8000/ in your browser.

  5. Run gulp watch

    You can run a gulp watch in a second terminal window to automatically publish changes to the files in the src directory:

    gulp watch