X-Git-Url: https://git.proxmox.com/?p=vncterm.git;a=blobdiff_plain;f=vncterm.c;h=0614e4b2df9531d169f2d90cfc6d636ae1654bb8;hp=0e33791e2a095ff181320c447ba94c4e9eb998a4;hb=b26ab9ab5a50f91381a2d8b8fe99c896a053a343;hpb=df4b12152dd24de0acc420407aedf85541a87c6d diff --git a/vncterm.c b/vncterm.c index 0e33791..0614e4b 100644 --- a/vncterm.c +++ b/vncterm.c @@ -256,7 +256,11 @@ tls_initialize_anon_cred(void) return NULL; } +#if GNUTLS_VERSION_NUMBER >= 0x030506 + gnutls_anon_set_server_known_dh_params(anon_cred, GNUTLS_SEC_PARAM_MEDIUM); +#else gnutls_anon_set_server_dh_params(anon_cred, dh_params); +#endif return anon_cred; } @@ -290,8 +294,13 @@ tls_initialize_x509_cred(void) gnutls_certificate_free_credentials(x509_cred); return NULL; } - +#if GNUTLS_VERSION_NUMBER >= 0x030506 + /* only available since GnuTLS 3.5.6, on previous versions see + * gnutls_certificate_set_dh_params(). */ + gnutls_certificate_set_known_dh_params(x509_cred, GNUTLS_SEC_PARAM_MEDIUM); +#else gnutls_certificate_set_dh_params (x509_cred, dh_params); +#endif return x509_cred; }