[PATCH] 206 - get archival working in python key client
This patch gets key archival working for the Key python client. Ade
Ade: Looks good, just a question. 1. This code here: def setup_contexts(mechanism, sym_key, nonce_iv): .... # If initialization vector was supplied use it, otherwise set it to None if nonce_iv: iv_si = nss.SecItem(nonce_iv) iv_param = nss.param_from_iv(mechanism, iv_si) else: iv_length = nss.get_iv_length(mechanism) if iv_length > 0: iv_data = nss.generate_random(iv_length) iv_si = nss.SecItem(iv_data) iv_param = nss.param_from_iv(mechanism, iv_si) else: iv_param = None Note the else clause where we generate an init vector. Can we use the nice method you provided "generate_nonce_iv" to do this? ----- Original Message -----
From: "Ade Lee" <alee@redhat.com> To: pki-devel@redhat.comgenerate_nonce_iv Subject: [Pki-devel] [PATCH] 206 - get archival working in python key client
This patch gets key archival working for the Key python client.
Ade
_______________________________________________ Pki-devel mailing list Pki-devel@redhat.com https://www.redhat.com/mailman/listinfo/pki-devel
On 3/4/2014 1:23 PM, Ade Lee wrote:
This patch gets key archival working for the Key python client.
Ade
Not sure if this is correct. Test #19 archives key1 with a new client_key_id. I suppose this will generate a new key record with a new key_id. Test #20 is getting the key_info with the above client_key_id, but then it retrieves the key data using an old key_id obtained from test #4, not from the key_info just obtained. Is the test comparing the right keys? -- Endi S. Dewata
I think you are correct, but they may be the same keys anway. He looks like he has the same key archived under two different id's. He's retrieving it at the end using the old id. ----- Original Message -----
From: "Endi Sukma Dewata" <edewata@redhat.com> To: alee@redhat.com, pki-devel@redhat.com Sent: Tuesday, March 4, 2014 6:26:22 PM Subject: Re: [Pki-devel] [PATCH] 206 - get archival working in python key client
On 3/4/2014 1:23 PM, Ade Lee wrote:
This patch gets key archival working for the Key python client.
Ade
Not sure if this is correct.
Test #19 archives key1 with a new client_key_id. I suppose this will generate a new key record with a new key_id.
Test #20 is getting the key_info with the above client_key_id, but then it retrieves the key data using an old key_id obtained from test #4, not from the key_info just obtained. Is the test comparing the right keys?
-- Endi S. Dewata
_______________________________________________ Pki-devel mailing list Pki-devel@redhat.com https://www.redhat.com/mailman/listinfo/pki-devel
Yes, they are the same keys, but in this case test #20 might report a false positive. The key generated in test #4 is already validated in tests #7 and #8. Test #20 basically repeats those steps. The key archived in test #19 is not validated, which I suppose is the purpose of test #20. -- Endi S. Dewata On 3/4/2014 8:49 PM, John Magne wrote:
I think you are correct, but they may be the same keys anway.
He looks like he has the same key archived under two different id's. He's retrieving it at the end using the old id.
Not sure if this is correct.
Test #19 archives key1 with a new client_key_id. I suppose this will generate a new key record with a new key_id.
Test #20 is getting the key_info with the above client_key_id, but then it retrieves the key data using an old key_id obtained from test #4, not from the key_info just obtained. Is the test comparing the right keys?
Good catch on the test. I updated the test and changed the code as Jack suggested. Updated patch attached. This one supersedes the old one. Ade On Tue, 2014-03-04 at 21:13 -0600, Endi Sukma Dewata wrote:
Yes, they are the same keys, but in this case test #20 might report a false positive.
The key generated in test #4 is already validated in tests #7 and #8. Test #20 basically repeats those steps. The key archived in test #19 is not validated, which I suppose is the purpose of test #20.
acked by Endi. Pushed to master. On Wed, 2014-03-05 at 12:03 -0500, Ade Lee wrote:
Good catch on the test.
I updated the test and changed the code as Jack suggested. Updated patch attached. This one supersedes the old one.
Ade
On Tue, 2014-03-04 at 21:13 -0600, Endi Sukma Dewata wrote:
Yes, they are the same keys, but in this case test #20 might report a false positive.
The key generated in test #4 is already validated in tests #7 and #8. Test #20 basically repeats those steps. The key archived in test #19 is not validated, which I suppose is the purpose of test #20.
_______________________________________________ Pki-devel mailing list Pki-devel@redhat.com https://www.redhat.com/mailman/listinfo/pki-devel
participants (3)
-
Ade Lee -
Endi Sukma Dewata -
John Magne