Re: [Freeipa-devel] [PATCH 020] Change internal rsa_(public|private)_key variable names

2015-08-24 Thread Martin Basti



On 07/28/2015 04:28 PM, Simo Sorce wrote:

On Tue, 2015-07-28 at 16:18 +0200, Christian Heimes wrote:

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.

LGTM.
Simo.


ACK

Pushed to:
master: cee5d9007e7db84f24bc8e387ec7ff784495ab9f
ipa-4-2: 5f557686ffbbfd738e9d4f440a91a68fd421bad6

--
Manage your subscription for the Freeipa-devel mailing list:
https://www.redhat.com/mailman/listinfo/freeipa-devel
Contribute to FreeIPA: http://www.freeipa.org/page/Contribute/Code


Re: [Freeipa-devel] [PATCH 020] Change internal rsa_(public|private)_key variable names

2015-07-28 Thread Simo Sorce
On Tue, 2015-07-28 at 16:18 +0200, Christian Heimes wrote:
 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.

LGTM.
Simo.

-- 
Simo Sorce * Red Hat, Inc * New York

-- 
Manage your subscription for the Freeipa-devel mailing list:
https://www.redhat.com/mailman/listinfo/freeipa-devel
Contribute to FreeIPA: http://www.freeipa.org/page/Contribute/Code


[Freeipa-devel] [PATCH 020] Change internal rsa_(public|private)_key variable names

2015-07-28 Thread Christian Heimes
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.
From 1b09967de50aa3c73a9fcab1ff11aa6d1800bae5 Mon Sep 17 00:00:00 2001
From: Christian Heimes chei...@redhat.com
Date: Tue, 28 Jul 2015 16:12:40 +0200
Subject: [PATCH] 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.
---
 ipalib/plugins/vault.py | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/ipalib/plugins/vault.py b/ipalib/plugins/vault.py
index 81197f9328c7ed890fa336f464bfcda475ac6189..a2b78f4dec143524d81a1a006733c22db0f90847 100644
--- a/ipalib/plugins/vault.py
+++ b/ipalib/plugins/vault.py
@@ -469,11 +469,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()),
@@ -496,12 +496,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()),
-- 
2.4.3



signature.asc
Description: OpenPGP digital signature
-- 
Manage your subscription for the Freeipa-devel mailing list:
https://www.redhat.com/mailman/listinfo/freeipa-devel
Contribute to FreeIPA: http://www.freeipa.org/page/Contribute/Code