Skip to content
This repository was archived by the owner on Nov 30, 2023. It is now read-only.

Commit 0371e22

Browse files
authored
AWS CLI - GPG Fix (#1391)
1 parent 4a8064f commit 0371e22

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

script-library/awscli-debian.sh

100644100755
Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -92,15 +92,13 @@ verify_aws_cli_gpg_signature() {
9292

9393
get_common_setting AWSCLI_GPG_KEY
9494
get_common_setting AWSCLI_GPG_KEY_MATERIAL true
95-
local awsCliPublicKeyFile=aws-cli-public-key.pem
96-
echo "${AWSCLI_GPG_KEY_MATERIAL}" > "${awsCliPublicKeyFile}"
97-
gpg --quiet --import "${awsCliPublicKeyFile}"
95+
local awsGpgKeyring=aws-cli-public-key.gpg
9896

99-
gpg --batch --quiet --verify "${sigFilePath}" "${filePath}"
97+
echo "${AWSCLI_GPG_KEY_MATERIAL}" | gpg --dearmor > "./${awsGpgKeyring}"
98+
gpg --batch --quiet --no-default-keyring --keyring "./${awsGpgKeyring}" --verify "${sigFilePath}" "${filePath}"
10099
local status=$?
101100

102-
gpg --batch --quiet --delete-keys "${AWSCLI_GPG_KEY}"
103-
rm "${awsCliPublicKeyFile}"
101+
rm "./${awsGpgKeyring}"
104102

105103
return ${status}
106104
}
@@ -141,4 +139,4 @@ echo "(*) Installing AWS CLI..."
141139

142140
install
143141

144-
echo "Done!"
142+
echo "Done!"

0 commit comments

Comments
 (0)