RSA sign/verify and hash generation functions
nmav at gnutls.org
Thu Dec 16 22:23:29 CET 2010
On 12/16/2010 06:49 PM, Murray S. Kucherawy wrote:
>> What do you mean by key size? The indicator returned by
> It's telling me the key is zero bits long. My call sequence is:
> bits = 0;
> gnutls_pubkey_import(X, &keydata, GNUTLS_X509_FMT_DER);
> gnutls_pubkey_verify_hash(X, 0, &digest, &signature); <== works; returns 1
> gnutls_pubkey_get_pk_algorithm(X, &bits);
> assert(bits > 0); <== FAILS
> It looks like key->bits is never set to anything by gnutls_pubkey_import().
It was not set when importing from a raw format. Should work now.
>> I've just added (not tested yet) gnutls_pubkey_import_privkey() that
>> will import the public parameters from a gnutls_privkey_t structure.
>> Thus it would still be quite some calls, but you don't need to export
>> anything. How does it look?
> Works for me. Let me know when you'd like me to grab a snapshot and try it.
Should work by now.
More information about the Gnutls-help