Commit 7959c669 7959c6693b091a59854c10ca28edb4d20eb1e3c2 by Wojciech Polak

(generate_dh_params): Adapt to GnuTLS >= 1.0.0.

1 parent aafb4c8e
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
......