summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/dh/dh_depr.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/lib/libcrypto/dh/dh_depr.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/src/lib/libcrypto/dh/dh_depr.c b/src/lib/libcrypto/dh/dh_depr.c
index 61c0f35636..bc7ba16f2b 100644
--- a/src/lib/libcrypto/dh/dh_depr.c
+++ b/src/lib/libcrypto/dh/dh_depr.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: dh_depr.c,v 1.3 2014/06/12 15:49:28 deraadt Exp $ */ 1/* $OpenBSD: dh_depr.c,v 1.4 2014/07/09 13:26:47 miod Exp $ */
2/* ==================================================================== 2/* ====================================================================
3 * Copyright (c) 1998-2002 The OpenSSL Project. All rights reserved. 3 * Copyright (c) 1998-2002 The OpenSSL Project. All rights reserved.
4 * 4 *
@@ -62,20 +62,21 @@
62#include <openssl/dh.h> 62#include <openssl/dh.h>
63 63
64#ifndef OPENSSL_NO_DEPRECATED 64#ifndef OPENSSL_NO_DEPRECATED
65DH *DH_generate_parameters(int prime_len, int generator, 65DH *
66 void (*callback)(int,int,void *), void *cb_arg) 66DH_generate_parameters(int prime_len, int generator,
67 { 67 void (*callback)(int, int, void *), void *cb_arg)
68{
68 BN_GENCB cb; 69 BN_GENCB cb;
69 DH *ret=NULL; 70 DH *ret = NULL;
70 71
71 if((ret=DH_new()) == NULL) 72 if ((ret = DH_new()) == NULL)
72 return NULL; 73 return NULL;
73 74
74 BN_GENCB_set_old(&cb, callback, cb_arg); 75 BN_GENCB_set_old(&cb, callback, cb_arg);
75 76
76 if(DH_generate_parameters_ex(ret, prime_len, generator, &cb)) 77 if (DH_generate_parameters_ex(ret, prime_len, generator, &cb))
77 return ret; 78 return ret;
78 DH_free(ret); 79 DH_free(ret);
79 return NULL; 80 return NULL;
80 } 81}
81#endif 82#endif