[gnutls-dev] Re: Problem with passphrase (opencdk-0.5.8)

Simon Josefsson jas at extundo.com
Mon May 15 22:09:07 CEST 2006


Rafael Martin <rafaelbuitre at yahoo.it> writes:

> Hi,
>
>   I create a pair of keys using opencdk libraries:
>
> cdk_keygen_new(&hd);
> cdk_keygen_set_algo_info(hd, 0, CDK_PK_RSA, key_len);
> cdk_keygen_set_name (hd, name);
> cdk_keygen_set_expire_date (hd, 0, 864000);
> cdk_keygen_set_passphrase (hd, "a");
> cdk_keygen_start (hd);
> cdk_keygen_save (hd, "file.pub", "file.priv");
>
> and then I import the private key in gnupg:
>
> gpg --import file.priv
>
> The import works fine but, when I try to use that key (e.g. to sign):
>
> gpg -u file --sign something
>
> Gnupg ask me for the passphrase and SURPRISE!!! it doesn't accept the one I've
> set (in this case 'a')
>
> Any idea? On my opinion the problem seems to occure when saving the
> key to file but I couldn't solve it.

Hi Rafael.  I'm afraid I don't have any idea.  If nobody else answer
this, and if GPGME can do what you want, may I suggest trying GPGME
instead?  OpenCDK is not actively maintained anymore, and I'm not sure
where we are going with the OpenPGP support in GnuTLS.

/Simon



More information about the Gnutls-dev mailing list