-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #26 from iammuho/25-upgrade-the-depreceated-jose-p…
…ackage-for-jwt-for-pem 25 upgrade the depreceated jose package for jwt for pem
- Loading branch information
Showing
6 changed files
with
82 additions
and
79 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#!/bin/bash | ||
|
||
# Check if the script is running as root | ||
if [ "$EUID" -ne 0 ] | ||
then echo "Please run as root" | ||
exit | ||
fi | ||
|
||
# Generate the RSA private key | ||
openssl genrsa -out /etc/ssl/certs/natternet.private.pem 2048 | ||
|
||
# Generate the RSA public key from the private key | ||
openssl rsa -in /etc/ssl/certs/natternet.private.pem -pubout -out /etc/ssl/certs/natternet.public.pem | ||
|
||
# Set read permissions for all users | ||
chmod 644 /etc/ssl/certs/natternet.private.pem | ||
chmod 644 /etc/ssl/certs/natternet.public.pem | ||
|
||
# Provide feedback that the keys were created | ||
echo "RSA keys generated and placed in /etc/ssl/certs/" |
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
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
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
Oops, something went wrong.