if (dh_params)
gnutls_dh_params_deinit(dh_params);
I'm afraid, the _params_deinit functions should only be called when the
session is closed. ldap_gnutls_need_rsa_params uses
gnutls_certificate_set_{dh,rsa}_params to set the given params and
those functions only set a pointer...
Message-ID: <email address hidden>
Date: Tue, 20 Jul 2004 14:20:15 +0200
From: <email address hidden> (Roland Bauerschmidt)
To: Matthias Urlichs <email address hidden>
Cc: Modestas Vainius <email address hidden>, <email address hidden>
Subject: Re: Bug#244827: libgcrypt7: more info
On Tue, Jul 20, 2004 at 01:44:46PM +0200, Matthias Urlichs wrote:
> => something freed the dh_params vector.
>
> I haven't found the culprit yet.
I think I might've found it (though not verified yet). In gnutls.c
(OpenLDAP code), SSL_do_handshake:
[...]
gnutls_ error = gnutls_ rsa_params_ init(&rsa_ params) ;
gnutls_ error = gnutls_ dh_params_ init(&dh_ params) ;
ldap_ gnutls_ need_rsa_ params( ssl,&rsa_ params) ;
ldap_ gnutls_ need_dh_ params( ssl,&dh_ params) ; rsa_params_ deinit( rsa_params) ;
if (!ssl->session) {
[...]
[...]
[...]
[...]
[...]
}
[...]
if (rsa_params)
gnutls_
if (dh_params) dh_params_ deinit( dh_params) ;
gnutls_
I'm afraid, the _params_deinit functions should only be called when the need_rsa_ params uses certificate_ set_{dh, rsa}_params to set the given params and
session is closed. ldap_gnutls_
gnutls_
those functions only set a pointer...
Roland