diff options
| author | jsing <> | 2017-04-29 21:48:44 +0000 |
|---|---|---|
| committer | jsing <> | 2017-04-29 21:48:44 +0000 |
| commit | 1de47e5fe8ef45dc6638449b6a0decdcf07cc840 (patch) | |
| tree | 4195f946a49f85960dfe69d053abfc95e5e32dd9 | |
| parent | 06e58ee3d445df182278c56c23d0bf1aec820070 (diff) | |
| download | openbsd-1de47e5fe8ef45dc6638449b6a0decdcf07cc840.tar.gz openbsd-1de47e5fe8ef45dc6638449b6a0decdcf07cc840.tar.bz2 openbsd-1de47e5fe8ef45dc6638449b6a0decdcf07cc840.zip | |
Stop calling OPENSSL_init() internally, since it is a no-op. Also place
it under #ifndef LIBRESSL_INTERNAL.
ok beck@
Diffstat (limited to '')
| -rw-r--r-- | src/lib/libcrypto/cryptlib.c | 3 | ||||
| -rw-r--r-- | src/lib/libcrypto/crypto.h | 4 | ||||
| -rw-r--r-- | src/lib/libcrypto/evp/names.c | 6 |
3 files changed, 4 insertions, 9 deletions
diff --git a/src/lib/libcrypto/cryptlib.c b/src/lib/libcrypto/cryptlib.c index 1bc245ed0a..f7b783a029 100644 --- a/src/lib/libcrypto/cryptlib.c +++ b/src/lib/libcrypto/cryptlib.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: cryptlib.c,v 1.40 2017/01/29 17:49:22 beck Exp $ */ | 1 | /* $OpenBSD: cryptlib.c,v 1.41 2017/04/29 21:48:43 jsing Exp $ */ |
| 2 | /* ==================================================================== | 2 | /* ==================================================================== |
| 3 | * Copyright (c) 1998-2006 The OpenSSL Project. All rights reserved. | 3 | * Copyright (c) 1998-2006 The OpenSSL Project. All rights reserved. |
| 4 | * | 4 | * |
| @@ -403,7 +403,6 @@ CRYPTO_set_locking_callback(void (*func)(int mode, int type, | |||
| 403 | /* Calling this here ensures initialisation before any threads | 403 | /* Calling this here ensures initialisation before any threads |
| 404 | * are started. | 404 | * are started. |
| 405 | */ | 405 | */ |
| 406 | OPENSSL_init(); | ||
| 407 | locking_callback = func; | 406 | locking_callback = func; |
| 408 | } | 407 | } |
| 409 | 408 | ||
diff --git a/src/lib/libcrypto/crypto.h b/src/lib/libcrypto/crypto.h index c1ee78fb2f..068415f693 100644 --- a/src/lib/libcrypto/crypto.h +++ b/src/lib/libcrypto/crypto.h | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: crypto.h,v 1.40 2015/09/17 09:51:40 bcook Exp $ */ | 1 | /* $OpenBSD: crypto.h,v 1.41 2017/04/29 21:48:43 jsing Exp $ */ |
| 2 | /* ==================================================================== | 2 | /* ==================================================================== |
| 3 | * Copyright (c) 1998-2006 The OpenSSL Project. All rights reserved. | 3 | * Copyright (c) 1998-2006 The OpenSSL Project. All rights reserved. |
| 4 | * | 4 | * |
| @@ -499,9 +499,9 @@ uint64_t OPENSSL_cpu_caps(void); | |||
| 499 | 499 | ||
| 500 | int OPENSSL_isservice(void); | 500 | int OPENSSL_isservice(void); |
| 501 | 501 | ||
| 502 | #ifndef LIBRESSL_INTERNAL | ||
| 502 | void OPENSSL_init(void); | 503 | void OPENSSL_init(void); |
| 503 | 504 | ||
| 504 | #ifndef LIBRESSL_INTERNAL | ||
| 505 | /* CRYPTO_memcmp returns zero iff the |len| bytes at |a| and |b| are equal. It | 505 | /* CRYPTO_memcmp returns zero iff the |len| bytes at |a| and |b| are equal. It |
| 506 | * takes an amount of time dependent on |len|, but independent of the contents | 506 | * takes an amount of time dependent on |len|, but independent of the contents |
| 507 | * of |a| and |b|. Unlike memcmp, it cannot be used to put elements into a | 507 | * of |a| and |b|. Unlike memcmp, it cannot be used to put elements into a |
diff --git a/src/lib/libcrypto/evp/names.c b/src/lib/libcrypto/evp/names.c index 33d7dc8084..ebaa3a2f6f 100644 --- a/src/lib/libcrypto/evp/names.c +++ b/src/lib/libcrypto/evp/names.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: names.c,v 1.12 2014/07/11 08:44:48 jsing Exp $ */ | 1 | /* $OpenBSD: names.c,v 1.13 2017/04/29 21:48:44 jsing Exp $ */ |
| 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) |
| 3 | * All rights reserved. | 3 | * All rights reserved. |
| 4 | * | 4 | * |
| @@ -70,8 +70,6 @@ EVP_add_cipher(const EVP_CIPHER *c) | |||
| 70 | if (c == NULL) | 70 | if (c == NULL) |
| 71 | return 0; | 71 | return 0; |
| 72 | 72 | ||
| 73 | OPENSSL_init(); | ||
| 74 | |||
| 75 | r = OBJ_NAME_add(OBJ_nid2sn(c->nid), OBJ_NAME_TYPE_CIPHER_METH, | 73 | r = OBJ_NAME_add(OBJ_nid2sn(c->nid), OBJ_NAME_TYPE_CIPHER_METH, |
| 76 | (const char *)c); | 74 | (const char *)c); |
| 77 | if (r == 0) | 75 | if (r == 0) |
| @@ -88,8 +86,6 @@ EVP_add_digest(const EVP_MD *md) | |||
| 88 | int r; | 86 | int r; |
| 89 | const char *name; | 87 | const char *name; |
| 90 | 88 | ||
| 91 | OPENSSL_init(); | ||
| 92 | |||
| 93 | name = OBJ_nid2sn(md->type); | 89 | name = OBJ_nid2sn(md->type); |
| 94 | r = OBJ_NAME_add(name, OBJ_NAME_TYPE_MD_METH, (const char *)md); | 90 | r = OBJ_NAME_add(name, OBJ_NAME_TYPE_MD_METH, (const char *)md); |
| 95 | if (r == 0) | 91 | if (r == 0) |
