[gnutls-dev] Using encrypted OpenPGP keys

Mario Lenz mario.lenz at gmx.net
Thu Aug 10 17:05:28 CEST 2006


Hi!

I just wanted to offer you to send diffs or to use cvs. And a little
change:

> int
> _gnutls_openpgp_raw_enc_privkey_to_gkey (gnutls_privkey * pkey, const
> gnutls_datum_t * raw_key, const char *pw)
> {
>   /* no changes */
> 
>   if (pw)
>   {
>     if (cdk_sk_unprotect (pkt->pkt.secret_key, pw) != CDK_Success)
>     {
>       rc = GNUTLS_E_OPENPGP_GETKEY_FAILED;
>       goto leave;
>     }
>   }
> 
>   /* no changes from here on */
> 
>   sk = pkt->pkt.secret_key;
>   pke_algo = sk->pk->pubkey_algo;
>   pkey->params_size = cdk_pk_get_npkey (pke_algo);
> 
>   /* and so on... */
> 
> }

I think "if (pw && *pw)" would be better.


greez 

   Mario





More information about the Gnutls-devel mailing list