590d18
From 6031fed29f3e81450b48b73eba0f9e716efcb73f Mon Sep 17 00:00:00 2001
590d18
From: Christian Heimes <cheimes@redhat.com>
590d18
Date: Tue, 28 Jul 2015 16:12:40 +0200
590d18
Subject: [PATCH] Change internal rsa_(public|private)_key variable names
590d18
590d18
In two places the vault plugin refers to rsa public or rsa private key
590d18
although the code can handle just any kind of asymmetric algorithms,
590d18
e.g. ECDSA. The patch just renames the occurences to avoid more
590d18
confusion in the future.
590d18
590d18
Reviewed-By: Simo Sorce <ssorce@redhat.com>
590d18
Reviewed-By: Martin Basti <mbasti@redhat.com>
590d18
---
590d18
 ipalib/plugins/vault.py | 8 ++++----
590d18
 1 file changed, 4 insertions(+), 4 deletions(-)
590d18
590d18
diff --git a/ipalib/plugins/vault.py b/ipalib/plugins/vault.py
590d18
index 83dc085b5aadb4e2878e29d17449f0808cc7a9c2..4b2c8a518e5c9a93e5490841a3d2177536c905b1 100644
590d18
--- a/ipalib/plugins/vault.py
590d18
+++ b/ipalib/plugins/vault.py
590d18
@@ -486,11 +486,11 @@ class vault(LDAPObject):
590d18
             return fernet.encrypt(data)
590d18
 
590d18
         elif public_key:
590d18
-            rsa_public_key = load_pem_public_key(
590d18
+            public_key_obj = load_pem_public_key(
590d18
                 data=public_key,
590d18
                 backend=default_backend()
590d18
             )
590d18
-            return rsa_public_key.encrypt(
590d18
+            return public_key_obj.encrypt(
590d18
                 data,
590d18
                 padding.OAEP(
590d18
                     mgf=padding.MGF1(algorithm=hashes.SHA1()),
590d18
@@ -513,12 +513,12 @@ class vault(LDAPObject):
590d18
 
590d18
         elif private_key:
590d18
             try:
590d18
-                rsa_private_key = load_pem_private_key(
590d18
+                private_key_obj = load_pem_private_key(
590d18
                     data=private_key,
590d18
                     password=None,
590d18
                     backend=default_backend()
590d18
                 )
590d18
-                return rsa_private_key.decrypt(
590d18
+                return private_key_obj.decrypt(
590d18
                     data,
590d18
                     padding.OAEP(
590d18
                         mgf=padding.MGF1(algorithm=hashes.SHA1()),
590d18
-- 
590d18
2.4.3
590d18