aboutsummaryrefslogtreecommitdiffstats
path: root/crypto/dh
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/dh')
-rw-r--r--crypto/dh/dh.h8
-rw-r--r--crypto/dh/dh_err.c3
-rw-r--r--crypto/dh/dh_lib.c3
3 files changed, 7 insertions, 7 deletions
diff --git a/crypto/dh/dh.h b/crypto/dh/dh.h
index 19bd570309e..c15b2ad4836 100644
--- a/crypto/dh/dh.h
+++ b/crypto/dh/dh.h
@@ -59,6 +59,10 @@
#ifndef HEADER_DH_H
#define HEADER_DH_H
+#ifdef __cplusplus
+extern "C" {
+#endif
+
#ifdef NO_DH
#error DH is disabled.
#endif
@@ -68,10 +72,6 @@
#define DH_FLAG_CACHE_MONT_P 0x01
-#ifdef __cplusplus
-extern "C" {
-#endif
-
typedef struct dh_st DH;
typedef struct dh_method {
diff --git a/crypto/dh/dh_err.c b/crypto/dh/dh_err.c
index ff2d1684c21..0348bd24a2e 100644
--- a/crypto/dh/dh_err.c
+++ b/crypto/dh/dh_err.c
@@ -54,8 +54,7 @@
*/
/* NOTE: this file was auto generated by the mkerr.pl script: any changes
- * made to it will be overwritten when the script next updates this file,
- * only reason strings will be preserved.
+ * made to it will be overwritten when the script next updates this file.
*/
#include <stdio.h>
diff --git a/crypto/dh/dh_lib.c b/crypto/dh/dh_lib.c
index be00ceee2ff..6c21463028a 100644
--- a/crypto/dh/dh_lib.c
+++ b/crypto/dh/dh_lib.c
@@ -103,8 +103,9 @@ DH *DH_new_method(DH_METHOD *meth)
DHerr(DH_F_DH_NEW,ERR_R_MALLOC_FAILURE);
return(NULL);
}
+ if(!default_DH_method) default_DH_method = DH_OpenSSL();
if(meth) ret->meth = meth;
- else ret->meth = DH_get_default_method();
+ else ret->meth = default_DH_method;
ret->pad=0;
ret->version=0;
ret->p=NULL;