summaryrefslogtreecommitdiff
path: root/tests/anonself.c
diff options
context:
space:
mode:
authorSimon Josefsson <simon@josefsson.org>2007-02-05 12:50:56 +0000
committerSimon Josefsson <simon@josefsson.org>2007-02-05 12:50:56 +0000
commit3ecb8ef3b501b96bb8f7983b9ac96c0747497a35 (patch)
treeb810ff6be3fce8de81723fa3f94dbd12f1362463 /tests/anonself.c
parent8b79faaa445c04396f0779f420ee35a720022630 (diff)
downloadgnutls-3ecb8ef3b501b96bb8f7983b9ac96c0747497a35.tar.gz
Use static DH.
Diffstat (limited to 'tests/anonself.c')
-rw-r--r--tests/anonself.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/tests/anonself.c b/tests/anonself.c
index febd3c892c..54360c9cae 100644
--- a/tests/anonself.c
+++ b/tests/anonself.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004, 2005, 2006 Free Software Foundation
+ * Copyright (C) 2004, 2005, 2006, 2007 Free Software Foundation
*
* Author: Simon Josefsson
*
@@ -213,16 +213,14 @@ static gnutls_dh_params_t dh_params;
static int
generate_dh_params (void)
{
-
+ const gnutls_datum_t p3 = { pkcs3, strlen (pkcs3) };
/* Generate Diffie Hellman parameters - for use with DHE
* kx algorithms. These should be discarded and regenerated
* once a day, once a week or once a month. Depending on the
* security requirements.
*/
gnutls_dh_params_init (&dh_params);
- gnutls_dh_params_generate2 (dh_params, DH_BITS);
-
- return 0;
+ return gnutls_dh_params_import_pkcs3 (dh_params, &p3, GNUTLS_X509_FMT_PEM);
}
int err, listen_sd, i;