(generate_dh_params): Adapt to GnuTLS >= 1.0.0.
Showing
1 changed file
with
3 additions
and
9 deletions
1 | /* GNU Mailutils -- a suite of utilities for electronic mail | 1 | /* GNU Mailutils -- a suite of utilities for electronic mail |
2 | Copyright (C) 2003 Free Software Foundation, Inc. | 2 | Copyright (C) 2003, 2004 Free Software Foundation, Inc. |
3 | 3 | ||
4 | This library is free software; you can redistribute it and/or | 4 | This library is free software; you can redistribute it and/or |
5 | modify it under the terms of the GNU Lesser General Public | 5 | modify it under the terms of the GNU Lesser General Public |
... | @@ -215,14 +215,8 @@ mu_deinit_tls_libs (void) | ... | @@ -215,14 +215,8 @@ mu_deinit_tls_libs (void) |
215 | static void | 215 | static void |
216 | generate_dh_params (void) | 216 | generate_dh_params (void) |
217 | { | 217 | { |
218 | gnutls_datum prime, generator; | ||
219 | |||
220 | gnutls_dh_params_init (&dh_params); | 218 | gnutls_dh_params_init (&dh_params); |
221 | gnutls_dh_params_generate (&prime, &generator, DH_BITS); | 219 | gnutls_dh_params_generate2 (dh_params, DH_BITS); |
222 | gnutls_dh_params_set (dh_params, prime, generator, DH_BITS); | ||
223 | |||
224 | free (prime.data); | ||
225 | free (generator.data); | ||
226 | } | 220 | } |
227 | 221 | ||
228 | static gnutls_session | 222 | static gnutls_session |
... | @@ -612,7 +606,7 @@ tls_stream_create_client_from_tcp (stream_t *stream, stream_t tcp_str, | ... | @@ -612,7 +606,7 @@ tls_stream_create_client_from_tcp (stream_t *stream, stream_t tcp_str, |
612 | return rc; | 606 | return rc; |
613 | } | 607 | } |
614 | 608 | ||
615 | |||
616 | #endif /* WITH_TLS */ | 609 | #endif /* WITH_TLS */ |
617 | 610 | ||
618 | /* EOF */ | 611 | /* EOF */ |
612 | ... | ... |
-
Please register or sign in to post a comment