[Pki-devel] [PATCH] 206 - get archival working in python key client

John Magne jmagne at redhat.com
Wed Mar 5 01:52:07 UTC 2014


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 at redhat.com>
> To: pki-devel at 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 at redhat.com
> https://www.redhat.com/mailman/listinfo/pki-devel




More information about the Pki-devel mailing list