From 341e79b6041e6f4b8b9e3f9dbbf2aad500c823a1 Mon Sep 17 00:00:00 2001 From: Satyajit Bulage Date: Tue, 28 Nov 2017 13:51:17 +0530 Subject: [PATCH] Removes 'md5' as it only compares two hashes. (#33286) Removing 'md5' checksum checking as simply comparing current and desired publickey does the expected job. Signed-off-by: Satyajit Bulage --- lib/ansible/modules/crypto/openssl_publickey.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ansible/modules/crypto/openssl_publickey.py b/lib/ansible/modules/crypto/openssl_publickey.py index 25ac766c1ee..afc3cc3ca9f 100644 --- a/lib/ansible/modules/crypto/openssl_publickey.py +++ b/lib/ansible/modules/crypto/openssl_publickey.py @@ -224,7 +224,7 @@ class PublicKey(crypto_utils.OpenSSLObject): crypto_utils.load_privatekey(self.privatekey_path, self.privatekey_passphrase) ) - return hashlib.md5(current_publickey).hexdigest() == hashlib.md5(desired_publickey).hexdigest() + return current_publickey == desired_publickey if not state_and_perms: return state_and_perms