Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion tools/sdc-docker-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -516,7 +516,16 @@ csrPath=$certDir/csr.pem
caPath=$certDir/ca.pem

mkdir -p $(dirname $keyPath)
openssl rsa -in $sshPrivKeyPath -outform pem >$keyPath 2>/dev/null
#
# Check to see if the given private key is ECDSA or RSA
#
keyType=$(ssh-keygen -lf $sshPrivKeyPath | grep ECDSA)
if [[ -z "$keyType" ]]; then
openssl rsa -in $sshPrivKeyPath -outform pem >$keyPath 2>/dev/null
else
openssl ec -in $sshPrivKeyPath -outform pem >$keyPath 2>/dev/null
fi


certSubject=
if [[ -n "$(which uname 2>/dev/null)" && "$(uname)" == MINGW* ]]; then
Expand Down