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:
parent
f25be66429
commit
f17c2ef84c
1 changed files with 3 additions and 0 deletions
|
@ -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));
|
||||||
|
|
Loading…
Reference in a new issue