Browse Source
Option A: use Let's Encrypt to get a signed certificate Option B: self-sign your certificatemaster
2 changed files with 32 additions and 0 deletions
@ -0,0 +1,14 @@
@@ -0,0 +1,14 @@
|
||||
#!/bin/sh |
||||
# |
||||
# Generate you some certificates |
||||
# from Lets Encrypt |
||||
# |
||||
# https://charlesreid1.com/wiki/LetsEncrypt |
||||
|
||||
export WEBROOT="/var/www/html" |
||||
export URL="reidmachine.party" |
||||
|
||||
add-apt-repository ppa:certbot/certbot |
||||
apt-get update |
||||
apt-get -y install certbot |
||||
certbot certonly --webroot -w ${WEBROOT} -d ${URL} |
@ -0,0 +1,18 @@
@@ -0,0 +1,18 @@
|
||||
#!/bin/bash |
||||
# |
||||
# Generate a self-signed certificate |
||||
# You snake oil salesman you |
||||
# |
||||
# https://charlesreid1.com/wiki/RaspberryPi/SSH_Stunnel |
||||
|
||||
# Use the openssl library to generate a 2048-bit private RSA key: |
||||
openssl genrsa -out key.pem 2048 |
||||
|
||||
# already generated a private key, so now we generate a certificate, and use our own key to sign it |
||||
openssl req -new -x509 -key key.pem -out cert.pem -days 365 |
||||
|
||||
# Now you have your private key in key.pem and your server's certificate in cert.pem. |
||||
|
||||
# Put those both into the certificate file: |
||||
cat key.pem cert.pem >> stunnel.pem |
||||
|
Loading…
Reference in new issue