All Projects → Dexus → Pem

Dexus / Pem

Licence: other
Create private keys and certificates with node.js

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Pem

Ssl exporter
Exports Prometheus metrics for SSL certificates
Stars: ✭ 211 (-57.46%)
Mutual labels:  ssl, tls, certificate, ssl-certificate
Cert
Cert is the Go tool to get TLS certificate information.
Stars: ✭ 166 (-66.53%)
Mutual labels:  ssl, tls, certificate, ssl-certificate
Aspnetcorecertificates
Certificate Manager in .NET Core for creating and using X509 certificates
Stars: ✭ 135 (-72.78%)
Mutual labels:  ssl, tls, certificate
Acmetool
🔒 acmetool, an automatic certificate acquisition tool for ACME (Let's Encrypt)
Stars: ✭ 1,882 (+279.44%)
Mutual labels:  ssl, tls, certificate
Mutual Tls Ssl
🔐 Tutorial of setting up Security for your API with one way authentication with TLS/SSL and mutual mutual authentication for a java based web server and a client with both Spring Boot. Different clients are provided such as Apache HttpClient, OkHttp, Spring RestTemplate, Spring WebFlux WebClient Jetty and Netty, the old and the new JDK HttpClient, the old and the new Jersey Client, Google HttpClient, Unirest, Retrofit, Feign, Methanol, vertx, Scala client Finagle, Featherbed, Dispatch Reboot, AsyncHttpClient, Sttp, Akka, Requests Scala, Http4s Blaze, Kotlin client Fuel, http4k, Kohttp and ktor. Also other server examples are available such as jersey with grizzly. Also gRPC examples are included
Stars: ✭ 163 (-67.14%)
Mutual labels:  ssl, tls, certificate
O Saft
O-Saft - OWASP SSL advanced forensic tool
Stars: ✭ 306 (-38.31%)
Mutual labels:  ssl, tls, certificate
Pem
Easy PEM file parsing in Python.
Stars: ✭ 122 (-75.4%)
Mutual labels:  ssl, tls, certificate
Sortpem
➿ Sorting utility for PEM files
Stars: ✭ 11 (-97.78%)
Mutual labels:  ssl, tls, certificate
smtplib-bruteforce
bruteforcing gmail (TLS/SSL)
Stars: ✭ 26 (-94.76%)
Mutual labels:  tls, ssl, certificate
qsslcaudit
test SSL/TLS clients how secure they are
Stars: ✭ 22 (-95.56%)
Mutual labels:  tls, ssl, certificate
Trustme
#1 quality TLS certs while you wait, for the discerning tester
Stars: ✭ 355 (-28.43%)
Mutual labels:  ssl, tls, ssl-certificate
Ssl Checker
Python script that collects SSL/TLS information from hosts
Stars: ✭ 94 (-81.05%)
Mutual labels:  ssl, tls, certificate
Acme client
Java ACME Client application
Stars: ✭ 77 (-84.48%)
Mutual labels:  ssl, tls, certificate
Certstrap
Tools to bootstrap CAs, certificate requests, and signed certificates.
Stars: ✭ 1,689 (+240.52%)
Mutual labels:  ssl, tls, certificate
Nico
A HTTP2 web server for reverse proxy and single page application, automatically apply for ssl certificate, Zero-Configuration.
Stars: ✭ 43 (-91.33%)
Mutual labels:  ssl, tls, certificate
letsencrypt-www
Probably the easiest way to create | renew | deploy certificate
Stars: ✭ 27 (-94.56%)
Mutual labels:  tls, ssl, certificate
Certigo
A utility to examine and validate certificates in a variety of formats
Stars: ✭ 662 (+33.47%)
Mutual labels:  ssl, tls, certificate
sslcontext-kickstart
🔐 A lightweight high level library for configuring a http client or server based on SSLContext or other properties such as TrustManager, KeyManager or Trusted Certificates to communicate over SSL TLS for one way authentication or two way authentication provided by the SSLFactory. Support for Java, Scala and Kotlin based clients with examples. Av…
Stars: ✭ 295 (-40.52%)
Mutual labels:  tls, ssl, certificate
freshcerts
ACME certificate protocol (Let's Encrypt) proxy client with a dashboard and monitoring
Stars: ✭ 59 (-88.1%)
Mutual labels:  tls, ssl, certificate
Ssl Proxy
🔒 Simple zero-config SSL reverse proxy with real autogenerated certificates (LetsEncrypt, self-signed, provided)
Stars: ✭ 427 (-13.91%)
Mutual labels:  ssl, tls, certificate

pem

Create private keys and certificates with node.js

Build Status npm version npm downloads pem documentation Greenkeeper badge

JavaScript Style Guide

Installation

Install with npm

npm install pem

Examples

Here are some examples for creating an SSL key/cert on the fly, and running an HTTPS server on port 443. 443 is the standard HTTPS port, but requires root permissions on most systems. To get around this, you could use a higher port number, like 4300, and use https://localhost:4300 to access your server.

Basic https

var https = require('https')
var pem = require('pem')

pem.createCertificate({ days: 1, selfSigned: true }, function (err, keys) {
  if (err) {
    throw err
  }
  https.createServer({ key: keys.clientKey, cert: keys.certificate }, function (req, res) {
    res.end('o hai!')
  }).listen(443)
})

Express

var https = require('https')
var pem = require('pem')
var express = require('express')

pem.createCertificate({ days: 1, selfSigned: true }, function (err, keys) {
  if (err) {
    throw err
  }
  var app = express()

  app.get('/', function (req, res) {
    res.send('o hai!')
  })

  https.createServer({ key: keys.clientKey, cert: keys.certificate }, app).listen(443)
})

API

Please have a look into the API documentation.

we had to clean up a bit

Custom extensions config file

You can specify custom OpenSSL extensions using the config or extFile options for createCertificate (or using csrConfigFile with createCSR).

extFile and csrConfigFile should be paths to the extension files. While config will generate a temporary file from the supplied file contents.

If you specify config then the v3_req section of your config file will be used.

The following would be an example of a Certificate Authority extensions file:

[req]
req_extensions = v3_req
distinguished_name = req_distinguished_name

[req_distinguished_name]
commonName = Common Name
commonName_max = 64

[v3_req]
basicConstraints = critical,CA:TRUE

While the following would specify subjectAltNames in the resulting certificate:

[req]
req_extensions = v3_req

[ v3_req ]
basicConstraints = CA:FALSE
keyUsage = nonRepudiation, digitalSignature, keyEncipherment
subjectAltName = @alt_names

[alt_names]
DNS.1 = host1.example.com
DNS.2 = host2.example.com
DNS.3 = host3.example.com

Note that createCertificate and createCSR supports the altNames option which would be easier to use in most cases.

Warning: If you specify altNames the custom extensions file will not be passed to OpenSSL.

Setting openssl location

In some systems the openssl executable might not be available by the default name or it is not included in $PATH. In this case you can define the location of the executable yourself as a one time action after you have loaded the pem module:

var pem = require('pem')
pem.config({
  pathOpenSSL: '/usr/local/bin/openssl'
})
// do something with the pem module

Specialthanks to

  • Andris Reinman (@andris9) - Initiator of pem

License

MIT

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].