diff options
author | jsing <> | 2018-02-14 16:32:06 +0000 |
---|---|---|
committer | jsing <> | 2018-02-14 16:32:06 +0000 |
commit | b67d1c3350cb5ebce3d8cc42491ccf21a0e2e482 (patch) | |
tree | 2bef41e0dead5333cbb82a36a9651fa52e970550 /src | |
parent | badad72c27155e042a4ba77f179c0771b373d3fa (diff) | |
download | openbsd-b67d1c3350cb5ebce3d8cc42491ccf21a0e2e482.tar.gz openbsd-b67d1c3350cb5ebce3d8cc42491ccf21a0e2e482.tar.bz2 openbsd-b67d1c3350cb5ebce3d8cc42491ccf21a0e2e482.zip |
Start providing parts of the OpenSSL 1.1 API.
This will ease the burden on ports and others trying to make software
work with LibreSSL, while avoiding #ifdef mazes. Note that we are not
removing 1.0.1 API or making things opaque, hence software written to
use the older APIs will continue to work, as will software written to
use the 1.1 API (as more functionality become available).
Discussed at length with deraadt@ and others.
Diffstat (limited to 'src')
-rw-r--r-- | src/lib/libcrypto/Symbols.list | 2 | ||||
-rw-r--r-- | src/lib/libcrypto/crypto.h | 10 | ||||
-rw-r--r-- | src/lib/libcrypto/cversion.c | 14 |
3 files changed, 24 insertions, 2 deletions
diff --git a/src/lib/libcrypto/Symbols.list b/src/lib/libcrypto/Symbols.list index 6dfd569e1f..0c437dc75f 100644 --- a/src/lib/libcrypto/Symbols.list +++ b/src/lib/libcrypto/Symbols.list | |||
@@ -1832,6 +1832,8 @@ OTHERNAME_new | |||
1832 | OpenSSLDie | 1832 | OpenSSLDie |
1833 | OpenSSL_add_all_ciphers | 1833 | OpenSSL_add_all_ciphers |
1834 | OpenSSL_add_all_digests | 1834 | OpenSSL_add_all_digests |
1835 | OpenSSL_version | ||
1836 | OpenSSL_version_num | ||
1835 | PBE2PARAM_free | 1837 | PBE2PARAM_free |
1836 | PBE2PARAM_it | 1838 | PBE2PARAM_it |
1837 | PBE2PARAM_new | 1839 | PBE2PARAM_new |
diff --git a/src/lib/libcrypto/crypto.h b/src/lib/libcrypto/crypto.h index 068415f693..90c2875349 100644 --- a/src/lib/libcrypto/crypto.h +++ b/src/lib/libcrypto/crypto.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: crypto.h,v 1.41 2017/04/29 21:48:43 jsing Exp $ */ | 1 | /* $OpenBSD: crypto.h,v 1.42 2018/02/14 16:32:06 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 | * |
@@ -330,6 +330,14 @@ int CRYPTO_is_mem_check_on(void); | |||
330 | CRYPTO_malloc_locked((int)num,__FILE__,__LINE__) | 330 | CRYPTO_malloc_locked((int)num,__FILE__,__LINE__) |
331 | #define OPENSSL_free_locked(addr) CRYPTO_free_locked(addr) | 331 | #define OPENSSL_free_locked(addr) CRYPTO_free_locked(addr) |
332 | 332 | ||
333 | const char *OpenSSL_version(int type); | ||
334 | #define OPENSSL_VERSION 0 | ||
335 | #define OPENSSL_CFLAGS 1 | ||
336 | #define OPENSSL_BUILT_ON 2 | ||
337 | #define OPENSSL_PLATFORM 3 | ||
338 | #define OPENSSL_DIR 4 | ||
339 | #define OPENSSL_ENGINES_DIR 5 | ||
340 | unsigned long OpenSSL_version_num(void); | ||
333 | 341 | ||
334 | const char *SSLeay_version(int type); | 342 | const char *SSLeay_version(int type); |
335 | unsigned long SSLeay(void); | 343 | unsigned long SSLeay(void); |
diff --git a/src/lib/libcrypto/cversion.c b/src/lib/libcrypto/cversion.c index 7ffa80ec26..b8b1a22a8a 100644 --- a/src/lib/libcrypto/cversion.c +++ b/src/lib/libcrypto/cversion.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: cversion.c,v 1.15 2014/07/11 11:42:28 jsing Exp $ */ | 1 | /* $OpenBSD: cversion.c,v 1.16 2018/02/14 16:32:06 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 | * |
@@ -84,3 +84,15 @@ SSLeay(void) | |||
84 | { | 84 | { |
85 | return (SSLEAY_VERSION_NUMBER); | 85 | return (SSLEAY_VERSION_NUMBER); |
86 | } | 86 | } |
87 | |||
88 | const char * | ||
89 | OpenSSL_version(int t) | ||
90 | { | ||
91 | return SSLeay_version(t); | ||
92 | } | ||
93 | |||
94 | unsigned long | ||
95 | OpenSSL_version_num(void) | ||
96 | { | ||
97 | return SSLeay(); | ||
98 | } | ||