how to use gnutls_privkey_import_ext

Nikos Mavrogiannopoulos nmav at
Sun Jun 10 13:18:39 CEST 2012

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,

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.


More information about the Gnutls-help mailing list