Compare commits

..

No commits in common. "9f57ff30466045d506ee218d7a831648ced9f978" and "67c5528b07a2cfb88304ffccbb3cf562aa06070a" have entirely different histories.

View file

@ -87,9 +87,7 @@ function _machines-regenKey {
function _machines-verifyCertificate { function _machines-verifyCertificate {
if openssl verify $MACHINES_CONFIG/machines.crt | grep -v 'error18' | grep 'error' --quiet; then if openssl verify $MACHINES_CONFIG/machines.crt | grep -v 'error18' | grep 'error' --quiet; then
echo "Invalid certificate" echo "Invalid certificate"
return 1 exit 1
else
return 0
fi fi
} }
@ -104,17 +102,13 @@ function _machines-ensurePub {
mv $CERT_FILE $MACHINES_CONFIG/machines.crt &> /dev/null mv $CERT_FILE $MACHINES_CONFIG/machines.crt &> /dev/null
else else
echo "Certificate rejected." echo "Certificate rejected."
return 1 exit 1
fi fi
fi fi
_machines-verifyCertificate _machines-verifyCertificate
if [ $? != 0 ]; then
return 1
fi
if [ ! -f $MACHINES_CONFIG/machines.pub ]; then if [ ! -f $MACHINES_CONFIG/machines.pub ]; then
_machines-pubFromCrt _machines-pubFromCrt
fi fi
return 0
} }
# SSH ACCESS KEYS # SSH ACCESS KEYS
@ -130,9 +124,6 @@ function _machines-signAkey { # network
function _machines-getAkey { # network function _machines-getAkey { # network
_machines-ensurePub _machines-ensurePub
if [ $? != 0 ]; then
return 1
fi
KEY_FILE=$(mktemp) KEY_FILE=$(mktemp)
SIGN_FILE=$(mktemp) SIGN_FILE=$(mktemp)
_machines-api akey/$1 > $KEY_FILE _machines-api akey/$1 > $KEY_FILE
@ -293,9 +284,6 @@ function machines-setup {
fi fi
_machines-ensurePub _machines-ensurePub
if [ $? != 0 ]; then
return 1
fi
# Variables # Variables
read -p 'Machine name? ' name read -p 'Machine name? ' name