0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-12-28 00:14:07 +01:00

Make sure x509_cred and dh_params objects are allocated.

This commit is contained in:
William Pitcock 2008-06-10 21:24:49 -05:00
parent f25be66429
commit f17c2ef84c

View file

@ -293,6 +293,9 @@ rb_init_ssl(void)
gnutls_global_init(); gnutls_global_init();
gnutls_certificate_allocate_credentials(&x509_cred);
gnutls_dh_params_init(&dh_params);
if((g_ret = gnutls_dh_params_generate2(dh_params, 1024)) < 0) if((g_ret = gnutls_dh_params_generate2(dh_params, 1024)) < 0)
{ {
rb_lib_log("rb_init_gnutls: Failed to generate GNUTLS DH params: %s", gnutls_strerror(g_ret)); rb_lib_log("rb_init_gnutls: Failed to generate GNUTLS DH params: %s", gnutls_strerror(g_ret));