how to use gnutls_privkey_import_ext

Carolin Latze latze at angry-red-pla.net
Sun Jun 10 14:51:14 CEST 2012


yay, that works ( I do it with a cert_callback now). I just need to 
restrict the hash algorithms to SHA-1 since the TPM refuses to sign an 
SHA256 hash :-/

need to figure out how to do this. If all is running fine I need to 
clean up the code and will send it to you.

On 06/10/2012 01:18 PM, Nikos Mavrogiannopoulos wrote:
> On 06/10/2012 12:56 PM, Carolin Latze wrote:
>
>
>    
>> gnutls_privkey_t key;
>> gnutls_privkey_init(&key);
>>
>> and assigned a NULL privkey to the credentials of this session: (even if
>> I assign the&key here, it does not help)
>>
>> gnutls_certificate_set_x509_key_mem(xcred,&ccert, NULL,
>> GNUTLS_X509_FMT_PEM);
>>      
>
> Unfortunately you cannot call this. If you have a gnutls_privkey_t you
> need to use gnutls_certificate_set_key(). That means that you'll have to
> import the certificate and convert it to gnutls_pcert_st. A helper
> function is indeed needed in that case.
>
> regards,
> Nikos
>    





More information about the Gnutls-help mailing list