summary refs log tree commit diff
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2023-10-11 18:26:49 -0400
committerJune McEnroe <june@causal.agency>2023-10-11 18:26:49 -0400
commit1a1b5c85663a5170da073674344ed1a6bdb0b0eb (patch)
tree81d986a5b6ea04a478ba2d0059fe5f176b3ecc8e
parentImport LibreSSL 3.8.0 (diff)
downloadlibretls-upstream.tar.gz
libretls-upstream.zip
Import LibreSSL 3.8.1 upstream
-rw-r--r--LIBTLS_VERSION2
-rw-r--r--Makefile.am9
-rw-r--r--VERSION2
-rw-r--r--compat/posix_win.c113
-rw-r--r--include/compat/sys/types.h12
-rw-r--r--include/compat/unistd.h4
-rw-r--r--include/tls.h14
-rw-r--r--m4/check-libc.m43
-rw-r--r--man/Makefile.am366
-rw-r--r--man/tls_config_set_protocols.312
-rw-r--r--tls.c18
-rw-r--r--tls_config.c6
-rw-r--r--tls_internal.h6
-rw-r--r--tls_signer.c28
-rw-r--r--tls_verify.c101
15 files changed, 341 insertions, 355 deletions
diff --git a/LIBTLS_VERSION b/LIBTLS_VERSION
index 6e2f32a..fd02cce 100644
--- a/LIBTLS_VERSION
+++ b/LIBTLS_VERSION
@@ -1 +1 @@
-27:0:0
+28:0:0
diff --git a/Makefile.am b/Makefile.am
index d5725c3..22f3222 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -20,10 +20,17 @@ libtls_la_objects.mk: Makefile
 	  > libtls_la_objects.mk
 
 libtls_la_LDFLAGS = -version-info @LIBTLS_VERSION@ -no-undefined -export-symbols $(top_srcdir)/tls/tls.sym
+
+if ENABLE_LIBTLS_ONLY
 libtls_la_LIBADD = $(libcrypto_la_objects)
+libtls_la_LIBADD += $(libssl_la_objects)
+else
+libtls_la_LIBADD = $(abs_top_builddir)/crypto/libcrypto.la
+libtls_la_LIBADD += $(abs_top_builddir)/ssl/libssl.la
+endif
+
 libtls_la_LIBADD += $(libcompat_la_objects)
 libtls_la_LIBADD += $(libcompatnoopt_la_objects)
-libtls_la_LIBADD += $(libssl_la_objects)
 libtls_la_LIBADD += $(PLATFORM_LDADD)
 
 libtls_la_CPPFLAGS = $(AM_CPPFLAGS)
diff --git a/VERSION b/VERSION
index 6641052..1693986 100644
--- a/VERSION
+++ b/VERSION
@@ -1,2 +1,2 @@
-3.8.0
+3.8.1
 
diff --git a/compat/posix_win.c b/compat/posix_win.c
index 30c93cd..b3a4687 100644
--- a/compat/posix_win.c
+++ b/compat/posix_win.c
@@ -148,6 +148,49 @@ wsa_errno(int err)
 	return -1;
 }
 
+/*
+ * Employ a similar trick to cpython (pycore_fileutils.h) where the CRT report
+ * handler is disabled while checking if a descriptor is a socket or a file
+ */
+#if defined _MSC_VER && _MSC_VER >= 1900
+
+#include <crtdbg.h>
+#include <stdlib.h>
+
+static void noop_handler(const wchar_t *expression,	const wchar_t *function,
+    const wchar_t *file, unsigned int line, uintptr_t pReserved)
+{
+	return;
+}
+
+#define BEGIN_SUPPRESS_IPH \
+	_invalid_parameter_handler old_handler = _set_thread_local_invalid_parameter_handler(noop_handler)
+#define END_SUPPRESS_IPH \
+	_set_thread_local_invalid_parameter_handler(old_handler)
+
+#else
+
+#define BEGIN_SUPPRESS_IPH
+#define END_SUPPRESS_IPH
+
+#endif
+
+static int
+is_socket(int fd)
+{
+	intptr_t hd;
+
+	BEGIN_SUPPRESS_IPH;
+	hd = _get_osfhandle(fd);
+	END_SUPPRESS_IPH;
+
+	if (hd == (intptr_t)INVALID_HANDLE_VALUE) {
+		return 1; /* fd is not file descriptor */
+	}
+
+	return 0;
+}
+
 int
 posix_connect(int sockfd, const struct sockaddr *addr, socklen_t addrlen)
 {
@@ -160,24 +203,31 @@ posix_connect(int sockfd, const struct sockaddr *addr, socklen_t addrlen)
 int
 posix_close(int fd)
 {
-	if (closesocket(fd) == SOCKET_ERROR) {
-		int err = WSAGetLastError();
-		return (err == WSAENOTSOCK || err == WSAEBADF ||
-		    err == WSANOTINITIALISED) ?
-			close(fd) : wsa_errno(err);
+	int rc;
+
+	if (is_socket(fd)) {
+		if ((rc = closesocket(fd)) == SOCKET_ERROR) {
+			int err = WSAGetLastError();
+			rc = wsa_errno(err);
+		}
+	} else {
+		rc = close(fd);
 	}
-	return 0;
+	return rc;
 }
 
 ssize_t
 posix_read(int fd, void *buf, size_t count)
 {
-	ssize_t rc = recv(fd, buf, count, 0);
-	if (rc == SOCKET_ERROR) {
-		int err = WSAGetLastError();
-		return (err == WSAENOTSOCK || err == WSAEBADF ||
-		    err == WSANOTINITIALISED) ?
-			read(fd, buf, count) : wsa_errno(err);
+	ssize_t rc;
+
+	if (is_socket(fd)) {
+		if ((rc = recv(fd, buf, count, 0)) == SOCKET_ERROR) {
+			int err = WSAGetLastError();
+			rc = wsa_errno(err);
+		}
+	} else {
+		rc = read(fd, buf, count);
 	}
 	return rc;
 }
@@ -185,12 +235,13 @@ posix_read(int fd, void *buf, size_t count)
 ssize_t
 posix_write(int fd, const void *buf, size_t count)
 {
-	ssize_t rc = send(fd, buf, count, 0);
-	if (rc == SOCKET_ERROR) {
-		int err = WSAGetLastError();
-		return (err == WSAENOTSOCK || err == WSAEBADF ||
-		    err == WSANOTINITIALISED) ?
-			write(fd, buf, count) : wsa_errno(err);
+	ssize_t rc;
+	if (is_socket(fd)) {
+		if ((rc = send(fd, buf, count, 0)) == SOCKET_ERROR) {
+			rc = wsa_errno(WSAGetLastError());
+		}
+	} else {
+		rc = write(fd, buf, count);
 	}
 	return rc;
 }
@@ -199,17 +250,32 @@ int
 posix_getsockopt(int sockfd, int level, int optname,
 	void *optval, socklen_t *optlen)
 {
-	int rc = getsockopt(sockfd, level, optname, (char *)optval, optlen);
-	return rc == 0 ? 0 : wsa_errno(WSAGetLastError());
-
+	int rc;
+	if (is_socket(sockfd)) {
+		rc = getsockopt(sockfd, level, optname, (char *)optval, optlen);
+		if (rc != 0) {
+			rc = wsa_errno(WSAGetLastError());
+		}
+	} else {
+		rc = -1;
+	}
+	return rc;
 }
 
 int
 posix_setsockopt(int sockfd, int level, int optname,
 	const void *optval, socklen_t optlen)
 {
-	int rc = setsockopt(sockfd, level, optname, (char *)optval, optlen);
-	return rc == 0 ? 0 : wsa_errno(WSAGetLastError());
+	int rc;
+	if (is_socket(sockfd)) {
+		rc = setsockopt(sockfd, level, optname, (char *)optval, optlen);
+		if (rc != 0) {
+			rc = wsa_errno(WSAGetLastError());
+		}
+	} else {
+		rc = -1;
+	}
+	return rc;
 }
 
 uid_t getuid(void)
@@ -241,5 +307,4 @@ int gettimeofday(struct timeval * tp, struct timezone * tzp)
 	tp->tv_usec = (long)(system_time.wMilliseconds * 1000);
 	return 0;
 }
-
 #endif
diff --git a/include/compat/sys/types.h b/include/compat/sys/types.h
index 4967843..59664bc 100644
--- a/include/compat/sys/types.h
+++ b/include/compat/sys/types.h
@@ -45,18 +45,6 @@ typedef SSIZE_T ssize_t;
 
 #endif
 
-#if !defined(HAVE_ATTRIBUTE__BOUNDED__) && !defined(__bounded__)
-# define __bounded__(x, y, z)
-#endif
-
-#if !defined(HAVE_ATTRIBUTE__DEAD) && !defined(__dead)
-#ifdef _MSC_VER
-#define __dead      __declspec(noreturn)
-#else
-#define __dead      __attribute__((__noreturn__))
-#endif
-#endif
-
 #ifdef _WIN32
 #define __warn_references(sym,msg)
 #else
diff --git a/include/compat/unistd.h b/include/compat/unistd.h
index 5e6ab1d..2583a6e 100644
--- a/include/compat/unistd.h
+++ b/include/compat/unistd.h
@@ -64,6 +64,10 @@ int getentropy(void *buf, size_t buflen);
 #endif
 #endif
 
+#ifndef HAVE_GETOPT
+#include <getopt.h>
+#endif
+
 #ifndef HAVE_GETPAGESIZE
 int getpagesize(void);
 #endif
diff --git a/include/tls.h b/include/tls.h
index 0c9e497..59b2c4c 100644
--- a/include/tls.h
+++ b/include/tls.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: tls.h,v 1.62 2022/03/24 15:56:34 tb Exp $ */
+/* $OpenBSD: tls.h,v 1.63 2023/07/02 06:37:27 beck Exp $ */
 /*
  * Copyright (c) 2014 Joel Sing <jsing@openbsd.org>
  *
@@ -36,14 +36,18 @@ typedef SSIZE_T ssize_t;
 
 #define TLS_API	20200120
 
-#define TLS_PROTOCOL_TLSv1_0	(1 << 1)
-#define TLS_PROTOCOL_TLSv1_1	(1 << 2)
+/*
+ * Deprecated versions of TLS. Using these effectively selects
+ * the minimum supported version.
+ */
+#define TLS_PROTOCOL_TLSv1_0	(1 << 3)
+#define TLS_PROTOCOL_TLSv1_1	(1 << 3)
+/* Supported versions of TLS */
 #define TLS_PROTOCOL_TLSv1_2	(1 << 3)
 #define TLS_PROTOCOL_TLSv1_3	(1 << 4)
 
 #define TLS_PROTOCOL_TLSv1 \
-	(TLS_PROTOCOL_TLSv1_0|TLS_PROTOCOL_TLSv1_1|\
-	 TLS_PROTOCOL_TLSv1_2|TLS_PROTOCOL_TLSv1_3)
+	(TLS_PROTOCOL_TLSv1_2|TLS_PROTOCOL_TLSv1_3)
 
 #define TLS_PROTOCOLS_ALL TLS_PROTOCOL_TLSv1
 #define TLS_PROTOCOLS_DEFAULT (TLS_PROTOCOL_TLSv1_2|TLS_PROTOCOL_TLSv1_3)
diff --git a/m4/check-libc.m4 b/m4/check-libc.m4
index 68a4f88..dc8d6bd 100644
--- a/m4/check-libc.m4
+++ b/m4/check-libc.m4
@@ -11,7 +11,7 @@ AC_CHECK_FUNCS([asprintf freezero memmem])
 AC_CHECK_FUNCS([readpassphrase reallocarray recallocarray])
 AC_CHECK_FUNCS([strlcat strlcpy strndup strnlen strsep strtonum])
 AC_CHECK_FUNCS([timegm _mkgmtime timespecsub])
-AC_CHECK_FUNCS([getprogname syslog syslog_r])
+AC_CHECK_FUNCS([getopt getprogname syslog syslog_r])
 AC_CACHE_CHECK([for getpagesize], ac_cv_func_getpagesize, [
 	AC_LINK_IFELSE([AC_LANG_PROGRAM([[
 #include <unistd.h>
@@ -25,6 +25,7 @@ AC_CACHE_CHECK([for getpagesize], ac_cv_func_getpagesize, [
 AM_CONDITIONAL([HAVE_ASPRINTF], [test "x$ac_cv_func_asprintf" = xyes])
 AM_CONDITIONAL([HAVE_FREEZERO], [test "x$ac_cv_func_freezero" = xyes])
 AM_CONDITIONAL([HAVE_GETPAGESIZE], [test "x$ac_cv_func_getpagesize" = xyes])
+AM_CONDITIONAL([HAVE_GETOPT], [test "x$ac_cv_func_getopt" = xyes])
 AM_CONDITIONAL([HAVE_MEMMEM], [test "x$ac_cv_func_memmem" = xyes])
 AM_CONDITIONAL([HAVE_READPASSPHRASE], [test "x$ac_cv_func_readpassphrase" = xyes])
 AM_CONDITIONAL([HAVE_REALLOCARRAY], [test "x$ac_cv_func_reallocarray" = xyes])
diff --git a/man/Makefile.am b/man/Makefile.am
index 902ed5a..9928e97 100644
--- a/man/Makefile.am
+++ b/man/Makefile.am
@@ -129,7 +129,6 @@ dist_man3_MANS += d2i_SSL_SESSION.3
 dist_man3_MANS += ssl.3
 dist_man3_MANS += ACCESS_DESCRIPTION_new.3
 dist_man3_MANS += AES_encrypt.3
-dist_man3_MANS += ASN1_BIT_STRING_num_asc.3
 dist_man3_MANS += ASN1_BIT_STRING_set.3
 dist_man3_MANS += ASN1_INTEGER_get.3
 dist_man3_MANS += ASN1_NULL_new.3
@@ -142,8 +141,6 @@ dist_man3_MANS += ASN1_STRING_print_ex.3
 dist_man3_MANS += ASN1_TIME_set.3
 dist_man3_MANS += ASN1_TYPE_get.3
 dist_man3_MANS += ASN1_UNIVERSALSTRING_to_string.3
-dist_man3_MANS += ASN1_bn_print.3
-dist_man3_MANS += ASN1_buf_print.3
 dist_man3_MANS += ASN1_generate_nconf.3
 dist_man3_MANS += ASN1_get_object.3
 dist_man3_MANS += ASN1_item_d2i.3
@@ -163,7 +160,6 @@ dist_man3_MANS += BIO_accept.3
 dist_man3_MANS += BIO_ctrl.3
 dist_man3_MANS += BIO_dump.3
 dist_man3_MANS += BIO_dup_chain.3
-dist_man3_MANS += BIO_f_asn1.3
 dist_man3_MANS += BIO_f_base64.3
 dist_man3_MANS += BIO_f_buffer.3
 dist_man3_MANS += BIO_f_cipher.3
@@ -189,7 +185,6 @@ dist_man3_MANS += BIO_s_null.3
 dist_man3_MANS += BIO_s_socket.3
 dist_man3_MANS += BIO_set_callback.3
 dist_man3_MANS += BIO_should_retry.3
-dist_man3_MANS += BN_BLINDING_new.3
 dist_man3_MANS += BN_CTX_new.3
 dist_man3_MANS += BN_CTX_start.3
 dist_man3_MANS += BN_add.3
@@ -198,6 +193,7 @@ dist_man3_MANS += BN_bn2bin.3
 dist_man3_MANS += BN_cmp.3
 dist_man3_MANS += BN_copy.3
 dist_man3_MANS += BN_generate_prime.3
+dist_man3_MANS += BN_get_rfc3526_prime_8192.3
 dist_man3_MANS += BN_kronecker.3
 dist_man3_MANS += BN_mod_inverse.3
 dist_man3_MANS += BN_mod_mul_montgomery.3
@@ -292,12 +288,15 @@ dist_man3_MANS += ERR_set_mark.3
 dist_man3_MANS += ESS_SIGNING_CERT_new.3
 dist_man3_MANS += EVP_AEAD_CTX_init.3
 dist_man3_MANS += EVP_BytesToKey.3
+dist_man3_MANS += EVP_CIPHER_CTX_get_cipher_data.3
+dist_man3_MANS += EVP_CIPHER_do_all.3
 dist_man3_MANS += EVP_CIPHER_meth_new.3
 dist_man3_MANS += EVP_DigestInit.3
 dist_man3_MANS += EVP_DigestSignInit.3
 dist_man3_MANS += EVP_DigestVerifyInit.3
 dist_man3_MANS += EVP_EncodeInit.3
 dist_man3_MANS += EVP_EncryptInit.3
+dist_man3_MANS += EVP_MD_meth_new.3
 dist_man3_MANS += EVP_OpenInit.3
 dist_man3_MANS += EVP_PKCS82PKEY.3
 dist_man3_MANS += EVP_PKEY_CTX_ctrl.3
@@ -325,10 +324,14 @@ dist_man3_MANS += EVP_PKEY_verify_recover.3
 dist_man3_MANS += EVP_SealInit.3
 dist_man3_MANS += EVP_SignInit.3
 dist_man3_MANS += EVP_VerifyInit.3
+dist_man3_MANS += EVP_add_cipher.3
 dist_man3_MANS += EVP_aes_128_cbc.3
 dist_man3_MANS += EVP_camellia_128_cbc.3
+dist_man3_MANS += EVP_chacha20.3
 dist_man3_MANS += EVP_des_cbc.3
 dist_man3_MANS += EVP_rc4.3
+dist_man3_MANS += EVP_sha1.3
+dist_man3_MANS += EVP_sha3_224.3
 dist_man3_MANS += EVP_sm3.3
 dist_man3_MANS += EVP_sm4_cbc.3
 dist_man3_MANS += EVP_whirlpool.3
@@ -338,8 +341,8 @@ dist_man3_MANS += HMAC.3
 dist_man3_MANS += MD5.3
 dist_man3_MANS += NAME_CONSTRAINTS_new.3
 dist_man3_MANS += OBJ_NAME_add.3
-dist_man3_MANS += OBJ_add_sigid.3
 dist_man3_MANS += OBJ_create.3
+dist_man3_MANS += OBJ_find_sigid_algs.3
 dist_man3_MANS += OBJ_nid2obj.3
 dist_man3_MANS += OCSP_CRLID_new.3
 dist_man3_MANS += OCSP_REQUEST_new.3
@@ -542,7 +545,6 @@ dist_man3_MANS += d2i_X509_REQ.3
 dist_man3_MANS += d2i_X509_SIG.3
 dist_man3_MANS += des_read_pw.3
 dist_man3_MANS += evp.3
-dist_man3_MANS += get_rfc3526_prime_8192.3
 dist_man3_MANS += i2a_ASN1_STRING.3
 dist_man3_MANS += i2d_CMS_bio_stream.3
 dist_man3_MANS += i2d_PKCS7_bio_stream.3
@@ -572,9 +574,6 @@ install-data-hook:
 	ln -sf "AES_encrypt.3" "$(DESTDIR)$(mandir)/man3/AES_decrypt.3"
 	ln -sf "AES_encrypt.3" "$(DESTDIR)$(mandir)/man3/AES_set_decrypt_key.3"
 	ln -sf "AES_encrypt.3" "$(DESTDIR)$(mandir)/man3/AES_set_encrypt_key.3"
-	ln -sf "ASN1_BIT_STRING_num_asc.3" "$(DESTDIR)$(mandir)/man3/ASN1_BIT_STRING_name_print.3"
-	ln -sf "ASN1_BIT_STRING_num_asc.3" "$(DESTDIR)$(mandir)/man3/ASN1_BIT_STRING_set_asc.3"
-	ln -sf "ASN1_BIT_STRING_set.3" "$(DESTDIR)$(mandir)/man3/ASN1_BIT_STRING_check.3"
 	ln -sf "ASN1_BIT_STRING_set.3" "$(DESTDIR)$(mandir)/man3/ASN1_BIT_STRING_get_bit.3"
 	ln -sf "ASN1_BIT_STRING_set.3" "$(DESTDIR)$(mandir)/man3/ASN1_BIT_STRING_set_bit.3"
 	ln -sf "ASN1_INTEGER_get.3" "$(DESTDIR)$(mandir)/man3/ASN1_ENUMERATED_get.3"
@@ -714,7 +713,6 @@ install-data-hook:
 	ln -sf "BF_set_key.3" "$(DESTDIR)$(mandir)/man3/BF_ecb_encrypt.3"
 	ln -sf "BF_set_key.3" "$(DESTDIR)$(mandir)/man3/BF_encrypt.3"
 	ln -sf "BF_set_key.3" "$(DESTDIR)$(mandir)/man3/BF_ofb64_encrypt.3"
-	ln -sf "BF_set_key.3" "$(DESTDIR)$(mandir)/man3/BF_options.3"
 	ln -sf "BIO_accept.3" "$(DESTDIR)$(mandir)/man3/BIO_get_accept_socket.3"
 	ln -sf "BIO_accept.3" "$(DESTDIR)$(mandir)/man3/BIO_get_host_ip.3"
 	ln -sf "BIO_accept.3" "$(DESTDIR)$(mandir)/man3/BIO_get_port.3"
@@ -745,11 +743,6 @@ install-data-hook:
 	ln -sf "BIO_dump.3" "$(DESTDIR)$(mandir)/man3/BIO_dump_indent.3"
 	ln -sf "BIO_dump.3" "$(DESTDIR)$(mandir)/man3/BIO_dump_indent_fp.3"
 	ln -sf "BIO_dup_chain.3" "$(DESTDIR)$(mandir)/man3/BIO_dup_state.3"
-	ln -sf "BIO_f_asn1.3" "$(DESTDIR)$(mandir)/man3/BIO_asn1_get_prefix.3"
-	ln -sf "BIO_f_asn1.3" "$(DESTDIR)$(mandir)/man3/BIO_asn1_get_suffix.3"
-	ln -sf "BIO_f_asn1.3" "$(DESTDIR)$(mandir)/man3/BIO_asn1_set_prefix.3"
-	ln -sf "BIO_f_asn1.3" "$(DESTDIR)$(mandir)/man3/BIO_asn1_set_suffix.3"
-	ln -sf "BIO_f_asn1.3" "$(DESTDIR)$(mandir)/man3/asn1_ps_func.3"
 	ln -sf "BIO_f_buffer.3" "$(DESTDIR)$(mandir)/man3/BIO_get_buffer_num_lines.3"
 	ln -sf "BIO_f_buffer.3" "$(DESTDIR)$(mandir)/man3/BIO_set_buffer_read_data.3"
 	ln -sf "BIO_f_buffer.3" "$(DESTDIR)$(mandir)/man3/BIO_set_buffer_size.3"
@@ -796,12 +789,6 @@ install-data-hook:
 	ln -sf "BIO_get_ex_new_index.3" "$(DESTDIR)$(mandir)/man3/BIO_get_ex_data.3"
 	ln -sf "BIO_get_ex_new_index.3" "$(DESTDIR)$(mandir)/man3/BIO_set_app_data.3"
 	ln -sf "BIO_get_ex_new_index.3" "$(DESTDIR)$(mandir)/man3/BIO_set_ex_data.3"
-	ln -sf "BIO_get_ex_new_index.3" "$(DESTDIR)$(mandir)/man3/ECDH_get_ex_data.3"
-	ln -sf "BIO_get_ex_new_index.3" "$(DESTDIR)$(mandir)/man3/ECDH_get_ex_new_index.3"
-	ln -sf "BIO_get_ex_new_index.3" "$(DESTDIR)$(mandir)/man3/ECDH_set_ex_data.3"
-	ln -sf "BIO_get_ex_new_index.3" "$(DESTDIR)$(mandir)/man3/ECDSA_get_ex_data.3"
-	ln -sf "BIO_get_ex_new_index.3" "$(DESTDIR)$(mandir)/man3/ECDSA_get_ex_new_index.3"
-	ln -sf "BIO_get_ex_new_index.3" "$(DESTDIR)$(mandir)/man3/ECDSA_set_ex_data.3"
 	ln -sf "BIO_get_ex_new_index.3" "$(DESTDIR)$(mandir)/man3/EC_KEY_get_ex_data.3"
 	ln -sf "BIO_get_ex_new_index.3" "$(DESTDIR)$(mandir)/man3/EC_KEY_get_ex_new_index.3"
 	ln -sf "BIO_get_ex_new_index.3" "$(DESTDIR)$(mandir)/man3/EC_KEY_set_ex_data.3"
@@ -925,39 +912,9 @@ install-data-hook:
 	ln -sf "BIO_should_retry.3" "$(DESTDIR)$(mandir)/man3/BIO_should_io_special.3"
 	ln -sf "BIO_should_retry.3" "$(DESTDIR)$(mandir)/man3/BIO_should_read.3"
 	ln -sf "BIO_should_retry.3" "$(DESTDIR)$(mandir)/man3/BIO_should_write.3"
-	ln -sf "BN_BLINDING_new.3" "$(DESTDIR)$(mandir)/man3/BN_BLINDING_convert.3"
-	ln -sf "BN_BLINDING_new.3" "$(DESTDIR)$(mandir)/man3/BN_BLINDING_convert_ex.3"
-	ln -sf "BN_BLINDING_new.3" "$(DESTDIR)$(mandir)/man3/BN_BLINDING_create_param.3"
-	ln -sf "BN_BLINDING_new.3" "$(DESTDIR)$(mandir)/man3/BN_BLINDING_free.3"
-	ln -sf "BN_BLINDING_new.3" "$(DESTDIR)$(mandir)/man3/BN_BLINDING_get_flags.3"
-	ln -sf "BN_BLINDING_new.3" "$(DESTDIR)$(mandir)/man3/BN_BLINDING_invert.3"
-	ln -sf "BN_BLINDING_new.3" "$(DESTDIR)$(mandir)/man3/BN_BLINDING_invert_ex.3"
-	ln -sf "BN_BLINDING_new.3" "$(DESTDIR)$(mandir)/man3/BN_BLINDING_set_flags.3"
-	ln -sf "BN_BLINDING_new.3" "$(DESTDIR)$(mandir)/man3/BN_BLINDING_thread_id.3"
-	ln -sf "BN_BLINDING_new.3" "$(DESTDIR)$(mandir)/man3/BN_BLINDING_update.3"
 	ln -sf "BN_CTX_new.3" "$(DESTDIR)$(mandir)/man3/BN_CTX_free.3"
 	ln -sf "BN_CTX_start.3" "$(DESTDIR)$(mandir)/man3/BN_CTX_end.3"
 	ln -sf "BN_CTX_start.3" "$(DESTDIR)$(mandir)/man3/BN_CTX_get.3"
-	ln -sf "BN_GF2m_add.3" "$(DESTDIR)$(mandir)/man3/BN_GF2m_arr2poly.3"
-	ln -sf "BN_GF2m_add.3" "$(DESTDIR)$(mandir)/man3/BN_GF2m_cmp.3"
-	ln -sf "BN_GF2m_add.3" "$(DESTDIR)$(mandir)/man3/BN_GF2m_mod.3"
-	ln -sf "BN_GF2m_add.3" "$(DESTDIR)$(mandir)/man3/BN_GF2m_mod_arr.3"
-	ln -sf "BN_GF2m_add.3" "$(DESTDIR)$(mandir)/man3/BN_GF2m_mod_div.3"
-	ln -sf "BN_GF2m_add.3" "$(DESTDIR)$(mandir)/man3/BN_GF2m_mod_div_arr.3"
-	ln -sf "BN_GF2m_add.3" "$(DESTDIR)$(mandir)/man3/BN_GF2m_mod_exp.3"
-	ln -sf "BN_GF2m_add.3" "$(DESTDIR)$(mandir)/man3/BN_GF2m_mod_exp_arr.3"
-	ln -sf "BN_GF2m_add.3" "$(DESTDIR)$(mandir)/man3/BN_GF2m_mod_inv.3"
-	ln -sf "BN_GF2m_add.3" "$(DESTDIR)$(mandir)/man3/BN_GF2m_mod_inv_arr.3"
-	ln -sf "BN_GF2m_add.3" "$(DESTDIR)$(mandir)/man3/BN_GF2m_mod_mul.3"
-	ln -sf "BN_GF2m_add.3" "$(DESTDIR)$(mandir)/man3/BN_GF2m_mod_mul_arr.3"
-	ln -sf "BN_GF2m_add.3" "$(DESTDIR)$(mandir)/man3/BN_GF2m_mod_solve_quad.3"
-	ln -sf "BN_GF2m_add.3" "$(DESTDIR)$(mandir)/man3/BN_GF2m_mod_solve_quad_arr.3"
-	ln -sf "BN_GF2m_add.3" "$(DESTDIR)$(mandir)/man3/BN_GF2m_mod_sqr.3"
-	ln -sf "BN_GF2m_add.3" "$(DESTDIR)$(mandir)/man3/BN_GF2m_mod_sqr_arr.3"
-	ln -sf "BN_GF2m_add.3" "$(DESTDIR)$(mandir)/man3/BN_GF2m_mod_sqrt.3"
-	ln -sf "BN_GF2m_add.3" "$(DESTDIR)$(mandir)/man3/BN_GF2m_mod_sqrt_arr.3"
-	ln -sf "BN_GF2m_add.3" "$(DESTDIR)$(mandir)/man3/BN_GF2m_poly2arr.3"
-	ln -sf "BN_GF2m_add.3" "$(DESTDIR)$(mandir)/man3/BN_GF2m_sub.3"
 	ln -sf "BN_add.3" "$(DESTDIR)$(mandir)/man3/BN_div.3"
 	ln -sf "BN_add.3" "$(DESTDIR)$(mandir)/man3/BN_exp.3"
 	ln -sf "BN_add.3" "$(DESTDIR)$(mandir)/man3/BN_gcd.3"
@@ -1013,10 +970,13 @@ install-data-hook:
 	ln -sf "BN_generate_prime.3" "$(DESTDIR)$(mandir)/man3/BN_generate_prime_ex.3"
 	ln -sf "BN_generate_prime.3" "$(DESTDIR)$(mandir)/man3/BN_is_prime_ex.3"
 	ln -sf "BN_generate_prime.3" "$(DESTDIR)$(mandir)/man3/BN_is_prime_fasttest_ex.3"
-	ln -sf "BN_get0_nist_prime_521.3" "$(DESTDIR)$(mandir)/man3/BN_get0_nist_prime_192.3"
-	ln -sf "BN_get0_nist_prime_521.3" "$(DESTDIR)$(mandir)/man3/BN_get0_nist_prime_224.3"
-	ln -sf "BN_get0_nist_prime_521.3" "$(DESTDIR)$(mandir)/man3/BN_get0_nist_prime_256.3"
-	ln -sf "BN_get0_nist_prime_521.3" "$(DESTDIR)$(mandir)/man3/BN_get0_nist_prime_384.3"
+	ln -sf "BN_get_rfc3526_prime_8192.3" "$(DESTDIR)$(mandir)/man3/BN_get_rfc2409_prime_1024.3"
+	ln -sf "BN_get_rfc3526_prime_8192.3" "$(DESTDIR)$(mandir)/man3/BN_get_rfc2409_prime_768.3"
+	ln -sf "BN_get_rfc3526_prime_8192.3" "$(DESTDIR)$(mandir)/man3/BN_get_rfc3526_prime_1536.3"
+	ln -sf "BN_get_rfc3526_prime_8192.3" "$(DESTDIR)$(mandir)/man3/BN_get_rfc3526_prime_2048.3"
+	ln -sf "BN_get_rfc3526_prime_8192.3" "$(DESTDIR)$(mandir)/man3/BN_get_rfc3526_prime_3072.3"
+	ln -sf "BN_get_rfc3526_prime_8192.3" "$(DESTDIR)$(mandir)/man3/BN_get_rfc3526_prime_4096.3"
+	ln -sf "BN_get_rfc3526_prime_8192.3" "$(DESTDIR)$(mandir)/man3/BN_get_rfc3526_prime_6144.3"
 	ln -sf "BN_mod_mul_montgomery.3" "$(DESTDIR)$(mandir)/man3/BN_MONT_CTX_copy.3"
 	ln -sf "BN_mod_mul_montgomery.3" "$(DESTDIR)$(mandir)/man3/BN_MONT_CTX_free.3"
 	ln -sf "BN_mod_mul_montgomery.3" "$(DESTDIR)$(mandir)/man3/BN_MONT_CTX_new.3"
@@ -1024,19 +984,9 @@ install-data-hook:
 	ln -sf "BN_mod_mul_montgomery.3" "$(DESTDIR)$(mandir)/man3/BN_MONT_CTX_set_locked.3"
 	ln -sf "BN_mod_mul_montgomery.3" "$(DESTDIR)$(mandir)/man3/BN_from_montgomery.3"
 	ln -sf "BN_mod_mul_montgomery.3" "$(DESTDIR)$(mandir)/man3/BN_to_montgomery.3"
-	ln -sf "BN_mod_mul_reciprocal.3" "$(DESTDIR)$(mandir)/man3/BN_RECP_CTX_free.3"
-	ln -sf "BN_mod_mul_reciprocal.3" "$(DESTDIR)$(mandir)/man3/BN_RECP_CTX_init.3"
-	ln -sf "BN_mod_mul_reciprocal.3" "$(DESTDIR)$(mandir)/man3/BN_RECP_CTX_new.3"
-	ln -sf "BN_mod_mul_reciprocal.3" "$(DESTDIR)$(mandir)/man3/BN_RECP_CTX_set.3"
-	ln -sf "BN_mod_mul_reciprocal.3" "$(DESTDIR)$(mandir)/man3/BN_div_recp.3"
-	ln -sf "BN_mod_mul_reciprocal.3" "$(DESTDIR)$(mandir)/man3/BN_reciprocal.3"
 	ln -sf "BN_new.3" "$(DESTDIR)$(mandir)/man3/BN_clear.3"
 	ln -sf "BN_new.3" "$(DESTDIR)$(mandir)/man3/BN_clear_free.3"
 	ln -sf "BN_new.3" "$(DESTDIR)$(mandir)/man3/BN_free.3"
-	ln -sf "BN_nist_mod_521.3" "$(DESTDIR)$(mandir)/man3/BN_nist_mod_192.3"
-	ln -sf "BN_nist_mod_521.3" "$(DESTDIR)$(mandir)/man3/BN_nist_mod_224.3"
-	ln -sf "BN_nist_mod_521.3" "$(DESTDIR)$(mandir)/man3/BN_nist_mod_256.3"
-	ln -sf "BN_nist_mod_521.3" "$(DESTDIR)$(mandir)/man3/BN_nist_mod_384.3"
 	ln -sf "BN_num_bytes.3" "$(DESTDIR)$(mandir)/man3/BN_num_bits.3"
 	ln -sf "BN_num_bytes.3" "$(DESTDIR)$(mandir)/man3/BN_num_bits_word.3"
 	ln -sf "BN_rand.3" "$(DESTDIR)$(mandir)/man3/BN_pseudo_rand.3"
@@ -1059,8 +1009,6 @@ install-data-hook:
 	ln -sf "BUF_MEM_new.3" "$(DESTDIR)$(mandir)/man3/BUF_MEM_free.3"
 	ln -sf "BUF_MEM_new.3" "$(DESTDIR)$(mandir)/man3/BUF_MEM_grow.3"
 	ln -sf "BUF_MEM_new.3" "$(DESTDIR)$(mandir)/man3/BUF_MEM_grow_clean.3"
-	ln -sf "BUF_MEM_new.3" "$(DESTDIR)$(mandir)/man3/BUF_reverse.3"
-	ln -sf "BUF_MEM_new.3" "$(DESTDIR)$(mandir)/man3/BUF_strdup.3"
 	ln -sf "CMAC_Init.3" "$(DESTDIR)$(mandir)/man3/CMAC_CTX_cleanup.3"
 	ln -sf "CMAC_Init.3" "$(DESTDIR)$(mandir)/man3/CMAC_CTX_copy.3"
 	ln -sf "CMAC_Init.3" "$(DESTDIR)$(mandir)/man3/CMAC_CTX_free.3"
@@ -1094,9 +1042,11 @@ install-data-hook:
 	ln -sf "CMS_get0_SignerInfos.3" "$(DESTDIR)$(mandir)/man3/CMS_SignerInfo_cert_cmp.3"
 	ln -sf "CMS_get0_SignerInfos.3" "$(DESTDIR)$(mandir)/man3/CMS_SignerInfo_get0_signature.3"
 	ln -sf "CMS_get0_SignerInfos.3" "$(DESTDIR)$(mandir)/man3/CMS_SignerInfo_get0_signer_id.3"
+	ln -sf "CMS_get0_SignerInfos.3" "$(DESTDIR)$(mandir)/man3/CMS_SignerInfo_get_version.3"
 	ln -sf "CMS_get0_SignerInfos.3" "$(DESTDIR)$(mandir)/man3/CMS_SignerInfo_set1_signer_cert.3"
 	ln -sf "CMS_get0_type.3" "$(DESTDIR)$(mandir)/man3/CMS_get0_content.3"
 	ln -sf "CMS_get0_type.3" "$(DESTDIR)$(mandir)/man3/CMS_get0_eContentType.3"
+	ln -sf "CMS_get0_type.3" "$(DESTDIR)$(mandir)/man3/CMS_get_version.3"
 	ln -sf "CMS_get0_type.3" "$(DESTDIR)$(mandir)/man3/CMS_set1_eContentType.3"
 	ln -sf "CMS_get1_ReceiptRequest.3" "$(DESTDIR)$(mandir)/man3/CMS_ReceiptRequest_create0.3"
 	ln -sf "CMS_get1_ReceiptRequest.3" "$(DESTDIR)$(mandir)/man3/CMS_ReceiptRequest_get0_values.3"
@@ -1232,21 +1182,14 @@ install-data-hook:
 	ln -sf "DSA_sign.3" "$(DESTDIR)$(mandir)/man3/DSA_verify.3"
 	ln -sf "DSA_size.3" "$(DESTDIR)$(mandir)/man3/DSA_bits.3"
 	ln -sf "ECDH_compute_key.3" "$(DESTDIR)$(mandir)/man3/ECDH_size.3"
-	ln -sf "ECDSA_SIG_new.3" "$(DESTDIR)$(mandir)/man3/ECDSA_OpenSSL.3"
 	ln -sf "ECDSA_SIG_new.3" "$(DESTDIR)$(mandir)/man3/ECDSA_SIG_free.3"
 	ln -sf "ECDSA_SIG_new.3" "$(DESTDIR)$(mandir)/man3/ECDSA_SIG_get0.3"
 	ln -sf "ECDSA_SIG_new.3" "$(DESTDIR)$(mandir)/man3/ECDSA_SIG_get0_r.3"
 	ln -sf "ECDSA_SIG_new.3" "$(DESTDIR)$(mandir)/man3/ECDSA_SIG_get0_s.3"
 	ln -sf "ECDSA_SIG_new.3" "$(DESTDIR)$(mandir)/man3/ECDSA_SIG_set0.3"
 	ln -sf "ECDSA_SIG_new.3" "$(DESTDIR)$(mandir)/man3/ECDSA_do_sign.3"
-	ln -sf "ECDSA_SIG_new.3" "$(DESTDIR)$(mandir)/man3/ECDSA_do_sign_ex.3"
 	ln -sf "ECDSA_SIG_new.3" "$(DESTDIR)$(mandir)/man3/ECDSA_do_verify.3"
-	ln -sf "ECDSA_SIG_new.3" "$(DESTDIR)$(mandir)/man3/ECDSA_get_default_method.3"
-	ln -sf "ECDSA_SIG_new.3" "$(DESTDIR)$(mandir)/man3/ECDSA_set_default_method.3"
-	ln -sf "ECDSA_SIG_new.3" "$(DESTDIR)$(mandir)/man3/ECDSA_set_method.3"
 	ln -sf "ECDSA_SIG_new.3" "$(DESTDIR)$(mandir)/man3/ECDSA_sign.3"
-	ln -sf "ECDSA_SIG_new.3" "$(DESTDIR)$(mandir)/man3/ECDSA_sign_ex.3"
-	ln -sf "ECDSA_SIG_new.3" "$(DESTDIR)$(mandir)/man3/ECDSA_sign_setup.3"
 	ln -sf "ECDSA_SIG_new.3" "$(DESTDIR)$(mandir)/man3/ECDSA_size.3"
 	ln -sf "ECDSA_SIG_new.3" "$(DESTDIR)$(mandir)/man3/ECDSA_verify.3"
 	ln -sf "ECDSA_SIG_new.3" "$(DESTDIR)$(mandir)/man3/d2i_ECDSA_SIG.3"
@@ -1265,10 +1208,8 @@ install-data-hook:
 	ln -sf "EC_GROUP_copy.3" "$(DESTDIR)$(mandir)/man3/EC_GROUP_get_curve_name.3"
 	ln -sf "EC_GROUP_copy.3" "$(DESTDIR)$(mandir)/man3/EC_GROUP_get_degree.3"
 	ln -sf "EC_GROUP_copy.3" "$(DESTDIR)$(mandir)/man3/EC_GROUP_get_order.3"
-	ln -sf "EC_GROUP_copy.3" "$(DESTDIR)$(mandir)/man3/EC_GROUP_get_pentanomial_basis.3"
 	ln -sf "EC_GROUP_copy.3" "$(DESTDIR)$(mandir)/man3/EC_GROUP_get_point_conversion_form.3"
 	ln -sf "EC_GROUP_copy.3" "$(DESTDIR)$(mandir)/man3/EC_GROUP_get_seed_len.3"
-	ln -sf "EC_GROUP_copy.3" "$(DESTDIR)$(mandir)/man3/EC_GROUP_get_trinomial_basis.3"
 	ln -sf "EC_GROUP_copy.3" "$(DESTDIR)$(mandir)/man3/EC_GROUP_method_of.3"
 	ln -sf "EC_GROUP_copy.3" "$(DESTDIR)$(mandir)/man3/EC_GROUP_order_bits.3"
 	ln -sf "EC_GROUP_copy.3" "$(DESTDIR)$(mandir)/man3/EC_GROUP_set_asn1_flag.3"
@@ -1380,8 +1321,7 @@ install-data-hook:
 	ln -sf "ENGINE_get_default_RSA.3" "$(DESTDIR)$(mandir)/man3/ENGINE_get_cipher_engine.3"
 	ln -sf "ENGINE_get_default_RSA.3" "$(DESTDIR)$(mandir)/man3/ENGINE_get_default_DH.3"
 	ln -sf "ENGINE_get_default_RSA.3" "$(DESTDIR)$(mandir)/man3/ENGINE_get_default_DSA.3"
-	ln -sf "ENGINE_get_default_RSA.3" "$(DESTDIR)$(mandir)/man3/ENGINE_get_default_ECDH.3"
-	ln -sf "ENGINE_get_default_RSA.3" "$(DESTDIR)$(mandir)/man3/ENGINE_get_default_ECDSA.3"
+	ln -sf "ENGINE_get_default_RSA.3" "$(DESTDIR)$(mandir)/man3/ENGINE_get_default_EC.3"
 	ln -sf "ENGINE_get_default_RSA.3" "$(DESTDIR)$(mandir)/man3/ENGINE_get_default_RAND.3"
 	ln -sf "ENGINE_get_default_RSA.3" "$(DESTDIR)$(mandir)/man3/ENGINE_get_digest_engine.3"
 	ln -sf "ENGINE_get_default_RSA.3" "$(DESTDIR)$(mandir)/man3/ENGINE_get_table_flags.3"
@@ -1421,8 +1361,7 @@ install-data-hook:
 	ln -sf "ENGINE_set_RSA.3" "$(DESTDIR)$(mandir)/man3/ENGINE_DIGESTS_PTR.3"
 	ln -sf "ENGINE_set_RSA.3" "$(DESTDIR)$(mandir)/man3/ENGINE_get_DH.3"
 	ln -sf "ENGINE_set_RSA.3" "$(DESTDIR)$(mandir)/man3/ENGINE_get_DSA.3"
-	ln -sf "ENGINE_set_RSA.3" "$(DESTDIR)$(mandir)/man3/ENGINE_get_ECDH.3"
-	ln -sf "ENGINE_set_RSA.3" "$(DESTDIR)$(mandir)/man3/ENGINE_get_ECDSA.3"
+	ln -sf "ENGINE_set_RSA.3" "$(DESTDIR)$(mandir)/man3/ENGINE_get_EC.3"
 	ln -sf "ENGINE_set_RSA.3" "$(DESTDIR)$(mandir)/man3/ENGINE_get_RAND.3"
 	ln -sf "ENGINE_set_RSA.3" "$(DESTDIR)$(mandir)/man3/ENGINE_get_RSA.3"
 	ln -sf "ENGINE_set_RSA.3" "$(DESTDIR)$(mandir)/man3/ENGINE_get_STORE.3"
@@ -1432,8 +1371,7 @@ install-data-hook:
 	ln -sf "ENGINE_set_RSA.3" "$(DESTDIR)$(mandir)/man3/ENGINE_get_digests.3"
 	ln -sf "ENGINE_set_RSA.3" "$(DESTDIR)$(mandir)/man3/ENGINE_set_DH.3"
 	ln -sf "ENGINE_set_RSA.3" "$(DESTDIR)$(mandir)/man3/ENGINE_set_DSA.3"
-	ln -sf "ENGINE_set_RSA.3" "$(DESTDIR)$(mandir)/man3/ENGINE_set_ECDH.3"
-	ln -sf "ENGINE_set_RSA.3" "$(DESTDIR)$(mandir)/man3/ENGINE_set_ECDSA.3"
+	ln -sf "ENGINE_set_RSA.3" "$(DESTDIR)$(mandir)/man3/ENGINE_set_EC.3"
 	ln -sf "ENGINE_set_RSA.3" "$(DESTDIR)$(mandir)/man3/ENGINE_set_RAND.3"
 	ln -sf "ENGINE_set_RSA.3" "$(DESTDIR)$(mandir)/man3/ENGINE_set_STORE.3"
 	ln -sf "ENGINE_set_RSA.3" "$(DESTDIR)$(mandir)/man3/ENGINE_set_ciphers.3"
@@ -1499,6 +1437,11 @@ install-data-hook:
 	ln -sf "EVP_AEAD_CTX_init.3" "$(DESTDIR)$(mandir)/man3/EVP_aead_aes_256_gcm.3"
 	ln -sf "EVP_AEAD_CTX_init.3" "$(DESTDIR)$(mandir)/man3/EVP_aead_chacha20_poly1305.3"
 	ln -sf "EVP_AEAD_CTX_init.3" "$(DESTDIR)$(mandir)/man3/EVP_aead_xchacha20_poly1305.3"
+	ln -sf "EVP_CIPHER_CTX_get_cipher_data.3" "$(DESTDIR)$(mandir)/man3/EVP_CIPHER_CTX_buf_noconst.3"
+	ln -sf "EVP_CIPHER_CTX_get_cipher_data.3" "$(DESTDIR)$(mandir)/man3/EVP_CIPHER_CTX_set_cipher_data.3"
+	ln -sf "EVP_CIPHER_do_all.3" "$(DESTDIR)$(mandir)/man3/EVP_CIPHER_do_all_sorted.3"
+	ln -sf "EVP_CIPHER_do_all.3" "$(DESTDIR)$(mandir)/man3/EVP_MD_do_all.3"
+	ln -sf "EVP_CIPHER_do_all.3" "$(DESTDIR)$(mandir)/man3/EVP_MD_do_all_sorted.3"
 	ln -sf "EVP_CIPHER_meth_new.3" "$(DESTDIR)$(mandir)/man3/EVP_CIPHER_meth_dup.3"
 	ln -sf "EVP_CIPHER_meth_new.3" "$(DESTDIR)$(mandir)/man3/EVP_CIPHER_meth_free.3"
 	ln -sf "EVP_CIPHER_meth_new.3" "$(DESTDIR)$(mandir)/man3/EVP_CIPHER_meth_set_cleanup.3"
@@ -1518,6 +1461,7 @@ install-data-hook:
 	ln -sf "EVP_DigestInit.3" "$(DESTDIR)$(mandir)/man3/EVP_MAX_MD_SIZE.3"
 	ln -sf "EVP_DigestInit.3" "$(DESTDIR)$(mandir)/man3/EVP_MD_CTX_block_size.3"
 	ln -sf "EVP_DigestInit.3" "$(DESTDIR)$(mandir)/man3/EVP_MD_CTX_cleanup.3"
+	ln -sf "EVP_DigestInit.3" "$(DESTDIR)$(mandir)/man3/EVP_MD_CTX_clear_flags.3"
 	ln -sf "EVP_DigestInit.3" "$(DESTDIR)$(mandir)/man3/EVP_MD_CTX_copy.3"
 	ln -sf "EVP_DigestInit.3" "$(DESTDIR)$(mandir)/man3/EVP_MD_CTX_copy_ex.3"
 	ln -sf "EVP_DigestInit.3" "$(DESTDIR)$(mandir)/man3/EVP_MD_CTX_create.3"
@@ -1526,22 +1470,25 @@ install-data-hook:
 	ln -sf "EVP_DigestInit.3" "$(DESTDIR)$(mandir)/man3/EVP_MD_CTX_free.3"
 	ln -sf "EVP_DigestInit.3" "$(DESTDIR)$(mandir)/man3/EVP_MD_CTX_init.3"
 	ln -sf "EVP_DigestInit.3" "$(DESTDIR)$(mandir)/man3/EVP_MD_CTX_md.3"
+	ln -sf "EVP_DigestInit.3" "$(DESTDIR)$(mandir)/man3/EVP_MD_CTX_md_data.3"
 	ln -sf "EVP_DigestInit.3" "$(DESTDIR)$(mandir)/man3/EVP_MD_CTX_new.3"
+	ln -sf "EVP_DigestInit.3" "$(DESTDIR)$(mandir)/man3/EVP_MD_CTX_pkey_ctx.3"
 	ln -sf "EVP_DigestInit.3" "$(DESTDIR)$(mandir)/man3/EVP_MD_CTX_reset.3"
+	ln -sf "EVP_DigestInit.3" "$(DESTDIR)$(mandir)/man3/EVP_MD_CTX_set_flags.3"
+	ln -sf "EVP_DigestInit.3" "$(DESTDIR)$(mandir)/man3/EVP_MD_CTX_set_pkey_ctx.3"
 	ln -sf "EVP_DigestInit.3" "$(DESTDIR)$(mandir)/man3/EVP_MD_CTX_size.3"
+	ln -sf "EVP_DigestInit.3" "$(DESTDIR)$(mandir)/man3/EVP_MD_CTX_test_flags.3"
 	ln -sf "EVP_DigestInit.3" "$(DESTDIR)$(mandir)/man3/EVP_MD_CTX_type.3"
 	ln -sf "EVP_DigestInit.3" "$(DESTDIR)$(mandir)/man3/EVP_MD_block_size.3"
+	ln -sf "EVP_DigestInit.3" "$(DESTDIR)$(mandir)/man3/EVP_MD_flags.3"
 	ln -sf "EVP_DigestInit.3" "$(DESTDIR)$(mandir)/man3/EVP_MD_pkey_type.3"
 	ln -sf "EVP_DigestInit.3" "$(DESTDIR)$(mandir)/man3/EVP_MD_size.3"
 	ln -sf "EVP_DigestInit.3" "$(DESTDIR)$(mandir)/man3/EVP_MD_type.3"
 	ln -sf "EVP_DigestInit.3" "$(DESTDIR)$(mandir)/man3/EVP_get_digestbyname.3"
 	ln -sf "EVP_DigestInit.3" "$(DESTDIR)$(mandir)/man3/EVP_get_digestbynid.3"
 	ln -sf "EVP_DigestInit.3" "$(DESTDIR)$(mandir)/man3/EVP_get_digestbyobj.3"
-	ln -sf "EVP_DigestInit.3" "$(DESTDIR)$(mandir)/man3/EVP_md5.3"
-	ln -sf "EVP_DigestInit.3" "$(DESTDIR)$(mandir)/man3/EVP_md5_sha1.3"
 	ln -sf "EVP_DigestInit.3" "$(DESTDIR)$(mandir)/man3/EVP_md_null.3"
 	ln -sf "EVP_DigestInit.3" "$(DESTDIR)$(mandir)/man3/EVP_ripemd160.3"
-	ln -sf "EVP_DigestInit.3" "$(DESTDIR)$(mandir)/man3/EVP_sha1.3"
 	ln -sf "EVP_DigestInit.3" "$(DESTDIR)$(mandir)/man3/EVP_sha224.3"
 	ln -sf "EVP_DigestInit.3" "$(DESTDIR)$(mandir)/man3/EVP_sha256.3"
 	ln -sf "EVP_DigestInit.3" "$(DESTDIR)$(mandir)/man3/EVP_sha384.3"
@@ -1567,7 +1514,9 @@ install-data-hook:
 	ln -sf "EVP_EncryptInit.3" "$(DESTDIR)$(mandir)/man3/EVP_CIPHER_CTX_cipher.3"
 	ln -sf "EVP_EncryptInit.3" "$(DESTDIR)$(mandir)/man3/EVP_CIPHER_CTX_cleanup.3"
 	ln -sf "EVP_EncryptInit.3" "$(DESTDIR)$(mandir)/man3/EVP_CIPHER_CTX_clear_flags.3"
+	ln -sf "EVP_EncryptInit.3" "$(DESTDIR)$(mandir)/man3/EVP_CIPHER_CTX_copy.3"
 	ln -sf "EVP_EncryptInit.3" "$(DESTDIR)$(mandir)/man3/EVP_CIPHER_CTX_ctrl.3"
+	ln -sf "EVP_EncryptInit.3" "$(DESTDIR)$(mandir)/man3/EVP_CIPHER_CTX_encrypting.3"
 	ln -sf "EVP_EncryptInit.3" "$(DESTDIR)$(mandir)/man3/EVP_CIPHER_CTX_flags.3"
 	ln -sf "EVP_EncryptInit.3" "$(DESTDIR)$(mandir)/man3/EVP_CIPHER_CTX_free.3"
 	ln -sf "EVP_EncryptInit.3" "$(DESTDIR)$(mandir)/man3/EVP_CIPHER_CTX_get_app_data.3"
@@ -1621,7 +1570,6 @@ install-data-hook:
 	ln -sf "EVP_EncryptInit.3" "$(DESTDIR)$(mandir)/man3/EVP_cast5_cfb64.3"
 	ln -sf "EVP_EncryptInit.3" "$(DESTDIR)$(mandir)/man3/EVP_cast5_ecb.3"
 	ln -sf "EVP_EncryptInit.3" "$(DESTDIR)$(mandir)/man3/EVP_cast5_ofb.3"
-	ln -sf "EVP_EncryptInit.3" "$(DESTDIR)$(mandir)/man3/EVP_chacha20.3"
 	ln -sf "EVP_EncryptInit.3" "$(DESTDIR)$(mandir)/man3/EVP_enc_null.3"
 	ln -sf "EVP_EncryptInit.3" "$(DESTDIR)$(mandir)/man3/EVP_get_cipherbyname.3"
 	ln -sf "EVP_EncryptInit.3" "$(DESTDIR)$(mandir)/man3/EVP_get_cipherbynid.3"
@@ -1638,6 +1586,18 @@ install-data-hook:
 	ln -sf "EVP_EncryptInit.3" "$(DESTDIR)$(mandir)/man3/EVP_rc2_cfb64.3"
 	ln -sf "EVP_EncryptInit.3" "$(DESTDIR)$(mandir)/man3/EVP_rc2_ecb.3"
 	ln -sf "EVP_EncryptInit.3" "$(DESTDIR)$(mandir)/man3/EVP_rc2_ofb.3"
+	ln -sf "EVP_MD_meth_new.3" "$(DESTDIR)$(mandir)/man3/EVP_MD_meth_dup.3"
+	ln -sf "EVP_MD_meth_new.3" "$(DESTDIR)$(mandir)/man3/EVP_MD_meth_free.3"
+	ln -sf "EVP_MD_meth_new.3" "$(DESTDIR)$(mandir)/man3/EVP_MD_meth_set_app_datasize.3"
+	ln -sf "EVP_MD_meth_new.3" "$(DESTDIR)$(mandir)/man3/EVP_MD_meth_set_cleanup.3"
+	ln -sf "EVP_MD_meth_new.3" "$(DESTDIR)$(mandir)/man3/EVP_MD_meth_set_copy.3"
+	ln -sf "EVP_MD_meth_new.3" "$(DESTDIR)$(mandir)/man3/EVP_MD_meth_set_ctrl.3"
+	ln -sf "EVP_MD_meth_new.3" "$(DESTDIR)$(mandir)/man3/EVP_MD_meth_set_final.3"
+	ln -sf "EVP_MD_meth_new.3" "$(DESTDIR)$(mandir)/man3/EVP_MD_meth_set_flags.3"
+	ln -sf "EVP_MD_meth_new.3" "$(DESTDIR)$(mandir)/man3/EVP_MD_meth_set_init.3"
+	ln -sf "EVP_MD_meth_new.3" "$(DESTDIR)$(mandir)/man3/EVP_MD_meth_set_input_blocksize.3"
+	ln -sf "EVP_MD_meth_new.3" "$(DESTDIR)$(mandir)/man3/EVP_MD_meth_set_result_size.3"
+	ln -sf "EVP_MD_meth_new.3" "$(DESTDIR)$(mandir)/man3/EVP_MD_meth_set_update.3"
 	ln -sf "EVP_OpenInit.3" "$(DESTDIR)$(mandir)/man3/EVP_OpenFinal.3"
 	ln -sf "EVP_OpenInit.3" "$(DESTDIR)$(mandir)/man3/EVP_OpenUpdate.3"
 	ln -sf "EVP_PKCS82PKEY.3" "$(DESTDIR)$(mandir)/man3/EVP_PKEY2PKCS8.3"
@@ -1766,6 +1726,7 @@ install-data-hook:
 	ln -sf "EVP_PKEY_set1_RSA.3" "$(DESTDIR)$(mandir)/man3/EVP_PKEY_set1_DSA.3"
 	ln -sf "EVP_PKEY_set1_RSA.3" "$(DESTDIR)$(mandir)/man3/EVP_PKEY_set1_EC_KEY.3"
 	ln -sf "EVP_PKEY_set1_RSA.3" "$(DESTDIR)$(mandir)/man3/EVP_PKEY_set_type.3"
+	ln -sf "EVP_PKEY_set1_RSA.3" "$(DESTDIR)$(mandir)/man3/EVP_PKEY_set_type_str.3"
 	ln -sf "EVP_PKEY_set1_RSA.3" "$(DESTDIR)$(mandir)/man3/EVP_PKEY_type.3"
 	ln -sf "EVP_PKEY_sign.3" "$(DESTDIR)$(mandir)/man3/EVP_PKEY_sign_init.3"
 	ln -sf "EVP_PKEY_size.3" "$(DESTDIR)$(mandir)/man3/EVP_PKEY_bits.3"
@@ -1780,6 +1741,11 @@ install-data-hook:
 	ln -sf "EVP_VerifyInit.3" "$(DESTDIR)$(mandir)/man3/EVP_VerifyFinal.3"
 	ln -sf "EVP_VerifyInit.3" "$(DESTDIR)$(mandir)/man3/EVP_VerifyInit_ex.3"
 	ln -sf "EVP_VerifyInit.3" "$(DESTDIR)$(mandir)/man3/EVP_VerifyUpdate.3"
+	ln -sf "EVP_add_cipher.3" "$(DESTDIR)$(mandir)/man3/EVP_add_cipher_alias.3"
+	ln -sf "EVP_add_cipher.3" "$(DESTDIR)$(mandir)/man3/EVP_add_digest.3"
+	ln -sf "EVP_add_cipher.3" "$(DESTDIR)$(mandir)/man3/EVP_add_digest_alias.3"
+	ln -sf "EVP_add_cipher.3" "$(DESTDIR)$(mandir)/man3/EVP_delete_cipher_alias.3"
+	ln -sf "EVP_add_cipher.3" "$(DESTDIR)$(mandir)/man3/EVP_delete_digest_alias.3"
 	ln -sf "EVP_aes_128_cbc.3" "$(DESTDIR)$(mandir)/man3/EVP_aes_128_cbc_hmac_sha1.3"
 	ln -sf "EVP_aes_128_cbc.3" "$(DESTDIR)$(mandir)/man3/EVP_aes_128_ccm.3"
 	ln -sf "EVP_aes_128_cbc.3" "$(DESTDIR)$(mandir)/man3/EVP_aes_128_cfb.3"
@@ -1836,6 +1802,7 @@ install-data-hook:
 	ln -sf "EVP_camellia_128_cbc.3" "$(DESTDIR)$(mandir)/man3/EVP_camellia_256_cfb8.3"
 	ln -sf "EVP_camellia_128_cbc.3" "$(DESTDIR)$(mandir)/man3/EVP_camellia_256_ecb.3"
 	ln -sf "EVP_camellia_128_cbc.3" "$(DESTDIR)$(mandir)/man3/EVP_camellia_256_ofb.3"
+	ln -sf "EVP_chacha20.3" "$(DESTDIR)$(mandir)/man3/EVP_chacha20_poly1305.3"
 	ln -sf "EVP_des_cbc.3" "$(DESTDIR)$(mandir)/man3/EVP_des_cfb.3"
 	ln -sf "EVP_des_cbc.3" "$(DESTDIR)$(mandir)/man3/EVP_des_cfb1.3"
 	ln -sf "EVP_des_cbc.3" "$(DESTDIR)$(mandir)/man3/EVP_des_cfb64.3"
@@ -1859,6 +1826,12 @@ install-data-hook:
 	ln -sf "EVP_des_cbc.3" "$(DESTDIR)$(mandir)/man3/EVP_desx_cbc.3"
 	ln -sf "EVP_rc4.3" "$(DESTDIR)$(mandir)/man3/EVP_rc4_40.3"
 	ln -sf "EVP_rc4.3" "$(DESTDIR)$(mandir)/man3/EVP_rc4_hmac_md5.3"
+	ln -sf "EVP_sha1.3" "$(DESTDIR)$(mandir)/man3/EVP_md4.3"
+	ln -sf "EVP_sha1.3" "$(DESTDIR)$(mandir)/man3/EVP_md5.3"
+	ln -sf "EVP_sha1.3" "$(DESTDIR)$(mandir)/man3/EVP_md5_sha1.3"
+	ln -sf "EVP_sha3_224.3" "$(DESTDIR)$(mandir)/man3/EVP_sha3_256.3"
+	ln -sf "EVP_sha3_224.3" "$(DESTDIR)$(mandir)/man3/EVP_sha3_384.3"
+	ln -sf "EVP_sha3_224.3" "$(DESTDIR)$(mandir)/man3/EVP_sha3_512.3"
 	ln -sf "EVP_sm4_cbc.3" "$(DESTDIR)$(mandir)/man3/EVP_sm4_cfb.3"
 	ln -sf "EVP_sm4_cbc.3" "$(DESTDIR)$(mandir)/man3/EVP_sm4_cfb128.3"
 	ln -sf "EVP_sm4_cbc.3" "$(DESTDIR)$(mandir)/man3/EVP_sm4_ctr.3"
@@ -1900,15 +1873,13 @@ install-data-hook:
 	ln -sf "OBJ_NAME_add.3" "$(DESTDIR)$(mandir)/man3/OBJ_NAME_init.3"
 	ln -sf "OBJ_NAME_add.3" "$(DESTDIR)$(mandir)/man3/OBJ_NAME_new_index.3"
 	ln -sf "OBJ_NAME_add.3" "$(DESTDIR)$(mandir)/man3/OBJ_NAME_remove.3"
-	ln -sf "OBJ_add_sigid.3" "$(DESTDIR)$(mandir)/man3/OBJ_find_sigid_algs.3"
-	ln -sf "OBJ_add_sigid.3" "$(DESTDIR)$(mandir)/man3/OBJ_find_sigid_by_algs.3"
-	ln -sf "OBJ_add_sigid.3" "$(DESTDIR)$(mandir)/man3/OBJ_sigid_free.3"
 	ln -sf "OBJ_create.3" "$(DESTDIR)$(mandir)/man3/OBJ_add_object.3"
 	ln -sf "OBJ_create.3" "$(DESTDIR)$(mandir)/man3/OBJ_cleanup.3"
 	ln -sf "OBJ_create.3" "$(DESTDIR)$(mandir)/man3/OBJ_create_objects.3"
 	ln -sf "OBJ_create.3" "$(DESTDIR)$(mandir)/man3/OBJ_new_nid.3"
 	ln -sf "OBJ_create.3" "$(DESTDIR)$(mandir)/man3/check_defer.3"
 	ln -sf "OBJ_create.3" "$(DESTDIR)$(mandir)/man3/obj_cleanup_defer.3"
+	ln -sf "OBJ_find_sigid_algs.3" "$(DESTDIR)$(mandir)/man3/OBJ_find_sigid_by_algs.3"
 	ln -sf "OBJ_nid2obj.3" "$(DESTDIR)$(mandir)/man3/OBJ_cmp.3"
 	ln -sf "OBJ_nid2obj.3" "$(DESTDIR)$(mandir)/man3/OBJ_dup.3"
 	ln -sf "OBJ_nid2obj.3" "$(DESTDIR)$(mandir)/man3/OBJ_ln2nid.3"
@@ -2175,9 +2146,6 @@ install-data-hook:
 	ln -sf "POLICYINFO_new.3" "$(DESTDIR)$(mandir)/man3/POLICY_MAPPING_new.3"
 	ln -sf "POLICYINFO_new.3" "$(DESTDIR)$(mandir)/man3/USERNOTICE_free.3"
 	ln -sf "POLICYINFO_new.3" "$(DESTDIR)$(mandir)/man3/USERNOTICE_new.3"
-	ln -sf "PROXY_POLICY_new.3" "$(DESTDIR)$(mandir)/man3/PROXY_CERT_INFO_EXTENSION_free.3"
-	ln -sf "PROXY_POLICY_new.3" "$(DESTDIR)$(mandir)/man3/PROXY_CERT_INFO_EXTENSION_new.3"
-	ln -sf "PROXY_POLICY_new.3" "$(DESTDIR)$(mandir)/man3/PROXY_POLICY_free.3"
 	ln -sf "RAND_add.3" "$(DESTDIR)$(mandir)/man3/RAND_cleanup.3"
 	ln -sf "RAND_add.3" "$(DESTDIR)$(mandir)/man3/RAND_poll.3"
 	ln -sf "RAND_add.3" "$(DESTDIR)$(mandir)/man3/RAND_seed.3"
@@ -2603,13 +2571,6 @@ install-data-hook:
 	ln -sf "SSL_want.3" "$(DESTDIR)$(mandir)/man3/SSL_want_write.3"
 	ln -sf "SSL_want.3" "$(DESTDIR)$(mandir)/man3/SSL_want_x509_lookup.3"
 	ln -sf "SSL_write.3" "$(DESTDIR)$(mandir)/man3/SSL_write_ex.3"
-	ln -sf "SXNET_new.3" "$(DESTDIR)$(mandir)/man3/SXNETID_free.3"
-	ln -sf "SXNET_new.3" "$(DESTDIR)$(mandir)/man3/SXNETID_new.3"
-	ln -sf "SXNET_new.3" "$(DESTDIR)$(mandir)/man3/SXNET_free.3"
-	ln -sf "SXNET_new.3" "$(DESTDIR)$(mandir)/man3/d2i_SXNET.3"
-	ln -sf "SXNET_new.3" "$(DESTDIR)$(mandir)/man3/d2i_SXNETID.3"
-	ln -sf "SXNET_new.3" "$(DESTDIR)$(mandir)/man3/i2d_SXNET.3"
-	ln -sf "SXNET_new.3" "$(DESTDIR)$(mandir)/man3/i2d_SXNETID.3"
 	ln -sf "TS_REQ_new.3" "$(DESTDIR)$(mandir)/man3/TS_ACCURACY_free.3"
 	ln -sf "TS_REQ_new.3" "$(DESTDIR)$(mandir)/man3/TS_ACCURACY_new.3"
 	ln -sf "TS_REQ_new.3" "$(DESTDIR)$(mandir)/man3/TS_MSG_IMPRINT_free.3"
@@ -2885,6 +2846,8 @@ install-data-hook:
 	ln -sf "X509_STORE_CTX_set_verify.3" "$(DESTDIR)$(mandir)/man3/X509_STORE_set_verify_func.3"
 	ln -sf "X509_STORE_CTX_set_verify_cb.3" "$(DESTDIR)$(mandir)/man3/X509_STORE_CTX_get_verify_cb.3"
 	ln -sf "X509_STORE_CTX_set_verify_cb.3" "$(DESTDIR)$(mandir)/man3/X509_STORE_CTX_verify_cb.3"
+	ln -sf "X509_STORE_get_by_subject.3" "$(DESTDIR)$(mandir)/man3/X509_STORE_CTX_get1_certs.3"
+	ln -sf "X509_STORE_get_by_subject.3" "$(DESTDIR)$(mandir)/man3/X509_STORE_CTX_get1_crls.3"
 	ln -sf "X509_STORE_get_by_subject.3" "$(DESTDIR)$(mandir)/man3/X509_STORE_CTX_get1_issuer.3"
 	ln -sf "X509_STORE_get_by_subject.3" "$(DESTDIR)$(mandir)/man3/X509_STORE_CTX_get_by_subject.3"
 	ln -sf "X509_STORE_get_by_subject.3" "$(DESTDIR)$(mandir)/man3/X509_STORE_CTX_get_obj_by_subject.3"
@@ -3030,14 +2993,6 @@ install-data-hook:
 	ln -sf "X509_new.3" "$(DESTDIR)$(mandir)/man3/X509_dup.3"
 	ln -sf "X509_new.3" "$(DESTDIR)$(mandir)/man3/X509_free.3"
 	ln -sf "X509_new.3" "$(DESTDIR)$(mandir)/man3/X509_up_ref.3"
-	ln -sf "X509_policy_check.3" "$(DESTDIR)$(mandir)/man3/X509_policy_tree_free.3"
-	ln -sf "X509_policy_tree_get0_policies.3" "$(DESTDIR)$(mandir)/man3/X509_policy_tree_get0_user_policies.3"
-	ln -sf "X509_policy_tree_level_count.3" "$(DESTDIR)$(mandir)/man3/X509_policy_level_get0_node.3"
-	ln -sf "X509_policy_tree_level_count.3" "$(DESTDIR)$(mandir)/man3/X509_policy_level_node_count.3"
-	ln -sf "X509_policy_tree_level_count.3" "$(DESTDIR)$(mandir)/man3/X509_policy_node_get0_parent.3"
-	ln -sf "X509_policy_tree_level_count.3" "$(DESTDIR)$(mandir)/man3/X509_policy_node_get0_policy.3"
-	ln -sf "X509_policy_tree_level_count.3" "$(DESTDIR)$(mandir)/man3/X509_policy_node_get0_qualifiers.3"
-	ln -sf "X509_policy_tree_level_count.3" "$(DESTDIR)$(mandir)/man3/X509_policy_tree_get0_level.3"
 	ln -sf "X509_print_ex.3" "$(DESTDIR)$(mandir)/man3/X509_CERT_AUX_print.3"
 	ln -sf "X509_print_ex.3" "$(DESTDIR)$(mandir)/man3/X509_print.3"
 	ln -sf "X509_print_ex.3" "$(DESTDIR)$(mandir)/man3/X509_print_ex_fp.3"
@@ -3114,6 +3069,8 @@ install-data-hook:
 	ln -sf "bn_dump.3" "$(DESTDIR)$(mandir)/man3/mul_add.3"
 	ln -sf "bn_dump.3" "$(DESTDIR)$(mandir)/man3/sqr.3"
 	ln -sf "d2i_ASN1_NULL.3" "$(DESTDIR)$(mandir)/man3/i2d_ASN1_NULL.3"
+	ln -sf "d2i_ASN1_OBJECT.3" "$(DESTDIR)$(mandir)/man3/OBJ_get0_data.3"
+	ln -sf "d2i_ASN1_OBJECT.3" "$(DESTDIR)$(mandir)/man3/OBJ_length.3"
 	ln -sf "d2i_ASN1_OBJECT.3" "$(DESTDIR)$(mandir)/man3/i2d_ASN1_OBJECT.3"
 	ln -sf "d2i_ASN1_OCTET_STRING.3" "$(DESTDIR)$(mandir)/man3/d2i_ASN1_BIT_STRING.3"
 	ln -sf "d2i_ASN1_OCTET_STRING.3" "$(DESTDIR)$(mandir)/man3/d2i_ASN1_BMPSTRING.3"
@@ -3317,9 +3274,6 @@ install-data-hook:
 	ln -sf "d2i_POLICYINFO.3" "$(DESTDIR)$(mandir)/man3/i2d_POLICYINFO.3"
 	ln -sf "d2i_POLICYINFO.3" "$(DESTDIR)$(mandir)/man3/i2d_POLICYQUALINFO.3"
 	ln -sf "d2i_POLICYINFO.3" "$(DESTDIR)$(mandir)/man3/i2d_USERNOTICE.3"
-	ln -sf "d2i_PROXY_POLICY.3" "$(DESTDIR)$(mandir)/man3/d2i_PROXY_CERT_INFO_EXTENSION.3"
-	ln -sf "d2i_PROXY_POLICY.3" "$(DESTDIR)$(mandir)/man3/i2d_PROXY_CERT_INFO_EXTENSION.3"
-	ln -sf "d2i_PROXY_POLICY.3" "$(DESTDIR)$(mandir)/man3/i2d_PROXY_POLICY.3"
 	ln -sf "d2i_PrivateKey.3" "$(DESTDIR)$(mandir)/man3/d2i_AutoPrivateKey.3"
 	ln -sf "d2i_PrivateKey.3" "$(DESTDIR)$(mandir)/man3/d2i_PrivateKey_bio.3"
 	ln -sf "d2i_PrivateKey.3" "$(DESTDIR)$(mandir)/man3/d2i_PrivateKey_fp.3"
@@ -3433,21 +3387,6 @@ install-data-hook:
 	ln -sf "des_read_pw.3" "$(DESTDIR)$(mandir)/man3/EVP_read_pw_string.3"
 	ln -sf "des_read_pw.3" "$(DESTDIR)$(mandir)/man3/EVP_read_pw_string_min.3"
 	ln -sf "des_read_pw.3" "$(DESTDIR)$(mandir)/man3/des_read_pw_string.3"
-	ln -sf "get_rfc3526_prime_8192.3" "$(DESTDIR)$(mandir)/man3/BN_get_rfc2409_prime_1024.3"
-	ln -sf "get_rfc3526_prime_8192.3" "$(DESTDIR)$(mandir)/man3/BN_get_rfc2409_prime_768.3"
-	ln -sf "get_rfc3526_prime_8192.3" "$(DESTDIR)$(mandir)/man3/BN_get_rfc3526_prime_1536.3"
-	ln -sf "get_rfc3526_prime_8192.3" "$(DESTDIR)$(mandir)/man3/BN_get_rfc3526_prime_2048.3"
-	ln -sf "get_rfc3526_prime_8192.3" "$(DESTDIR)$(mandir)/man3/BN_get_rfc3526_prime_3072.3"
-	ln -sf "get_rfc3526_prime_8192.3" "$(DESTDIR)$(mandir)/man3/BN_get_rfc3526_prime_4096.3"
-	ln -sf "get_rfc3526_prime_8192.3" "$(DESTDIR)$(mandir)/man3/BN_get_rfc3526_prime_6144.3"
-	ln -sf "get_rfc3526_prime_8192.3" "$(DESTDIR)$(mandir)/man3/BN_get_rfc3526_prime_8192.3"
-	ln -sf "get_rfc3526_prime_8192.3" "$(DESTDIR)$(mandir)/man3/get_rfc2409_prime_1024.3"
-	ln -sf "get_rfc3526_prime_8192.3" "$(DESTDIR)$(mandir)/man3/get_rfc2409_prime_768.3"
-	ln -sf "get_rfc3526_prime_8192.3" "$(DESTDIR)$(mandir)/man3/get_rfc3526_prime_1536.3"
-	ln -sf "get_rfc3526_prime_8192.3" "$(DESTDIR)$(mandir)/man3/get_rfc3526_prime_2048.3"
-	ln -sf "get_rfc3526_prime_8192.3" "$(DESTDIR)$(mandir)/man3/get_rfc3526_prime_3072.3"
-	ln -sf "get_rfc3526_prime_8192.3" "$(DESTDIR)$(mandir)/man3/get_rfc3526_prime_4096.3"
-	ln -sf "get_rfc3526_prime_8192.3" "$(DESTDIR)$(mandir)/man3/get_rfc3526_prime_6144.3"
 	ln -sf "i2a_ASN1_STRING.3" "$(DESTDIR)$(mandir)/man3/a2i_ASN1_ENUMERATED.3"
 	ln -sf "i2a_ASN1_STRING.3" "$(DESTDIR)$(mandir)/man3/a2i_ASN1_INTEGER.3"
 	ln -sf "i2a_ASN1_STRING.3" "$(DESTDIR)$(mandir)/man3/a2i_ASN1_STRING.3"
@@ -3572,9 +3511,6 @@ uninstall-local:
 	-rm -f "$(DESTDIR)$(mandir)/man3/AES_decrypt.3"
 	-rm -f "$(DESTDIR)$(mandir)/man3/AES_set_decrypt_key.3"
 	-rm -f "$(DESTDIR)$(mandir)/man3/AES_set_encrypt_key.3"
-	-rm -f "$(DESTDIR)$(mandir)/man3/ASN1_BIT_STRING_name_print.3"
-	-rm -f "$(DESTDIR)$(mandir)/man3/ASN1_BIT_STRING_set_asc.3"
-	-rm -f "$(DESTDIR)$(mandir)/man3/ASN1_BIT_STRING_check.3"
 	-rm -f "$(DESTDIR)$(mandir)/man3/ASN1_BIT_STRING_get_bit.3"
 	-rm -f "$(DESTDIR)$(mandir)/man3/ASN1_BIT_STRING_set_bit.3"
 	-rm -f "$(DESTDIR)$(mandir)/man3/ASN1_ENUMERATED_get.3"
@@ -3714,7 +3650,6 @@ uninstall-local:
 	-rm -f "$(DESTDIR)$(mandir)/man3/BF_ecb_encrypt.3"
 	-rm -f "$(DESTDIR)$(mandir)/man3/BF_encrypt.3"
 	-rm -f "$(DESTDIR)$(mandir)/man3/BF_ofb64_encrypt.3"
-	-rm -f "$(DESTDIR)$(mandir)/man3/BF_options.3"
 	-rm -f "$(DESTDIR)$(mandir)/man3/BIO_get_accept_socket.3"
 	-rm -f "$(DESTDIR)$(mandir)/man3/BIO_get_host_ip.3"
 	-rm -f "$(DESTDIR)$(mandir)/man3/BIO_get_port.3"
@@ -3745,11 +3680,6 @@ uninstall-local:
 	-rm -f "$(DESTDIR)$(mandir)/man3/BIO_dump_indent.3"
 	-rm -f "$(DESTDIR)$(mandir)/man3/BIO_dump_indent_fp.3"
 	-rm -f "$(DESTDIR)$(mandir)/man3/BIO_dup_state.3"
-	-rm -f "$(DESTDIR)$(mandir)/man3/BIO_asn1_get_prefix.3"
-	-rm -f "$(DESTDIR)$(mandir)/man3/BIO_asn1_get_suffix.3"
-	-rm -f "$(DESTDIR)$(mandir)/man3/BIO_asn1_set_prefix.3"
-	-rm -f "$(DESTDIR)$(mandir)/man3/BIO_asn1_set_suffix.3"
-	-rm -f "$(DESTDIR)$(mandir)/man3/asn1_ps_func.3"
 	-rm -f "$(DESTDIR)$(mandir)/man3/BIO_get_buffer_num_lines.3"
 	-rm -f "$(DESTDIR)$(mandir)/man3/BIO_set_buffer_read_data.3"
 	-rm -f "$(DESTDIR)$(mandir)/man3/BIO_set_buffer_size.3"
@@ -3796,12 +3726,6 @@ uninstall-local:
 	-rm -f "$(DESTDIR)$(mandir)/man3/BIO_get_ex_data.3"
 	-rm -f "$(DESTDIR)$(mandir)/man3/BIO_set_app_data.3"
 	-rm -f "$(DESTDIR)$(mandir)/man3/BIO_set_ex_data.3"
-	-rm -f "$(DESTDIR)$(mandir)/man3/ECDH_get_ex_data.3"
-	-rm -f "$(DESTDIR)$(mandir)/man3/ECDH_get_ex_new_index.3"
-	-rm -f "$(DESTDIR)$(mandir)/man3/ECDH_set_ex_data.3"
-	-rm -f "$(DESTDIR)$(mandir)/man3/ECDSA_get_ex_data.3"
-	-rm -f "$(DESTDIR)$(mandir)/man3/ECDSA_get_ex_new_index.3"
-	-rm -f "$(DESTDIR)$(mandir)/man3/ECDSA_set_ex_data.3"
 	-rm -f "$(DESTDIR)$(mandir)/man3/EC_KEY_get_ex_data.3"
 	-rm -f "$(DESTDIR)$(mandir)/man3/EC_KEY_get_ex_new_index.3"
 	-rm -f "$(DESTDIR)$(mandir)/man3/EC_KEY_set_ex_data.3"
@@ -3925,39 +3849,9 @@ uninstall-local:
 	-rm -f "$(DESTDIR)$(mandir)/man3/BIO_should_io_special.3"
 	-rm -f "$(DESTDIR)$(mandir)/man3/BIO_should_read.3"
 	-rm -f "$(DESTDIR)$(mandir)/man3/BIO_should_write.3"
-	-rm -f "$(DESTDIR)$(mandir)/man3/BN_BLINDING_convert.3"
-	-rm -f "$(DESTDIR)$(mandir)/man3/BN_BLINDING_convert_ex.3"
-	-rm -f "$(DESTDIR)$(mandir)/man3/BN_BLINDING_create_param.3"
-	-rm -f "$(DESTDIR)$(mandir)/man3/BN_BLINDING_free.3"
-	-rm -f "$(DESTDIR)$(mandir)/man3/BN_BLINDING_get_flags.3"
-	-rm -f "$(DESTDIR)$(mandir)/man3/BN_BLINDING_invert.3"
-	-rm -f "$(DESTDIR)$(mandir)/man3/BN_BLINDING_invert_ex.3"
-	-rm -f "$(DESTDIR)$(mandir)/man3/BN_BLINDING_set_flags.3"
-	-rm -f "$(DESTDIR)$(mandir)/man3/BN_BLINDING_thread_id.3"
-	-rm -f "$(DESTDIR)$(mandir)/man3/BN_BLINDING_update.3"
 	-rm -f "$(DESTDIR)$(mandir)/man3/BN_CTX_free.3"
 	-rm -f "$(DESTDIR)$(mandir)/man3/BN_CTX_end.3"
 	-rm -f "$(DESTDIR)$(mandir)/man3/BN_CTX_get.3"
-	-rm -f "$(DESTDIR)$(mandir)/man3/BN_GF2m_arr2poly.3"
-	-rm -f "$(DESTDIR)$(mandir)/man3/BN_GF2m_cmp.3"
-	-rm -f "$(DESTDIR)$(mandir)/man3/BN_GF2m_mod.3"
-	-rm -f "$(DESTDIR)$(mandir)/man3/BN_GF2m_mod_arr.3"
-	-rm -f "$(DESTDIR)$(mandir)/man3/BN_GF2m_mod_div.3"
-	-rm -f "$(DESTDIR)$(mandir)/man3/BN_GF2m_mod_div_arr.3"
-	-rm -f "$(DESTDIR)$(mandir)/man3/BN_GF2m_mod_exp.3"
-	-rm -f "$(DESTDIR)$(mandir)/man3/BN_GF2m_mod_exp_arr.3"
-	-rm -f "$(DESTDIR)$(mandir)/man3/BN_GF2m_mod_inv.3"
-	-rm -f "$(DESTDIR)$(mandir)/man3/BN_GF2m_mod_inv_arr.3"
-	-rm -f "$(DESTDIR)$(mandir)/man3/BN_GF2m_mod_mul.3"
-	-rm -f "$(DESTDIR)$(mandir)/man3/BN_GF2m_mod_mul_arr.3"
-	-rm -f "$(DESTDIR)$(mandir)/man3/BN_GF2m_mod_solve_quad.3"
-	-rm -f "$(DESTDIR)$(mandir)/man3/BN_GF2m_mod_solve_quad_arr.3"
-	-rm -f "$(DESTDIR)$(mandir)/man3/BN_GF2m_mod_sqr.3"
-	-rm -f "$(DESTDIR)$(mandir)/man3/BN_GF2m_mod_sqr_arr.3"
-	-rm -f "$(DESTDIR)$(mandir)/man3/BN_GF2m_mod_sqrt.3"
-	-rm -f "$(DESTDIR)$(mandir)/man3/BN_GF2m_mod_sqrt_arr.3"
-	-rm -f "$(DESTDIR)$(mandir)/man3/BN_GF2m_poly2arr.3"
-	-rm -f "$(DESTDIR)$(mandir)/man3/BN_GF2m_sub.3"
 	-rm -f "$(DESTDIR)$(mandir)/man3/BN_div.3"
 	-rm -f "$(DESTDIR)$(mandir)/man3/BN_exp.3"
 	-rm -f "$(DESTDIR)$(mandir)/man3/BN_gcd.3"
@@ -4013,10 +3907,13 @@ uninstall-local:
 	-rm -f "$(DESTDIR)$(mandir)/man3/BN_generate_prime_ex.3"
 	-rm -f "$(DESTDIR)$(mandir)/man3/BN_is_prime_ex.3"
 	-rm -f "$(DESTDIR)$(mandir)/man3/BN_is_prime_fasttest_ex.3"
-	-rm -f "$(DESTDIR)$(mandir)/man3/BN_get0_nist_prime_192.3"
-	-rm -f "$(DESTDIR)$(mandir)/man3/BN_get0_nist_prime_224.3"
-	-rm -f "$(DESTDIR)$(mandir)/man3/BN_get0_nist_prime_256.3"
-	-rm -f "$(DESTDIR)$(mandir)/man3/BN_get0_nist_prime_384.3"
+	-rm -f "$(DESTDIR)$(mandir)/man3/BN_get_rfc2409_prime_1024.3"
+	-rm -f "$(DESTDIR)$(mandir)/man3/BN_get_rfc2409_prime_768.3"
+	-rm -f "$(DESTDIR)$(mandir)/man3/BN_get_rfc3526_prime_1536.3"
+	-rm -f "$(DESTDIR)$(mandir)/man3/BN_get_rfc3526_prime_2048.3"
+	-rm -f "$(DESTDIR)$(mandir)/man3/BN_get_rfc3526_prime_3072.3"
+	-rm -f "$(DESTDIR)$(mandir)/man3/BN_get_rfc3526_prime_4096.3"
+	-rm -f "$(DESTDIR)$(mandir)/man3/BN_get_rfc3526_prime_6144.3"
 	-rm -f "$(DESTDIR)$(mandir)/man3/BN_MONT_CTX_copy.3"
 	-rm -f "$(DESTDIR)$(mandir)/man3/BN_MONT_CTX_free.3"
 	-rm -f "$(DESTDIR)$(mandir)/man3/BN_MONT_CTX_new.3"
@@ -4024,19 +3921,9 @@ uninstall-local:
 	-rm -f "$(DESTDIR)$(mandir)/man3/BN_MONT_CTX_set_locked.3"
 	-rm -f "$(DESTDIR)$(mandir)/man3/BN_from_montgomery.3"
 	-rm -f "$(DESTDIR)$(mandir)/man3/BN_to_montgomery.3"
-	-rm -f "$(DESTDIR)$(mandir)/man3/BN_RECP_CTX_free.3"
-	-rm -f "$(DESTDIR)$(mandir)/man3/BN_RECP_CTX_init.3"
-	-rm -f "$(DESTDIR)$(mandir)/man3/BN_RECP_CTX_new.3"
-	-rm -f "$(DESTDIR)$(mandir)/man3/BN_RECP_CTX_set.3"
-	-rm -f "$(DESTDIR)$(mandir)/man3/BN_div_recp.3"
-	-rm -f "$(DESTDIR)$(mandir)/man3/BN_reciprocal.3"
 	-rm -f "$(DESTDIR)$(mandir)/man3/BN_clear.3"
 	-rm -f "$(DESTDIR)$(mandir)/man3/BN_clear_free.3"
 	-rm -f "$(DESTDIR)$(mandir)/man3/BN_free.3"
-	-rm -f "$(DESTDIR)$(mandir)/man3/BN_nist_mod_192.3"
-	-rm -f "$(DESTDIR)$(mandir)/man3/BN_nist_mod_224.3"
-	-rm -f "$(DESTDIR)$(mandir)/man3/BN_nist_mod_256.3"
-	-rm -f "$(DESTDIR)$(mandir)/man3/BN_nist_mod_384.3"
 	-rm -f "$(DESTDIR)$(mandir)/man3/BN_num_bits.3"
 	-rm -f "$(DESTDIR)$(mandir)/man3/BN_num_bits_word.3"
 	-rm -f "$(DESTDIR)$(mandir)/man3/BN_pseudo_rand.3"
@@ -4059,8 +3946,6 @@ uninstall-local:
 	-rm -f "$(DESTDIR)$(mandir)/man3/BUF_MEM_free.3"
 	-rm -f "$(DESTDIR)$(mandir)/man3/BUF_MEM_grow.3"
 	-rm -f "$(DESTDIR)$(mandir)/man3/BUF_MEM_grow_clean.3"
-	-rm -f "$(DESTDIR)$(mandir)/man3/BUF_reverse.3"
-	-rm -f "$(DESTDIR)$(mandir)/man3/BUF_strdup.3"
 	-rm -f "$(DESTDIR)$(mandir)/man3/CMAC_CTX_cleanup.3"
 	-rm -f "$(DESTDIR)$(mandir)/man3/CMAC_CTX_copy.3"
 	-rm -f "$(DESTDIR)$(mandir)/man3/CMAC_CTX_free.3"
@@ -4094,9 +3979,11 @@ uninstall-local:
 	-rm -f "$(DESTDIR)$(mandir)/man3/CMS_SignerInfo_cert_cmp.3"
 	-rm -f "$(DESTDIR)$(mandir)/man3/CMS_SignerInfo_get0_signature.3"
 	-rm -f "$(DESTDIR)$(mandir)/man3/CMS_SignerInfo_get0_signer_id.3"
+	-rm -f "$(DESTDIR)$(mandir)/man3/CMS_SignerInfo_get_version.3"
 	-rm -f "$(DESTDIR)$(mandir)/man3/CMS_SignerInfo_set1_signer_cert.3"
 	-rm -f "$(DESTDIR)$(mandir)/man3/CMS_get0_content.3"
 	-rm -f "$(DESTDIR)$(mandir)/man3/CMS_get0_eContentType.3"
+	-rm -f "$(DESTDIR)$(mandir)/man3/CMS_get_version.3"
 	-rm -f "$(DESTDIR)$(mandir)/man3/CMS_set1_eContentType.3"
 	-rm -f "$(DESTDIR)$(mandir)/man3/CMS_ReceiptRequest_create0.3"
 	-rm -f "$(DESTDIR)$(mandir)/man3/CMS_ReceiptRequest_get0_values.3"
@@ -4232,21 +4119,14 @@ uninstall-local:
 	-rm -f "$(DESTDIR)$(mandir)/man3/DSA_verify.3"
 	-rm -f "$(DESTDIR)$(mandir)/man3/DSA_bits.3"
 	-rm -f "$(DESTDIR)$(mandir)/man3/ECDH_size.3"
-	-rm -f "$(DESTDIR)$(mandir)/man3/ECDSA_OpenSSL.3"
 	-rm -f "$(DESTDIR)$(mandir)/man3/ECDSA_SIG_free.3"
 	-rm -f "$(DESTDIR)$(mandir)/man3/ECDSA_SIG_get0.3"
 	-rm -f "$(DESTDIR)$(mandir)/man3/ECDSA_SIG_get0_r.3"
 	-rm -f "$(DESTDIR)$(mandir)/man3/ECDSA_SIG_get0_s.3"
 	-rm -f "$(DESTDIR)$(mandir)/man3/ECDSA_SIG_set0.3"
 	-rm -f "$(DESTDIR)$(mandir)/man3/ECDSA_do_sign.3"
-	-rm -f "$(DESTDIR)$(mandir)/man3/ECDSA_do_sign_ex.3"
 	-rm -f "$(DESTDIR)$(mandir)/man3/ECDSA_do_verify.3"
-	-rm -f "$(DESTDIR)$(mandir)/man3/ECDSA_get_default_method.3"
-	-rm -f "$(DESTDIR)$(mandir)/man3/ECDSA_set_default_method.3"
-	-rm -f "$(DESTDIR)$(mandir)/man3/ECDSA_set_method.3"
 	-rm -f "$(DESTDIR)$(mandir)/man3/ECDSA_sign.3"
-	-rm -f "$(DESTDIR)$(mandir)/man3/ECDSA_sign_ex.3"
-	-rm -f "$(DESTDIR)$(mandir)/man3/ECDSA_sign_setup.3"
 	-rm -f "$(DESTDIR)$(mandir)/man3/ECDSA_size.3"
 	-rm -f "$(DESTDIR)$(mandir)/man3/ECDSA_verify.3"
 	-rm -f "$(DESTDIR)$(mandir)/man3/d2i_ECDSA_SIG.3"
@@ -4265,10 +4145,8 @@ uninstall-local:
 	-rm -f "$(DESTDIR)$(mandir)/man3/EC_GROUP_get_curve_name.3"
 	-rm -f "$(DESTDIR)$(mandir)/man3/EC_GROUP_get_degree.3"
 	-rm -f "$(DESTDIR)$(mandir)/man3/EC_GROUP_get_order.3"
-	-rm -f "$(DESTDIR)$(mandir)/man3/EC_GROUP_get_pentanomial_basis.3"
 	-rm -f "$(DESTDIR)$(mandir)/man3/EC_GROUP_get_point_conversion_form.3"
 	-rm -f "$(DESTDIR)$(mandir)/man3/EC_GROUP_get_seed_len.3"
-	-rm -f "$(DESTDIR)$(mandir)/man3/EC_GROUP_get_trinomial_basis.3"
 	-rm -f "$(DESTDIR)$(mandir)/man3/EC_GROUP_method_of.3"
 	-rm -f "$(DESTDIR)$(mandir)/man3/EC_GROUP_order_bits.3"
 	-rm -f "$(DESTDIR)$(mandir)/man3/EC_GROUP_set_asn1_flag.3"
@@ -4380,8 +4258,7 @@ uninstall-local:
 	-rm -f "$(DESTDIR)$(mandir)/man3/ENGINE_get_cipher_engine.3"
 	-rm -f "$(DESTDIR)$(mandir)/man3/ENGINE_get_default_DH.3"
 	-rm -f "$(DESTDIR)$(mandir)/man3/ENGINE_get_default_DSA.3"
-	-rm -f "$(DESTDIR)$(mandir)/man3/ENGINE_get_default_ECDH.3"
-	-rm -f "$(DESTDIR)$(mandir)/man3/ENGINE_get_default_ECDSA.3"
+	-rm -f "$(DESTDIR)$(mandir)/man3/ENGINE_get_default_EC.3"
 	-rm -f "$(DESTDIR)$(mandir)/man3/ENGINE_get_default_RAND.3"
 	-rm -f "$(DESTDIR)$(mandir)/man3/ENGINE_get_digest_engine.3"
 	-rm -f "$(DESTDIR)$(mandir)/man3/ENGINE_get_table_flags.3"
@@ -4421,8 +4298,7 @@ uninstall-local:
 	-rm -f "$(DESTDIR)$(mandir)/man3/ENGINE_DIGESTS_PTR.3"
 	-rm -f "$(DESTDIR)$(mandir)/man3/ENGINE_get_DH.3"
 	-rm -f "$(DESTDIR)$(mandir)/man3/ENGINE_get_DSA.3"
-	-rm -f "$(DESTDIR)$(mandir)/man3/ENGINE_get_ECDH.3"
-	-rm -f "$(DESTDIR)$(mandir)/man3/ENGINE_get_ECDSA.3"
+	-rm -f "$(DESTDIR)$(mandir)/man3/ENGINE_get_EC.3"
 	-rm -f "$(DESTDIR)$(mandir)/man3/ENGINE_get_RAND.3"
 	-rm -f "$(DESTDIR)$(mandir)/man3/ENGINE_get_RSA.3"
 	-rm -f "$(DESTDIR)$(mandir)/man3/ENGINE_get_STORE.3"
@@ -4432,8 +4308,7 @@ uninstall-local:
 	-rm -f "$(DESTDIR)$(mandir)/man3/ENGINE_get_digests.3"
 	-rm -f "$(DESTDIR)$(mandir)/man3/ENGINE_set_DH.3"
 	-rm -f "$(DESTDIR)$(mandir)/man3/ENGINE_set_DSA.3"
-	-rm -f "$(DESTDIR)$(mandir)/man3/ENGINE_set_ECDH.3"
-	-rm -f "$(DESTDIR)$(mandir)/man3/ENGINE_set_ECDSA.3"
+	-rm -f "$(DESTDIR)$(mandir)/man3/ENGINE_set_EC.3"
 	-rm -f "$(DESTDIR)$(mandir)/man3/ENGINE_set_RAND.3"
 	-rm -f "$(DESTDIR)$(mandir)/man3/ENGINE_set_STORE.3"
 	-rm -f "$(DESTDIR)$(mandir)/man3/ENGINE_set_ciphers.3"
@@ -4499,6 +4374,11 @@ uninstall-local:
 	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_aead_aes_256_gcm.3"
 	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_aead_chacha20_poly1305.3"
 	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_aead_xchacha20_poly1305.3"
+	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_CIPHER_CTX_buf_noconst.3"
+	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_CIPHER_CTX_set_cipher_data.3"
+	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_CIPHER_do_all_sorted.3"
+	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_MD_do_all.3"
+	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_MD_do_all_sorted.3"
 	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_CIPHER_meth_dup.3"
 	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_CIPHER_meth_free.3"
 	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_CIPHER_meth_set_cleanup.3"
@@ -4518,6 +4398,7 @@ uninstall-local:
 	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_MAX_MD_SIZE.3"
 	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_MD_CTX_block_size.3"
 	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_MD_CTX_cleanup.3"
+	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_MD_CTX_clear_flags.3"
 	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_MD_CTX_copy.3"
 	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_MD_CTX_copy_ex.3"
 	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_MD_CTX_create.3"
@@ -4526,22 +4407,25 @@ uninstall-local:
 	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_MD_CTX_free.3"
 	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_MD_CTX_init.3"
 	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_MD_CTX_md.3"
+	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_MD_CTX_md_data.3"
 	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_MD_CTX_new.3"
+	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_MD_CTX_pkey_ctx.3"
 	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_MD_CTX_reset.3"
+	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_MD_CTX_set_flags.3"
+	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_MD_CTX_set_pkey_ctx.3"
 	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_MD_CTX_size.3"
+	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_MD_CTX_test_flags.3"
 	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_MD_CTX_type.3"
 	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_MD_block_size.3"
+	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_MD_flags.3"
 	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_MD_pkey_type.3"
 	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_MD_size.3"
 	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_MD_type.3"
 	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_get_digestbyname.3"
 	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_get_digestbynid.3"
 	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_get_digestbyobj.3"
-	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_md5.3"
-	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_md5_sha1.3"
 	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_md_null.3"
 	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_ripemd160.3"
-	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_sha1.3"
 	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_sha224.3"
 	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_sha256.3"
 	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_sha384.3"
@@ -4567,7 +4451,9 @@ uninstall-local:
 	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_CIPHER_CTX_cipher.3"
 	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_CIPHER_CTX_cleanup.3"
 	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_CIPHER_CTX_clear_flags.3"
+	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_CIPHER_CTX_copy.3"
 	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_CIPHER_CTX_ctrl.3"
+	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_CIPHER_CTX_encrypting.3"
 	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_CIPHER_CTX_flags.3"
 	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_CIPHER_CTX_free.3"
 	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_CIPHER_CTX_get_app_data.3"
@@ -4621,7 +4507,6 @@ uninstall-local:
 	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_cast5_cfb64.3"
 	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_cast5_ecb.3"
 	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_cast5_ofb.3"
-	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_chacha20.3"
 	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_enc_null.3"
 	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_get_cipherbyname.3"
 	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_get_cipherbynid.3"
@@ -4638,6 +4523,18 @@ uninstall-local:
 	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_rc2_cfb64.3"
 	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_rc2_ecb.3"
 	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_rc2_ofb.3"
+	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_MD_meth_dup.3"
+	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_MD_meth_free.3"
+	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_MD_meth_set_app_datasize.3"
+	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_MD_meth_set_cleanup.3"
+	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_MD_meth_set_copy.3"
+	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_MD_meth_set_ctrl.3"
+	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_MD_meth_set_final.3"
+	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_MD_meth_set_flags.3"
+	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_MD_meth_set_init.3"
+	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_MD_meth_set_input_blocksize.3"
+	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_MD_meth_set_result_size.3"
+	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_MD_meth_set_update.3"
 	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_OpenFinal.3"
 	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_OpenUpdate.3"
 	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_PKEY2PKCS8.3"
@@ -4766,6 +4663,7 @@ uninstall-local:
 	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_PKEY_set1_DSA.3"
 	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_PKEY_set1_EC_KEY.3"
 	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_PKEY_set_type.3"
+	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_PKEY_set_type_str.3"
 	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_PKEY_type.3"
 	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_PKEY_sign_init.3"
 	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_PKEY_bits.3"
@@ -4780,6 +4678,11 @@ uninstall-local:
 	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_VerifyFinal.3"
 	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_VerifyInit_ex.3"
 	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_VerifyUpdate.3"
+	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_add_cipher_alias.3"
+	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_add_digest.3"
+	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_add_digest_alias.3"
+	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_delete_cipher_alias.3"
+	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_delete_digest_alias.3"
 	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_aes_128_cbc_hmac_sha1.3"
 	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_aes_128_ccm.3"
 	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_aes_128_cfb.3"
@@ -4836,6 +4739,7 @@ uninstall-local:
 	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_camellia_256_cfb8.3"
 	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_camellia_256_ecb.3"
 	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_camellia_256_ofb.3"
+	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_chacha20_poly1305.3"
 	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_des_cfb.3"
 	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_des_cfb1.3"
 	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_des_cfb64.3"
@@ -4859,6 +4763,12 @@ uninstall-local:
 	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_desx_cbc.3"
 	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_rc4_40.3"
 	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_rc4_hmac_md5.3"
+	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_md4.3"
+	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_md5.3"
+	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_md5_sha1.3"
+	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_sha3_256.3"
+	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_sha3_384.3"
+	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_sha3_512.3"
 	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_sm4_cfb.3"
 	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_sm4_cfb128.3"
 	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_sm4_ctr.3"
@@ -4900,15 +4810,13 @@ uninstall-local:
 	-rm -f "$(DESTDIR)$(mandir)/man3/OBJ_NAME_init.3"
 	-rm -f "$(DESTDIR)$(mandir)/man3/OBJ_NAME_new_index.3"
 	-rm -f "$(DESTDIR)$(mandir)/man3/OBJ_NAME_remove.3"
-	-rm -f "$(DESTDIR)$(mandir)/man3/OBJ_find_sigid_algs.3"
-	-rm -f "$(DESTDIR)$(mandir)/man3/OBJ_find_sigid_by_algs.3"
-	-rm -f "$(DESTDIR)$(mandir)/man3/OBJ_sigid_free.3"
 	-rm -f "$(DESTDIR)$(mandir)/man3/OBJ_add_object.3"
 	-rm -f "$(DESTDIR)$(mandir)/man3/OBJ_cleanup.3"
 	-rm -f "$(DESTDIR)$(mandir)/man3/OBJ_create_objects.3"
 	-rm -f "$(DESTDIR)$(mandir)/man3/OBJ_new_nid.3"
 	-rm -f "$(DESTDIR)$(mandir)/man3/check_defer.3"
 	-rm -f "$(DESTDIR)$(mandir)/man3/obj_cleanup_defer.3"
+	-rm -f "$(DESTDIR)$(mandir)/man3/OBJ_find_sigid_by_algs.3"
 	-rm -f "$(DESTDIR)$(mandir)/man3/OBJ_cmp.3"
 	-rm -f "$(DESTDIR)$(mandir)/man3/OBJ_dup.3"
 	-rm -f "$(DESTDIR)$(mandir)/man3/OBJ_ln2nid.3"
@@ -5175,9 +5083,6 @@ uninstall-local:
 	-rm -f "$(DESTDIR)$(mandir)/man3/POLICY_MAPPING_new.3"
 	-rm -f "$(DESTDIR)$(mandir)/man3/USERNOTICE_free.3"
 	-rm -f "$(DESTDIR)$(mandir)/man3/USERNOTICE_new.3"
-	-rm -f "$(DESTDIR)$(mandir)/man3/PROXY_CERT_INFO_EXTENSION_free.3"
-	-rm -f "$(DESTDIR)$(mandir)/man3/PROXY_CERT_INFO_EXTENSION_new.3"
-	-rm -f "$(DESTDIR)$(mandir)/man3/PROXY_POLICY_free.3"
 	-rm -f "$(DESTDIR)$(mandir)/man3/RAND_cleanup.3"
 	-rm -f "$(DESTDIR)$(mandir)/man3/RAND_poll.3"
 	-rm -f "$(DESTDIR)$(mandir)/man3/RAND_seed.3"
@@ -5603,13 +5508,6 @@ uninstall-local:
 	-rm -f "$(DESTDIR)$(mandir)/man3/SSL_want_write.3"
 	-rm -f "$(DESTDIR)$(mandir)/man3/SSL_want_x509_lookup.3"
 	-rm -f "$(DESTDIR)$(mandir)/man3/SSL_write_ex.3"
-	-rm -f "$(DESTDIR)$(mandir)/man3/SXNETID_free.3"
-	-rm -f "$(DESTDIR)$(mandir)/man3/SXNETID_new.3"
-	-rm -f "$(DESTDIR)$(mandir)/man3/SXNET_free.3"
-	-rm -f "$(DESTDIR)$(mandir)/man3/d2i_SXNET.3"
-	-rm -f "$(DESTDIR)$(mandir)/man3/d2i_SXNETID.3"
-	-rm -f "$(DESTDIR)$(mandir)/man3/i2d_SXNET.3"
-	-rm -f "$(DESTDIR)$(mandir)/man3/i2d_SXNETID.3"
 	-rm -f "$(DESTDIR)$(mandir)/man3/TS_ACCURACY_free.3"
 	-rm -f "$(DESTDIR)$(mandir)/man3/TS_ACCURACY_new.3"
 	-rm -f "$(DESTDIR)$(mandir)/man3/TS_MSG_IMPRINT_free.3"
@@ -5885,6 +5783,8 @@ uninstall-local:
 	-rm -f "$(DESTDIR)$(mandir)/man3/X509_STORE_set_verify_func.3"
 	-rm -f "$(DESTDIR)$(mandir)/man3/X509_STORE_CTX_get_verify_cb.3"
 	-rm -f "$(DESTDIR)$(mandir)/man3/X509_STORE_CTX_verify_cb.3"
+	-rm -f "$(DESTDIR)$(mandir)/man3/X509_STORE_CTX_get1_certs.3"
+	-rm -f "$(DESTDIR)$(mandir)/man3/X509_STORE_CTX_get1_crls.3"
 	-rm -f "$(DESTDIR)$(mandir)/man3/X509_STORE_CTX_get1_issuer.3"
 	-rm -f "$(DESTDIR)$(mandir)/man3/X509_STORE_CTX_get_by_subject.3"
 	-rm -f "$(DESTDIR)$(mandir)/man3/X509_STORE_CTX_get_obj_by_subject.3"
@@ -6030,14 +5930,6 @@ uninstall-local:
 	-rm -f "$(DESTDIR)$(mandir)/man3/X509_dup.3"
 	-rm -f "$(DESTDIR)$(mandir)/man3/X509_free.3"
 	-rm -f "$(DESTDIR)$(mandir)/man3/X509_up_ref.3"
-	-rm -f "$(DESTDIR)$(mandir)/man3/X509_policy_tree_free.3"
-	-rm -f "$(DESTDIR)$(mandir)/man3/X509_policy_tree_get0_user_policies.3"
-	-rm -f "$(DESTDIR)$(mandir)/man3/X509_policy_level_get0_node.3"
-	-rm -f "$(DESTDIR)$(mandir)/man3/X509_policy_level_node_count.3"
-	-rm -f "$(DESTDIR)$(mandir)/man3/X509_policy_node_get0_parent.3"
-	-rm -f "$(DESTDIR)$(mandir)/man3/X509_policy_node_get0_policy.3"
-	-rm -f "$(DESTDIR)$(mandir)/man3/X509_policy_node_get0_qualifiers.3"
-	-rm -f "$(DESTDIR)$(mandir)/man3/X509_policy_tree_get0_level.3"
 	-rm -f "$(DESTDIR)$(mandir)/man3/X509_CERT_AUX_print.3"
 	-rm -f "$(DESTDIR)$(mandir)/man3/X509_print.3"
 	-rm -f "$(DESTDIR)$(mandir)/man3/X509_print_ex_fp.3"
@@ -6114,6 +6006,8 @@ uninstall-local:
 	-rm -f "$(DESTDIR)$(mandir)/man3/mul_add.3"
 	-rm -f "$(DESTDIR)$(mandir)/man3/sqr.3"
 	-rm -f "$(DESTDIR)$(mandir)/man3/i2d_ASN1_NULL.3"
+	-rm -f "$(DESTDIR)$(mandir)/man3/OBJ_get0_data.3"
+	-rm -f "$(DESTDIR)$(mandir)/man3/OBJ_length.3"
 	-rm -f "$(DESTDIR)$(mandir)/man3/i2d_ASN1_OBJECT.3"
 	-rm -f "$(DESTDIR)$(mandir)/man3/d2i_ASN1_BIT_STRING.3"
 	-rm -f "$(DESTDIR)$(mandir)/man3/d2i_ASN1_BMPSTRING.3"
@@ -6317,9 +6211,6 @@ uninstall-local:
 	-rm -f "$(DESTDIR)$(mandir)/man3/i2d_POLICYINFO.3"
 	-rm -f "$(DESTDIR)$(mandir)/man3/i2d_POLICYQUALINFO.3"
 	-rm -f "$(DESTDIR)$(mandir)/man3/i2d_USERNOTICE.3"
-	-rm -f "$(DESTDIR)$(mandir)/man3/d2i_PROXY_CERT_INFO_EXTENSION.3"
-	-rm -f "$(DESTDIR)$(mandir)/man3/i2d_PROXY_CERT_INFO_EXTENSION.3"
-	-rm -f "$(DESTDIR)$(mandir)/man3/i2d_PROXY_POLICY.3"
 	-rm -f "$(DESTDIR)$(mandir)/man3/d2i_AutoPrivateKey.3"
 	-rm -f "$(DESTDIR)$(mandir)/man3/d2i_PrivateKey_bio.3"
 	-rm -f "$(DESTDIR)$(mandir)/man3/d2i_PrivateKey_fp.3"
@@ -6433,21 +6324,6 @@ uninstall-local:
 	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_read_pw_string.3"
 	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_read_pw_string_min.3"
 	-rm -f "$(DESTDIR)$(mandir)/man3/des_read_pw_string.3"
-	-rm -f "$(DESTDIR)$(mandir)/man3/BN_get_rfc2409_prime_1024.3"
-	-rm -f "$(DESTDIR)$(mandir)/man3/BN_get_rfc2409_prime_768.3"
-	-rm -f "$(DESTDIR)$(mandir)/man3/BN_get_rfc3526_prime_1536.3"
-	-rm -f "$(DESTDIR)$(mandir)/man3/BN_get_rfc3526_prime_2048.3"
-	-rm -f "$(DESTDIR)$(mandir)/man3/BN_get_rfc3526_prime_3072.3"
-	-rm -f "$(DESTDIR)$(mandir)/man3/BN_get_rfc3526_prime_4096.3"
-	-rm -f "$(DESTDIR)$(mandir)/man3/BN_get_rfc3526_prime_6144.3"
-	-rm -f "$(DESTDIR)$(mandir)/man3/BN_get_rfc3526_prime_8192.3"
-	-rm -f "$(DESTDIR)$(mandir)/man3/get_rfc2409_prime_1024.3"
-	-rm -f "$(DESTDIR)$(mandir)/man3/get_rfc2409_prime_768.3"
-	-rm -f "$(DESTDIR)$(mandir)/man3/get_rfc3526_prime_1536.3"
-	-rm -f "$(DESTDIR)$(mandir)/man3/get_rfc3526_prime_2048.3"
-	-rm -f "$(DESTDIR)$(mandir)/man3/get_rfc3526_prime_3072.3"
-	-rm -f "$(DESTDIR)$(mandir)/man3/get_rfc3526_prime_4096.3"
-	-rm -f "$(DESTDIR)$(mandir)/man3/get_rfc3526_prime_6144.3"
 	-rm -f "$(DESTDIR)$(mandir)/man3/a2i_ASN1_ENUMERATED.3"
 	-rm -f "$(DESTDIR)$(mandir)/man3/a2i_ASN1_INTEGER.3"
 	-rm -f "$(DESTDIR)$(mandir)/man3/a2i_ASN1_STRING.3"
diff --git a/man/tls_config_set_protocols.3 b/man/tls_config_set_protocols.3
index 7c62493..32b8cce 100644
--- a/man/tls_config_set_protocols.3
+++ b/man/tls_config_set_protocols.3
@@ -1,4 +1,4 @@
-.\" $OpenBSD: tls_config_set_protocols.3,v 1.11 2021/01/02 19:58:44 schwarze Exp $
+.\" $OpenBSD: tls_config_set_protocols.3,v 1.12 2023/07/02 06:37:27 beck Exp $
 .\"
 .\" Copyright (c) 2014 Ted Unangst <tedu@openbsd.org>
 .\" Copyright (c) 2015, 2016 Joel Sing <jsing@openbsd.org>
@@ -16,7 +16,7 @@
 .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
 .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 .\"
-.Dd $Mdocdate: January 2 2021 $
+.Dd $Mdocdate: July 2 2023 $
 .Dt TLS_CONFIG_SET_PROTOCOLS 3
 .Os
 .Sh NAME
@@ -76,10 +76,6 @@ Possible values are the bitwise OR of:
 .Pp
 .Bl -item -offset indent -compact
 .It
-.Dv TLS_PROTOCOL_TLSv1_0
-.It
-.Dv TLS_PROTOCOL_TLSv1_1
-.It
 .Dv TLS_PROTOCOL_TLSv1_2
 .It
 .Dv TLS_PROTOCOL_TLSv1_3
@@ -87,7 +83,7 @@ Possible values are the bitwise OR of:
 .Pp
 Additionally, the values
 .Dv TLS_PROTOCOL_TLSv1
-(TLSv1.0, TLSv1.1, TLSv1.2, TLSv1.3),
+(TLSv1.2, TLSv1.3),
 .Dv TLS_PROTOCOLS_ALL
 (all supported protocols) and
 .Dv TLS_PROTOCOLS_DEFAULT
@@ -106,8 +102,6 @@ The protocol string is a comma or colon separated list of keywords.
 Valid keywords are:
 .Pp
 .Bl -tag -width "tlsv1.3" -offset indent -compact
-.It Dv tlsv1.0
-.It Dv tlsv1.1
 .It Dv tlsv1.2
 .It Dv tlsv1.3
 .It Dv all
diff --git a/tls.c b/tls.c
index 989339d..fdb994d 100644
--- a/tls.c
+++ b/tls.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tls.c,v 1.96 2023/05/25 07:46:21 op Exp $ */
+/* $OpenBSD: tls.c,v 1.98 2023/07/02 06:37:27 beck Exp $ */
 /*
  * Copyright (c) 2014 Joel Sing <jsing@openbsd.org>
  *
@@ -389,7 +389,7 @@ static int
 tls_keypair_setup_pkey(struct tls *ctx, struct tls_keypair *keypair, EVP_PKEY *pkey)
 {
 	RSA_METHOD *rsa_method;
-	ECDSA_METHOD *ecdsa_method;
+	EC_KEY_METHOD *ecdsa_method;
 	RSA *rsa = NULL;
 	EC_KEY *eckey = NULL;
 	int ret = -1;
@@ -427,15 +427,15 @@ tls_keypair_setup_pkey(struct tls *ctx, struct tls_keypair *keypair, EVP_PKEY *p
 		break;
 	case EVP_PKEY_EC:
 		if ((eckey = EVP_PKEY_get1_EC_KEY(pkey)) == NULL ||
-		    ECDSA_set_ex_data(eckey, 0, keypair->pubkey_hash) == 0) {
+		    EC_KEY_set_ex_data(eckey, 0, keypair->pubkey_hash) == 0) {
 			tls_set_errorx(ctx, "EC key setup failure");
 			goto err;
 		}
 		if (ctx->config->sign_cb != NULL) {
 			ecdsa_method = tls_signer_ecdsa_method();
 			if (ecdsa_method == NULL ||
-			    ECDSA_set_ex_data(eckey, 1, ctx->config) == 0 ||
-			    ECDSA_set_method(eckey, ecdsa_method) == 0) {
+			    EC_KEY_set_ex_data(eckey, 1, ctx->config) == 0 ||
+			    EC_KEY_set_method(eckey, ecdsa_method) == 0) {
 				tls_set_errorx(ctx, "failed to setup EC key");
 				goto err;
 			}
@@ -520,16 +520,12 @@ tls_configure_ssl(struct tls *ctx, SSL_CTX *ssl_ctx)
 
 	SSL_CTX_set_options(ssl_ctx, SSL_OP_NO_SSLv2);
 	SSL_CTX_set_options(ssl_ctx, SSL_OP_NO_SSLv3);
+	SSL_CTX_set_options(ssl_ctx, SSL_OP_NO_TLSv1);
+	SSL_CTX_set_options(ssl_ctx, SSL_OP_NO_TLSv1_1);
 
-	SSL_CTX_clear_options(ssl_ctx, SSL_OP_NO_TLSv1);
-	SSL_CTX_clear_options(ssl_ctx, SSL_OP_NO_TLSv1_1);
 	SSL_CTX_clear_options(ssl_ctx, SSL_OP_NO_TLSv1_2);
 	SSL_CTX_clear_options(ssl_ctx, SSL_OP_NO_TLSv1_3);
 
-	if ((ctx->config->protocols & TLS_PROTOCOL_TLSv1_0) == 0)
-		SSL_CTX_set_options(ssl_ctx, SSL_OP_NO_TLSv1);
-	if ((ctx->config->protocols & TLS_PROTOCOL_TLSv1_1) == 0)
-		SSL_CTX_set_options(ssl_ctx, SSL_OP_NO_TLSv1_1);
 	if ((ctx->config->protocols & TLS_PROTOCOL_TLSv1_2) == 0)
 		SSL_CTX_set_options(ssl_ctx, SSL_OP_NO_TLSv1_2);
 	if ((ctx->config->protocols & TLS_PROTOCOL_TLSv1_3) == 0)
diff --git a/tls_config.c b/tls_config.c
index 3efd0dd..5eb5b69 100644
--- a/tls_config.c
+++ b/tls_config.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tls_config.c,v 1.66 2023/05/14 07:26:25 op Exp $ */
+/* $OpenBSD: tls_config.c,v 1.67 2023/07/02 06:37:27 beck Exp $ */
 /*
  * Copyright (c) 2014 Joel Sing <jsing@openbsd.org>
  *
@@ -251,9 +251,9 @@ tls_config_parse_protocols(uint32_t *protocols, const char *protostr)
 		if (strcasecmp(p, "tlsv1") == 0)
 			proto = TLS_PROTOCOL_TLSv1;
 		else if (strcasecmp(p, "tlsv1.0") == 0)
-			proto = TLS_PROTOCOL_TLSv1_0;
+			proto = TLS_PROTOCOL_TLSv1_2;
 		else if (strcasecmp(p, "tlsv1.1") == 0)
-			proto = TLS_PROTOCOL_TLSv1_1;
+			proto = TLS_PROTOCOL_TLSv1_2;
 		else if (strcasecmp(p, "tlsv1.2") == 0)
 			proto = TLS_PROTOCOL_TLSv1_2;
 		else if (strcasecmp(p, "tlsv1.3") == 0)
diff --git a/tls_internal.h b/tls_internal.h
index f4c23f6..5cac881 100644
--- a/tls_internal.h
+++ b/tls_internal.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: tls_internal.h,v 1.81 2023/04/09 18:26:26 tb Exp $ */
+/* $OpenBSD: tls_internal.h,v 1.83 2023/06/27 18:19:59 tb Exp $ */
 /*
  * Copyright (c) 2014 Jeremie Courreges-Anglas <jca@openbsd.org>
  * Copyright (c) 2014 Joel Sing <jsing@openbsd.org>
@@ -29,7 +29,7 @@
 __BEGIN_HIDDEN_DECLS
 
 #ifndef TLS_DEFAULT_CA_FILE
-#define TLS_DEFAULT_CA_FILE 	"/etc/ssl/cert.pem"
+#define TLS_DEFAULT_CA_FILE	"/etc/ssl/cert.pem"
 #endif
 
 #define TLS_CIPHERS_DEFAULT	"TLSv1.3:TLSv1.2+AEAD+ECDHE:TLSv1.2+AEAD+DHE"
@@ -298,7 +298,7 @@ int tls_cert_pubkey_hash(X509 *_cert, char **_hash);
 int tls_password_cb(char *_buf, int _size, int _rwflag, void *_u);
 
 RSA_METHOD *tls_signer_rsa_method(void);
-ECDSA_METHOD *tls_signer_ecdsa_method(void);
+EC_KEY_METHOD *tls_signer_ecdsa_method(void);
 
 #define TLS_PADDING_NONE			0
 #define TLS_PADDING_RSA_PKCS1			1
diff --git a/tls_signer.c b/tls_signer.c
index f6005d3..177c9d0 100644
--- a/tls_signer.c
+++ b/tls_signer.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tls_signer.c,v 1.5 2023/04/09 18:26:26 tb Exp $ */
+/* $OpenBSD: tls_signer.c,v 1.9 2023/06/18 19:12:58 tb Exp $ */
 /*
  * Copyright (c) 2021 Eric Faurot <eric@openbsd.org>
  *
@@ -392,8 +392,8 @@ tls_ecdsa_do_sign(const unsigned char *dgst, int dgst_len, const BIGNUM *inv,
 	 * to its calling convention/signature.
 	 */
 
-	pubkey_hash = ECDSA_get_ex_data(eckey, 0);
-	config = ECDSA_get_ex_data(eckey, 1);
+	pubkey_hash = EC_KEY_get_ex_data(eckey, 0);
+	config = EC_KEY_get_ex_data(eckey, 1);
 
 	if (pubkey_hash == NULL || config == NULL)
 		goto err;
@@ -419,26 +419,30 @@ tls_ecdsa_do_sign(const unsigned char *dgst, int dgst_len, const BIGNUM *inv,
 	return (NULL);
 }
 
-ECDSA_METHOD *
+EC_KEY_METHOD *
 tls_signer_ecdsa_method(void)
 {
-	static ECDSA_METHOD *ecdsa_method = NULL;
+	static EC_KEY_METHOD *ecdsa_method = NULL;
+	const EC_KEY_METHOD *default_method;
+	int (*sign)(int type, const unsigned char *dgst, int dlen,
+	    unsigned char *sig, unsigned int *siglen,
+	    const BIGNUM *kinv, const BIGNUM *r, EC_KEY *eckey);
+	int (*sign_setup)(EC_KEY *eckey, BN_CTX *ctx_in,
+	    BIGNUM **kinvp, BIGNUM **rp);
 
 	pthread_mutex_lock(&signer_method_lock);
 
 	if (ecdsa_method != NULL)
 		goto out;
 
-	ecdsa_method = calloc(1, sizeof(*ecdsa_method));
+	default_method = EC_KEY_get_default_method();
+	ecdsa_method = EC_KEY_METHOD_new(default_method);
 	if (ecdsa_method == NULL)
 		goto out;
 
-	ecdsa_method->ecdsa_do_sign = tls_ecdsa_do_sign;
-	ecdsa_method->name = strdup("libtls ECDSA method");
-	if (ecdsa_method->name == NULL) {
-		free(ecdsa_method);
-		ecdsa_method = NULL;
-	}
+	EC_KEY_METHOD_get_sign(default_method, &sign, &sign_setup, NULL);
+	EC_KEY_METHOD_set_sign(ecdsa_method, sign, sign_setup,
+	    tls_ecdsa_do_sign);
 
  out:
 	pthread_mutex_unlock(&signer_method_lock);
diff --git a/tls_verify.c b/tls_verify.c
index 0cb86f6..c588f02 100644
--- a/tls_verify.c
+++ b/tls_verify.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tls_verify.c,v 1.23 2023/05/11 07:35:27 tb Exp $ */
+/* $OpenBSD: tls_verify.c,v 1.28 2023/06/01 07:32:25 tb Exp $ */
 /*
  * Copyright (c) 2014 Jeremie Courreges-Anglas <jca@openbsd.org>
  *
@@ -92,15 +92,21 @@ tls_check_subject_altname(struct tls *ctx, X509 *cert, const char *name,
 	union tls_addr addrbuf;
 	int addrlen, type;
 	int count, i;
-	int rv = 0;
+	int critical = 0;
+	int rv = -1;
 
 	*alt_match = 0;
 	*alt_exists = 0;
 
-	altname_stack = X509_get_ext_d2i(cert, NID_subject_alt_name,
-	    NULL, NULL);
-	if (altname_stack == NULL)
-		return 0;
+	altname_stack = X509_get_ext_d2i(cert, NID_subject_alt_name, &critical,
+	    NULL);
+	if (altname_stack == NULL) {
+		if (critical != -1) {
+			tls_set_errorx(ctx, "error decoding subjectAltName");
+			goto err;
+		}
+		goto done;
+	}
 
 	if (inet_pton(AF_INET, name, &addrbuf) == 1) {
 		type = GEN_IPADD;
@@ -140,8 +146,7 @@ tls_check_subject_altname(struct tls *ctx, X509 *cert, const char *name,
 					    "NUL byte in subjectAltName, "
 					    "probably a malicious certificate",
 					    name);
-					rv = -1;
-					break;
+					goto err;
 				}
 
 				/*
@@ -154,13 +159,12 @@ tls_check_subject_altname(struct tls *ctx, X509 *cert, const char *name,
 					    "error verifying name '%s': "
 					    "a dNSName of \" \" must not be "
 					    "used", name);
-					rv = -1;
-					break;
+					goto err;
 				}
 
 				if (tls_match_name(data, name) == 0) {
 					*alt_match = 1;
-					break;
+					goto done;
 				}
 			} else {
 #ifdef DEBUG
@@ -181,8 +185,7 @@ tls_check_subject_altname(struct tls *ctx, X509 *cert, const char *name,
 				tls_set_errorx(ctx,
 				    "Unexpected negative length for an "
 				    "IP address: %d", datalen);
-				rv = -1;
-				break;
+				goto err;
 			}
 
 			/*
@@ -192,11 +195,15 @@ tls_check_subject_altname(struct tls *ctx, X509 *cert, const char *name,
 			if (datalen == addrlen &&
 			    memcmp(data, &addrbuf, addrlen) == 0) {
 				*alt_match = 1;
-				break;
+				goto done;
 			}
 		}
 	}
 
+ done:
+	rv = 0;
+
+ err:
 	sk_GENERAL_NAME_pop_free(altname_stack, GENERAL_NAME_free);
 	return rv;
 }
@@ -205,10 +212,13 @@ static int
 tls_check_common_name(struct tls *ctx, X509 *cert, const char *name,
     int *cn_match)
 {
+	unsigned char *utf8_bytes = NULL;
 	X509_NAME *subject_name;
 	char *common_name = NULL;
 	union tls_addr addrbuf;
 	int common_name_len;
+	ASN1_STRING *data;
+	int lastpos = -1;
 	int rv = -1;
 
 	*cn_match = 0;
@@ -217,29 +227,65 @@ tls_check_common_name(struct tls *ctx, X509 *cert, const char *name,
 	if (subject_name == NULL)
 		goto done;
 
-	common_name_len = X509_NAME_get_text_by_NID(subject_name,
-	    NID_commonName, NULL, 0);
-	if (common_name_len < 0)
+	lastpos = X509_NAME_get_index_by_NID(subject_name,
+	    NID_commonName, lastpos);
+	if (lastpos == -1)
 		goto done;
-
-	common_name = calloc(common_name_len + 1, 1);
-	if (common_name == NULL) {
-		tls_set_error(ctx, "out of memory");
+	if (lastpos < 0)
+		goto err;
+	if (X509_NAME_get_index_by_NID(subject_name, NID_commonName, lastpos)
+	    != -1) {
+		/*
+		 * Having multiple CN's is possible, and even happened back in
+		 * the glory days of mullets and Hammer pants. In anything like
+		 * a modern TLS cert, CN is as close to deprecated as it gets,
+		 * and having more than one is bad. We therefore fail if we have
+		 * more than one CN fed to us in the subject, treating the
+		 * certificate as hostile.
+		 */
+		tls_set_errorx(ctx, "error verifying name '%s': "
+		    "Certificate subject contains mutiple Common Name fields, "
+		    "probably a malicious or malformed certificate", name);
 		goto err;
 	}
 
-	X509_NAME_get_text_by_NID(subject_name, NID_commonName, common_name,
-	    common_name_len + 1);
-
-	/* NUL bytes in CN? */
-	if (common_name_len < 0 ||
-	    (size_t)common_name_len != strlen(common_name)) {
+	data = X509_NAME_ENTRY_get_data(X509_NAME_get_entry(subject_name,
+	    lastpos));
+	/*
+	 * Fail if we cannot encode the CN bytes as UTF-8.
+	 */
+	if ((common_name_len = ASN1_STRING_to_UTF8(&utf8_bytes, data)) < 0) {
+		tls_set_errorx(ctx, "error verifying name '%s': "
+		    "Common Name field cannot be encoded as a UTF-8 string, "
+		    "probably a malicious certificate", name);
+		goto err;
+	}
+	/*
+	 * Fail if the CN is of invalid length. RFC 5280 specifies that a CN
+	 * must be between 1 and 64 bytes long.
+	 */
+	if (common_name_len < 1 || common_name_len > 64) {
+		tls_set_errorx(ctx, "error verifying name '%s': "
+		    "Common Name field has invalid length, "
+		    "probably a malicious certificate", name);
+		goto err;
+	}
+	/*
+	 * Fail if the resulting text contains a NUL byte.
+	 */
+	if (memchr(utf8_bytes, 0, common_name_len) != NULL) {
 		tls_set_errorx(ctx, "error verifying name '%s': "
 		    "NUL byte in Common Name field, "
 		    "probably a malicious certificate", name);
 		goto err;
 	}
 
+	common_name = strndup(utf8_bytes, common_name_len);
+	if (common_name == NULL) {
+		tls_set_error(ctx, "out of memory");
+		goto err;
+	}
+
 	/*
 	 * We don't want to attempt wildcard matching against IP addresses,
 	 * so perform a simple comparison here.
@@ -258,6 +304,7 @@ tls_check_common_name(struct tls *ctx, X509 *cert, const char *name,
 	rv = 0;
 
  err:
+	free(utf8_bytes);
 	free(common_name);
 	return rv;
 }