summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjsing <jsing@openbsd.org>2017-04-29 21:48:43 +0000
committerjsing <jsing@openbsd.org>2017-04-29 21:48:43 +0000
commit60e626a589c7097113ddae72add2c15e84acad1d (patch)
tree43eb3ece4851b251b032fdafbf2ea7a22a79b642
parentFix UTF-8 combining characters in column 0, based on a diff from Keith (diff)
downloadwireguard-openbsd-60e626a589c7097113ddae72add2c15e84acad1d.tar.xz
wireguard-openbsd-60e626a589c7097113ddae72add2c15e84acad1d.zip
Stop calling OPENSSL_init() internally, since it is a no-op. Also place
it under #ifndef LIBRESSL_INTERNAL. ok beck@
-rw-r--r--lib/libcrypto/cryptlib.c3
-rw-r--r--lib/libcrypto/crypto.h4
-rw-r--r--lib/libcrypto/evp/names.c6
3 files changed, 4 insertions, 9 deletions
diff --git a/lib/libcrypto/cryptlib.c b/lib/libcrypto/cryptlib.c
index 1bc245ed0a5..f7b783a029b 100644
--- a/lib/libcrypto/cryptlib.c
+++ b/lib/libcrypto/cryptlib.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cryptlib.c,v 1.40 2017/01/29 17:49:22 beck Exp $ */
+/* $OpenBSD: cryptlib.c,v 1.41 2017/04/29 21:48:43 jsing Exp $ */
/* ====================================================================
* Copyright (c) 1998-2006 The OpenSSL Project. All rights reserved.
*
@@ -403,7 +403,6 @@ CRYPTO_set_locking_callback(void (*func)(int mode, int type,
/* Calling this here ensures initialisation before any threads
* are started.
*/
- OPENSSL_init();
locking_callback = func;
}
diff --git a/lib/libcrypto/crypto.h b/lib/libcrypto/crypto.h
index c1ee78fb2fd..068415f693b 100644
--- a/lib/libcrypto/crypto.h
+++ b/lib/libcrypto/crypto.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: crypto.h,v 1.40 2015/09/17 09:51:40 bcook Exp $ */
+/* $OpenBSD: crypto.h,v 1.41 2017/04/29 21:48:43 jsing Exp $ */
/* ====================================================================
* Copyright (c) 1998-2006 The OpenSSL Project. All rights reserved.
*
@@ -499,9 +499,9 @@ uint64_t OPENSSL_cpu_caps(void);
int OPENSSL_isservice(void);
+#ifndef LIBRESSL_INTERNAL
void OPENSSL_init(void);
-#ifndef LIBRESSL_INTERNAL
/* CRYPTO_memcmp returns zero iff the |len| bytes at |a| and |b| are equal. It
* takes an amount of time dependent on |len|, but independent of the contents
* of |a| and |b|. Unlike memcmp, it cannot be used to put elements into a
diff --git a/lib/libcrypto/evp/names.c b/lib/libcrypto/evp/names.c
index 33d7dc80842..ebaa3a2f6fd 100644
--- a/lib/libcrypto/evp/names.c
+++ b/lib/libcrypto/evp/names.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: names.c,v 1.12 2014/07/11 08:44:48 jsing Exp $ */
+/* $OpenBSD: names.c,v 1.13 2017/04/29 21:48:44 jsing Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
@@ -70,8 +70,6 @@ EVP_add_cipher(const EVP_CIPHER *c)
if (c == NULL)
return 0;
- OPENSSL_init();
-
r = OBJ_NAME_add(OBJ_nid2sn(c->nid), OBJ_NAME_TYPE_CIPHER_METH,
(const char *)c);
if (r == 0)
@@ -88,8 +86,6 @@ EVP_add_digest(const EVP_MD *md)
int r;
const char *name;
- OPENSSL_init();
-
name = OBJ_nid2sn(md->type);
r = OBJ_NAME_add(name, OBJ_NAME_TYPE_MD_METH, (const char *)md);
if (r == 0)