Skip to content

Example NodeJS server that uses certificates from Self-Signed Cert Authority for Server and Client

Notifications You must be signed in to change notification settings

AnsonT/NodeSelfSignedCAExample

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Setting up node.js to validate certificates from self signed certificate authority

Uses cfssl to generate certificates:

Install GoLang

go get -u github.com/cloudflare/cfssl/cmd/...

Generate certificates:

Modify cert/config files.

cd cert mkdir ca server clients

  1. Generate certificate authority

./genca.sh

  1. Generate server certificate

./genserver.sh

  1. Generate client certificate

./genclient.sh

Description

  • Server uses server certificate to support https calls
  • Server expects clients to call with client cert
  • Client uses self signed certificate authority to validate server

For testing

host file localhost.test 127.0.0.1

yarn test

About

Example NodeJS server that uses certificates from Self-Signed Cert Authority for Server and Client

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published