Skip to content

Commit

Permalink
add ip to cert SANs
Browse files Browse the repository at this point in the history
  • Loading branch information
carsonab committed Sep 30, 2024
1 parent b91310f commit 112ae62
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions gencerts.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ cd testcerts
openssl genrsa -out root.key 2048
openssl req -new -x509 -days 365 -key root.key -subj "/C=CN/ST=GD/L=SZ/O=Moov, Inc./CN=Moov Root CA" -out root.crt
openssl req -newkey rsa:2048 -nodes -keyout server.key -subj "/C=CN/ST=GD/L=SZ/O=Moov, Inc./CN=localhost" -out server.csr
openssl x509 -req -extfile <(printf "subjectAltName=DNS:localhost") -days 365 -in server.csr -CA root.crt -CAkey root.key -CAcreateserial -out server.crt
openssl x509 -req -extfile <(printf "subjectAltName=DNS:localhost,IP:127.0.0.1") -days 365 -in server.csr -CA root.crt -CAkey root.key -CAcreateserial -out server.crt
openssl req -newkey rsa:2048 -nodes -keyout client.key -subj "/C=CN/ST=GD/L=SZ/O=Moov, Inc./CN=moov" -out client.csr
openssl x509 -req -extfile <(printf "subjectAltName=DNS:localhost") -days 365 -in client.csr -CA root.crt -CAkey root.key -CAcreateserial -out client.crt
openssl x509 -req -extfile <(printf "subjectAltName=DNS:localhost,IP:127.0.0.1") -days 365 -in client.csr -CA root.crt -CAkey root.key -CAcreateserial -out client.crt

0 comments on commit 112ae62

Please sign in to comment.