@@ -93,7 +93,6 @@ const response* starttls_init(void)
93
93
{
94
94
int ret ;
95
95
gnutls_dh_params_t dh_params ;
96
- gnutls_priority_t priority_cache ;
97
96
gnutls_certificate_credentials_t x509_cred ;
98
97
const char * my_priority = getenv ("TLS_PRIORITY" );
99
98
const char * certfile = getenv ("TLS_CERTFILE" );
@@ -115,9 +114,11 @@ const response* starttls_init(void)
115
114
return 0 ;
116
115
}
117
116
117
+ gnutls_init (& gsession , GNUTLS_SERVER );
118
+
118
119
if (!my_priority )
119
120
my_priority = "NORMAL" ;
120
- ret = gnutls_priority_init ( & priority_cache , my_priority , NULL );
121
+ ret = gnutls_priority_set_direct ( gsession , my_priority , NULL );
121
122
if (ret != GNUTLS_E_SUCCESS ) {
122
123
msg2 ("TLS priority error: " , gnutls_strerror (ret ));
123
124
return 0 ;
@@ -141,10 +142,6 @@ const response* starttls_init(void)
141
142
/* Don't deinit the dh_params, since the above only stores a pointer to the params. */
142
143
}
143
144
144
- gnutls_init (& gsession , GNUTLS_SERVER );
145
-
146
- gnutls_priority_set (gsession , priority_cache );
147
-
148
145
gnutls_credentials_set (gsession , GNUTLS_CRD_CERTIFICATE , x509_cred );
149
146
150
147
/* Set maximum compatibility mode. */
0 commit comments