[Help-gnutls] Order of freing various structures

Einar Karttunen ekarttun at cs.helsinki.fi
Mon Aug 1 15:08:33 CEST 2005


Hello

I am writing a wrapper of GnuTLS in Haskell and the order of freing
structures seems quite important. Is one allowed to first free
credentials and then deinit a session they were associated with? Or
must the credentials be valid when deinit is called on the session?

i.e. is the following sequence legal:
gnutls_credentials_set(session, cred, ...);
gnutls_<something>_credentials_free(cred);
gnutls_deinit(session);

or must deinit allways be called first? May they be called concurrently 
if gcry_control has been properly initialized for multithreaded operation?

- Einar Karttunen





More information about the Gnutls-help mailing list