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 1e320728f3
commit c7d01d2d7d
1 changed files with 3 additions and 0 deletions

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));