summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Heimes <cheimes@redhat.com>2015-07-28 16:12:40 +0200
committerMartin Basti <mbasti@redhat.com>2015-08-24 16:58:56 +0200
commitcee5d9007e7db84f24bc8e387ec7ff784495ab9f (patch)
treecb33088f523483a2af8eaaf582a1300d0c356e09
parentb202afbcc0fe8cd1291784a3d261fce59b5646fd (diff)
downloadfreeipa-cee5d9007e7db84f24bc8e387ec7ff784495ab9f.tar.gz
freeipa-cee5d9007e7db84f24bc8e387ec7ff784495ab9f.tar.xz
freeipa-cee5d9007e7db84f24bc8e387ec7ff784495ab9f.zip
Change internal rsa_(public|private)_key variable names
In two places the vault plugin refers to rsa public or rsa private key although the code can handle just any kind of asymmetric algorithms, e.g. ECDSA. The patch just renames the occurences to avoid more confusion in the future. Reviewed-By: Simo Sorce <ssorce@redhat.com> Reviewed-By: Martin Basti <mbasti@redhat.com>
-rw-r--r--ipalib/plugins/vault.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/ipalib/plugins/vault.py b/ipalib/plugins/vault.py
index 83dc085b5..4b2c8a518 100644
--- a/ipalib/plugins/vault.py
+++ b/ipalib/plugins/vault.py
@@ -486,11 +486,11 @@ class vault(LDAPObject):
return fernet.encrypt(data)
elif public_key:
- rsa_public_key = load_pem_public_key(
+ public_key_obj = load_pem_public_key(
data=public_key,
backend=default_backend()
)
- return rsa_public_key.encrypt(
+ return public_key_obj.encrypt(
data,
padding.OAEP(
mgf=padding.MGF1(algorithm=hashes.SHA1()),
@@ -513,12 +513,12 @@ class vault(LDAPObject):
elif private_key:
try:
- rsa_private_key = load_pem_private_key(
+ private_key_obj = load_pem_private_key(
data=private_key,
password=None,
backend=default_backend()
)
- return rsa_private_key.decrypt(
+ return private_key_obj.decrypt(
data,
padding.OAEP(
mgf=padding.MGF1(algorithm=hashes.SHA1()),