# Generate CA key and cert (use -nodes to remove pass phrase)
openssl req -x509 -nodes -newkey rsa:2048 -keyout rootCA.key \
-days 1024 -out rootCA.crt \
-subj "/C=SG/OU=www.org/O=MyOrg, Inc./CN=My Org Root CA"
# Generate server key and CSR (OpenSSL 1.1.1+)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const socketio = require('feathers-socketio') | |
const authOnSocketConnect = require('./authenticate-on-socket-connect') | |
// ... Setup your Feathers app code or use the generator then replace the socketio registration with this | |
// When you register the feathers-socketio plugin, use the utility | |
app.configure(socketio(function (io) { | |
// Get Socket.io headers | |
io.on('connection', function (socket) { | |
authOnSocketConnect({ app, socket }) |
Live Table: https://diafygi.github.io/webcrypto-examples/
I couldn't find anywhere that had clear examples of WebCryptoAPI, so I wrote examples and made a live table with them. Pull requests welcome!
- generateKey | importKey |