summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorjsing <>2018-02-14 16:32:06 +0000
committerjsing <>2018-02-14 16:32:06 +0000
commitb67d1c3350cb5ebce3d8cc42491ccf21a0e2e482 (patch)
tree2bef41e0dead5333cbb82a36a9651fa52e970550 /src
parentbadad72c27155e042a4ba77f179c0771b373d3fa (diff)
downloadopenbsd-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.list2
-rw-r--r--src/lib/libcrypto/crypto.h10
-rw-r--r--src/lib/libcrypto/cversion.c14
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
1832OpenSSLDie 1832OpenSSLDie
1833OpenSSL_add_all_ciphers 1833OpenSSL_add_all_ciphers
1834OpenSSL_add_all_digests 1834OpenSSL_add_all_digests
1835OpenSSL_version
1836OpenSSL_version_num
1835PBE2PARAM_free 1837PBE2PARAM_free
1836PBE2PARAM_it 1838PBE2PARAM_it
1837PBE2PARAM_new 1839PBE2PARAM_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
333const 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
340unsigned long OpenSSL_version_num(void);
333 341
334const char *SSLeay_version(int type); 342const char *SSLeay_version(int type);
335unsigned long SSLeay(void); 343unsigned 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
88const char *
89OpenSSL_version(int t)
90{
91 return SSLeay_version(t);
92}
93
94unsigned long
95OpenSSL_version_num(void)
96{
97 return SSLeay();
98}