From e2d1cfee9b0f9ed78ae4c07055d7537c722a56e6 Mon Sep 17 00:00:00 2001 From: Searge Date: Tue, 16 Apr 2024 09:47:29 +0300 Subject: [PATCH] fix: Fix typo in file path for certificate approval script - Corrected the destination path for the `approve-csr.sh` script in the Vagrantfile. - Updated the file path to match the actual location of the script. --- Vagrantfile | 2 +- vm/utils/cert_verify.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Vagrantfile b/Vagrantfile index d9b3366..febd6c4 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -103,7 +103,7 @@ Vagrant.configure("2") do |config| if i == 1 # Add cetificate verification scripts node.vm.provision "file", source: "vm/utils/cert_verify.sh", destination: "$HOME/certs/cert_verify.sh" - node.vm.provision "file", source: "vm/utils/approve-csr.sh", destination: "$HOME/certs/approve_csr.sh" + node.vm.provision "file", source: "vm/utils/approve_csr.sh", destination: "$HOME/certs/approve_csr.sh" end end end diff --git a/vm/utils/cert_verify.sh b/vm/utils/cert_verify.sh index 3343ac8..1652ac5 100755 --- a/vm/utils/cert_verify.sh +++ b/vm/utils/cert_verify.sh @@ -115,7 +115,7 @@ check_cert_and_key() CERT_ISSUER=$(sudo openssl x509 -in $cert -text | grep "Issuer: CN"| tr -d " ") CERT_MD5=$(sudo openssl x509 -noout -modulus -in $cert | openssl md5| awk '{print $2}') KEY_MD5=$(sudo openssl rsa -noout -modulus -in $key | openssl md5| awk '{print $2}') - if [ $CERT_SUBJECT == "${subject}" ] && [ $CERT_ISSUER == "${issuer}" ] && [ $CERT_MD5 == $KEY_MD5 ] + if [ "$CERT_SUBJECT" == "${subject}" ] && [ "$CERT_ISSUER" == "${issuer}" ] && [ "$CERT_MD5" == "$KEY_MD5" ] then printf "${SUCCESS}${name} cert and key are correct\n${NC}" else