Skip to content

Commit

Permalink
add certs script for ec2
Browse files Browse the repository at this point in the history
  • Loading branch information
kota-yata committed Jul 20, 2024
1 parent 764736f commit ba648d4
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,4 @@ venv/
ENV/
env.bak/
venv.bak/
certs/
9 changes: 9 additions & 0 deletions scripts/ec2.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/usr/bin/env bash

# Create certs dir if it does not exists
mkdir -p ./certs

# Generate publi - private key
openssl req -newkey rsa:2048 -nodes -keyout ./certs/certificate.key -x509 -out ./certs/certificate.pem -subj '/CN=54.187.49.238' -addext "subjectAltName=IP:54.187.49.238"

openssl x509 -outform der -in ./certs/certificate.pem -out ./certificate.crt

0 comments on commit ba648d4

Please sign in to comment.