Skip to content

Commit

Permalink
WIP detect key format and automatically convert
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrew Chin authored and Andrew Chin committed Feb 1, 2018
1 parent bac11fb commit e2d0996
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions installer/build/scripts/systemd/scripts/vic-appliance-tls.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,12 @@ function formatCert {
echo "$content" | sed -r 's/(-{5}BEGIN [A-Z ]+-{5})/&\n/g; s/(-{5}END [A-Z ]+-{5})/\n&\n/g' | sed -r 's/.{64}/&\n/g; /^\s*$/d' | sed -r '/^$/d' > "$file"
}

# Check if private key is valid
function checkKey {
file=$1
openssl rsa -in "$file" -check
}

# Generate self signed cert
function genCert {
echo "Generating self signed certificate"
Expand Down

0 comments on commit e2d0996

Please sign in to comment.