RSA sign/verify and hash generation functions

Nikos Mavrogiannopoulos nmav at gnutls.org
Wed Dec 15 01:53:21 CET 2010


Did you try the interface in abstract.h for public keys?

On Tue, Dec 14, 2010 at 7:54 PM, Murray S. Kucherawy <msk at cloudmark.com> wrote:
> Looks like signing is now working, but I can't import a DER public key with this:
>
>        gnutls_x509_crt_init(&pubkey);
>        key.data = <pointer to DER data>;
>        key.size = <length of DER data, currently >;
>        gnutls_x509_crt_import(pubkey, &key, GNUTLS_X509_FMT_DER);
>
> The import call is returning -73, GNUTLS_E_ASN1_TAG_ERROR.
>
> What I'm actually importing is an DER encoded RSA public key, namely a PEM one with the "---BEGIN PUBLIC KEY---" removed and then the base64 decoding done.  It's a 1024 bit key, and post-decoding it's 162 bytes long.
>




More information about the Gnutls-help mailing list