Check-in [cf6cc31067]
Not logged in

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:update libressl to version 3.0.2
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: cf6cc3106715a378b0eb0c45f55a1121e448a5dc
User & Date: chw 2019-10-20 12:45:46.804
Context
2019-10-21
04:08
add tk upstream changes check-in: ed46603d04 user: chw tags: trunk
2019-10-20
12:49
merge with trunk check-in: 0e337fef3d user: chw tags: wtf-8-experiment
12:45
update libressl to version 3.0.2 check-in: cf6cc31067 user: chw tags: trunk
08:55
add tk upstream changes check-in: 3583d49f86 user: chw tags: trunk
Changes
Unified Diff Ignore Whitespace Patch
Changes to jni/libressl/Android.mk.
74
75
76
77
78
79
80

81
82
83
84
85
86
87
	crypto/pem/pem_all.c \
	crypto/pem/pem_x509.c \
	crypto/pem/pem_seal.c \
	crypto/pem/pem_pk8.c \
	crypto/pem/pvkfmt.c \
	crypto/pem/pem_info.c \
	crypto/pem/pem_pkey.c \

	crypto/ecdh/ech_lib.c \
	crypto/ecdh/ech_key.c \
	crypto/ecdh/ech_err.c \
	crypto/ts/ts_rsp_verify.c \
	crypto/ts/ts_rsp_print.c \
	crypto/ts/ts_verify_ctx.c \
	crypto/ts/ts_req_utils.c \







>







74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
	crypto/pem/pem_all.c \
	crypto/pem/pem_x509.c \
	crypto/pem/pem_seal.c \
	crypto/pem/pem_pk8.c \
	crypto/pem/pvkfmt.c \
	crypto/pem/pem_info.c \
	crypto/pem/pem_pkey.c \
	crypto/ecdh/ecdh_kdf.c \
	crypto/ecdh/ech_lib.c \
	crypto/ecdh/ech_key.c \
	crypto/ecdh/ech_err.c \
	crypto/ts/ts_rsp_verify.c \
	crypto/ts/ts_rsp_print.c \
	crypto/ts/ts_verify_ctx.c \
	crypto/ts/ts_req_utils.c \
583
584
585
586
587
588
589

590
591
592
593
594
595
596
	$(LOCAL_PATH)/include/compat \
	$(LOCAL_PATH)/crypto \
	$(LOCAL_PATH)/crypto/compat \
	$(LOCAL_PATH)/crypto/asn1 \
	$(LOCAL_PATH)/crypto/bn \
	$(LOCAL_PATH)/crypto/evp \
	$(LOCAL_PATH)/crypto/ec \

	$(LOCAL_PATH)/crypto/ecdsa \
	$(LOCAL_PATH)/crypto/modes

LOCAL_CFLAGS := \
	-DLIBRESSL_INTERNAL \
	-DOPENSSL_NO_HW_PADLOCK \
	-DOPENSSL_NO_ASM \







>







584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
	$(LOCAL_PATH)/include/compat \
	$(LOCAL_PATH)/crypto \
	$(LOCAL_PATH)/crypto/compat \
	$(LOCAL_PATH)/crypto/asn1 \
	$(LOCAL_PATH)/crypto/bn \
	$(LOCAL_PATH)/crypto/evp \
	$(LOCAL_PATH)/crypto/ec \
	$(LOCAL_PATH)/crypto/ecdh \
	$(LOCAL_PATH)/crypto/ecdsa \
	$(LOCAL_PATH)/crypto/modes

LOCAL_CFLAGS := \
	-DLIBRESSL_INTERNAL \
	-DOPENSSL_NO_HW_PADLOCK \
	-DOPENSSL_NO_ASM \
Changes to jni/libressl/CMakeLists.txt.
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
endif()

if(WIN32)
	add_definitions(-Drestrict)
	add_definitions(-D_CRT_SECURE_NO_WARNINGS)
	add_definitions(-D_CRT_DEPRECATED_NO_WARNINGS)
	add_definitions(-D_REENTRANT -D_POSIX_THREAD_SAFE_FUNCTIONS)
	add_definitions(-DWIN32_LEAN_AND_MEAN)
	add_definitions(-DCPPFLAGS -DOPENSSL_NO_SPEED -DNO_SYSLOG -DNO_CRYPT)
	set(PLATFORM_LIBS ${PLATFORM_LIBS} ws2_32)
endif()

if(MSVC)
	add_definitions(-Dinline=__inline)
	message(STATUS "Using [${CMAKE_C_COMPILER_ID}] compiler")
	if(CMAKE_C_COMPILER_ID MATCHES "MSVC")







|
|







102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
endif()

if(WIN32)
	add_definitions(-Drestrict)
	add_definitions(-D_CRT_SECURE_NO_WARNINGS)
	add_definitions(-D_CRT_DEPRECATED_NO_WARNINGS)
	add_definitions(-D_REENTRANT -D_POSIX_THREAD_SAFE_FUNCTIONS)
	add_definitions(-DWIN32_LEAN_AND_MEAN -D_WIN32_WINNT=0x0600)
	add_definitions(-DCPPFLAGS -DNO_SYSLOG -DNO_CRYPT)
	set(PLATFORM_LIBS ${PLATFORM_LIBS} ws2_32)
endif()

if(MSVC)
	add_definitions(-Dinline=__inline)
	message(STATUS "Using [${CMAKE_C_COMPILER_ID}] compiler")
	if(CMAKE_C_COMPILER_ID MATCHES "MSVC")
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
		elseif("${CMAKE_SYSTEM_PROCESSOR}" MATCHES "arm")
			set(HOST_ASM_ELF_ARMV4 true)
		elseif(CMAKE_SYSTEM_NAME STREQUAL "SunOS" AND "${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "i386")
			set(HOST_ASM_ELF_X86_64 true)
		endif()
	elseif(APPLE AND "${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "x86_64")
		set(HOST_ASM_MACOSX_X86_64 true)
	elseif(MSVC AND "${CMAKE_GENERATOR}" MATCHES "Win64" AND FALSE)
		# XXX Disabled for now, CMake's MASM support seems to either never
		# build supply ASM or build it with the C compiler in a mode where it
		# does not parse correctly. It might be easier to get NASM support working.
		set(HOST_ASM_MASM_X86_64 true)
		ENABLE_LANGUAGE(ASM_MASM)
	elseif(CMAKE_SYSTEM_NAME MATCHES "MINGW" AND "${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "x86_64")
		set(HOST_ASM_MINGW64_X86_64 true)
	endif()
endif()








|
<
<
<







285
286
287
288
289
290
291
292



293
294
295
296
297
298
299
		elseif("${CMAKE_SYSTEM_PROCESSOR}" MATCHES "arm")
			set(HOST_ASM_ELF_ARMV4 true)
		elseif(CMAKE_SYSTEM_NAME STREQUAL "SunOS" AND "${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "i386")
			set(HOST_ASM_ELF_X86_64 true)
		endif()
	elseif(APPLE AND "${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "x86_64")
		set(HOST_ASM_MACOSX_X86_64 true)
	elseif(MSVC AND "${CMAKE_GENERATOR}" MATCHES "Win64")



		set(HOST_ASM_MASM_X86_64 true)
		ENABLE_LANGUAGE(ASM_MASM)
	elseif(CMAKE_SYSTEM_NAME MATCHES "MINGW" AND "${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "x86_64")
		set(HOST_ASM_MINGW64_X86_64 true)
	endif()
endif()

342
343
344
345
346
347
348

349

350
351
352
353
354
355
356
357
358
359
360

361
362
363
364
365
366
367


if(NOT MSVC)
	# Create pkgconfig files.
	set(prefix      ${CMAKE_INSTALL_PREFIX})
	set(exec_prefix \${prefix})
	set(libdir      \${exec_prefix}/${CMAKE_INSTALL_LIBDIR})
	set(includedir  \${prefix}/include)

	string(REGEX REPLACE ";" " -l" PLATFORM_LDADD ";${PLATFORM_LIBS}")

	file(STRINGS    "VERSION" VERSION LIMIT_COUNT 1)
	file(GLOB       OPENSSL_PKGCONFIGS "*.pc.in")
	foreach(file ${OPENSSL_PKGCONFIGS})
		get_filename_component(filename ${file} NAME)
		string(REPLACE ".in" "" new_file "${filename}")
		configure_file(${filename} pkgconfig/${new_file} @ONLY)
	endforeach()
	install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/pkgconfig
		DESTINATION ${CMAKE_INSTALL_LIBDIR})
endif()


configure_file(
	"${CMAKE_CURRENT_SOURCE_DIR}/cmake_uninstall.cmake.in"
	"${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake"
	IMMEDIATE @ONLY)

add_custom_target(uninstall
	COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake)








>
|
>











>
|
|
|
|

|
|
>
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368

if(NOT MSVC)
	# Create pkgconfig files.
	set(prefix      ${CMAKE_INSTALL_PREFIX})
	set(exec_prefix \${prefix})
	set(libdir      \${exec_prefix}/${CMAKE_INSTALL_LIBDIR})
	set(includedir  \${prefix}/include)
	if(PLATFORM_LIBS)
		string(REGEX REPLACE ";" " -l" PLATFORM_LDADD ";${PLATFORM_LIBS}")
	endif()
	file(STRINGS    "VERSION" VERSION LIMIT_COUNT 1)
	file(GLOB       OPENSSL_PKGCONFIGS "*.pc.in")
	foreach(file ${OPENSSL_PKGCONFIGS})
		get_filename_component(filename ${file} NAME)
		string(REPLACE ".in" "" new_file "${filename}")
		configure_file(${filename} pkgconfig/${new_file} @ONLY)
	endforeach()
	install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/pkgconfig
		DESTINATION ${CMAKE_INSTALL_LIBDIR})
endif()

if(NOT TARGET uninstall)
	configure_file(
		"${CMAKE_CURRENT_SOURCE_DIR}/cmake_uninstall.cmake.in"
		"${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake"
		IMMEDIATE @ONLY)

	add_custom_target(uninstall
		COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake)
endif()
Changes to jni/libressl/ChangeLog.
24
25
26
27
28
29
30























































31
32
33
34
35
36
37
The portable bits of the project are largely maintained out-of-tree, and their
history is also available from Git.

	https://github.com/libressl-portable/portable

LibreSSL Portable Release Notes:
























































2.9.2 - Bug fixes

	* Fixed portable builds with older versions of MacOS,
	  Android targets < API 21, and Solaris 10

	* Fixed SRTP profile advertisement for DTLS servers.








>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
The portable bits of the project are largely maintained out-of-tree, and their
history is also available from Git.

	https://github.com/libressl-portable/portable

LibreSSL Portable Release Notes:

3.0.2 - Stable release

	* Use a valid curve when constructing an EC_KEY that looks like X25519.
	  The recent EC group cofactor change results in stricter validation,
	  which causes the EC_GROUP_set_generator() call to fail.
	  Issue reported and fix tested by rsadowski@

	* Fixed a padding oracle in PKCS7_dataDecode and CMS_decrypt_set1_pkey.
	  (Note that the CMS code is currently disabled)
	  Port of Edlinger's Fix for CVE-2019-1563 from OpenSSL 1.1.1 (old license) 

	* Avoid a path traversal bug in s_server on Windows when run with the -WWW
	  or -HTTP options, due to incomplete path check logic.
	  Issue reported and fix tested by Jobert Abma

3.0.1 - Development release

	* Ported Billy Brumley's fix for CVE-2019-1547 in OpenSSL 1.1.1. If a NULL
	  or zero cofactor is passed to EC_GROUP_set_generator(), try to compute
	  it using Hasse's bound. This works as long as the cofactor is small
	  enough.

	* Fixed a memory leak in error paths for eckey_type2param().

	* Initial work on supporting Cryptographic Message Syntax (CMS) in
	  libcrypto (not enabled).

	* Various manual page improvements and additions.

	* Added a CMake check for an existing uninstall target, facilitating
	  embedding LibreSSL in larger CMake projects, from Matthew Albrecht.

3.0.0 - Development release

	* Completed the port of RSA_METHOD accessors from the OpenSSL 1.1 API.

	* Documented undescribed options and removed unfunctional options
	  description in openssl(1) manual.

	* A plethora of small fixes due to regular oss-fuzz testing.

	* Various side channels in DSA and ECDSA were addressed.  These are some of
	  the many issues found in an extensive systematic analysis of bignum usage
	  by Samuel Weiser, David Schrammel et al.

	* Enabled openssl(1) speed subcommand on Windows platform.

	* Enabled performance optimizations when building with Visual Studio on Windows.

	* Fixed incorrect carry operation in 512 addition for Streebog.

	* Fixed -modulus option with openssl(1) dsa subcommand.

	* Fixed PVK format output issue with openssl(1) dsa and rsa subcommand.

2.9.2 - Bug fixes

	* Fixed portable builds with older versions of MacOS,
	  Android targets < API 21, and Solaris 10

	* Fixed SRTP profile advertisement for DTLS servers.

Changes to jni/libressl/README.md.

1


2
3
4
5
6
7
8

## Portable version of [LibreSSL](https://www.libressl.org) ##



LibreSSL is a fork of [OpenSSL](https://www.openssl.org) 1.0.1g developed by the
[OpenBSD](https://www.openbsd.org) project.  Our goal is to modernize the codebase,
improve security, and apply best practice development processes from OpenBSD.

## Compatibility with OpenSSL: ##

>
|
>
>







1
2
3
4
5
6
7
8
9
10
11
![LibreSSL image](https://www.libressl.org/images/libressl.jpg)
## Official portable version of [LibreSSL](https://www.libressl.org) ##

[![Build Status](https://travis-ci.org/libressl-portable/portable.svg?branch=master)](https://travis-ci.org/libressl-portable/portable)

LibreSSL is a fork of [OpenSSL](https://www.openssl.org) 1.0.1g developed by the
[OpenBSD](https://www.openbsd.org) project.  Our goal is to modernize the codebase,
improve security, and apply best practice development processes from OpenBSD.

## Compatibility with OpenSSL: ##

Changes to jni/libressl/VERSION.
1
2
2.9.2

|

1
2
3.0.2

Changes to jni/libressl/apps/nc/netcat.c.
1
2
3
4
5
6
7
8
/* $OpenBSD: netcat.c,v 1.203 2019/02/26 17:32:47 jsing Exp $ */
/*
 * Copyright (c) 2001 Eric Jackson <ericj@monkey.org>
 * Copyright (c) 2015 Bob Beck.  All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
|







1
2
3
4
5
6
7
8
/* $OpenBSD: netcat.c,v 1.206 2019/08/08 16:49:35 mestre Exp $ */
/*
 * Copyright (c) 2001 Eric Jackson <ericj@monkey.org>
 * Copyright (c) 2015 Bob Beck.  All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
389
390
391
392
393
394
395

396
397
398
399
400
401
402
			if (unveil(host, "rwc") == -1)
				err(1, "unveil");
			if (uflag && !lflag) {
				if (unveil(sflag ? sflag : "/tmp", "rwc") == -1)
					err(1, "unveil");
			}
		} else {

			if (unveil("/", "") == -1)
				err(1, "unveil");
		}
	}

	if (family == AF_UNIX) {
		if (pledge("stdio rpath wpath cpath tmppath unix", NULL) == -1)







>







389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
			if (unveil(host, "rwc") == -1)
				err(1, "unveil");
			if (uflag && !lflag) {
				if (unveil(sflag ? sflag : "/tmp", "rwc") == -1)
					err(1, "unveil");
			}
		} else {
			/* no filesystem visibility */
			if (unveil("/", "") == -1)
				err(1, "unveil");
		}
	}

	if (family == AF_UNIX) {
		if (pledge("stdio rpath wpath cpath tmppath unix", NULL) == -1)
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
		/* Allow only one connection at a time, but stay alive. */
		for (;;) {
			if (family != AF_UNIX) {
				if (s != -1)
					close(s);
				s = local_listen(host, uport, hints);
			}
			if (s < 0)
				err(1, NULL);
			if (uflag && kflag) {
				/*
				 * For UDP and -k, don't connect the socket,
				 * let it receive datagrams from multiple
				 * socket pairs.
				 */







|







575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
		/* Allow only one connection at a time, but stay alive. */
		for (;;) {
			if (family != AF_UNIX) {
				if (s != -1)
					close(s);
				s = local_listen(host, uport, hints);
			}
			if (s == -1)
				err(1, NULL);
			if (uflag && kflag) {
				/*
				 * For UDP and -k, don't connect the socket,
				 * let it receive datagrams from multiple
				 * socket pairs.
				 */
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
				int rv;
				char buf[2048];
				struct sockaddr_storage z;

				len = sizeof(z);
				rv = recvfrom(s, buf, sizeof(buf), MSG_PEEK,
				    (struct sockaddr *)&z, &len);
				if (rv < 0)
					err(1, "recvfrom");

				rv = connect(s, (struct sockaddr *)&z, len);
				if (rv < 0)
					err(1, "connect");

				if (vflag)
					report_sock("Connection received",
					    (struct sockaddr *)&z, len, NULL);

				readwrite(s, NULL);







|



|







597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
				int rv;
				char buf[2048];
				struct sockaddr_storage z;

				len = sizeof(z);
				rv = recvfrom(s, buf, sizeof(buf), MSG_PEEK,
				    (struct sockaddr *)&z, &len);
				if (rv == -1)
					err(1, "recvfrom");

				rv = connect(s, (struct sockaddr *)&z, len);
				if (rv == -1)
					err(1, "connect");

				if (vflag)
					report_sock("Connection received",
					    (struct sockaddr *)&z, len, NULL);

				readwrite(s, NULL);
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
					readwrite(connfd, NULL);
				if (tls_cctx)
					timeout_tls(s, tls_cctx, tls_close);
				close(connfd);
				tls_free(tls_cctx);
			}
			if (family == AF_UNIX && uflag) {
				if (connect(s, NULL, 0) < 0)
					err(1, "connect");
			}

			if (!kflag)
				break;
		}
	} else if (family == AF_UNIX) {







|







635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
					readwrite(connfd, NULL);
				if (tls_cctx)
					timeout_tls(s, tls_cctx, tls_close);
				close(connfd);
				tls_free(tls_cctx);
			}
			if (family == AF_UNIX && uflag) {
				if (connect(s, NULL, 0) == -1)
					err(1, "connect");
			}

			if (!kflag)
				break;
		}
	} else if (family == AF_UNIX) {
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
unix_bind(char *path, int flags)
{
	struct sockaddr_un s_un;
	int s, save_errno;

	/* Create unix domain socket. */
	if ((s = socket(AF_UNIX, flags | (uflag ? SOCK_DGRAM : SOCK_STREAM),
	    0)) < 0)
		return -1;

	memset(&s_un, 0, sizeof(struct sockaddr_un));
	s_un.sun_family = AF_UNIX;

	if (strlcpy(s_un.sun_path, path, sizeof(s_un.sun_path)) >=
	    sizeof(s_un.sun_path)) {
		close(s);
		errno = ENAMETOOLONG;
		return -1;
	}

	if (bind(s, (struct sockaddr *)&s_un, sizeof(s_un)) < 0) {
		save_errno = errno;
		close(s);
		errno = save_errno;
		return -1;
	}
	if (vflag)
		report_sock("Bound", NULL, 0, path);







|












|







746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
unix_bind(char *path, int flags)
{
	struct sockaddr_un s_un;
	int s, save_errno;

	/* Create unix domain socket. */
	if ((s = socket(AF_UNIX, flags | (uflag ? SOCK_DGRAM : SOCK_STREAM),
	    0)) == -1)
		return -1;

	memset(&s_un, 0, sizeof(struct sockaddr_un));
	s_un.sun_family = AF_UNIX;

	if (strlcpy(s_un.sun_path, path, sizeof(s_un.sun_path)) >=
	    sizeof(s_un.sun_path)) {
		close(s);
		errno = ENAMETOOLONG;
		return -1;
	}

	if (bind(s, (struct sockaddr *)&s_un, sizeof(s_un)) == -1) {
		save_errno = errno;
		close(s);
		errno = save_errno;
		return -1;
	}
	if (vflag)
		report_sock("Bound", NULL, 0, path);
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
int
unix_connect(char *path)
{
	struct sockaddr_un s_un;
	int s, save_errno;

	if (uflag) {
		if ((s = unix_bind(unix_dg_tmp_socket, SOCK_CLOEXEC)) < 0)
			return -1;
	} else {
		if ((s = socket(AF_UNIX, SOCK_STREAM | SOCK_CLOEXEC, 0)) < 0)
			return -1;
	}

	memset(&s_un, 0, sizeof(struct sockaddr_un));
	s_un.sun_family = AF_UNIX;

	if (strlcpy(s_un.sun_path, path, sizeof(s_un.sun_path)) >=
	    sizeof(s_un.sun_path)) {
		close(s);
		errno = ENAMETOOLONG;
		return -1;
	}
	if (connect(s, (struct sockaddr *)&s_un, sizeof(s_un)) < 0) {
		save_errno = errno;
		close(s);
		errno = save_errno;
		return -1;
	}
	return s;

}

/*
 * unix_listen()
 * Create a unix domain socket, and listen on it.
 */
int
unix_listen(char *path)
{
	int s;

	if ((s = unix_bind(path, 0)) < 0)
		return -1;
	if (listen(s, 5) < 0) {
		close(s);
		return -1;
	}
	if (vflag)
		report_sock("Listening", NULL, 0, path);

	return s;







|


|












|


















|

|







869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
int
unix_connect(char *path)
{
	struct sockaddr_un s_un;
	int s, save_errno;

	if (uflag) {
		if ((s = unix_bind(unix_dg_tmp_socket, SOCK_CLOEXEC)) == -1)
			return -1;
	} else {
		if ((s = socket(AF_UNIX, SOCK_STREAM | SOCK_CLOEXEC, 0)) == -1)
			return -1;
	}

	memset(&s_un, 0, sizeof(struct sockaddr_un));
	s_un.sun_family = AF_UNIX;

	if (strlcpy(s_un.sun_path, path, sizeof(s_un.sun_path)) >=
	    sizeof(s_un.sun_path)) {
		close(s);
		errno = ENAMETOOLONG;
		return -1;
	}
	if (connect(s, (struct sockaddr *)&s_un, sizeof(s_un)) == -1) {
		save_errno = errno;
		close(s);
		errno = save_errno;
		return -1;
	}
	return s;

}

/*
 * unix_listen()
 * Create a unix domain socket, and listen on it.
 */
int
unix_listen(char *path)
{
	int s;

	if ((s = unix_bind(path, 0)) == -1)
		return -1;
	if (listen(s, 5) == -1) {
		close(s);
		return -1;
	}
	if (vflag)
		report_sock("Listening", NULL, 0, path);

	return s;
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969

	if ((error = getaddrinfo(host, port, &hints, &res0)))
		errx(1, "getaddrinfo for host \"%s\" port %s: %s", host,
		    port, gai_strerror(error));

	for (res = res0; res; res = res->ai_next) {
		if ((s = socket(res->ai_family, res->ai_socktype |
		    SOCK_NONBLOCK, res->ai_protocol)) < 0)
			continue;

		/* Bind to a local port or source address if specified. */
		if (sflag || pflag) {
			struct addrinfo ahints, *ares;

#ifdef SO_BINDANY
			/* try SO_BINDANY, but don't insist */
			setsockopt(s, SOL_SOCKET, SO_BINDANY, &on, sizeof(on));
#endif
			memset(&ahints, 0, sizeof(struct addrinfo));
			ahints.ai_family = res->ai_family;
			ahints.ai_socktype = uflag ? SOCK_DGRAM : SOCK_STREAM;
			ahints.ai_protocol = uflag ? IPPROTO_UDP : IPPROTO_TCP;
			ahints.ai_flags = AI_PASSIVE;
			if ((error = getaddrinfo(sflag, pflag, &ahints, &ares)))
				errx(1, "getaddrinfo: %s", gai_strerror(error));

			if (bind(s, (struct sockaddr *)ares->ai_addr,
			    ares->ai_addrlen) < 0)
				err(1, "bind failed");
			freeaddrinfo(ares);
		}

		set_common_sockopts(s, res->ai_family);

		if (timeout_connect(s, res->ai_addr, res->ai_addrlen) == 0)







|



















|







936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970

	if ((error = getaddrinfo(host, port, &hints, &res0)))
		errx(1, "getaddrinfo for host \"%s\" port %s: %s", host,
		    port, gai_strerror(error));

	for (res = res0; res; res = res->ai_next) {
		if ((s = socket(res->ai_family, res->ai_socktype |
		    SOCK_NONBLOCK, res->ai_protocol)) == -1)
			continue;

		/* Bind to a local port or source address if specified. */
		if (sflag || pflag) {
			struct addrinfo ahints, *ares;

#ifdef SO_BINDANY
			/* try SO_BINDANY, but don't insist */
			setsockopt(s, SOL_SOCKET, SO_BINDANY, &on, sizeof(on));
#endif
			memset(&ahints, 0, sizeof(struct addrinfo));
			ahints.ai_family = res->ai_family;
			ahints.ai_socktype = uflag ? SOCK_DGRAM : SOCK_STREAM;
			ahints.ai_protocol = uflag ? IPPROTO_UDP : IPPROTO_TCP;
			ahints.ai_flags = AI_PASSIVE;
			if ((error = getaddrinfo(sflag, pflag, &ahints, &ares)))
				errx(1, "getaddrinfo: %s", gai_strerror(error));

			if (bind(s, (struct sockaddr *)ares->ai_addr,
			    ares->ai_addrlen) == -1)
				err(1, "bind failed");
			freeaddrinfo(ares);
		}

		set_common_sockopts(s, res->ai_family);

		if (timeout_connect(s, res->ai_addr, res->ai_addrlen) == 0)
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
		hints.ai_family = AF_INET;

	if ((error = getaddrinfo(host, port, &hints, &res0)))
		errx(1, "getaddrinfo: %s", gai_strerror(error));

	for (res = res0; res; res = res->ai_next) {
		if ((s = socket(res->ai_family, res->ai_socktype,
		    res->ai_protocol)) < 0)
			continue;

#ifdef SO_REUSEPORT
		ret = setsockopt(s, SOL_SOCKET, SO_REUSEPORT, &x, sizeof(x));
		if (ret == -1)
			err(1, NULL);
#endif







|







1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
		hints.ai_family = AF_INET;

	if ((error = getaddrinfo(host, port, &hints, &res0)))
		errx(1, "getaddrinfo: %s", gai_strerror(error));

	for (res = res0; res; res = res->ai_next) {
		if ((s = socket(res->ai_family, res->ai_socktype,
		    res->ai_protocol)) == -1)
			continue;

#ifdef SO_REUSEPORT
		ret = setsockopt(s, SOL_SOCKET, SO_REUSEPORT, &x, sizeof(x));
		if (ret == -1)
			err(1, NULL);
#endif
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
		save_errno = errno;
		close(s);
		errno = save_errno;
		s = -1;
	}

	if (!uflag && s != -1) {
		if (listen(s, 1) < 0)
			err(1, "listen");
	}
	if (vflag && s != -1) {
		struct sockaddr_storage ss;
		socklen_t len;

		len = sizeof(ss);







|







1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
		save_errno = errno;
		close(s);
		errno = save_errno;
		s = -1;
	}

	if (!uflag && s != -1) {
		if (listen(s, 1) == -1)
			err(1, "listen");
	}
	if (vflag && s != -1) {
		struct sockaddr_storage ss;
		socklen_t len;

		len = sizeof(ss);
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
		 * Initialize portlist with a random permutation.  Based on
		 * Knuth, as in ip_randomid() in sys/netinet/ip_id.c.
		 */
		if (rflag) {
			for (x = 0; x <= hi - lo; x++) {
				cp = arc4random_uniform(x + 1);
				portlist[x] = portlist[cp];
				if (asprintf(&portlist[cp], "%d", x + lo) < 0)
					err(1, "asprintf");
			}
		} else { /* Load ports sequentially. */
			for (cp = lo; cp <= hi; cp++) {
				if (asprintf(&portlist[x], "%d", cp) < 0)
					err(1, "asprintf");
				x++;
			}
		}
	} else {
		char *tmp;








|




|







1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
		 * Initialize portlist with a random permutation.  Based on
		 * Knuth, as in ip_randomid() in sys/netinet/ip_id.c.
		 */
		if (rflag) {
			for (x = 0; x <= hi - lo; x++) {
				cp = arc4random_uniform(x + 1);
				portlist[x] = portlist[cp];
				if (asprintf(&portlist[cp], "%d", x + lo) == -1)
					err(1, "asprintf");
			}
		} else { /* Load ports sequentially. */
			for (cp = lo; cp <= hi; cp++) {
				if (asprintf(&portlist[x], "%d", cp) == -1)
					err(1, "asprintf");
				x++;
			}
		}
	} else {
		char *tmp;

Changes to jni/libressl/apps/nc/socks.c.
1
2
3
4
5
6
7
8
/*	$OpenBSD: socks.c,v 1.27 2019/01/10 12:44:54 mestre Exp $	*/

/*
 * Copyright (c) 1999 Niklas Hallqvist.  All rights reserved.
 * Copyright (c) 2004, 2005 Damien Miller.  All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
|







1
2
3
4
5
6
7
8
/*	$OpenBSD: socks.c,v 1.29 2019/07/29 15:19:03 benno Exp $	*/

/*
 * Copyright (c) 1999 Niklas Hallqvist.  All rights reserved.
 * Copyright (c) 2004, 2005 Damien Miller.  All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
			    "CONNECT [%s]:%d HTTP/1.0\r\n",
			    host, ntohs(serverport));
		} else {
			r = snprintf(buf, sizeof(buf),
			    "CONNECT %s:%d HTTP/1.0\r\n",
			    host, ntohs(serverport));
		}
		if (r == -1 || (size_t)r >= sizeof(buf))
			errx(1, "hostname too long");
		r = strlen(buf);

		cnt = atomicio(vwrite, proxyfd, buf, r);
		if (cnt != r)
			err(1, "write failed (%zu/%d)", cnt, r);








|







330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
			    "CONNECT [%s]:%d HTTP/1.0\r\n",
			    host, ntohs(serverport));
		} else {
			r = snprintf(buf, sizeof(buf),
			    "CONNECT %s:%d HTTP/1.0\r\n",
			    host, ntohs(serverport));
		}
		if (r < 0 || (size_t)r >= sizeof(buf))
			errx(1, "hostname too long");
		r = strlen(buf);

		cnt = atomicio(vwrite, proxyfd, buf, r);
		if (cnt != r)
			err(1, "write failed (%zu/%d)", cnt, r);

353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376

377
378
379
380
381
382
383
			explicit_bzero(proxypass, sizeof proxypass);
			if (r == -1 || (size_t)r >= sizeof(buf) ||
			    b64_ntop(buf, strlen(buf), resp,
			    sizeof(resp)) == -1)
				errx(1, "Proxy username/password too long");
			r = snprintf(buf, sizeof(buf), "Proxy-Authorization: "
			    "Basic %s\r\n", resp);
			if (r == -1 || (size_t)r >= sizeof(buf))
				errx(1, "Proxy auth response too long");
			r = strlen(buf);
			if ((cnt = atomicio(vwrite, proxyfd, buf, r)) != r)
				err(1, "write failed (%zu/%d)", cnt, r);
			explicit_bzero(proxypass, sizeof proxypass);
			explicit_bzero(buf, sizeof buf);
		}

		/* Terminate headers */
		if ((cnt = atomicio(vwrite, proxyfd, "\r\n", 2)) != 2)
			err(1, "write failed (%zu/2)", cnt);

		/* Read status reply */
		proxy_read_line(proxyfd, buf, sizeof(buf));
		if (proxyuser != NULL &&
		    strncmp(buf, "HTTP/1.0 407 ", 12) == 0) {

			if (authretry > 1) {
				fprintf(stderr, "Proxy authentication "
				    "failed\n");
			}
			close(proxyfd);
			goto again;
		} else if (strncmp(buf, "HTTP/1.0 200 ", 12) != 0 &&







|















|
>







353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
			explicit_bzero(proxypass, sizeof proxypass);
			if (r == -1 || (size_t)r >= sizeof(buf) ||
			    b64_ntop(buf, strlen(buf), resp,
			    sizeof(resp)) == -1)
				errx(1, "Proxy username/password too long");
			r = snprintf(buf, sizeof(buf), "Proxy-Authorization: "
			    "Basic %s\r\n", resp);
			if (r < 0 || (size_t)r >= sizeof(buf))
				errx(1, "Proxy auth response too long");
			r = strlen(buf);
			if ((cnt = atomicio(vwrite, proxyfd, buf, r)) != r)
				err(1, "write failed (%zu/%d)", cnt, r);
			explicit_bzero(proxypass, sizeof proxypass);
			explicit_bzero(buf, sizeof buf);
		}

		/* Terminate headers */
		if ((cnt = atomicio(vwrite, proxyfd, "\r\n", 2)) != 2)
			err(1, "write failed (%zu/2)", cnt);

		/* Read status reply */
		proxy_read_line(proxyfd, buf, sizeof(buf));
		if (proxyuser != NULL &&
		    (strncmp(buf, "HTTP/1.0 407 ", 12) == 0 ||
		    strncmp(buf, "HTTP/1.1 407 ", 12) == 0)) {
			if (authretry > 1) {
				fprintf(stderr, "Proxy authentication "
				    "failed\n");
			}
			close(proxyfd);
			goto again;
		} else if (strncmp(buf, "HTTP/1.0 200 ", 12) != 0 &&
Changes to jni/libressl/apps/ocspcheck/http.c.
1
2
3
4
5
6
7
8
/*	$Id: http.c,v 1.11 2018/11/29 14:25:07 tedu Exp $ */
/*
 * Copyright (c) 2016 Kristaps Dzonsons <kristaps@bsd.lv>
 *
 * Permission to use, copy, modify, and distribute this software for any
 * purpose with or without fee is hereby granted, provided that the above
 * copyright notice and this permission notice appear in all copies.
 *
|







1
2
3
4
5
6
7
8
/*	$Id: http.c,v 1.12 2019/06/28 13:32:49 deraadt Exp $ */
/*
 * Copyright (c) 2016 Kristaps Dzonsons <kristaps@bsd.lv>
 *
 * Permission to use, copy, modify, and distribute this software for any
 * purpose with or without fee is hereby granted, provided that the above
 * copyright notice and this permission notice appear in all copies.
 *
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122

static ssize_t
dosysread(char *buf, size_t sz, const struct http *http)
{
	ssize_t	 rc;

	rc = read(http->fd, buf, sz);
	if (rc < 0)
		warn("%s: read", http->src.ip);
	return rc;
}

static ssize_t
dosyswrite(const void *buf, size_t sz, const struct http *http)
{
	ssize_t	 rc;

	rc = write(http->fd, buf, sz);
	if (rc < 0)
		warn("%s: write", http->src.ip);
	return rc;
}

static ssize_t
dotlsread(char *buf, size_t sz, const struct http *http)
{
	ssize_t	 rc;

	do {
		rc = tls_read(http->ctx, buf, sz);
	} while (rc == TLS_WANT_POLLIN || rc == TLS_WANT_POLLOUT);

	if (rc < 0)
		warnx("%s: tls_read: %s", http->src.ip,
		    tls_error(http->ctx));
	return rc;
}

static ssize_t
dotlswrite(const void *buf, size_t sz, const struct http *http)
{
	ssize_t	 rc;

	do {
		rc = tls_write(http->ctx, buf, sz);
	} while (rc == TLS_WANT_POLLIN || rc == TLS_WANT_POLLOUT);

	if (rc < 0)
		warnx("%s: tls_write: %s", http->src.ip,
		    tls_error(http->ctx));
	return rc;
}

int
http_init()







|










|













|














|







68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122

static ssize_t
dosysread(char *buf, size_t sz, const struct http *http)
{
	ssize_t	 rc;

	rc = read(http->fd, buf, sz);
	if (rc == -1)
		warn("%s: read", http->src.ip);
	return rc;
}

static ssize_t
dosyswrite(const void *buf, size_t sz, const struct http *http)
{
	ssize_t	 rc;

	rc = write(http->fd, buf, sz);
	if (rc == -1)
		warn("%s: write", http->src.ip);
	return rc;
}

static ssize_t
dotlsread(char *buf, size_t sz, const struct http *http)
{
	ssize_t	 rc;

	do {
		rc = tls_read(http->ctx, buf, sz);
	} while (rc == TLS_WANT_POLLIN || rc == TLS_WANT_POLLOUT);

	if (rc == -1)
		warnx("%s: tls_read: %s", http->src.ip,
		    tls_error(http->ctx));
	return rc;
}

static ssize_t
dotlswrite(const void *buf, size_t sz, const struct http *http)
{
	ssize_t	 rc;

	do {
		rc = tls_write(http->ctx, buf, sz);
	} while (rc == TLS_WANT_POLLIN || rc == TLS_WANT_POLLOUT);

	if (rc == -1)
		warnx("%s: tls_write: %s", http->src.ip,
		    tls_error(http->ctx));
	return rc;
}

int
http_init()
Changes to jni/libressl/apps/ocspcheck/ocspcheck.c.
1
2
3
4
5
6
7
8
/* $OpenBSD: ocspcheck.c,v 1.24 2017/12/01 14:42:23 visa Exp $ */

/*
 * Copyright (c) 2017 Bob Beck <beck@openbsd.org>
 *
 * Permission to use, copy, modify, and distribute this software for any
 * purpose with or without fee is hereby granted, provided that the above
 * copyright notice and this permission notice appear in all copies.
|







1
2
3
4
5
6
7
8
/* $OpenBSD: ocspcheck.c,v 1.25 2019/05/15 13:44:18 bcook Exp $ */

/*
 * Copyright (c) 2017 Bob Beck <beck@openbsd.org>
 *
 * Permission to use, copy, modify, and distribute this software for any
 * purpose with or without fee is hereby granted, provided that the above
 * copyright notice and this permission notice appear in all copies.
666
667
668
669
670
671
672
673


674
675
676
677
678
679
680
	}

	/*
	 * If we have been given a place to save a staple,
	 * write out the DER format response to the staplefd
	 */
	if (staplefd >= 0) {
		(void) ftruncate(staplefd, 0);


		w = 0;
		written = 0;
		while (written < instaplesz) {
			w = write(staplefd, instaple + written,
			    instaplesz - written);
			if (w == -1) {
				if (errno != EINTR && errno != EAGAIN)







|
>
>







666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
	}

	/*
	 * If we have been given a place to save a staple,
	 * write out the DER format response to the staplefd
	 */
	if (staplefd >= 0) {
		while (ftruncate(staplefd, 0) < 0)
			if (errno != EINTR && errno != EAGAIN)
				err(1, "Write of OCSP response failed");
		w = 0;
		written = 0;
		while (written < instaplesz) {
			w = write(staplefd, instaple + written,
			    instaplesz - written);
			if (w == -1) {
				if (errno != EINTR && errno != EAGAIN)
Changes to jni/libressl/apps/openssl/apps.c.
1
2
3
4
5
6
7
8
/* $OpenBSD: apps.c,v 1.51 2019/02/09 15:49:21 inoguchi Exp $ */
/*
 * Copyright (c) 2014 Joel Sing <jsing@openbsd.org>
 *
 * Permission to use, copy, modify, and distribute this software for any
 * purpose with or without fee is hereby granted, provided that the above
 * copyright notice and this permission notice appear in all copies.
 *
|







1
2
3
4
5
6
7
8
/* $OpenBSD: apps.c,v 1.54 2019/07/14 03:30:45 guenther Exp $ */
/*
 * Copyright (c) 2014 Joel Sing <jsing@openbsd.org>
 *
 * Permission to use, copy, modify, and distribute this software for any
 * purpose with or without fee is hereby granted, provided that the above
 * copyright notice and this permission notice appear in all copies.
 *
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
	ASN1_INTEGER *ai = NULL;

	if (suffix == NULL)
		n = strlcpy(serialpath, serialfile, sizeof serialpath);
	else
		n = snprintf(serialpath, sizeof serialpath, "%s.%s",
		    serialfile, suffix);
	if (n == -1 || n >= sizeof(serialpath)) {
		BIO_printf(bio_err, "serial too long\n");
		goto err;
	}
	out = BIO_new(BIO_s_file());
	if (out == NULL) {
		ERR_print_errors(bio_err);
		goto err;







|







1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
	ASN1_INTEGER *ai = NULL;

	if (suffix == NULL)
		n = strlcpy(serialpath, serialfile, sizeof serialpath);
	else
		n = snprintf(serialpath, sizeof serialpath, "%s.%s",
		    serialfile, suffix);
	if (n < 0 || n >= sizeof(serialpath)) {
		BIO_printf(bio_err, "serial too long\n");
		goto err;
	}
	out = BIO_new(BIO_s_file());
	if (out == NULL) {
		ERR_print_errors(bio_err);
		goto err;
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400

	if (snprintf(opath, sizeof opath, "%s.%s", serialfile,
	    old_suffix) >= sizeof opath) {
		BIO_printf(bio_err, "file name too long\n");
		goto err;
	}

	if (rename(serialfile, opath) < 0 &&
	    errno != ENOENT && errno != ENOTDIR) {
		BIO_printf(bio_err, "unable to rename %s to %s\n",
		    serialfile, opath);
		perror("reason");
		goto err;
	}


	if (rename(npath, serialfile) < 0) {
		BIO_printf(bio_err, "unable to rename %s to %s\n",
		    npath, serialfile);
		perror("reason");
		if (rename(opath, serialfile) < 0) {
			BIO_printf(bio_err, "unable to rename %s to %s\n",
			    opath, serialfile);
			perror("reason");
		}
		goto err;
	}
	return 1;







|








|



|







1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400

	if (snprintf(opath, sizeof opath, "%s.%s", serialfile,
	    old_suffix) >= sizeof opath) {
		BIO_printf(bio_err, "file name too long\n");
		goto err;
	}

	if (rename(serialfile, opath) == -1 &&
	    errno != ENOENT && errno != ENOTDIR) {
		BIO_printf(bio_err, "unable to rename %s to %s\n",
		    serialfile, opath);
		perror("reason");
		goto err;
	}


	if (rename(npath, serialfile) == -1) {
		BIO_printf(bio_err, "unable to rename %s to %s\n",
		    npath, serialfile);
		perror("reason");
		if (rename(opath, serialfile) == -1) {
			BIO_printf(bio_err, "unable to rename %s to %s\n",
			    opath, serialfile);
			perror("reason");
		}
		goto err;
	}
	return 1;
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
	}
	if (snprintf(odbpath, sizeof odbpath, "%s.%s",
	    dbfile, old_suffix) >= sizeof odbpath) {
		BIO_printf(bio_err, "file name too long\n");
		goto err;
	}

	if (rename(dbfile, odbpath) < 0 && errno != ENOENT && errno != ENOTDIR) {
		BIO_printf(bio_err, "unable to rename %s to %s\n",
		    dbfile, odbpath);
		perror("reason");
		goto err;
	}

	if (rename(dbpath, dbfile) < 0) {
		BIO_printf(bio_err, "unable to rename %s to %s\n",
		    dbpath, dbfile);
		perror("reason");
		if (rename(odbpath, dbfile) < 0) {
			BIO_printf(bio_err, "unable to rename %s to %s\n",
			    odbpath, dbfile);
			perror("reason");
		}
		goto err;
	}

	if (rename(attrpath, oattrpath) < 0 && errno != ENOENT && errno != ENOTDIR) {
		BIO_printf(bio_err, "unable to rename %s to %s\n",
		    attrpath, oattrpath);
		perror("reason");
		if (rename(dbfile, dbpath) < 0) {
			BIO_printf(bio_err, "unable to rename %s to %s\n",
			    dbfile, dbpath);
			perror("reason");
		}
		if (rename(odbpath, dbfile) < 0) {
			BIO_printf(bio_err, "unable to rename %s to %s\n",
			    odbpath, dbfile);
			perror("reason");
		}
		goto err;
	}

	if (rename(nattrpath, attrpath) < 0) {
		BIO_printf(bio_err, "unable to rename %s to %s\n",
		    nattrpath, attrpath);
		perror("reason");
		if (rename(oattrpath, attrpath) < 0) {
			BIO_printf(bio_err, "unable to rename %s to %s\n",
			    oattrpath, attrpath);
			perror("reason");
		}
		if (rename(dbfile, dbpath) < 0) {
			BIO_printf(bio_err, "unable to rename %s to %s\n",
			    dbfile, dbpath);
			perror("reason");
		}
		if (rename(odbpath, dbfile) < 0) {
			BIO_printf(bio_err, "unable to rename %s to %s\n",
			    odbpath, dbfile);
			perror("reason");
		}
		goto err;
	}
	return 1;







|






|



|







|



|




|







|



|




|




|







1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
	}
	if (snprintf(odbpath, sizeof odbpath, "%s.%s",
	    dbfile, old_suffix) >= sizeof odbpath) {
		BIO_printf(bio_err, "file name too long\n");
		goto err;
	}

	if (rename(dbfile, odbpath) == -1 && errno != ENOENT && errno != ENOTDIR) {
		BIO_printf(bio_err, "unable to rename %s to %s\n",
		    dbfile, odbpath);
		perror("reason");
		goto err;
	}

	if (rename(dbpath, dbfile) == -1) {
		BIO_printf(bio_err, "unable to rename %s to %s\n",
		    dbpath, dbfile);
		perror("reason");
		if (rename(odbpath, dbfile) == -1) {
			BIO_printf(bio_err, "unable to rename %s to %s\n",
			    odbpath, dbfile);
			perror("reason");
		}
		goto err;
	}

	if (rename(attrpath, oattrpath) == -1 && errno != ENOENT && errno != ENOTDIR) {
		BIO_printf(bio_err, "unable to rename %s to %s\n",
		    attrpath, oattrpath);
		perror("reason");
		if (rename(dbfile, dbpath) == -1) {
			BIO_printf(bio_err, "unable to rename %s to %s\n",
			    dbfile, dbpath);
			perror("reason");
		}
		if (rename(odbpath, dbfile) == -1) {
			BIO_printf(bio_err, "unable to rename %s to %s\n",
			    odbpath, dbfile);
			perror("reason");
		}
		goto err;
	}

	if (rename(nattrpath, attrpath) == -1) {
		BIO_printf(bio_err, "unable to rename %s to %s\n",
		    nattrpath, attrpath);
		perror("reason");
		if (rename(oattrpath, attrpath) == -1) {
			BIO_printf(bio_err, "unable to rename %s to %s\n",
			    oattrpath, attrpath);
			perror("reason");
		}
		if (rename(dbfile, dbpath) == -1) {
			BIO_printf(bio_err, "unable to rename %s to %s\n",
			    dbfile, dbpath);
			perror("reason");
		}
		if (rename(odbpath, dbfile) == -1) {
			BIO_printf(bio_err, "unable to rename %s to %s\n",
			    odbpath, dbfile);
			perror("reason");
		}
		goto err;
	}
	return 1;
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
		return S_ISDIR(st.st_mode);
	return -1;
}

#define OPTION_WIDTH 18

void
options_usage(struct option *opts)
{
	const char *p, *q;
	char optstr[32];
	int i;

	for (i = 0; opts[i].name != NULL; i++) {
		if (opts[i].desc == NULL)







|







2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
		return S_ISDIR(st.st_mode);
	return -1;
}

#define OPTION_WIDTH 18

void
options_usage(const struct option *opts)
{
	const char *p, *q;
	char optstr[32];
	int i;

	for (i = 0; opts[i].name != NULL; i++) {
		if (opts[i].desc == NULL)
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
			p = q + 1;
		}
		fprintf(stderr, " %s\n", p);
	}
}

int
options_parse(int argc, char **argv, struct option *opts, char **unnamed,
    int *argsused)
{
	const char *errstr;
	struct option *opt;
	long long val;
	char *arg, *p;
	int fmt, used;
	int ord = 0;
	int i, j;

	if (unnamed != NULL)







|



|







2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
			p = q + 1;
		}
		fprintf(stderr, " %s\n", p);
	}
}

int
options_parse(int argc, char **argv, const struct option *opts, char **unnamed,
    int *argsused)
{
	const char *errstr;
	const struct option *opt;
	long long val;
	char *arg, *p;
	int fmt, used;
	int ord = 0;
	int i, j;

	if (unnamed != NULL)
Changes to jni/libressl/apps/openssl/apps.h.
1
2
3
4
5
6
7
8
/* $OpenBSD: apps.h,v 1.22 2019/02/09 06:27:37 inoguchi Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
 * All rights reserved.
 *
 * This package is an SSL implementation written
 * by Eric Young (eay@cryptsoft.com).
 * The implementation was written so as to conform with Netscapes SSL.
 *
|







1
2
3
4
5
6
7
8
/* $OpenBSD: apps.h,v 1.23 2019/07/14 03:30:45 guenther Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
 * All rights reserved.
 *
 * This package is an SSL implementation written
 * by Eric Young (eay@cryptsoft.com).
 * The implementation was written so as to conform with Netscapes SSL.
 *
313
314
315
316
317
318
319
320
321
322
323
324
325
326
		long *lvalue;
		int *value;
		time_t *tvalue;
	} opt;
	const int value;
};

void options_usage(struct option *opts);
int options_parse(int argc, char **argv, struct option *opts, char **unnamed,
    int *argsused);

void show_cipher(const OBJ_NAME *name, void *arg);

#endif







|
|
|




313
314
315
316
317
318
319
320
321
322
323
324
325
326
		long *lvalue;
		int *value;
		time_t *tvalue;
	} opt;
	const int value;
};

void options_usage(const struct option *opts);
int options_parse(int argc, char **argv, const struct option *opts,
    char **unnamed, int *argsused);

void show_cipher(const OBJ_NAME *name, void *arg);

#endif
Changes to jni/libressl/apps/openssl/apps_win.c.
66
67
68
69
70
71
72


































































destroy_ui(void)
{
	if (ui_method) {
		UI_destroy_method(ui_method);
		ui_method = NULL;
	}
}









































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
destroy_ui(void)
{
	if (ui_method) {
		UI_destroy_method(ui_method);
		ui_method = NULL;
	}
}

static void (*speed_alarm_handler)(int);
static HANDLE speed_thread;
static unsigned int speed_lapse;
static volatile unsigned int speed_schlock;

void
speed_signal(int sigcatch, void (*func)(int sigraised))
{
	speed_alarm_handler = func;
}

static DWORD WINAPI
speed_timer(VOID * arg)
{
	speed_schlock = 1;
	Sleep(speed_lapse);
	(*speed_alarm_handler)(0);
	return (0);
}

unsigned int
speed_alarm(unsigned int seconds)
{
	DWORD err;

	speed_lapse = seconds * 1000;
	speed_schlock = 0;

	speed_thread = CreateThread(NULL, 4096, speed_timer, NULL, 0, NULL);
	if (speed_thread == NULL) {
		err = GetLastError();
		BIO_printf(bio_err, "CreateThread failed (%lu)", err);
		ExitProcess(err);
	}

	while (!speed_schlock)
		Sleep(0);

	return (seconds);
}

void
speed_alarm_free(int run)
{
	DWORD err;

	if (run) {
		if (TerminateThread(speed_thread, 0) == 0) {
			err = GetLastError();
			BIO_printf(bio_err, "TerminateThread failed (%lu)",
			    err);
			ExitProcess(err);
		}
	}

	if (CloseHandle(speed_thread) == 0) {
		err = GetLastError();
		BIO_printf(bio_err, "CloseHandle failed (%lu)", err);
		ExitProcess(err);
	}

	speed_thread = NULL;
	speed_lapse = 0;
	speed_schlock = 0;
}
Changes to jni/libressl/apps/openssl/asn1pars.c.
1
2
3
4
5
6
7
8
/* $OpenBSD: asn1pars.c,v 1.9 2018/02/07 05:47:55 jsing Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
 * All rights reserved.
 *
 * This package is an SSL implementation written
 * by Eric Young (eay@cryptsoft.com).
 * The implementation was written so as to conform with Netscapes SSL.
 *
|







1
2
3
4
5
6
7
8
/* $OpenBSD: asn1pars.c,v 1.10 2019/07/14 03:30:45 guenther Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
 * All rights reserved.
 *
 * This package is an SSL implementation written
 * by Eric Young (eay@cryptsoft.com).
 * The implementation was written so as to conform with Netscapes SSL.
 *
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
	if (sk_OPENSSL_STRING_push(asn1pars_config.osk, arg) == 0) {
		fprintf(stderr, "-strparse cannot add argument\n");
		return (-1);
	}
	return (0);
}

static struct option asn1pars_options[] = {
	{
		.name = "dump",
		.desc = "Dump unknown data in hex form",
		.type = OPTION_VALUE,
		.value = -1,
		.opt.value = &asn1pars_config.dump,
	},







|







122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
	if (sk_OPENSSL_STRING_push(asn1pars_config.osk, arg) == 0) {
		fprintf(stderr, "-strparse cannot add argument\n");
		return (-1);
	}
	return (0);
}

static const struct option asn1pars_options[] = {
	{
		.name = "dump",
		.desc = "Dump unknown data in hex form",
		.type = OPTION_VALUE,
		.value = -1,
		.opt.value = &asn1pars_config.dump,
	},
Changes to jni/libressl/apps/openssl/ca.c.
1
2
3
4
5
6
7
8
/* $OpenBSD: ca.c,v 1.26 2018/02/07 05:47:55 jsing Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
 * All rights reserved.
 *
 * This package is an SSL implementation written
 * by Eric Young (eay@cryptsoft.com).
 * The implementation was written so as to conform with Netscapes SSL.
 *
|







1
2
3
4
5
6
7
8
/* $OpenBSD: ca.c,v 1.27 2019/07/03 03:24:02 deraadt Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
 * All rights reserved.
 *
 * This package is an SSL implementation written
 * by Eric Young (eay@cryptsoft.com).
 * The implementation was written so as to conform with Netscapes SSL.
 *
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
				serialstr = bin2hex(data, j);
			else
				serialstr = strdup("00");
			if (serialstr) {
				k = snprintf(pempath, sizeof(pempath),
				    "%s/%s.pem", outdir, serialstr);
				free(serialstr);
				if (k == -1 || k >= sizeof(pempath)) {
					BIO_printf(bio_err,
					    "certificate file name too long\n");
					goto err;
				}
			} else {
				BIO_printf(bio_err,
				    "memory allocation failed\n");







|







1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
				serialstr = bin2hex(data, j);
			else
				serialstr = strdup("00");
			if (serialstr) {
				k = snprintf(pempath, sizeof(pempath),
				    "%s/%s.pem", outdir, serialstr);
				free(serialstr);
				if (k < 0 || k >= sizeof(pempath)) {
					BIO_printf(bio_err,
					    "certificate file name too long\n");
					goto err;
				}
			} else {
				BIO_printf(bio_err,
				    "memory allocation failed\n");
Changes to jni/libressl/apps/openssl/certhash.c.
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#include "apps.h"

static struct {
	int dryrun;
	int verbose;
} certhash_config;

struct option certhash_options[] = {
	{
		.name = "n",
		.desc = "Perform a dry-run - do not make any changes",
		.type = OPTION_FLAG,
		.opt.flag = &certhash_config.dryrun,
	},
	{







|







33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#include "apps.h"

static struct {
	int dryrun;
	int verbose;
} certhash_config;

static const struct option certhash_options[] = {
	{
		.name = "n",
		.desc = "Perform a dry-run - do not make any changes",
		.type = OPTION_FLAG,
		.opt.flag = &certhash_config.dryrun,
	},
	{
Changes to jni/libressl/apps/openssl/ciphers.c.
1
2
3
4
5
6
7
8
/* $OpenBSD: ciphers.c,v 1.9 2018/02/07 05:47:55 jsing Exp $ */
/*
 * Copyright (c) 2014 Joel Sing <jsing@openbsd.org>
 *
 * Permission to use, copy, modify, and distribute this software for any
 * purpose with or without fee is hereby granted, provided that the above
 * copyright notice and this permission notice appear in all copies.
 *
|







1
2
3
4
5
6
7
8
/* $OpenBSD: ciphers.c,v 1.10 2019/07/14 03:30:45 guenther Exp $ */
/*
 * Copyright (c) 2014 Joel Sing <jsing@openbsd.org>
 *
 * Permission to use, copy, modify, and distribute this software for any
 * purpose with or without fee is hereby granted, provided that the above
 * copyright notice and this permission notice appear in all copies.
 *
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#include "progs.h"

struct {
	int usage;
	int verbose;
} ciphers_config;

struct option ciphers_options[] = {
	{
		.name = "h",
		.type = OPTION_FLAG,
		.opt.flag = &ciphers_config.usage,
	},
	{
		.name = "?",







|







25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#include "progs.h"

struct {
	int usage;
	int verbose;
} ciphers_config;

static const struct option ciphers_options[] = {
	{
		.name = "h",
		.type = OPTION_FLAG,
		.opt.flag = &ciphers_config.usage,
	},
	{
		.name = "?",
Changes to jni/libressl/apps/openssl/crl.c.
1
2
3
4
5
6
7
8
/* $OpenBSD: crl.c,v 1.12 2019/01/19 21:17:05 jsg Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
 * All rights reserved.
 *
 * This package is an SSL implementation written
 * by Eric Young (eay@cryptsoft.com).
 * The implementation was written so as to conform with Netscapes SSL.
 *
|







1
2
3
4
5
6
7
8
/* $OpenBSD: crl.c,v 1.13 2019/07/14 03:30:45 guenther Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
 * All rights reserved.
 *
 * This package is an SSL implementation written
 * by Eric Young (eay@cryptsoft.com).
 * The implementation was written so as to conform with Netscapes SSL.
 *
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
	int noout;
	char *outfile;
	int outformat;
	int text;
	int verify;
} crl_config;

static struct option crl_options[] = {
	{
		.name = "CAfile",
		.argname = "file",
		.desc = "Verify the CRL using certificates in the given file",
		.type = OPTION_ARG,
		.opt.arg = &crl_config.cafile,
	},







|







84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
	int noout;
	char *outfile;
	int outformat;
	int text;
	int verify;
} crl_config;

static const struct option crl_options[] = {
	{
		.name = "CAfile",
		.argname = "file",
		.desc = "Verify the CRL using certificates in the given file",
		.type = OPTION_ARG,
		.opt.arg = &crl_config.cafile,
	},
Changes to jni/libressl/apps/openssl/crl2p7.c.
1
2
3
4
5
6
7
8
/* $OpenBSD: crl2p7.c,v 1.8 2018/02/07 05:47:55 jsing Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
 * All rights reserved.
 *
 * This package is an SSL implementation written
 * by Eric Young (eay@cryptsoft.com).
 * The implementation was written so as to conform with Netscapes SSL.
 *
|







1
2
3
4
5
6
7
8
/* $OpenBSD: crl2p7.c,v 1.9 2019/07/14 03:30:45 guenther Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
 * All rights reserved.
 *
 * This package is an SSL implementation written
 * by Eric Young (eay@cryptsoft.com).
 * The implementation was written so as to conform with Netscapes SSL.
 *
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
		fprintf(stderr, "out of memory\n");
		return (1);
	}

	return (0);
}

static struct option crl2p7_options[] = {
	{
		.name = "certfile",
		.argname = "file",
		.desc = "Chain of PEM certificates to a trusted CA",
		.type = OPTION_ARG_FUNC,
		.opt.argfunc = crl2p7_opt_certfile,
	},







|







98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
		fprintf(stderr, "out of memory\n");
		return (1);
	}

	return (0);
}

static const struct option crl2p7_options[] = {
	{
		.name = "certfile",
		.argname = "file",
		.desc = "Chain of PEM certificates to a trusted CA",
		.type = OPTION_ARG_FUNC,
		.opt.argfunc = crl2p7_opt_certfile,
	},
Changes to jni/libressl/apps/openssl/dgst.c.
1
2
3
4
5
6
7
8
/* $OpenBSD: dgst.c,v 1.13 2019/01/18 23:33:57 naddy Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
 * All rights reserved.
 *
 * This package is an SSL implementation written
 * by Eric Young (eay@cryptsoft.com).
 * The implementation was written so as to conform with Netscapes SSL.
 *
|







1
2
3
4
5
6
7
8
/* $OpenBSD: dgst.c,v 1.18 2019/08/30 12:32:14 inoguchi Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
 * All rights reserved.
 *
 * This package is an SSL implementation written
 * by Eric Young (eay@cryptsoft.com).
 * The implementation was written so as to conform with Netscapes SSL.
 *
73
74
75
76
77
78
79





















































































































































































































80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99















100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137




138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225

226

227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285

286

287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312

313

314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351

352
353

354
355
356
357
358
359
360
361

362

363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418

419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
#define BUFSIZE	1024*8

int
do_fp(BIO * out, unsigned char *buf, BIO * bp, int sep, int binout,
    EVP_PKEY * key, unsigned char *sigin, int siglen,
    const char *sig_name, const char *md_name,
    const char *file, BIO * bmd);






















































































































































































































static void
list_md_fn(const EVP_MD * m, const char *from, const char *to, void *arg)
{
	const char *mname;
	/* Skip aliases */
	if (!m)
		return;
	mname = OBJ_nid2ln(EVP_MD_type(m));
	/* Skip shortnames */
	if (strcmp(from, mname))
		return;
	/* Skip clones */
	if (EVP_MD_flags(m) & EVP_MD_FLAG_PKEY_DIGEST)
		return;
	if (strchr(mname, ' '))
		mname = EVP_MD_name(m);
	BIO_printf(arg, "-%-14s to use the %s message digest algorithm\n",
	    mname, mname);
}
















int
dgst_main(int argc, char **argv)
{
	unsigned char *buf = NULL;
	int i, err = 1;
	const EVP_MD *md = NULL, *m;
	BIO *in = NULL, *inp;
	BIO *bmd = NULL;
	BIO *out = NULL;
#define PROG_NAME_SIZE  39
	char pname[PROG_NAME_SIZE + 1];
	int separator = 0;
	int debug = 0;
	int keyform = FORMAT_PEM;
	const char *outfile = NULL, *keyfile = NULL;
	const char *sigfile = NULL;
	int out_bin = -1, want_pub = 0, do_verify = 0;
	EVP_PKEY *sigkey = NULL;
	unsigned char *sigbuf = NULL;
	int siglen = 0;
	char *passargin = NULL, *passin = NULL;
	char *hmac_key = NULL;
	char *mac_name = NULL;
	STACK_OF(OPENSSL_STRING) * sigopts = NULL, *macopts = NULL;

	if (single_execution) {
		if (pledge("stdio cpath wpath rpath tty", NULL) == -1) {
			perror("pledge");
			exit(1);
		}
	}

	if ((buf = malloc(BUFSIZE)) == NULL) {
		BIO_printf(bio_err, "out of memory\n");
		goto end;
	}





	/* first check the program name */
	program_name(argv[0], pname, sizeof pname);

	md = EVP_get_digestbyname(pname);

	argc--;
	argv++;
	while (argc > 0) {
		if ((*argv)[0] != '-')
			break;
		if (strcmp(*argv, "-c") == 0)
			separator = 1;
		else if (strcmp(*argv, "-r") == 0)
			separator = 2;
		else if (strcmp(*argv, "-out") == 0) {
			if (--argc < 1)
				break;
			outfile = *(++argv);
		} else if (strcmp(*argv, "-sign") == 0) {
			if (--argc < 1)
				break;
			keyfile = *(++argv);
		} else if (!strcmp(*argv, "-passin")) {
			if (--argc < 1)
				break;
			passargin = *++argv;
		} else if (strcmp(*argv, "-verify") == 0) {
			if (--argc < 1)
				break;
			keyfile = *(++argv);
			want_pub = 1;
			do_verify = 1;
		} else if (strcmp(*argv, "-prverify") == 0) {
			if (--argc < 1)
				break;
			keyfile = *(++argv);
			do_verify = 1;
		} else if (strcmp(*argv, "-signature") == 0) {
			if (--argc < 1)
				break;
			sigfile = *(++argv);
		} else if (strcmp(*argv, "-keyform") == 0) {
			if (--argc < 1)
				break;
			keyform = str2fmt(*(++argv));
		}
		else if (strcmp(*argv, "-hex") == 0)
			out_bin = 0;
		else if (strcmp(*argv, "-binary") == 0)
			out_bin = 1;
		else if (strcmp(*argv, "-d") == 0)
			debug = 1;
		else if (!strcmp(*argv, "-hmac")) {
			if (--argc < 1)
				break;
			hmac_key = *++argv;
		} else if (!strcmp(*argv, "-mac")) {
			if (--argc < 1)
				break;
			mac_name = *++argv;
		} else if (strcmp(*argv, "-sigopt") == 0) {
			if (--argc < 1)
				break;
			if (!sigopts)
				sigopts = sk_OPENSSL_STRING_new_null();
			if (!sigopts || !sk_OPENSSL_STRING_push(sigopts, *(++argv)))
				break;
		} else if (strcmp(*argv, "-macopt") == 0) {
			if (--argc < 1)
				break;
			if (!macopts)
				macopts = sk_OPENSSL_STRING_new_null();
			if (!macopts || !sk_OPENSSL_STRING_push(macopts, *(++argv)))
				break;
		} else if ((m = EVP_get_digestbyname(&((*argv)[1]))) != NULL)
			md = m;
		else
			break;
		argc--;
		argv++;
	}


	if (do_verify && !sigfile) {
		BIO_printf(bio_err, "No signature to verify: use the -signature option\n");
		goto end;
	}
	if ((argc > 0) && (argv[0][0] == '-')) {	/* bad option */

		BIO_printf(bio_err, "unknown option '%s'\n", *argv);

		BIO_printf(bio_err, "options are\n");
		BIO_printf(bio_err, "-c              to output the digest with separating colons\n");
		BIO_printf(bio_err, "-r              to output the digest in coreutils format\n");
		BIO_printf(bio_err, "-d              to output debug info\n");
		BIO_printf(bio_err, "-hex            output as hex dump\n");
		BIO_printf(bio_err, "-binary         output in binary form\n");
		BIO_printf(bio_err, "-sign   file    sign digest using private key in file\n");
		BIO_printf(bio_err, "-verify file    verify a signature using public key in file\n");
		BIO_printf(bio_err, "-prverify file  verify a signature using private key in file\n");
		BIO_printf(bio_err, "-keyform arg    key file format (PEM)\n");
		BIO_printf(bio_err, "-out filename   output to filename rather than stdout\n");
		BIO_printf(bio_err, "-signature file signature to verify\n");
		BIO_printf(bio_err, "-sigopt nm:v    signature parameter\n");
		BIO_printf(bio_err, "-hmac key       create hashed MAC with key\n");
		BIO_printf(bio_err, "-mac algorithm  create MAC (not neccessarily HMAC)\n");
		BIO_printf(bio_err, "-macopt nm:v    MAC algorithm parameters or key\n");

		EVP_MD_do_all_sorted(list_md_fn, bio_err);
		goto end;
	}

	in = BIO_new(BIO_s_file());
	bmd = BIO_new(BIO_f_md());
	if (in == NULL || bmd == NULL) {
		ERR_print_errors(bio_err);
		goto end;
	}

	if (debug) {
		BIO_set_callback(in, BIO_debug_callback);
		/* needed for windows 3.1 */
		BIO_set_callback_arg(in, (char *) bio_err);
	}
	if (!app_passwd(bio_err, passargin, NULL, &passin, NULL)) {
		BIO_printf(bio_err, "Error getting password\n");
		goto end;
	}
	if (out_bin == -1) {
		if (keyfile)
			out_bin = 1;
		else
			out_bin = 0;
	}

	if (outfile) {
		if (out_bin)
			out = BIO_new_file(outfile, "wb");
		else
			out = BIO_new_file(outfile, "w");
	} else {
		out = BIO_new_fp(stdout, BIO_NOCLOSE);
	}

	if (!out) {
		BIO_printf(bio_err, "Error opening output file %s\n",
		    outfile ? outfile : "(stdout)");
		ERR_print_errors(bio_err);
		goto end;
	}

	if ((!!mac_name + !!keyfile + !!hmac_key) > 1) {

		BIO_printf(bio_err, "MAC and Signing key cannot both be specified\n");
		goto end;
	}
	if (keyfile) {
		if (want_pub)
			sigkey = load_pubkey(bio_err, keyfile, keyform, 0, NULL,
			    "key file");
		else
			sigkey = load_key(bio_err, keyfile, keyform, 0, passin,
			    "key file");
		if (!sigkey) {
			/*
			 * load_[pub]key() has already printed an appropriate
			 * message
			 */
			goto end;
		}
	}
	if (mac_name) {
		EVP_PKEY_CTX *mac_ctx = NULL;
		int r = 0;
		if (!init_gen_str(bio_err, &mac_ctx, mac_name, 0))
			goto mac_end;
		if (macopts) {
			char *macopt;
			for (i = 0; i < sk_OPENSSL_STRING_num(macopts); i++) {

				macopt = sk_OPENSSL_STRING_value(macopts, i);

				if (pkey_ctrl_string(mac_ctx, macopt) <= 0) {
					BIO_printf(bio_err,
					    "MAC parameter error \"%s\"\n",
					    macopt);
					ERR_print_errors(bio_err);
					goto mac_end;
				}
			}
		}
		if (EVP_PKEY_keygen(mac_ctx, &sigkey) <= 0) {
			BIO_puts(bio_err, "Error generating key\n");
			ERR_print_errors(bio_err);
			goto mac_end;
		}
		r = 1;
mac_end:
		if (mac_ctx)
			EVP_PKEY_CTX_free(mac_ctx);
		if (r == 0)
			goto end;
	}
	if (hmac_key) {
		sigkey = EVP_PKEY_new_mac_key(EVP_PKEY_HMAC, NULL,
		    (unsigned char *) hmac_key, -1);
		if (!sigkey)
			goto end;
	}
	if (sigkey) {
		EVP_MD_CTX *mctx = NULL;
		EVP_PKEY_CTX *pctx = NULL;
		int r;
		if (!BIO_get_md_ctx(bmd, &mctx)) {
			BIO_printf(bio_err, "Error getting context\n");
			ERR_print_errors(bio_err);
			goto end;
		}
		if (do_verify)
			r = EVP_DigestVerifyInit(mctx, &pctx, md, NULL, sigkey);

		else
			r = EVP_DigestSignInit(mctx, &pctx, md, NULL, sigkey);

		if (!r) {
			BIO_printf(bio_err, "Error setting context\n");
			ERR_print_errors(bio_err);
			goto end;
		}
		if (sigopts) {
			char *sigopt;
			for (i = 0; i < sk_OPENSSL_STRING_num(sigopts); i++) {

				sigopt = sk_OPENSSL_STRING_value(sigopts, i);

				if (pkey_ctrl_string(pctx, sigopt) <= 0) {
					BIO_printf(bio_err,
					    "parameter error \"%s\"\n",
					    sigopt);
					ERR_print_errors(bio_err);
					goto end;
				}
			}
		}
	}
	/* we use md as a filter, reading from 'in' */
	else {
		if (md == NULL)
			md = EVP_sha256();
		if (!BIO_set_md(bmd, md)) {
			BIO_printf(bio_err, "Error setting digest %s\n", pname);
			ERR_print_errors(bio_err);
			goto end;
		}
	}

	if (sigfile && sigkey) {
		BIO *sigbio;
		siglen = EVP_PKEY_size(sigkey);
		sigbuf = malloc(siglen);
		if (sigbuf == NULL) {
			BIO_printf(bio_err, "out of memory\n");
			ERR_print_errors(bio_err);
			goto end;
		}
		sigbio = BIO_new_file(sigfile, "rb");
		if (!sigbio) {
			BIO_printf(bio_err, "Error opening signature file %s\n",
			    sigfile);
			ERR_print_errors(bio_err);
			goto end;
		}
		siglen = BIO_read(sigbio, sigbuf, siglen);
		BIO_free(sigbio);
		if (siglen <= 0) {
			BIO_printf(bio_err, "Error reading signature file %s\n",
			    sigfile);
			ERR_print_errors(bio_err);
			goto end;
		}
	}
	inp = BIO_push(bmd, in);

	if (md == NULL) {
		EVP_MD_CTX *tctx;
		BIO_get_md_ctx(bmd, &tctx);
		md = EVP_MD_CTX_md(tctx);
	}
	if (argc == 0) {
		BIO_set_fp(in, stdin, BIO_NOCLOSE);
		err = do_fp(out, buf, inp, separator, out_bin, sigkey, sigbuf,

		    siglen, NULL, NULL, "stdin", bmd);
	} else {
		const char *md_name = NULL, *sig_name = NULL;
		if (!out_bin) {
			if (sigkey) {
				const EVP_PKEY_ASN1_METHOD *ameth;
				ameth = EVP_PKEY_get0_asn1(sigkey);
				if (ameth)
					EVP_PKEY_asn1_get0_info(NULL, NULL,
					    NULL, NULL, &sig_name, ameth);
			}
			md_name = EVP_MD_name(md);
		}
		err = 0;
		for (i = 0; i < argc; i++) {
			int r;
			if (BIO_read_filename(in, argv[i]) <= 0) {
				perror(argv[i]);
				err++;
				continue;
			} else {
				r = do_fp(out, buf, inp, separator, out_bin,
				    sigkey, sigbuf, siglen, sig_name, md_name,
				    argv[i], bmd);
			}
			if (r)
				err = r;
			(void) BIO_reset(bmd);
		}
	}

 end:
	freezero(buf, BUFSIZE);
	if (in != NULL)
		BIO_free(in);
	free(passin);
	BIO_free_all(out);
	EVP_PKEY_free(sigkey);
	if (sigopts)
		sk_OPENSSL_STRING_free(sigopts);
	if (macopts)
		sk_OPENSSL_STRING_free(macopts);
	free(sigbuf);
	if (bmd != NULL)
		BIO_free(bmd);

	return (err);
}

int
do_fp(BIO * out, unsigned char *buf, BIO * bp, int sep, int binout,
    EVP_PKEY * key, unsigned char *sigin, int siglen,







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>

















|


>
>
>
>
>
>
>
>
>
>
>
>
>
>
>






<





<
<
<
<
<
<



|
<
<
<













>
>
>
>



|

|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
|
|
<
<


|
>
|
>
|
<
<
<
<
<
<
<
<
<
<
|
<
<
<
<
<
<










|




|



|
|
|

|


|
|
|

|






|



>
|
>
|


|
|
|
|

|
|








|


|

|

|
>
|
>















|
<
|



|

|












|
|
>

|
>





|

|
>
|
>












|
|
|






|








|


|







|






|


|



|
>
|


|







|









|
|
|









<
|



<
|
<
|

<
|







73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333

334
335
336
337
338






339
340
341
342



343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365











































































366
367


368
369
370
371
372
373
374










375






376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464

465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590

591
592
593
594

595

596
597

598
599
600
601
602
603
604
605
#define BUFSIZE	1024*8

int
do_fp(BIO * out, unsigned char *buf, BIO * bp, int sep, int binout,
    EVP_PKEY * key, unsigned char *sigin, int siglen,
    const char *sig_name, const char *md_name,
    const char *file, BIO * bmd);

static struct {
	int argsused;
	int debug;
	int do_verify;
	char *hmac_key;
	char *keyfile;
	int keyform;
	const EVP_MD *m;
	char *mac_name;
	STACK_OF(OPENSSL_STRING) *macopts;
	const EVP_MD *md;
	int out_bin;
	char *outfile;
	char *passargin;
	int separator;
	char *sigfile;
	STACK_OF(OPENSSL_STRING) *sigopts;
	int want_pub;
} dgst_config;

static int
dgst_opt_macopt(char *arg)
{
	if (arg == NULL)
		return (1);

	if (dgst_config.macopts == NULL &&
	    (dgst_config.macopts = sk_OPENSSL_STRING_new_null()) == NULL)
		return (1);

	if (!sk_OPENSSL_STRING_push(dgst_config.macopts, arg))
		return (1);

	return (0);
}

static int
dgst_opt_md(int argc, char **argv, int *argsused)
{
	char *name = argv[0];

	if (*name++ != '-')
		return (1);

	if ((dgst_config.m = EVP_get_digestbyname(name)) == NULL)
		return (1);

	dgst_config.md = dgst_config.m;

	*argsused = 1;
	return (0);
}

static int
dgst_opt_prverify(char *arg)
{
	if (arg == NULL)
		return (1);

	dgst_config.keyfile = arg;
	dgst_config.do_verify = 1;
	return (0);
}

static int
dgst_opt_sigopt(char *arg)
{
	if (arg == NULL)
		return (1);

	if (dgst_config.sigopts == NULL &&
	    (dgst_config.sigopts = sk_OPENSSL_STRING_new_null()) == NULL)
		return (1);

	if (!sk_OPENSSL_STRING_push(dgst_config.sigopts, arg))
		return (1);

	return (0);
}

static int
dgst_opt_verify(char *arg)
{
	if (arg == NULL)
		return (1);

	dgst_config.keyfile = arg;
	dgst_config.want_pub = 1;
	dgst_config.do_verify = 1;
	return (0);
}

static const struct option dgst_options[] = {
	{
		.name = "binary",
		.desc = "Output the digest or signature in binary form",
		.type = OPTION_VALUE,
		.opt.value = &dgst_config.out_bin,
		.value = 1,
	},
	{
		.name = "c",
		.desc = "Print the digest in two-digit groups separated by colons",
		.type = OPTION_VALUE,
		.opt.value = &dgst_config.separator,
		.value = 1,
	},
	{
		.name = "d",
		.desc = "Print BIO debugging information",
		.type = OPTION_FLAG,
		.opt.flag = &dgst_config.debug,
	},
	{
		.name = "hex",
		.desc = "Output as hex dump",
		.type = OPTION_VALUE,
		.opt.value = &dgst_config.out_bin,
		.value = 0,
	},
	{
		.name = "hmac",
		.argname = "key",
		.desc = "Create hashed MAC with key",
		.type = OPTION_ARG,
		.opt.arg = &dgst_config.hmac_key,
	},
	{
		.name = "keyform",
		.argname = "format",
		.desc = "Key file format (PEM)",
		.type = OPTION_ARG_FORMAT,
		.opt.value = &dgst_config.keyform,
	},
	{
		.name = "mac",
		.argname = "algorithm",
		.desc = "Create MAC (not necessarily HMAC)",
		.type = OPTION_ARG,
		.opt.arg = &dgst_config.mac_name,
	},
	{
		.name = "macopt",
		.argname = "nm:v",
		.desc = "MAC algorithm parameters or key",
		.type = OPTION_ARG_FUNC,
		.opt.argfunc = dgst_opt_macopt,
	},
	{
		.name = "out",
		.argname = "file",
		.desc = "Output to file rather than stdout",
		.type = OPTION_ARG,
		.opt.arg = &dgst_config.outfile,
	},
	{
		.name = "passin",
		.argname = "arg",
		.desc = "Input file passphrase source",
		.type = OPTION_ARG,
		.opt.arg = &dgst_config.passargin,
	},
	{
		.name = "prverify",
		.argname = "file",
		.desc = "Verify a signature using private key in file",
		.type = OPTION_ARG_FUNC,
		.opt.argfunc = dgst_opt_prverify,
	},
	{
		.name = "r",
		.desc = "Output the digest in coreutils format",
		.type = OPTION_VALUE,
		.opt.value = &dgst_config.separator,
		.value = 2,
	},
	{
		.name = "sign",
		.argname = "file",
		.desc = "Sign digest using private key in file",
		.type = OPTION_ARG,
		.opt.arg = &dgst_config.keyfile,
	},
	{
		.name = "signature",
		.argname = "file",
		.desc = "Signature to verify",
		.type = OPTION_ARG,
		.opt.arg = &dgst_config.sigfile,
	},
	{
		.name = "sigopt",
		.argname = "nm:v",
		.desc = "Signature parameter",
		.type = OPTION_ARG_FUNC,
		.opt.argfunc = dgst_opt_sigopt,
	},
	{
		.name = "verify",
		.argname = "file",
		.desc = "Verify a signature using public key in file",
		.type = OPTION_ARG_FUNC,
		.opt.argfunc = dgst_opt_verify,
	},
	{
		.name = NULL,
		.desc = "",
		.type = OPTION_ARGV_FUNC,
		.opt.argvfunc = dgst_opt_md,
	},
	{ NULL },
};

static void
list_md_fn(const EVP_MD * m, const char *from, const char *to, void *arg)
{
	const char *mname;
	/* Skip aliases */
	if (!m)
		return;
	mname = OBJ_nid2ln(EVP_MD_type(m));
	/* Skip shortnames */
	if (strcmp(from, mname))
		return;
	/* Skip clones */
	if (EVP_MD_flags(m) & EVP_MD_FLAG_PKEY_DIGEST)
		return;
	if (strchr(mname, ' '))
		mname = EVP_MD_name(m);
	BIO_printf(arg, " -%-17s To use the %s message digest algorithm\n",
	    mname, mname);
}

static void
dgst_usage(void)
{
	fprintf(stderr, "usage: dgst [-cdr] [-binary] [-digest] [-hex]");
	fprintf(stderr, " [-hmac key] [-keyform fmt]\n");
	fprintf(stderr, "    [-mac algorithm] [-macopt nm:v] [-out file]");
	fprintf(stderr, " [-passin arg]\n");
	fprintf(stderr, "    [-prverify file] [-sign file]");
	fprintf(stderr, " [-signature file]\n");
	fprintf(stderr, "    [-sigopt nm:v] [-verify file] [file ...]\n\n");
	options_usage(dgst_options);
	EVP_MD_do_all_sorted(list_md_fn, bio_err);
	fprintf(stderr, "\n");
}

int
dgst_main(int argc, char **argv)
{
	unsigned char *buf = NULL;
	int i, err = 1;

	BIO *in = NULL, *inp;
	BIO *bmd = NULL;
	BIO *out = NULL;
#define PROG_NAME_SIZE  39
	char pname[PROG_NAME_SIZE + 1];






	EVP_PKEY *sigkey = NULL;
	unsigned char *sigbuf = NULL;
	int siglen = 0;
	char *passin = NULL;




	if (single_execution) {
		if (pledge("stdio cpath wpath rpath tty", NULL) == -1) {
			perror("pledge");
			exit(1);
		}
	}

	if ((buf = malloc(BUFSIZE)) == NULL) {
		BIO_printf(bio_err, "out of memory\n");
		goto end;
	}

	memset(&dgst_config, 0, sizeof(dgst_config));
	dgst_config.keyform = FORMAT_PEM;
	dgst_config.out_bin = -1;

	/* first check the program name */
	program_name(argv[0], pname, sizeof pname);

	dgst_config.md = EVP_get_digestbyname(pname);

	if (options_parse(argc, argv, dgst_options, NULL,











































































	    &dgst_config.argsused) != 0) {
		dgst_usage();


		goto end;
	}
	argc -= dgst_config.argsused;
	argv += dgst_config.argsused;

	if (dgst_config.do_verify && !dgst_config.sigfile) {
		BIO_printf(bio_err,










		    "No signature to verify: use the -signature option\n");






		goto end;
	}

	in = BIO_new(BIO_s_file());
	bmd = BIO_new(BIO_f_md());
	if (in == NULL || bmd == NULL) {
		ERR_print_errors(bio_err);
		goto end;
	}

	if (dgst_config.debug) {
		BIO_set_callback(in, BIO_debug_callback);
		/* needed for windows 3.1 */
		BIO_set_callback_arg(in, (char *) bio_err);
	}
	if (!app_passwd(bio_err, dgst_config.passargin, NULL, &passin, NULL)) {
		BIO_printf(bio_err, "Error getting password\n");
		goto end;
	}
	if (dgst_config.out_bin == -1) {
		if (dgst_config.keyfile)
			dgst_config.out_bin = 1;
		else
			dgst_config.out_bin = 0;
	}

	if (dgst_config.outfile) {
		if (dgst_config.out_bin)
			out = BIO_new_file(dgst_config.outfile, "wb");
		else
			out = BIO_new_file(dgst_config.outfile, "w");
	} else {
		out = BIO_new_fp(stdout, BIO_NOCLOSE);
	}

	if (!out) {
		BIO_printf(bio_err, "Error opening output file %s\n",
		    dgst_config.outfile ? dgst_config.outfile : "(stdout)");
		ERR_print_errors(bio_err);
		goto end;
	}
	if ((!!dgst_config.mac_name + !!dgst_config.keyfile +
	    !!dgst_config.hmac_key) > 1) {
		BIO_printf(bio_err,
		    "MAC and Signing key cannot both be specified\n");
		goto end;
	}
	if (dgst_config.keyfile) {
		if (dgst_config.want_pub)
			sigkey = load_pubkey(bio_err, dgst_config.keyfile,
			    dgst_config.keyform, 0, NULL, "key file");
		else
			sigkey = load_key(bio_err, dgst_config.keyfile,
			    dgst_config.keyform, 0, passin, "key file");
		if (!sigkey) {
			/*
			 * load_[pub]key() has already printed an appropriate
			 * message
			 */
			goto end;
		}
	}
	if (dgst_config.mac_name) {
		EVP_PKEY_CTX *mac_ctx = NULL;
		int r = 0;
		if (!init_gen_str(bio_err, &mac_ctx, dgst_config.mac_name, 0))
			goto mac_end;
		if (dgst_config.macopts) {
			char *macopt;
			for (i = 0; i < sk_OPENSSL_STRING_num(
			    dgst_config.macopts); i++) {
				macopt = sk_OPENSSL_STRING_value(
				    dgst_config.macopts, i);
				if (pkey_ctrl_string(mac_ctx, macopt) <= 0) {
					BIO_printf(bio_err,
					    "MAC parameter error \"%s\"\n",
					    macopt);
					ERR_print_errors(bio_err);
					goto mac_end;
				}
			}
		}
		if (EVP_PKEY_keygen(mac_ctx, &sigkey) <= 0) {
			BIO_puts(bio_err, "Error generating key\n");
			ERR_print_errors(bio_err);
			goto mac_end;
		}
		r = 1;
 mac_end:

		EVP_PKEY_CTX_free(mac_ctx);
		if (r == 0)
			goto end;
	}
	if (dgst_config.hmac_key) {
		sigkey = EVP_PKEY_new_mac_key(EVP_PKEY_HMAC, NULL,
		    (unsigned char *) dgst_config.hmac_key, -1);
		if (!sigkey)
			goto end;
	}
	if (sigkey) {
		EVP_MD_CTX *mctx = NULL;
		EVP_PKEY_CTX *pctx = NULL;
		int r;
		if (!BIO_get_md_ctx(bmd, &mctx)) {
			BIO_printf(bio_err, "Error getting context\n");
			ERR_print_errors(bio_err);
			goto end;
		}
		if (dgst_config.do_verify)
			r = EVP_DigestVerifyInit(mctx, &pctx, dgst_config.md,
			    NULL, sigkey);
		else
			r = EVP_DigestSignInit(mctx, &pctx, dgst_config.md,
			    NULL, sigkey);
		if (!r) {
			BIO_printf(bio_err, "Error setting context\n");
			ERR_print_errors(bio_err);
			goto end;
		}
		if (dgst_config.sigopts) {
			char *sigopt;
			for (i = 0; i < sk_OPENSSL_STRING_num(
			    dgst_config.sigopts); i++) {
				sigopt = sk_OPENSSL_STRING_value(
				    dgst_config.sigopts, i);
				if (pkey_ctrl_string(pctx, sigopt) <= 0) {
					BIO_printf(bio_err,
					    "parameter error \"%s\"\n",
					    sigopt);
					ERR_print_errors(bio_err);
					goto end;
				}
			}
		}
	}
	/* we use md as a filter, reading from 'in' */
	else {
		if (dgst_config.md == NULL)
			dgst_config.md = EVP_sha256();
		if (!BIO_set_md(bmd, dgst_config.md)) {
			BIO_printf(bio_err, "Error setting digest %s\n", pname);
			ERR_print_errors(bio_err);
			goto end;
		}
	}

	if (dgst_config.sigfile && sigkey) {
		BIO *sigbio;
		siglen = EVP_PKEY_size(sigkey);
		sigbuf = malloc(siglen);
		if (sigbuf == NULL) {
			BIO_printf(bio_err, "out of memory\n");
			ERR_print_errors(bio_err);
			goto end;
		}
		sigbio = BIO_new_file(dgst_config.sigfile, "rb");
		if (!sigbio) {
			BIO_printf(bio_err, "Error opening signature file %s\n",
			    dgst_config.sigfile);
			ERR_print_errors(bio_err);
			goto end;
		}
		siglen = BIO_read(sigbio, sigbuf, siglen);
		BIO_free(sigbio);
		if (siglen <= 0) {
			BIO_printf(bio_err, "Error reading signature file %s\n",
			    dgst_config.sigfile);
			ERR_print_errors(bio_err);
			goto end;
		}
	}
	inp = BIO_push(bmd, in);

	if (dgst_config.md == NULL) {
		EVP_MD_CTX *tctx;
		BIO_get_md_ctx(bmd, &tctx);
		dgst_config.md = EVP_MD_CTX_md(tctx);
	}
	if (argc == 0) {
		BIO_set_fp(in, stdin, BIO_NOCLOSE);
		err = do_fp(out, buf, inp, dgst_config.separator,
		    dgst_config.out_bin, sigkey, sigbuf, siglen, NULL, NULL,
		    "stdin", bmd);
	} else {
		const char *md_name = NULL, *sig_name = NULL;
		if (!dgst_config.out_bin) {
			if (sigkey) {
				const EVP_PKEY_ASN1_METHOD *ameth;
				ameth = EVP_PKEY_get0_asn1(sigkey);
				if (ameth)
					EVP_PKEY_asn1_get0_info(NULL, NULL,
					    NULL, NULL, &sig_name, ameth);
			}
			md_name = EVP_MD_name(dgst_config.md);
		}
		err = 0;
		for (i = 0; i < argc; i++) {
			int r;
			if (BIO_read_filename(in, argv[i]) <= 0) {
				perror(argv[i]);
				err++;
				continue;
			} else {
				r = do_fp(out, buf, inp, dgst_config.separator,
				    dgst_config.out_bin, sigkey, sigbuf, siglen,
				    sig_name, md_name, argv[i], bmd);
			}
			if (r)
				err = r;
			(void) BIO_reset(bmd);
		}
	}

 end:
	freezero(buf, BUFSIZE);

	BIO_free(in);
	free(passin);
	BIO_free_all(out);
	EVP_PKEY_free(sigkey);

	sk_OPENSSL_STRING_free(dgst_config.sigopts);

	sk_OPENSSL_STRING_free(dgst_config.macopts);
	free(sigbuf);

	BIO_free(bmd);

	return (err);
}

int
do_fp(BIO * out, unsigned char *buf, BIO * bp, int sep, int binout,
    EVP_PKEY * key, unsigned char *sigin, int siglen,
Changes to jni/libressl/apps/openssl/dh.c.
1
2
3
4
5
6
7
8
/* $OpenBSD: dh.c,v 1.11 2018/02/07 05:47:55 jsing Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
 * All rights reserved.
 *
 * This package is an SSL implementation written
 * by Eric Young (eay@cryptsoft.com).
 * The implementation was written so as to conform with Netscapes SSL.
 *
|







1
2
3
4
5
6
7
8
/* $OpenBSD: dh.c,v 1.12 2019/07/14 03:30:45 guenther Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
 * All rights reserved.
 *
 * This package is an SSL implementation written
 * by Eric Young (eay@cryptsoft.com).
 * The implementation was written so as to conform with Netscapes SSL.
 *
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
	int informat;
	int noout;
	char *outfile;
	int outformat;
	int text;
} dh_config;

static struct option dh_options[] = {
	{
		.name = "C",
		.desc = "Convert DH parameters into C code",
		.type = OPTION_FLAG,
		.opt.flag = &dh_config.C,
	},
	{







|







81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
	int informat;
	int noout;
	char *outfile;
	int outformat;
	int text;
} dh_config;

static const struct option dh_options[] = {
	{
		.name = "C",
		.desc = "Convert DH parameters into C code",
		.type = OPTION_FLAG,
		.opt.flag = &dh_config.C,
	},
	{
Changes to jni/libressl/apps/openssl/dhparam.c.
1
2
3
4
5
6
7
8
/* $OpenBSD: dhparam.c,v 1.11 2018/02/07 05:47:55 jsing Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
 * All rights reserved.
 *
 * This package is an SSL implementation written
 * by Eric Young (eay@cryptsoft.com).
 * The implementation was written so as to conform with Netscapes SSL.
 *
|







1
2
3
4
5
6
7
8
/* $OpenBSD: dhparam.c,v 1.12 2019/07/14 03:30:45 guenther Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
 * All rights reserved.
 *
 * This package is an SSL implementation written
 * by Eric Young (eay@cryptsoft.com).
 * The implementation was written so as to conform with Netscapes SSL.
 *
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
	int informat;
	int noout;
	char *outfile;
	int outformat;
	int text;
} dhparam_config;

struct option dhparam_options[] = {
	{
		.name = "2",
		.desc = "Generate DH parameters with a generator value of 2 "
		    "(default)",
		.type = OPTION_VALUE,
		.opt.value = &dhparam_config.g,
		.value = 2,







|







140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
	int informat;
	int noout;
	char *outfile;
	int outformat;
	int text;
} dhparam_config;

static const struct option dhparam_options[] = {
	{
		.name = "2",
		.desc = "Generate DH parameters with a generator value of 2 "
		    "(default)",
		.type = OPTION_VALUE,
		.opt.value = &dhparam_config.g,
		.value = 2,
Changes to jni/libressl/apps/openssl/dsa.c.
1
2
3
4
5
6
7
8
/* $OpenBSD: dsa.c,v 1.13 2019/02/09 15:49:21 inoguchi Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
 * All rights reserved.
 *
 * This package is an SSL implementation written
 * by Eric Young (eay@cryptsoft.com).
 * The implementation was written so as to conform with Netscapes SSL.
 *
|







1
2
3
4
5
6
7
8
/* $OpenBSD: dsa.c,v 1.15 2019/07/14 03:30:45 guenther Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
 * All rights reserved.
 *
 * This package is an SSL implementation written
 * by Eric Young (eay@cryptsoft.com).
 * The implementation was written so as to conform with Netscapes SSL.
 *
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123






124
125
126
127
128
129
130
		*argsused = 1;
		return (0);
	}

	return (1);
}

static struct option dsa_options[] = {
	{
		.name = "in",
		.argname = "file",
		.desc = "Input file (default stdin)",
		.type = OPTION_ARG,
		.opt.arg = &dsa_config.infile,
	},
	{
		.name = "inform",
		.argname = "format",
		.desc = "Input format (PEM (default) or any other supported"
		    " format)",
		.type = OPTION_ARG_FORMAT,
		.opt.value = &dsa_config.informat,
	},






	{
		.name = "noout",
		.desc = "No output",
		.type = OPTION_FLAG,
		.opt.flag = &dsa_config.noout,
	},
	{







|















>
>
>
>
>
>







101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
		*argsused = 1;
		return (0);
	}

	return (1);
}

static const struct option dsa_options[] = {
	{
		.name = "in",
		.argname = "file",
		.desc = "Input file (default stdin)",
		.type = OPTION_ARG,
		.opt.arg = &dsa_config.infile,
	},
	{
		.name = "inform",
		.argname = "format",
		.desc = "Input format (PEM (default) or any other supported"
		    " format)",
		.type = OPTION_ARG_FORMAT,
		.opt.value = &dsa_config.informat,
	},
	{
		.name = "modulus",
		.desc = "Print the DSA public value",
		.type = OPTION_FLAG,
		.opt.flag = &dsa_config.modulus,
	},
	{
		.name = "noout",
		.desc = "No output",
		.type = OPTION_FLAG,
		.opt.flag = &dsa_config.noout,
	},
	{
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219

static void
dsa_usage(void)
{
	int n = 0;

	fprintf(stderr,
	    "usage: dsa [-in file] [-inform format] [-noout]\n"
	    "    [-out file] [-outform format] [-passin src] [-passout src]\n"
	    "    [-pubin] [-pubout] [-pvk-none | -pvk-strong | -pvk-weak]\n"
	    "    [-text] [-ciphername]\n\n");
	options_usage(dsa_options);
	fprintf(stderr, "\n");

	fprintf(stderr, "Valid ciphername values:\n\n");







|







211
212
213
214
215
216
217
218
219
220
221
222
223
224
225

static void
dsa_usage(void)
{
	int n = 0;

	fprintf(stderr,
	    "usage: dsa [-in file] [-inform format] [-modulus] [-noout]\n"
	    "    [-out file] [-outform format] [-passin src] [-passout src]\n"
	    "    [-pubin] [-pubout] [-pvk-none | -pvk-strong | -pvk-weak]\n"
	    "    [-text] [-ciphername]\n\n");
	options_usage(dsa_options);
	fprintf(stderr, "\n");

	fprintf(stderr, "Valid ciphername values:\n\n");
Changes to jni/libressl/apps/openssl/dsaparam.c.
1
2
3
4
5
6
7
8
/* $OpenBSD: dsaparam.c,v 1.10 2018/02/07 05:47:55 jsing Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
 * All rights reserved.
 *
 * This package is an SSL implementation written
 * by Eric Young (eay@cryptsoft.com).
 * The implementation was written so as to conform with Netscapes SSL.
 *
|







1
2
3
4
5
6
7
8
/* $OpenBSD: dsaparam.c,v 1.11 2019/07/14 03:30:45 guenther Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
 * All rights reserved.
 *
 * This package is an SSL implementation written
 * by Eric Young (eay@cryptsoft.com).
 * The implementation was written so as to conform with Netscapes SSL.
 *
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
	int informat;
	int noout;
	char *outfile;
	int outformat;
	int text;
} dsaparam_config;

static struct option dsaparam_options[] = {
	{
		.name = "C",
		.desc = "Convert DSA parameters into C code",
		.type = OPTION_FLAG,
		.opt.flag = &dsaparam_config.C,
	},
	{







|







86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
	int informat;
	int noout;
	char *outfile;
	int outformat;
	int text;
} dsaparam_config;

static const struct option dsaparam_options[] = {
	{
		.name = "C",
		.desc = "Convert DSA parameters into C code",
		.type = OPTION_FLAG,
		.opt.flag = &dsaparam_config.C,
	},
	{
Changes to jni/libressl/apps/openssl/ec.c.
1
2
3
4
5
6
7
8
/* $OpenBSD: ec.c,v 1.13 2019/02/09 15:49:21 inoguchi Exp $ */
/*
 * Written by Nils Larsch for the OpenSSL project.
 */
/* ====================================================================
 * Copyright (c) 1998-2005 The OpenSSL Project.  All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
|







1
2
3
4
5
6
7
8
/* $OpenBSD: ec.c,v 1.14 2019/07/14 03:30:45 guenther Exp $ */
/*
 * Written by Nils Larsch for the OpenSSL project.
 */
/* ====================================================================
 * Copyright (c) 1998-2005 The OpenSSL Project.  All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
		return (1);
	}

	ec_config.new_asn1_flag = 1;
	return (0);
}

static struct option ec_options[] = {
	{
		.name = "conv_form",
		.argname = "form",
		.desc = "Specify the point conversion form (default"
		    " \"named_curve\")",
		.type = OPTION_ARG_FUNC,
		.opt.argfunc = ec_opt_form,







|







136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
		return (1);
	}

	ec_config.new_asn1_flag = 1;
	return (0);
}

static const struct option ec_options[] = {
	{
		.name = "conv_form",
		.argname = "form",
		.desc = "Specify the point conversion form (default"
		    " \"named_curve\")",
		.type = OPTION_ARG_FUNC,
		.opt.argfunc = ec_opt_form,
Changes to jni/libressl/apps/openssl/ecparam.c.
1
2
3
4
5
6
7
8
/* $OpenBSD: ecparam.c,v 1.17 2018/02/07 05:47:55 jsing Exp $ */
/*
 * Written by Nils Larsch for the OpenSSL project.
 */
/* ====================================================================
 * Copyright (c) 1998-2005 The OpenSSL Project.  All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
|







1
2
3
4
5
6
7
8
/* $OpenBSD: ecparam.c,v 1.18 2019/07/14 03:30:45 guenther Exp $ */
/*
 * Written by Nils Larsch for the OpenSSL project.
 */
/* ====================================================================
 * Copyright (c) 1998-2005 The OpenSSL Project.  All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
	else
		return (1);

	ecparam_config.new_asn1_flag = 1;
	return (0);
}

struct option ecparam_options[] = {
	{
		.name = "C",
		.desc = "Convert the EC parameters into C code",
		.type = OPTION_FLAG,
		.opt.flag = &ecparam_config.C,
	},
	{







|







135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
	else
		return (1);

	ecparam_config.new_asn1_flag = 1;
	return (0);
}

static const struct option ecparam_options[] = {
	{
		.name = "C",
		.desc = "Convert the EC parameters into C code",
		.type = OPTION_FLAG,
		.opt.flag = &ecparam_config.C,
	},
	{
Changes to jni/libressl/apps/openssl/enc.c.
1
2
3
4
5
6
7
8
/* $OpenBSD: enc.c,v 1.20 2019/04/01 16:06:54 jsing Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
 * All rights reserved.
 *
 * This package is an SSL implementation written
 * by Eric Young (eay@cryptsoft.com).
 * The implementation was written so as to conform with Netscapes SSL.
 *
|







1
2
3
4
5
6
7
8
/* $OpenBSD: enc.c,v 1.23 2019/07/25 11:42:12 bcook Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
 * All rights reserved.
 *
 * This package is an SSL implementation written
 * by Eric Young (eay@cryptsoft.com).
 * The implementation was written so as to conform with Netscapes SSL.
 *
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
		*argsused = 1;
		return (0);
	}

	return (1);
}

static struct option enc_options[] = {
	{
		.name = "A",
		.desc = "Process base64 data on one line (requires -a)",
		.type = OPTION_FLAG,
		.opt.flag = &enc_config.olb64,
	},
	{







|







120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
		*argsused = 1;
		return (0);
	}

	return (1);
}

static const struct option enc_options[] = {
	{
		.name = "A",
		.desc = "Process base64 data on one line (requires -a)",
		.type = OPTION_FLAG,
		.opt.flag = &enc_config.olb64,
	},
	{
628
629
630
631
632
633
634
635

636
637
638
639
640
641
642
					strlen(enc_config.keystr), sptr, islen,
					enc_config.iter, dgst, iklen+ivlen, tmpkeyiv)) {
					BIO_printf(bio_err, "PKCS5_PBKDF2_HMAC failed\n");
					goto end;
				}
				/* split and move data back to global buffer */
				memcpy(key, tmpkeyiv, iklen);
				memcpy(iv, tmpkeyiv+iklen, ivlen);

			} else {
				EVP_BytesToKey(enc_config.cipher, dgst, sptr,
				    (unsigned char *)enc_config.keystr,
				    strlen(enc_config.keystr), 1, key, iv);
			}

			/*







|
>







628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
					strlen(enc_config.keystr), sptr, islen,
					enc_config.iter, dgst, iklen+ivlen, tmpkeyiv)) {
					BIO_printf(bio_err, "PKCS5_PBKDF2_HMAC failed\n");
					goto end;
				}
				/* split and move data back to global buffer */
				memcpy(key, tmpkeyiv, iklen);
				memcpy(iv, tmpkeyiv + iklen, ivlen);
				explicit_bzero(tmpkeyiv, sizeof tmpkeyiv);
			} else {
				EVP_BytesToKey(enc_config.cipher, dgst, sptr,
				    (unsigned char *)enc_config.keystr,
				    strlen(enc_config.keystr), 1, key, iv);
			}

			/*
Changes to jni/libressl/apps/openssl/errstr.c.
1
2
3
4
5
6
7
8
/* $OpenBSD: errstr.c,v 1.6 2015/10/17 15:00:11 doug Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
 * All rights reserved.
 *
 * This package is an SSL implementation written
 * by Eric Young (eay@cryptsoft.com).
 * The implementation was written so as to conform with Netscapes SSL.
 *
|







1
2
3
4
5
6
7
8
/* $OpenBSD: errstr.c,v 1.7 2019/07/14 03:30:45 guenther Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
 * All rights reserved.
 *
 * This package is an SSL implementation written
 * by Eric Young (eay@cryptsoft.com).
 * The implementation was written so as to conform with Netscapes SSL.
 *
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
#include <openssl/lhash.h>
#include <openssl/ssl.h>

struct {
	int stats;
} errstr_config;

struct option errstr_options[] = {
	{
		.name = "stats",
		.desc = "Print debugging statistics for the hash table",
		.type = OPTION_FLAG,
		.opt.flag = &errstr_config.stats,
	},
	{ NULL },







|







68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
#include <openssl/lhash.h>
#include <openssl/ssl.h>

struct {
	int stats;
} errstr_config;

static const struct option errstr_options[] = {
	{
		.name = "stats",
		.desc = "Print debugging statistics for the hash table",
		.type = OPTION_FLAG,
		.opt.flag = &errstr_config.stats,
	},
	{ NULL },
Changes to jni/libressl/apps/openssl/gendh.c.
1
2
3
4
5
6
7
8
/* $OpenBSD: gendh.c,v 1.10 2018/02/07 05:47:55 jsing Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
 * All rights reserved.
 *
 * This package is an SSL implementation written
 * by Eric Young (eay@cryptsoft.com).
 * The implementation was written so as to conform with Netscapes SSL.
 *
|







1
2
3
4
5
6
7
8
/* $OpenBSD: gendh.c,v 1.11 2019/07/14 03:30:45 guenther Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
 * All rights reserved.
 *
 * This package is an SSL implementation written
 * by Eric Young (eay@cryptsoft.com).
 * The implementation was written so as to conform with Netscapes SSL.
 *
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
static int dh_cb(int p, int n, BN_GENCB * cb);

static struct {
	int g;
	char *outfile;
} gendh_config;

static struct option gendh_options[] = {
	{
		.name = "2",
		.desc = "Generate DH parameters with a generator value of 2 "
		    "(default)",
		.type = OPTION_VALUE,
		.value = 2,
		.opt.value = &gendh_config.g,







|







87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
static int dh_cb(int p, int n, BN_GENCB * cb);

static struct {
	int g;
	char *outfile;
} gendh_config;

static const struct option gendh_options[] = {
	{
		.name = "2",
		.desc = "Generate DH parameters with a generator value of 2 "
		    "(default)",
		.type = OPTION_VALUE,
		.value = 2,
		.opt.value = &gendh_config.g,
Changes to jni/libressl/apps/openssl/gendsa.c.
1
2
3
4
5
6
7
8
/* $OpenBSD: gendsa.c,v 1.10 2018/02/07 05:47:55 jsing Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
 * All rights reserved.
 *
 * This package is an SSL implementation written
 * by Eric Young (eay@cryptsoft.com).
 * The implementation was written so as to conform with Netscapes SSL.
 *
|







1
2
3
4
5
6
7
8
/* $OpenBSD: gendsa.c,v 1.14 2019/07/24 14:23:25 inoguchi Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
 * All rights reserved.
 *
 * This package is an SSL implementation written
 * by Eric Young (eay@cryptsoft.com).
 * The implementation was written so as to conform with Netscapes SSL.
 *
69
70
71
72
73
74
75
76


















































































































































77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168

169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202

203
204
205
206
207
208
209
210
211
212
213
214

#include <openssl/bio.h>
#include <openssl/bn.h>
#include <openssl/dsa.h>
#include <openssl/err.h>
#include <openssl/pem.h>
#include <openssl/x509.h>



















































































































































int
gendsa_main(int argc, char **argv)
{
	DSA *dsa = NULL;
	int ret = 1;
	char *outfile = NULL;
	char *dsaparams = NULL;
	char *passargout = NULL, *passout = NULL;
	BIO *out = NULL, *in = NULL;
	const EVP_CIPHER *enc = NULL;

	if (single_execution) {
		if (pledge("stdio cpath wpath rpath tty", NULL) == -1) {
			perror("pledge");
			exit(1);
		}
	}

	argv++;
	argc--;
	for (;;) {
		if (argc <= 0)
			break;
		if (strcmp(*argv, "-out") == 0) {
			if (--argc < 1)
				goto bad;
			outfile = *(++argv);
		} else if (strcmp(*argv, "-passout") == 0) {
			if (--argc < 1)
				goto bad;
			passargout = *(++argv);
		}
		else if (strcmp(*argv, "-") == 0)
			goto bad;
#ifndef OPENSSL_NO_DES
		else if (strcmp(*argv, "-des") == 0)
			enc = EVP_des_cbc();
		else if (strcmp(*argv, "-des3") == 0)
			enc = EVP_des_ede3_cbc();
#endif
#ifndef OPENSSL_NO_IDEA
		else if (strcmp(*argv, "-idea") == 0)
			enc = EVP_idea_cbc();
#endif
#ifndef OPENSSL_NO_AES
		else if (strcmp(*argv, "-aes128") == 0)
			enc = EVP_aes_128_cbc();
		else if (strcmp(*argv, "-aes192") == 0)
			enc = EVP_aes_192_cbc();
		else if (strcmp(*argv, "-aes256") == 0)
			enc = EVP_aes_256_cbc();
#endif
#ifndef OPENSSL_NO_CAMELLIA
		else if (strcmp(*argv, "-camellia128") == 0)
			enc = EVP_camellia_128_cbc();
		else if (strcmp(*argv, "-camellia192") == 0)
			enc = EVP_camellia_192_cbc();
		else if (strcmp(*argv, "-camellia256") == 0)
			enc = EVP_camellia_256_cbc();
#endif
		else if (**argv != '-' && dsaparams == NULL) {
			dsaparams = *argv;
		} else
			goto bad;
		argv++;
		argc--;
	}

	if (dsaparams == NULL) {
 bad:
		BIO_printf(bio_err, "usage: gendsa [args] dsaparam-file\n");
		BIO_printf(bio_err, " -out file - output the key to 'file'\n");
#ifndef OPENSSL_NO_DES
		BIO_printf(bio_err, " -des      - encrypt the generated key with DES in cbc mode\n");
		BIO_printf(bio_err, " -des3     - encrypt the generated key with DES in ede cbc mode (168 bit key)\n");
#endif
#ifndef OPENSSL_NO_IDEA
		BIO_printf(bio_err, " -idea     - encrypt the generated key with IDEA in cbc mode\n");
#endif
#ifndef OPENSSL_NO_AES
		BIO_printf(bio_err, " -aes128, -aes192, -aes256\n");
		BIO_printf(bio_err, "                 encrypt PEM output with cbc aes\n");
#endif
#ifndef OPENSSL_NO_CAMELLIA
		BIO_printf(bio_err, " -camellia128, -camellia192, -camellia256\n");
		BIO_printf(bio_err, "                 encrypt PEM output with cbc camellia\n");
#endif
		BIO_printf(bio_err, " dsaparam-file\n");
		BIO_printf(bio_err, "           - a DSA parameter file as generated by the dsaparam command\n");
		goto end;
	}
	if (!app_passwd(bio_err, NULL, passargout, NULL, &passout)) {

		BIO_printf(bio_err, "Error getting password\n");
		goto end;
	}
	in = BIO_new(BIO_s_file());
	if (!(BIO_read_filename(in, dsaparams))) {
		perror(dsaparams);
		goto end;
	}
	if ((dsa = PEM_read_bio_DSAparams(in, NULL, NULL, NULL)) == NULL) {
		BIO_printf(bio_err, "unable to load DSA parameter file\n");
		goto end;
	}
	BIO_free(in);
	in = NULL;

	out = BIO_new(BIO_s_file());
	if (out == NULL)
		goto end;

	if (outfile == NULL) {
		BIO_set_fp(out, stdout, BIO_NOCLOSE);
	} else {
		if (BIO_write_filename(out, outfile) <= 0) {
			perror(outfile);
			goto end;
		}
	}

	BIO_printf(bio_err, "Generating DSA key, %d bits\n",
	    BN_num_bits(dsa->p));
	if (!DSA_generate_key(dsa))
		goto end;

	if (!PEM_write_bio_DSAPrivateKey(out, dsa, enc, NULL, 0, NULL, passout))

		goto end;
	ret = 0;
 end:
	if (ret != 0)
		ERR_print_errors(bio_err);
	BIO_free(in);
	BIO_free_all(out);
	DSA_free(dsa);
	free(passout);

	return (ret);
}








>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>





<

|

<








|
<
<
<
<
<
<
<
<
<
<
<
<
|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
|
|
|
<
<



<
<
<
<
<
<
|
<
<
<
<
<
<
<
<
<
<
<
<
<


|
>



















|


|
|









|
>












69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227

228
229
230

231
232
233
234
235
236
237
238
239












240





























241
242
243


244
245
246






247













248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298

#include <openssl/bio.h>
#include <openssl/bn.h>
#include <openssl/dsa.h>
#include <openssl/err.h>
#include <openssl/pem.h>
#include <openssl/x509.h>

static struct {
	const EVP_CIPHER *enc;
	char *outfile;
	char *passargout;
} gendsa_config;

static const EVP_CIPHER *get_cipher_by_name(char *name)
{
	if (name == NULL || strcmp(name, "") == 0)
		return (NULL);
#ifndef OPENSSL_NO_AES
	else if (strcmp(name, "aes128") == 0)
		return EVP_aes_128_cbc();
	else if (strcmp(name, "aes192") == 0)
		return EVP_aes_192_cbc();
	else if (strcmp(name, "aes256") == 0)
		return EVP_aes_256_cbc();
#endif
#ifndef OPENSSL_NO_CAMELLIA
	else if (strcmp(name, "camellia128") == 0)
		return EVP_camellia_128_cbc();
	else if (strcmp(name, "camellia192") == 0)
		return EVP_camellia_192_cbc();
	else if (strcmp(name, "camellia256") == 0)
		return EVP_camellia_256_cbc();
#endif
#ifndef OPENSSL_NO_DES
	else if (strcmp(name, "des") == 0)
		return EVP_des_cbc();
	else if (strcmp(name, "des3") == 0)
		return EVP_des_ede3_cbc();
#endif
#ifndef OPENSSL_NO_IDEA
	else if (strcmp(name, "idea") == 0)
		return EVP_idea_cbc();
#endif
	else
		return (NULL);
}

static int
set_enc(int argc, char **argv, int *argsused)
{
	char *name = argv[0];

	if (*name++ != '-')
		return (1);

	if ((gendsa_config.enc = get_cipher_by_name(name)) == NULL)
		return (1);

	*argsused = 1;
	return (0);
}

static const struct option gendsa_options[] = {
#ifndef OPENSSL_NO_AES
	{
		.name = "aes128",
		.desc = "Encrypt PEM output with CBC AES",
		.type = OPTION_ARGV_FUNC,
		.opt.argvfunc = set_enc,
	},
	{
		.name = "aes192",
		.desc = "Encrypt PEM output with CBC AES",
		.type = OPTION_ARGV_FUNC,
		.opt.argvfunc = set_enc,
	},
	{
		.name = "aes256",
		.desc = "Encrypt PEM output with CBC AES",
		.type = OPTION_ARGV_FUNC,
		.opt.argvfunc = set_enc,
	},
#endif
#ifndef OPENSSL_NO_CAMELLIA
	{
		.name = "camellia128",
		.desc = "Encrypt PEM output with CBC Camellia",
		.type = OPTION_ARGV_FUNC,
		.opt.argvfunc = set_enc,
	},
	{
		.name = "camellia192",
		.desc = "Encrypt PEM output with CBC Camellia",
		.type = OPTION_ARGV_FUNC,
		.opt.argvfunc = set_enc,
	},
	{
		.name = "camellia256",
		.desc = "Encrypt PEM output with CBC Camellia",
		.type = OPTION_ARGV_FUNC,
		.opt.argvfunc = set_enc,
	},
#endif
#ifndef OPENSSL_NO_DES
	{
		.name = "des",
		.desc = "Encrypt the generated key with DES in CBC mode",
		.type = OPTION_ARGV_FUNC,
		.opt.argvfunc = set_enc,
	},
	{
		.name = "des3",
		.desc = "Encrypt the generated key with DES in EDE CBC mode (168 bit key)",
		.type = OPTION_ARGV_FUNC,
		.opt.argvfunc = set_enc,
	},
#endif
#ifndef OPENSSL_NO_IDEA
	{
		.name = "idea",
		.desc = "Encrypt the generated key with IDEA in CBC mode",
		.type = OPTION_ARGV_FUNC,
		.opt.argvfunc = set_enc,
	},
#endif
	{
		.name = "out",
		.argname = "file",
		.desc = "Output the key to 'file'",
		.type = OPTION_ARG,
		.opt.arg = &gendsa_config.outfile,
	},
	{
		.name = "passout",
		.argname = "src",
		.desc = "Output file passphrase source",
		.type = OPTION_ARG,
		.opt.arg = &gendsa_config.passargout,
	},
	{ NULL },
};

static void
gendsa_usage(void)
{
	fprintf(stderr, "usage: gendsa [-aes128 | -aes192 | -aes256 |\n");
	fprintf(stderr, "    -camellia128 | -camellia192 | -camellia256 |\n");
	fprintf(stderr, "    -des | -des3 | -idea] [-out file] [-passout src]");
	fprintf(stderr, " paramfile\n\n");
	options_usage(gendsa_options);
	fprintf(stderr, "\n");
}

int
gendsa_main(int argc, char **argv)
{
	DSA *dsa = NULL;
	int ret = 1;

	char *dsaparams = NULL;
	char *passout = NULL;
	BIO *out = NULL, *in = NULL;


	if (single_execution) {
		if (pledge("stdio cpath wpath rpath tty", NULL) == -1) {
			perror("pledge");
			exit(1);
		}
	}

	memset(&gendsa_config, 0, sizeof(gendsa_config));










































	if (options_parse(argc, argv, gendsa_options, &dsaparams, NULL) != 0) {
		gendsa_usage();
		goto end;


	}

	if (dsaparams == NULL) {






		gendsa_usage();













		goto end;
	}
	if (!app_passwd(bio_err, NULL, gendsa_config.passargout, NULL,
	    &passout)) {
		BIO_printf(bio_err, "Error getting password\n");
		goto end;
	}
	in = BIO_new(BIO_s_file());
	if (!(BIO_read_filename(in, dsaparams))) {
		perror(dsaparams);
		goto end;
	}
	if ((dsa = PEM_read_bio_DSAparams(in, NULL, NULL, NULL)) == NULL) {
		BIO_printf(bio_err, "unable to load DSA parameter file\n");
		goto end;
	}
	BIO_free(in);
	in = NULL;

	out = BIO_new(BIO_s_file());
	if (out == NULL)
		goto end;

	if (gendsa_config.outfile == NULL) {
		BIO_set_fp(out, stdout, BIO_NOCLOSE);
	} else {
		if (BIO_write_filename(out, gendsa_config.outfile) <= 0) {
			perror(gendsa_config.outfile);
			goto end;
		}
	}

	BIO_printf(bio_err, "Generating DSA key, %d bits\n",
	    BN_num_bits(dsa->p));
	if (!DSA_generate_key(dsa))
		goto end;

	if (!PEM_write_bio_DSAPrivateKey(out, dsa, gendsa_config.enc, NULL, 0,
	    NULL, passout))
		goto end;
	ret = 0;
 end:
	if (ret != 0)
		ERR_print_errors(bio_err);
	BIO_free(in);
	BIO_free_all(out);
	DSA_free(dsa);
	free(passout);

	return (ret);
}
Changes to jni/libressl/apps/openssl/genpkey.c.
1
2
3
4
5
6
7
8
/* $OpenBSD: genpkey.c,v 1.12 2018/02/08 11:17:44 jsing Exp $ */
/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
 * project 2006
 */
/* ====================================================================
 * Copyright (c) 2006 The OpenSSL Project.  All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
|







1
2
3
4
5
6
7
8
/* $OpenBSD: genpkey.c,v 1.13 2019/07/14 03:30:46 guenther Exp $ */
/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
 * project 2006
 */
/* ====================================================================
 * Copyright (c) 2006 The OpenSSL Project.  All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
		ERR_print_errors(bio_err);
		return (1);
	}

	return (0);
}

struct option genpkey_options[] = {
	{
		.name = "algorithm",
		.argname = "name",
		.desc = "Public key algorithm to use (must precede -pkeyopt)",
		.type = OPTION_ARG_FUNC,
		.opt.argfunc = genpkey_opt_algorithm,
	},







|







137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
		ERR_print_errors(bio_err);
		return (1);
	}

	return (0);
}

static const struct option genpkey_options[] = {
	{
		.name = "algorithm",
		.argname = "name",
		.desc = "Public key algorithm to use (must precede -pkeyopt)",
		.type = OPTION_ARG_FUNC,
		.opt.argfunc = genpkey_opt_algorithm,
	},
Changes to jni/libressl/apps/openssl/genrsa.c.
1
2
3
4
5
6
7
8
/* $OpenBSD: genrsa.c,v 1.12 2018/12/09 19:30:34 tobias Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
 * All rights reserved.
 *
 * This package is an SSL implementation written
 * by Eric Young (eay@cryptsoft.com).
 * The implementation was written so as to conform with Netscapes SSL.
 *
|







1
2
3
4
5
6
7
8
/* $OpenBSD: genrsa.c,v 1.17 2019/07/24 14:23:25 inoguchi Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
 * All rights reserved.
 *
 * This package is an SSL implementation written
 * by Eric Young (eay@cryptsoft.com).
 * The implementation was written so as to conform with Netscapes SSL.
 *
80
81
82
83
84
85
86






















































































































































































87
88
89
90
91
92
93

94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136

137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166


167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192

193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211

212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
#include <openssl/pem.h>
#include <openssl/rsa.h>
#include <openssl/x509.h>

#define DEFBITS	2048

static int genrsa_cb(int p, int n, BN_GENCB * cb);























































































































































































int
genrsa_main(int argc, char **argv)
{
	BN_GENCB cb;
	int ret = 1;
	int i, num = DEFBITS;

	long l;
	const EVP_CIPHER *enc = NULL;
	unsigned long f4 = RSA_F4;
	char *outfile = NULL;
	char *passargout = NULL, *passout = NULL;
	BIO *out = NULL;
	BIGNUM *bn = BN_new();
	RSA *rsa = NULL;

	if (single_execution) {
		if (pledge("stdio cpath wpath rpath tty", NULL) == -1) {
			perror("pledge");
			exit(1);
		}
	}

	if (!bn)
		goto err;

	BN_GENCB_set(&cb, genrsa_cb, bio_err);

	if ((out = BIO_new(BIO_s_file())) == NULL) {
		BIO_printf(bio_err, "unable to create BIO for output\n");
		goto err;
	}
	argv++;
	argc--;
	for (;;) {
		if (argc <= 0)
			break;
		if (strcmp(*argv, "-out") == 0) {
			if (--argc < 1)
				goto bad;
			outfile = *(++argv);
		} else if (strcmp(*argv, "-3") == 0)
			f4 = 3;
		else if (strcmp(*argv, "-F4") == 0 || strcmp(*argv, "-f4") == 0)
			f4 = RSA_F4;
#ifndef OPENSSL_NO_DES
		else if (strcmp(*argv, "-des") == 0)
			enc = EVP_des_cbc();
		else if (strcmp(*argv, "-des3") == 0)
			enc = EVP_des_ede3_cbc();

#endif
#ifndef OPENSSL_NO_IDEA
		else if (strcmp(*argv, "-idea") == 0)
			enc = EVP_idea_cbc();
#endif
#ifndef OPENSSL_NO_AES
		else if (strcmp(*argv, "-aes128") == 0)
			enc = EVP_aes_128_cbc();
		else if (strcmp(*argv, "-aes192") == 0)
			enc = EVP_aes_192_cbc();
		else if (strcmp(*argv, "-aes256") == 0)
			enc = EVP_aes_256_cbc();
#endif
#ifndef OPENSSL_NO_CAMELLIA
		else if (strcmp(*argv, "-camellia128") == 0)
			enc = EVP_camellia_128_cbc();
		else if (strcmp(*argv, "-camellia192") == 0)
			enc = EVP_camellia_192_cbc();
		else if (strcmp(*argv, "-camellia256") == 0)
			enc = EVP_camellia_256_cbc();
#endif
		else if (strcmp(*argv, "-passout") == 0) {
			if (--argc < 1)
				goto bad;
			passargout = *(++argv);
		} else
			break;
		argv++;
		argc--;
	}


	if ((argc >= 1) && ((sscanf(*argv, "%d", &num) == 0) || (num < 0))) {
 bad:
		BIO_printf(bio_err, "usage: genrsa [args] [numbits]\n");
#ifndef OPENSSL_NO_DES
		BIO_printf(bio_err, " -des            encrypt the generated key with DES in cbc mode\n");
		BIO_printf(bio_err, " -des3           encrypt the generated key with DES in ede cbc mode (168 bit key)\n");
#endif
#ifndef OPENSSL_NO_IDEA
		BIO_printf(bio_err, " -idea           encrypt the generated key with IDEA in cbc mode\n");
#endif
#ifndef OPENSSL_NO_AES
		BIO_printf(bio_err, " -aes128, -aes192, -aes256\n");
		BIO_printf(bio_err, "                 encrypt PEM output with cbc aes\n");
#endif
#ifndef OPENSSL_NO_CAMELLIA
		BIO_printf(bio_err, " -camellia128, -camellia192, -camellia256\n");
		BIO_printf(bio_err, "                 encrypt PEM output with cbc camellia\n");
#endif
		BIO_printf(bio_err, " -out file       output the key to 'file\n");
		BIO_printf(bio_err, " -passout arg    output file pass phrase source\n");
		BIO_printf(bio_err, " -f4             use F4 (0x10001) for the E value\n");
		BIO_printf(bio_err, " -3              use 3 for the E value\n");
		goto err;
	}

	if (!app_passwd(bio_err, NULL, passargout, NULL, &passout)) {

		BIO_printf(bio_err, "Error getting password\n");
		goto err;
	}

	if (outfile == NULL) {
		BIO_set_fp(out, stdout, BIO_NOCLOSE);
	} else {
		if (BIO_write_filename(out, outfile) <= 0) {
			perror(outfile);
			goto err;
		}
	}

	BIO_printf(bio_err, "Generating RSA private key, %d bit long modulus\n",
	    num);
	rsa = RSA_new();
	if (!rsa)
		goto err;


	if (!BN_set_word(bn, f4) || !RSA_generate_key_ex(rsa, num, bn, &cb))
		goto err;

	/*
	 * We need to do the following for when the base number size is <
	 * long, esp windows 3.1 :-(.
	 */
	l = 0L;
	for (i = 0; i < rsa->e->top; i++) {
#ifndef _LP64
		l <<= BN_BITS4;
		l <<= BN_BITS4;
#endif
		l += rsa->e->d[i];
	}
	BIO_printf(bio_err, "e is %ld (0x%lX)\n", l, l);
	{
		PW_CB_DATA cb_data;
		cb_data.password = passout;
		cb_data.prompt_info = outfile;
		if (!PEM_write_bio_RSAPrivateKey(out, rsa, enc, NULL, 0,
			password_callback, &cb_data))
			goto err;
	}

	ret = 0;
 err:
	BN_free(bn);
	RSA_free(rsa);







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







>

<
<
<
|




















|
|
<
<
<
<
<
<
<
<
<
<
|
|
<
<
<
<
>
|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
|
<
<
<
<
<

>
>
|
<
<
<
<
<
|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<



|
>




|


|
|










>
|


















|
|
|







80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277



278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300










301
302




303
304






















305





306
307
308
309





310















311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
#include <openssl/pem.h>
#include <openssl/rsa.h>
#include <openssl/x509.h>

#define DEFBITS	2048

static int genrsa_cb(int p, int n, BN_GENCB * cb);

static struct {
	const EVP_CIPHER *enc;
	unsigned long f4;
	char *outfile;
	char *passargout;
} genrsa_config;

static int
set_public_exponent(int argc, char **argv, int *argsused)
{
	char *option = argv[0];

	if (strcmp(option, "-3") == 0)
		genrsa_config.f4 = 3;
	else if (strcmp(option, "-f4") == 0 || strcmp(option, "-F4") == 0)
		genrsa_config.f4 = RSA_F4;
	else
		return (1);

	*argsused = 1;
	return (0);
}

static const EVP_CIPHER *get_cipher_by_name(char *name)
{
	if (name == NULL || strcmp(name, "") == 0)
		return (NULL);
#ifndef OPENSSL_NO_AES
	else if (strcmp(name, "aes128") == 0)
		return EVP_aes_128_cbc();
	else if (strcmp(name, "aes192") == 0)
		return EVP_aes_192_cbc();
	else if (strcmp(name, "aes256") == 0)
		return EVP_aes_256_cbc();
#endif
#ifndef OPENSSL_NO_CAMELLIA
	else if (strcmp(name, "camellia128") == 0)
		return EVP_camellia_128_cbc();
	else if (strcmp(name, "camellia192") == 0)
		return EVP_camellia_192_cbc();
	else if (strcmp(name, "camellia256") == 0)
		return EVP_camellia_256_cbc();
#endif
#ifndef OPENSSL_NO_DES
	else if (strcmp(name, "des") == 0)
		return EVP_des_cbc();
	else if (strcmp(name, "des3") == 0)
		return EVP_des_ede3_cbc();
#endif
#ifndef OPENSSL_NO_IDEA
	else if (strcmp(name, "idea") == 0)
		return EVP_idea_cbc();
#endif
	else
		return (NULL);
}

static int
set_enc(int argc, char **argv, int *argsused)
{
	char *name = argv[0];

	if (*name++ != '-')
		return (1);

	if ((genrsa_config.enc = get_cipher_by_name(name)) == NULL)
		return (1);

	*argsused = 1;
	return (0);
}

static const struct option genrsa_options[] = {
	{
		.name = "3",
		.desc = "Use 3 for the E value",
		.type = OPTION_ARGV_FUNC,
		.opt.argvfunc = set_public_exponent,
	},
	{
		.name = "f4",
		.desc = "Use F4 (0x10001) for the E value",
		.type = OPTION_ARGV_FUNC,
		.opt.argvfunc = set_public_exponent,
	},
	{
		.name = "F4",
		.desc = "Use F4 (0x10001) for the E value",
		.type = OPTION_ARGV_FUNC,
		.opt.argvfunc = set_public_exponent,
	},
#ifndef OPENSSL_NO_AES
	{
		.name = "aes128",
		.desc = "Encrypt PEM output with CBC AES",
		.type = OPTION_ARGV_FUNC,
		.opt.argvfunc = set_enc,
	},
	{
		.name = "aes192",
		.desc = "Encrypt PEM output with CBC AES",
		.type = OPTION_ARGV_FUNC,
		.opt.argvfunc = set_enc,
	},
	{
		.name = "aes256",
		.desc = "Encrypt PEM output with CBC AES",
		.type = OPTION_ARGV_FUNC,
		.opt.argvfunc = set_enc,
	},
#endif
#ifndef OPENSSL_NO_CAMELLIA
	{
		.name = "camellia128",
		.desc = "Encrypt PEM output with CBC Camellia",
		.type = OPTION_ARGV_FUNC,
		.opt.argvfunc = set_enc,
	},
	{
		.name = "camellia192",
		.desc = "Encrypt PEM output with CBC Camellia",
		.type = OPTION_ARGV_FUNC,
		.opt.argvfunc = set_enc,
	},
	{
		.name = "camellia256",
		.desc = "Encrypt PEM output with CBC Camellia",
		.type = OPTION_ARGV_FUNC,
		.opt.argvfunc = set_enc,
	},
#endif
#ifndef OPENSSL_NO_DES
	{
		.name = "des",
		.desc = "Encrypt the generated key with DES in CBC mode",
		.type = OPTION_ARGV_FUNC,
		.opt.argvfunc = set_enc,
	},
	{
		.name = "des3",
		.desc = "Encrypt the generated key with DES in EDE CBC mode (168 bit key)",
		.type = OPTION_ARGV_FUNC,
		.opt.argvfunc = set_enc,
	},
#endif
#ifndef OPENSSL_NO_IDEA
	{
		.name = "idea",
		.desc = "Encrypt the generated key with IDEA in CBC mode",
		.type = OPTION_ARGV_FUNC,
		.opt.argvfunc = set_enc,
	},
#endif
	{
		.name = "out",
		.argname = "file",
		.desc = "Output the key to 'file'",
		.type = OPTION_ARG,
		.opt.arg = &genrsa_config.outfile,
	},
	{
		.name = "passout",
		.argname = "arg",
		.desc = "Output file passphrase source",
		.type = OPTION_ARG,
		.opt.arg = &genrsa_config.passargout,
	},
	{ NULL },
};

static void
genrsa_usage(void)
{
	fprintf(stderr, "usage: genrsa [-3 | -f4] [-aes128 | -aes192 |");
	fprintf(stderr, " -aes256 |\n");
	fprintf(stderr, "    -camellia128 | -camellia192 | -camellia256 |");
	fprintf(stderr, " -des | -des3 | -idea]\n");
	fprintf(stderr, "    [-out file] [-passout arg] [numbits]\n\n");
	options_usage(genrsa_options);
	fprintf(stderr, "\n");
}

int
genrsa_main(int argc, char **argv)
{
	BN_GENCB cb;
	int ret = 1;
	int i, num = DEFBITS;
	char *numbits= NULL;
	long l;



	char *passout = NULL;
	BIO *out = NULL;
	BIGNUM *bn = BN_new();
	RSA *rsa = NULL;

	if (single_execution) {
		if (pledge("stdio cpath wpath rpath tty", NULL) == -1) {
			perror("pledge");
			exit(1);
		}
	}

	if (!bn)
		goto err;

	BN_GENCB_set(&cb, genrsa_cb, bio_err);

	if ((out = BIO_new(BIO_s_file())) == NULL) {
		BIO_printf(bio_err, "unable to create BIO for output\n");
		goto err;
	}

	memset(&genrsa_config, 0, sizeof(genrsa_config));










	genrsa_config.f4 = RSA_F4;





	if (options_parse(argc, argv, genrsa_options, &numbits, NULL) != 0) {
		genrsa_usage();






















		goto err;





	}

	if ((numbits != NULL) &&
	    ((sscanf(numbits, "%d", &num) == 0) || (num < 0))) {





		genrsa_usage();















		goto err;
	}

	if (!app_passwd(bio_err, NULL, genrsa_config.passargout, NULL,
	    &passout)) {
		BIO_printf(bio_err, "Error getting password\n");
		goto err;
	}

	if (genrsa_config.outfile == NULL) {
		BIO_set_fp(out, stdout, BIO_NOCLOSE);
	} else {
		if (BIO_write_filename(out, genrsa_config.outfile) <= 0) {
			perror(genrsa_config.outfile);
			goto err;
		}
	}

	BIO_printf(bio_err, "Generating RSA private key, %d bit long modulus\n",
	    num);
	rsa = RSA_new();
	if (!rsa)
		goto err;

	if (!BN_set_word(bn, genrsa_config.f4) ||
	    !RSA_generate_key_ex(rsa, num, bn, &cb))
		goto err;

	/*
	 * We need to do the following for when the base number size is <
	 * long, esp windows 3.1 :-(.
	 */
	l = 0L;
	for (i = 0; i < rsa->e->top; i++) {
#ifndef _LP64
		l <<= BN_BITS4;
		l <<= BN_BITS4;
#endif
		l += rsa->e->d[i];
	}
	BIO_printf(bio_err, "e is %ld (0x%lX)\n", l, l);
	{
		PW_CB_DATA cb_data;
		cb_data.password = passout;
		cb_data.prompt_info = genrsa_config.outfile;
		if (!PEM_write_bio_RSAPrivateKey(out, rsa, genrsa_config.enc,
		    NULL, 0, password_callback, &cb_data))
			goto err;
	}

	ret = 0;
 err:
	BN_free(bn);
	RSA_free(rsa);
Changes to jni/libressl/apps/openssl/nseq.c.
1
2
3
4
5
6
7
8
/* $OpenBSD: nseq.c,v 1.8 2018/02/07 05:47:55 jsing Exp $ */
/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
 * project 1999.
 */
/* ====================================================================
 * Copyright (c) 1999 The OpenSSL Project.  All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
|







1
2
3
4
5
6
7
8
/* $OpenBSD: nseq.c,v 1.9 2019/07/14 03:30:46 guenther Exp $ */
/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
 * project 1999.
 */
/* ====================================================================
 * Copyright (c) 1999 The OpenSSL Project.  All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80

static struct {
	char *infile;
	char *outfile;
	int toseq;
} nseq_config;

static struct option nseq_options[] = {
	{
		.name = "in",
		.argname = "file",
		.desc = "Input file to read from (default stdin)",
		.type = OPTION_ARG,
		.opt.arg = &nseq_config.infile,
	},







|







66
67
68
69
70
71
72
73
74
75
76
77
78
79
80

static struct {
	char *infile;
	char *outfile;
	int toseq;
} nseq_config;

static const struct option nseq_options[] = {
	{
		.name = "in",
		.argname = "file",
		.desc = "Input file to read from (default stdin)",
		.type = OPTION_ARG,
		.opt.arg = &nseq_config.infile,
	},
Changes to jni/libressl/apps/openssl/openssl.1.
1
2
3
4
5
6
7
8
.\" $OpenBSD: openssl.1,v 1.100 2019/02/04 11:21:05 tb Exp $
.\" ====================================================================
.\" Copyright (c) 1998-2002 The OpenSSL Project.  All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\"
|







1
2
3
4
5
6
7
8
.\" $OpenBSD: openssl.1,v 1.114 2019/10/04 06:22:51 jmc Exp $
.\" ====================================================================
.\" Copyright (c) 1998-2002 The OpenSSL Project.  All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\"
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
.\" SUCH DAMAGE.
.\"
.\" The licence and distribution terms for any publically available version or
.\" derivative of this code cannot be changed.  i.e. this code cannot simply be
.\" copied and put under another distribution licence
.\" [including the GNU Public Licence.]
.\"
.Dd $Mdocdate: February 4 2019 $
.Dt OPENSSL 1
.Os
.Sh NAME
.Nm openssl
.Nd OpenSSL command line tool
.Sh SYNOPSIS
.Nm







|







106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
.\" SUCH DAMAGE.
.\"
.\" The licence and distribution terms for any publically available version or
.\" derivative of this code cannot be changed.  i.e. this code cannot simply be
.\" copied and put under another distribution licence
.\" [including the GNU Public Licence.]
.\"
.Dd $Mdocdate: October 4 2019 $
.Dt OPENSSL 1
.Os
.Sh NAME
.Nm openssl
.Nd OpenSSL command line tool
.Sh SYNOPSIS
.Nm
197
198
199
200
201
202
203
204
205

206
207
208
209
210
211
212
213
214
215
216
217
218
219

220
221
222
223
224
225
226
is not able to detect pseudo-commands such as
.Cm quit ,
.Cm list- Ns Ar ... Ns Cm -commands ,
or
.Cm no- Ns Ar command
itself.
.Sh ASN1PARSE
.nr nS 1
.Nm "openssl asn1parse"

.Op Fl i
.Op Fl dlimit Ar number
.Op Fl dump
.Op Fl genconf Ar file
.Op Fl genstr Ar str
.Op Fl in Ar file
.Op Fl inform Cm der | pem | txt
.Op Fl length Ar number
.Op Fl noout
.Op Fl offset Ar number
.Op Fl oid Ar file
.Op Fl out Ar file
.Op Fl strparse Ar offset
.nr nS 0

.Pp
The
.Nm asn1parse
command is a diagnostic utility that can parse ASN.1 structures.
It can also be used to extract data from ASN.1 formatted data.
.Pp
The options are as follows:







|
|
>













|
>







197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
is not able to detect pseudo-commands such as
.Cm quit ,
.Cm list- Ns Ar ... Ns Cm -commands ,
or
.Cm no- Ns Ar command
itself.
.Sh ASN1PARSE
.Bl -hang -width "openssl asn1parse"
.It Nm openssl asn1parse
.Bk -words
.Op Fl i
.Op Fl dlimit Ar number
.Op Fl dump
.Op Fl genconf Ar file
.Op Fl genstr Ar str
.Op Fl in Ar file
.Op Fl inform Cm der | pem | txt
.Op Fl length Ar number
.Op Fl noout
.Op Fl offset Ar number
.Op Fl oid Ar file
.Op Fl out Ar file
.Op Fl strparse Ar offset
.Ek
.El
.Pp
The
.Nm asn1parse
command is a diagnostic utility that can parse ASN.1 structures.
It can also be used to extract data from ASN.1 formatted data.
.Pp
The options are as follows:
291
292
293
294
295
296
297
298
299

300
301
302
303
304
305
306
307
308
309
310

311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333

334
335
336
337
338
339
340
341
342

343
344
345
346
347
348
349
Parse the content octets of the ASN.1 object starting at
.Ar offset .
This option can be used multiple times to
.Qq drill down
into a nested structure.
.El
.Sh CA
.nr nS 1
.Nm "openssl ca"

.Op Fl batch
.Op Fl cert Ar file
.Op Fl config Ar file
.Op Fl create_serial
.Op Fl crl_CA_compromise Ar time
.Op Fl crl_compromise Ar time
.Op Fl crl_hold Ar instruction
.Op Fl crl_reason Ar reason
.Op Fl crldays Ar days
.Op Fl crlexts Ar section
.Op Fl crlhours Ar hours

.Op Fl days Ar arg
.Op Fl enddate Ar date
.Op Fl extensions Ar section
.Op Fl extfile Ar section
.Op Fl gencrl
.Op Fl in Ar file
.Op Fl infiles
.Op Fl key Ar password
.Op Fl keyfile Ar arg
.Op Fl keyform Cm pem | der
.Op Fl md Ar arg
.Op Fl msie_hack
.Op Fl multivalue\-rdn
.Op Fl name Ar section
.Op Fl noemailDN
.Op Fl notext
.Op Fl out Ar file
.Op Fl outdir Ar dir
.Op Fl passin Ar arg
.Op Fl policy Ar arg
.Op Fl preserveDN
.Op Fl revoke Ar file
.Op Fl selfsign

.Op Fl spkac Ar file
.Op Fl ss_cert Ar file
.Op Fl startdate Ar date
.Op Fl status Ar serial
.Op Fl subj Ar arg
.Op Fl updatedb
.Op Fl utf8
.Op Fl verbose
.nr nS 0

.Pp
The
.Nm ca
command is a minimal certificate authority (CA) application.
It can be used to sign certificate requests in a variety of forms
and generate certificate revocation lists (CRLs).
It also maintains a text database of issued certificates and their status.







|
|
>











>



|




|

|

|




|





>








|
>







293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
Parse the content octets of the ASN.1 object starting at
.Ar offset .
This option can be used multiple times to
.Qq drill down
into a nested structure.
.El
.Sh CA
.Bl -hang -width "openssl ca"
.It Nm openssl ca
.Bk -words
.Op Fl batch
.Op Fl cert Ar file
.Op Fl config Ar file
.Op Fl create_serial
.Op Fl crl_CA_compromise Ar time
.Op Fl crl_compromise Ar time
.Op Fl crl_hold Ar instruction
.Op Fl crl_reason Ar reason
.Op Fl crldays Ar days
.Op Fl crlexts Ar section
.Op Fl crlhours Ar hours
.Op Fl crlsec Ar seconds
.Op Fl days Ar arg
.Op Fl enddate Ar date
.Op Fl extensions Ar section
.Op Fl extfile Ar file
.Op Fl gencrl
.Op Fl in Ar file
.Op Fl infiles
.Op Fl key Ar password
.Op Fl keyfile Ar file
.Op Fl keyform Cm pem | der
.Op Fl md Ar alg
.Op Fl msie_hack
.Op Fl multivalue-rdn
.Op Fl name Ar section
.Op Fl noemailDN
.Op Fl notext
.Op Fl out Ar file
.Op Fl outdir Ar directory
.Op Fl passin Ar arg
.Op Fl policy Ar arg
.Op Fl preserveDN
.Op Fl revoke Ar file
.Op Fl selfsign
.Op Fl sigopt Ar nm:v
.Op Fl spkac Ar file
.Op Fl ss_cert Ar file
.Op Fl startdate Ar date
.Op Fl status Ar serial
.Op Fl subj Ar arg
.Op Fl updatedb
.Op Fl utf8
.Op Fl verbose
.Ek
.El
.Pp
The
.Nm ca
command is a minimal certificate authority (CA) application.
It can be used to sign certificate requests in a variety of forms
and generate certificate revocation lists (CRLs).
It also maintains a text database of issued certificates and their status.
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
.Qq certenr3 .
It used UniversalStrings for almost everything.
Since the old control has various security bugs,
its use is strongly discouraged.
The newer control
.Qq Xenroll
does not need this option.
.It Fl multivalue\-rdn
This option causes the
.Fl subj
argument to be interpreted with full support for multivalued RDNs,
for example
.Qq "/DC=org/DC=OpenSSL/DC=users/UID=123456+CN=John Doe" .
If
.Fl multivalue\-rdn
is not used, the UID value is set to
.Qq "123456+CN=John Doe" .
.It Fl name Ar section
Specifies the configuration file
.Ar section
to use (overrides
.Cm default_ca







|






|







428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
.Qq certenr3 .
It used UniversalStrings for almost everything.
Since the old control has various security bugs,
its use is strongly discouraged.
The newer control
.Qq Xenroll
does not need this option.
.It Fl multivalue-rdn
This option causes the
.Fl subj
argument to be interpreted with full support for multivalued RDNs,
for example
.Qq "/DC=org/DC=OpenSSL/DC=users/UID=123456+CN=John Doe" .
If
.Fl multivalue-rdn
is not used, the UID value is set to
.Qq "123456+CN=John Doe" .
.It Fl name Ar section
Specifies the configuration file
.Ar section
to use (overrides
.Cm default_ca
517
518
519
520
521
522
523



524
525
526
527
528
529
530
A consequence of using
.Fl selfsign
is that the self-signed certificate appears among the entries in
the certificate database (see the configuration option
.Cm database )
and uses the same serial number counter as all other certificates
signed with the self-signed certificate.



.It Fl spkac Ar file
A file containing a single Netscape signed public key and challenge,
and additional field values to be signed by the CA.
This will usually come from the
KEYGEN tag in an HTML form to create a new private key.
It is, however, possible to create SPKACs using the
.Nm spkac







>
>
>







523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
A consequence of using
.Fl selfsign
is that the self-signed certificate appears among the entries in
the certificate database (see the configuration option
.Cm database )
and uses the same serial number counter as all other certificates
signed with the self-signed certificate.
.It Fl sigopt Ar nm:v
Pass options to the signature algorithm during sign or certify operations.
The names and values of these options are algorithm-specific.
.It Fl spkac Ar file
A file containing a single Netscape signed public key and challenge,
and additional field values to be signed by the CA.
This will usually come from the
KEYGEN tag in an HTML form to create a new private key.
It is, however, possible to create SPKACs using the
.Nm spkac
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615


616
617
618
619
620
621
622
cessationOfOperation, certificateHold or removeFromCRL.
The matching of
.Ar reason
is case insensitive.
Setting any revocation reason will make the CRL v2.
In practice, removeFromCRL is not particularly useful because it is only used
in delta CRLs which are not currently implemented.
.It Fl crldays Ar num
The number of days before the next CRL is due.
This is the days from now to place in the CRL
.Cm nextUpdate
field.
.It Fl crlexts Ar section
The
.Ar section
of the configuration file containing CRL extensions to include.
If no CRL extension section is present then a V1 CRL is created;
if the CRL extension section is present
(even if it is empty)
then a V2 CRL is created.
The CRL extensions specified are CRL extensions and not CRL entry extensions.
It should be noted that some software can't handle V2 CRLs.
See the
.Xr x509v3.cnf 5
manual page for details of the extension section format.
.It Fl crlhours Ar num
The number of hours before the next CRL is due.


.It Fl gencrl
Generate a CRL based on information in the index file.
.It Fl revoke Ar file
A
.Ar file
containing a certificate to revoke.
.It Fl status Ar serial







|

















|

>
>







598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
cessationOfOperation, certificateHold or removeFromCRL.
The matching of
.Ar reason
is case insensitive.
Setting any revocation reason will make the CRL v2.
In practice, removeFromCRL is not particularly useful because it is only used
in delta CRLs which are not currently implemented.
.It Fl crldays Ar days
The number of days before the next CRL is due.
This is the days from now to place in the CRL
.Cm nextUpdate
field.
.It Fl crlexts Ar section
The
.Ar section
of the configuration file containing CRL extensions to include.
If no CRL extension section is present then a V1 CRL is created;
if the CRL extension section is present
(even if it is empty)
then a V2 CRL is created.
The CRL extensions specified are CRL extensions and not CRL entry extensions.
It should be noted that some software can't handle V2 CRLs.
See the
.Xr x509v3.cnf 5
manual page for details of the extension section format.
.It Fl crlhours Ar hours
The number of hours before the next CRL is due.
.It Fl crlsec Ar seconds
The number of seconds before the next CRL is due.
.It Fl gencrl
Generate a CRL based on information in the index file.
.It Fl revoke Ar file
A
.Ar file
containing a certificate to revoke.
.It Fl status Ar serial
863
864
865
866
867
868
869
870
871

872
873

874
875

876
877
878
879

880
881
882
883
884

885

886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902


903
904
905
906
907


908
909
910
911
912
913
914
915
916
917


918
919
920
921
922
923
924
925
926
927
928
929


930
931
932

933

934
935
936
937
938
939
940

941
942
943
944
945
946
947
key exchange, authentication, encryption, and mac algorithms.
.It Fl v
Like
.Fl V ,
but without cipher suite codes.
.El
.Sh CRL
.nr nS 1
.Nm "openssl crl"

.Op Fl CAfile Ar file
.Op Fl CApath Ar dir

.Op Fl fingerprint
.Op Fl hash

.Op Fl in Ar file
.Op Fl inform Cm der | pem
.Op Fl issuer
.Op Fl lastupdate

.Op Fl nextupdate
.Op Fl noout
.Op Fl out Ar file
.Op Fl outform Cm der | pem
.Op Fl text

.nr nS 0

.Pp
The
.Nm crl
command processes CRL files in DER or PEM format.
.Pp
The options are as follows:
.Bl -tag -width Ds
.It Fl CAfile Ar file
Verify the signature on a CRL by looking up the issuing certificate in
.Ar file .
.It Fl CApath Ar directory
Verify the signature on a CRL by looking up the issuing certificate in
.Ar dir .
This directory must be a standard certificate directory,
i.e. a hash of each subject name (using
.Cm x509 Fl hash )
should be linked to each certificate.


.It Fl fingerprint
Print the CRL fingerprint.
.It Fl hash
Output a hash of the issuer name.
This can be used to look up CRLs in a directory by issuer name.


.It Fl in Ar file
The input file to read from, or standard input if not specified.
.It Fl inform Cm der | pem
The input format.
.It Fl issuer
Output the issuer name.
.It Fl lastupdate
Output the
.Cm lastUpdate
field.


.It Fl nextupdate
Output the
.Cm nextUpdate
field.
.It Fl noout
Do not output the encoded version of the CRL.
.It Fl out Ar file
The output file to write to, or standard output if not specified.
.It Fl outform Cm der | pem
The output format.
.It Fl text
Print the CRL in plain text.


.El
.Sh CRL2PKCS7
.nr nS 1

.Nm "openssl crl2pkcs7"

.Op Fl certfile Ar file
.Op Fl in Ar file
.Op Fl inform Cm der | pem
.Op Fl nocrl
.Op Fl out Ar file
.Op Fl outform Cm der | pem
.nr nS 0

.Pp
The
.Nm crl2pkcs7
command takes an optional CRL and one or more
certificates and converts them into a PKCS#7 degenerate
.Qq certificates only
structure.







|
|
>


>


>




>





>
|
>

















>
>





>
>










>
>












>
>


<
>
|
>






|
>







874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956

957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
key exchange, authentication, encryption, and mac algorithms.
.It Fl v
Like
.Fl V ,
but without cipher suite codes.
.El
.Sh CRL
.Bl -hang -width "openssl crl"
.It Nm openssl crl
.Bk -words
.Op Fl CAfile Ar file
.Op Fl CApath Ar dir
.Op Fl crlnumber
.Op Fl fingerprint
.Op Fl hash
.Op Fl hash_old
.Op Fl in Ar file
.Op Fl inform Cm der | pem
.Op Fl issuer
.Op Fl lastupdate
.Op Fl nameopt Ar option
.Op Fl nextupdate
.Op Fl noout
.Op Fl out Ar file
.Op Fl outform Cm der | pem
.Op Fl text
.Op Fl verify
.Ek
.El
.Pp
The
.Nm crl
command processes CRL files in DER or PEM format.
.Pp
The options are as follows:
.Bl -tag -width Ds
.It Fl CAfile Ar file
Verify the signature on a CRL by looking up the issuing certificate in
.Ar file .
.It Fl CApath Ar directory
Verify the signature on a CRL by looking up the issuing certificate in
.Ar dir .
This directory must be a standard certificate directory,
i.e. a hash of each subject name (using
.Cm x509 Fl hash )
should be linked to each certificate.
.It Fl crlnumber
Print the CRL number.
.It Fl fingerprint
Print the CRL fingerprint.
.It Fl hash
Output a hash of the issuer name.
This can be used to look up CRLs in a directory by issuer name.
.It Fl hash_old
Output an old-style (MD5) hash of the issuer name.
.It Fl in Ar file
The input file to read from, or standard input if not specified.
.It Fl inform Cm der | pem
The input format.
.It Fl issuer
Output the issuer name.
.It Fl lastupdate
Output the
.Cm lastUpdate
field.
.It Fl nameopt Ar option
Specify certificate name options.
.It Fl nextupdate
Output the
.Cm nextUpdate
field.
.It Fl noout
Do not output the encoded version of the CRL.
.It Fl out Ar file
The output file to write to, or standard output if not specified.
.It Fl outform Cm der | pem
The output format.
.It Fl text
Print the CRL in plain text.
.It Fl verify
Verify the signature on the CRL.
.El
.Sh CRL2PKCS7

.Bl -hang -width "openssl crl2pkcs7"
.It Nm openssl crl2pkcs7
.Bk -words
.Op Fl certfile Ar file
.Op Fl in Ar file
.Op Fl inform Cm der | pem
.Op Fl nocrl
.Op Fl out Ar file
.Op Fl outform Cm der | pem
.Ek
.El
.Pp
The
.Nm crl2pkcs7
command takes an optional CRL and one or more
certificates and converts them into a PKCS#7 degenerate
.Qq certificates only
structure.
968
969
970
971
972
973
974
975
976

977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993

994
995
996
997
998
999
1000
Write the PKCS#7 structure to
.Ar file ,
or standard output if not specified.
.It Fl outform Cm der | pem
The output format.
.El
.Sh DGST
.nr nS 1
.Nm "openssl dgst"

.Op Fl cd
.Op Fl binary
.Op Fl Ar digest
.Op Fl hex
.Op Fl hmac Ar key
.Op Fl keyform Cm pem
.Op Fl mac Ar algorithm
.Op Fl macopt Ar nm : Ns Ar v
.Op Fl out Ar file
.Op Fl passin Ar arg
.Op Fl prverify Ar file
.Op Fl sign Ar file
.Op Fl signature Ar file
.Op Fl sigopt Ar nm : Ns Ar v
.Op Fl verify Ar file
.Op Ar
.nr nS 0

.Pp
The digest functions output the message digest of a supplied
.Ar file
or
.Ar files
in hexadecimal form.
They can also be used for digital signing and verification.







|
|
>
|















|
>







995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
Write the PKCS#7 structure to
.Ar file ,
or standard output if not specified.
.It Fl outform Cm der | pem
The output format.
.El
.Sh DGST
.Bl -hang -width "openssl dgst"
.It Nm openssl dgst
.Bk -words
.Op Fl cdr
.Op Fl binary
.Op Fl Ar digest
.Op Fl hex
.Op Fl hmac Ar key
.Op Fl keyform Cm pem
.Op Fl mac Ar algorithm
.Op Fl macopt Ar nm : Ns Ar v
.Op Fl out Ar file
.Op Fl passin Ar arg
.Op Fl prverify Ar file
.Op Fl sign Ar file
.Op Fl signature Ar file
.Op Fl sigopt Ar nm : Ns Ar v
.Op Fl verify Ar file
.Op Ar
.Ek
.El
.Pp
The digest functions output the message digest of a supplied
.Ar file
or
.Ar files
in hexadecimal form.
They can also be used for digital signing and verification.
1058
1059
1060
1061
1062
1063
1064


1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086

1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098

1099
1100
1101
1102
1103
1104
1105
.It Fl prverify Ar file
Verify the signature using the private key in
.Ar file .
The output is either
.Qq Verification OK
or
.Qq Verification Failure .


.It Fl sign Ar file
Digitally sign the digest using the private key in
.Ar file .
.It Fl signature Ar file
The actual signature to verify.
.It Fl sigopt Ar nm : Ns Ar v
Pass options to the signature algorithm during sign or verify operations.
The names and values of these options are algorithm-specific.
.It Fl verify Ar file
Verify the signature using the public key in
.Ar file .
The output is either
.Qq Verification OK
or
.Qq Verification Failure .
.It Ar
File or files to digest.
If no files are specified then standard input is used.
.El
.Sh DHPARAM
.nr nS 1
.Nm "openssl dhparam"

.Op Fl 2 | 5
.Op Fl C
.Op Fl check
.Op Fl dsaparam
.Op Fl in Ar file
.Op Fl inform Cm der | pem
.Op Fl noout
.Op Fl out Ar file
.Op Fl outform Cm der | pem
.Op Fl text
.Op Ar numbits
.nr nS 0

.Pp
The
.Nm dhparam
command is used to manipulate DH parameter files.
Only the older PKCS#3 DH is supported,
not the newer X9.42 DH.
.Pp







>
>




















|
|
>











|
>







1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
.It Fl prverify Ar file
Verify the signature using the private key in
.Ar file .
The output is either
.Qq Verification OK
or
.Qq Verification Failure .
.It Fl r
Print the digest in coreutils format.
.It Fl sign Ar file
Digitally sign the digest using the private key in
.Ar file .
.It Fl signature Ar file
The actual signature to verify.
.It Fl sigopt Ar nm : Ns Ar v
Pass options to the signature algorithm during sign or verify operations.
The names and values of these options are algorithm-specific.
.It Fl verify Ar file
Verify the signature using the public key in
.Ar file .
The output is either
.Qq Verification OK
or
.Qq Verification Failure .
.It Ar
File or files to digest.
If no files are specified then standard input is used.
.El
.Sh DHPARAM
.Bl -hang -width "openssl dhparam"
.It Nm openssl dhparam
.Bk -words
.Op Fl 2 | 5
.Op Fl C
.Op Fl check
.Op Fl dsaparam
.Op Fl in Ar file
.Op Fl inform Cm der | pem
.Op Fl noout
.Op Fl out Ar file
.Op Fl outform Cm der | pem
.Op Fl text
.Op Ar numbits
.Ek
.El
.Pp
The
.Nm dhparam
command is used to manipulate DH parameter files.
Only the older PKCS#3 DH is supported,
not the newer X9.42 DH.
.Pp
1152
1153
1154
1155
1156
1157
1158
1159
1160

1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174

1175
1176

1177
1178
1179
1180
1181
1182
1183
.Ar numbits .
It must be the last option.
If not present, a value of 2048 is used.
If this value is present, the input file is ignored and
parameters are generated instead.
.El
.Sh DSA
.nr nS 1
.Nm "openssl dsa"

.Oo
.Fl aes128 | aes192 | aes256 |
.Fl des | des3
.Oc
.Op Fl in Ar file
.Op Fl inform Cm der | pem
.Op Fl modulus
.Op Fl noout
.Op Fl out Ar file
.Op Fl outform Cm der | pem
.Op Fl passin Ar arg
.Op Fl passout Ar arg
.Op Fl pubin
.Op Fl pubout

.Op Fl text
.nr nS 0

.Pp
The
.Nm dsa
command processes DSA keys.
They can be converted between various forms and their components printed out.
.Pp
.Sy Note :







|
|
>





|



|




>

|
>







1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
.Ar numbits .
It must be the last option.
If not present, a value of 2048 is used.
If this value is present, the input file is ignored and
parameters are generated instead.
.El
.Sh DSA
.Bl -hang -width "openssl dsa"
.It Nm openssl dsa
.Bk -words
.Oo
.Fl aes128 | aes192 | aes256 |
.Fl des | des3
.Oc
.Op Fl in Ar file
.Op Fl inform Cm der | pem | pvk
.Op Fl modulus
.Op Fl noout
.Op Fl out Ar file
.Op Fl outform Cm der | pem | pvk
.Op Fl passin Ar arg
.Op Fl passout Ar arg
.Op Fl pubin
.Op Fl pubout
.Op Fl pvk-none | pvk-strong | pvk-weak
.Op Fl text
.Ek
.El
.Pp
The
.Nm dsa
command processes DSA keys.
They can be converted between various forms and their components printed out.
.Pp
.Sy Note :
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233






1234
1235
1236
1237
1238
1239

1240
1241
1242
1243
1244
1245
1246
1247
1248
1249

1250
1251
1252
1253
1254
1255
1256
or by setting the encryption options it can be used to add or change
the pass phrase.
These options can only be used with PEM format output files.
.It Fl in Ar file
The input file to read from,
or standard input if not specified.
If the key is encrypted, a pass phrase will be prompted for.
.It Fl inform Cm der | pem
The input format.
.It Fl modulus
Print the value of the public key component of the key.
.It Fl noout
Do not output the encoded version of the key.
.It Fl out Ar file
The output file to write to,
or standard output if not specified.
If any encryption options are set then a pass phrase will be
prompted for.
.It Fl outform Cm der | pem
The output format.
.It Fl passin Ar arg
The key password source.
.It Fl passout Ar arg
The output file password source.
.It Fl pubin
Read in a public key, not a private key.
.It Fl pubout
Output a public key, not a private key.
Automatically set if the input is a public key.






.It Fl text
Print the public/private key in plain text.
.El
.Sh DSAPARAM
.nr nS 1
.Nm "openssl dsaparam"

.Op Fl C
.Op Fl genkey
.Op Fl in Ar file
.Op Fl inform Cm der | pem
.Op Fl noout
.Op Fl out Ar file
.Op Fl outform Cm der | pem
.Op Fl text
.Op Ar numbits
.nr nS 0

.Pp
The
.Nm dsaparam
command is used to manipulate or generate DSA parameter files.
.Pp
The options are as follows:
.Bl -tag -width Ds







|










|










>
>
>
>
>
>




|
|
>









|
>







1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
or by setting the encryption options it can be used to add or change
the pass phrase.
These options can only be used with PEM format output files.
.It Fl in Ar file
The input file to read from,
or standard input if not specified.
If the key is encrypted, a pass phrase will be prompted for.
.It Fl inform Cm der | pem | pvk
The input format.
.It Fl modulus
Print the value of the public key component of the key.
.It Fl noout
Do not output the encoded version of the key.
.It Fl out Ar file
The output file to write to,
or standard output if not specified.
If any encryption options are set then a pass phrase will be
prompted for.
.It Fl outform Cm der | pem | pvk
The output format.
.It Fl passin Ar arg
The key password source.
.It Fl passout Ar arg
The output file password source.
.It Fl pubin
Read in a public key, not a private key.
.It Fl pubout
Output a public key, not a private key.
Automatically set if the input is a public key.
.It Xo
.Fl pvk-none | pvk-strong | pvk-weak
.Xc
Enable or disable PVK encoding.
The default is
.Fl pvk-strong .
.It Fl text
Print the public/private key in plain text.
.El
.Sh DSAPARAM
.Bl -hang -width "openssl dsaparam"
.It Nm openssl dsaparam
.Bk -words
.Op Fl C
.Op Fl genkey
.Op Fl in Ar file
.Op Fl inform Cm der | pem
.Op Fl noout
.Op Fl out Ar file
.Op Fl outform Cm der | pem
.Op Fl text
.Op Ar numbits
.Ek
.El
.Pp
The
.Nm dsaparam
command is used to manipulate or generate DSA parameter files.
.Pp
The options are as follows:
.Bl -tag -width Ds
1281
1282
1283
1284
1285
1286
1287
1288
1289

1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305

1306
1307
1308
1309
1310
1311
1312
Print the DSA parameters in plain text.
.It Ar numbits
Generate a parameter set of size
.Ar numbits .
If this option is included, the input file is ignored.
.El
.Sh EC
.nr nS 1
.Nm "openssl ec"

.Op Fl conv_form Ar arg
.Op Fl des
.Op Fl des3
.Op Fl in Ar file
.Op Fl inform Cm der | pem
.Op Fl noout
.Op Fl out Ar file
.Op Fl outform Cm der | pem
.Op Fl param_enc Ar arg
.Op Fl param_out
.Op Fl passin Ar arg
.Op Fl passout Ar arg
.Op Fl pubin
.Op Fl pubout
.Op Fl text
.nr nS 0

.Pp
The
.Nm ec
command processes EC keys.
They can be converted between various
forms and their components printed out.
.Nm openssl







|
|
>















|
>







1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
Print the DSA parameters in plain text.
.It Ar numbits
Generate a parameter set of size
.Ar numbits .
If this option is included, the input file is ignored.
.El
.Sh EC
.Bl -hang -width "openssl ec"
.It Nm openssl ec
.Bk -words
.Op Fl conv_form Ar arg
.Op Fl des
.Op Fl des3
.Op Fl in Ar file
.Op Fl inform Cm der | pem
.Op Fl noout
.Op Fl out Ar file
.Op Fl outform Cm der | pem
.Op Fl param_enc Ar arg
.Op Fl param_out
.Op Fl passin Ar arg
.Op Fl passout Ar arg
.Op Fl pubin
.Op Fl pubout
.Op Fl text
.Ek
.El
.Pp
The
.Nm ec
command processes EC keys.
They can be converted between various
forms and their components printed out.
.Nm openssl
1376
1377
1378
1379
1380
1381
1382


1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397

1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412

1413
1414
1415
1416
1417
1418
1419
The default value is
.Cm named_curve .
Note: the
.Cm implicitlyCA
alternative,
as specified in RFC 3279,
is currently not implemented.


.It Fl passin Ar arg
The key password source.
.It Fl passout Ar arg
The output file password source.
.It Fl pubin
Read in a public key, not a private key.
.It Fl pubout
Output a public key, not a private key.
Automatically set if the input is a public key.
.It Fl text
Print the public/private key in plain text.
.El
.Sh ECPARAM
.nr nS 1
.Nm "openssl ecparam"

.Op Fl C
.Op Fl check
.Op Fl conv_form Ar arg
.Op Fl genkey
.Op Fl in Ar file
.Op Fl inform Cm der | pem
.Op Fl list_curves
.Op Fl name Ar arg
.Op Fl no_seed
.Op Fl noout
.Op Fl out Ar file
.Op Fl outform Cm der | pem
.Op Fl param_enc Ar arg
.Op Fl text
.nr nS 0

.Pp
The
.Nm ecparam
command is used to manipulate or generate EC parameter files.
.Nm openssl
is not able to generate new groups so
.Nm ecparam







>
>













|
|
>














|
>







1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
The default value is
.Cm named_curve .
Note: the
.Cm implicitlyCA
alternative,
as specified in RFC 3279,
is currently not implemented.
.It Fl param_out
Print the elliptic curve parameters.
.It Fl passin Ar arg
The key password source.
.It Fl passout Ar arg
The output file password source.
.It Fl pubin
Read in a public key, not a private key.
.It Fl pubout
Output a public key, not a private key.
Automatically set if the input is a public key.
.It Fl text
Print the public/private key in plain text.
.El
.Sh ECPARAM
.Bl -hang -width "openssl ecparam"
.It Nm openssl ecparam
.Bk -words
.Op Fl C
.Op Fl check
.Op Fl conv_form Ar arg
.Op Fl genkey
.Op Fl in Ar file
.Op Fl inform Cm der | pem
.Op Fl list_curves
.Op Fl name Ar arg
.Op Fl no_seed
.Op Fl noout
.Op Fl out Ar file
.Op Fl outform Cm der | pem
.Op Fl param_enc Ar arg
.Op Fl text
.Ek
.El
.Pp
The
.Nm ecparam
command is used to manipulate or generate EC parameter files.
.Nm openssl
is not able to generate new groups so
.Nm ecparam
1482
1483
1484
1485
1486
1487
1488
1489
1490

1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511

1512
1513
1514
1515
1516
1517
1518
.Cm implicitlyCA
alternative, as specified in RFC 3279,
is currently not implemented.
.It Fl text
Print the EC parameters in plain text.
.El
.Sh ENC
.nr nS 1
.Nm "openssl enc"

.Fl ciphername
.Op Fl AadePp
.Op Fl base64
.Op Fl bufsize Ar number
.Op Fl debug
.Op Fl in Ar file
.Op Fl iter Ar iterations
.Op Fl iv Ar IV
.Op Fl K Ar key
.Op Fl k Ar password
.Op Fl kfile Ar file
.Op Fl md Ar digest
.Op Fl none
.Op Fl nopad
.Op Fl nosalt
.Op Fl out Ar file
.Op Fl pass Ar arg
.Op Fl pbkdf2
.Op Fl S Ar salt
.Op Fl salt
.nr nS 0

.Pp
The symmetric cipher commands allow data to be encrypted or decrypted
using various block and stream ciphers using keys based on passwords
or explicitly provided.
Base64 encoding or decoding can also be performed either by itself
or in addition to the encryption or decryption.
The program can be called either as







|
|
>

|


















|
>







1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
.Cm implicitlyCA
alternative, as specified in RFC 3279,
is currently not implemented.
.It Fl text
Print the EC parameters in plain text.
.El
.Sh ENC
.Bl -hang -width "openssl enc"
.It Nm openssl enc
.Bk -words
.Fl ciphername
.Op Fl AadePpv
.Op Fl base64
.Op Fl bufsize Ar number
.Op Fl debug
.Op Fl in Ar file
.Op Fl iter Ar iterations
.Op Fl iv Ar IV
.Op Fl K Ar key
.Op Fl k Ar password
.Op Fl kfile Ar file
.Op Fl md Ar digest
.Op Fl none
.Op Fl nopad
.Op Fl nosalt
.Op Fl out Ar file
.Op Fl pass Ar arg
.Op Fl pbkdf2
.Op Fl S Ar salt
.Op Fl salt
.Ek
.El
.Pp
The symmetric cipher commands allow data to be encrypted or decrypted
using various block and stream ciphers using keys based on passwords
or explicitly provided.
Base64 encoding or decoding can also be performed either by itself
or in addition to the encryption or decryption.
The program can be called either as
1642
1643
1644
1645
1646
1647
1648


1649
1650
1651
1652
1653
1654
1655
this must be represented as a string comprised only of hex digits.
.It Fl salt
Use a salt in the key derivation routines (the default).
When the salt is being used
the first eight bytes of the encrypted data are reserved for the salt:
it is randomly generated when encrypting a file and read from the
encrypted file when it is decrypted.


.El
.Sh ERRSTR
.Nm openssl errstr
.Op Fl stats
.Ar errno ...
.Pp
The







>
>







1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
this must be represented as a string comprised only of hex digits.
.It Fl salt
Use a salt in the key derivation routines (the default).
When the salt is being used
the first eight bytes of the encrypted data are reserved for the salt:
it is randomly generated when encrypting a file and read from the
encrypted file when it is decrypted.
.It Fl v
Print extra details about the processing.
.El
.Sh ERRSTR
.Nm openssl errstr
.Op Fl stats
.Ar errno ...
.Pp
The
1674
1675
1676
1677
1678
1679
1680
1681
1682

1683
1684
1685
1686
1687

1688
1689

1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705

1706

1707
1708
1709
1710
1711
1712
1713
1714


1715
1716
1717
1718
1719
1720
1721

1722
1723
1724
1725
1726
1727
1728
1729
1730
1731

1732
1733
1734
1735
1736
1737
1738
.Pp
The options are as follows:
.Bl -tag -width Ds
.It Fl stats
Print debugging statistics about various aspects of the hash table.
.El
.Sh GENDSA
.nr nS 1
.Nm "openssl gendsa"

.Oo
.Fl aes128 | aes192 | aes256 |
.Fl des | des3
.Oc
.Op Fl out Ar file

.Op Ar paramfile
.nr nS 0

.Pp
The
.Nm gendsa
command generates a DSA private key from a DSA parameter file
(typically generated by the
.Nm openssl dsaparam
command).
DSA key generation is little more than random number generation so it is
much quicker than,
for example,
RSA key generation.
.Pp
The options are as follows:
.Bl -tag -width Ds
.It Xo
.Fl aes128 | aes192 | aes256 |

.Fl des | des3

.Xc
Encrypt the private key with the AES, DES,
or the triple DES ciphers, respectively, before outputting it.
A pass phrase is prompted for.
If none of these options are specified, no encryption is used.
.It Fl out Ar file
The output file to write to,
or standard output if not specified.


.It Ar paramfile
Specify the DSA parameter file to use.
The parameters in this file determine the size of the private key.
.El
.Sh GENPKEY
.nr nS 1
.Nm "openssl genpkey"

.Op Fl algorithm Ar alg
.Op Ar cipher
.Op Fl genparam
.Op Fl out Ar file
.Op Fl outform Cm der | pem
.Op Fl paramfile Ar file
.Op Fl pass Ar arg
.Op Fl pkeyopt Ar opt : Ns Ar value
.Op Fl text
.nr nS 0

.Pp
The
.Nm genpkey
command generates private keys.
The use of this
program is encouraged over the algorithm specific utilities
because additional algorithm options can be used.







|
|
>

|
|


>
|
|
>
















>
|
>

|
|





>
>





|
|
>









|
>







1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
.Pp
The options are as follows:
.Bl -tag -width Ds
.It Fl stats
Print debugging statistics about various aspects of the hash table.
.El
.Sh GENDSA
.Bl -hang -width "openssl gendsa"
.It Nm openssl gendsa
.Bk -words
.Oo
.Fl aes128 | aes192 | aes256 | camellia128 |
.Fl camellia192 | camellia256 | des | des3 | idea
.Oc
.Op Fl out Ar file
.Op Fl passout Ar arg
.Ar paramfile
.Ek
.El
.Pp
The
.Nm gendsa
command generates a DSA private key from a DSA parameter file
(typically generated by the
.Nm openssl dsaparam
command).
DSA key generation is little more than random number generation so it is
much quicker than,
for example,
RSA key generation.
.Pp
The options are as follows:
.Bl -tag -width Ds
.It Xo
.Fl aes128 | aes192 | aes256 |
.Fl camellia128 | camellia192 | camellia256 |
.Fl des | des3 |
.Fl idea
.Xc
Encrypt the private key with the AES, CAMELLIA, DES, triple DES
or the IDEA ciphers, respectively, before outputting it.
A pass phrase is prompted for.
If none of these options are specified, no encryption is used.
.It Fl out Ar file
The output file to write to,
or standard output if not specified.
.It Fl passout Ar arg
The output file password source.
.It Ar paramfile
Specify the DSA parameter file to use.
The parameters in this file determine the size of the private key.
.El
.Sh GENPKEY
.Bl -hang -width "openssl genpkey"
.It Nm openssl genpkey
.Bk -words
.Op Fl algorithm Ar alg
.Op Ar cipher
.Op Fl genparam
.Op Fl out Ar file
.Op Fl outform Cm der | pem
.Op Fl paramfile Ar file
.Op Fl pass Ar arg
.Op Fl pkeyopt Ar opt : Ns Ar value
.Op Fl text
.Ek
.El
.Pp
The
.Nm genpkey
command generates private keys.
The use of this
program is encouraged over the algorithm specific utilities
because additional algorithm options can be used.
1815
1816
1817
1818
1819
1820
1821
1822
1823

1824

1825


1826
1827
1828
1829

1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849

1850




1851
1852
1853
1854
1855
1856
1857
1858
1859
(EC)
The EC curve to use.
.El
.It Fl text
Print the private/public key in plain text.
.El
.Sh GENRSA
.nr nS 1
.Nm "openssl genrsa"

.Op Fl 3 | f4

.Op Fl aes128 | aes192 | aes256 | des | des3


.Op Fl out Ar file
.Op Fl passout Ar arg
.Op Ar numbits
.nr nS 0

.Pp
The
.Nm genrsa
command generates an RSA private key,
which essentially involves the generation of two prime numbers.
When generating the key,
various symbols will be output to indicate the progress of the generation.
A
.Sq \&.
represents each number which has passed an initial sieve test;
.Sq +
means a number has passed a single round of the Miller-Rabin primality test.
A newline means that the number has passed all the prime tests
(the actual number depends on the key size).
.Pp
The options are as follows:
.Bl -tag -width Ds
.It Fl 3 | f4
The public exponent to use, either 3 or 65537.
The default is 65537.

.It Fl aes128 | aes192 | aes256 | des | des3




Encrypt the private key with the AES, DES,
or the triple DES ciphers, respectively, before outputting it.
If none of these options are specified, no encryption is used.
If encryption is used, a pass phrase is prompted for,
if it is not supplied via the
.Fl passout
option.
.It Fl out Ar file
The output file to write to,







|
|
>

>
|
>
>



|
>




















>
|
>
>
>
>
|
|







1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
(EC)
The EC curve to use.
.El
.It Fl text
Print the private/public key in plain text.
.El
.Sh GENRSA
.Bl -hang -width "openssl genrsa"
.It Nm openssl genrsa
.Bk -words
.Op Fl 3 | f4
.Oo
.Fl aes128 | aes192 | aes256 | camellia128 |
.Fl camellia192 | camellia256 | des | des3 | idea
.Oc
.Op Fl out Ar file
.Op Fl passout Ar arg
.Op Ar numbits
.Ek
.El
.Pp
The
.Nm genrsa
command generates an RSA private key,
which essentially involves the generation of two prime numbers.
When generating the key,
various symbols will be output to indicate the progress of the generation.
A
.Sq \&.
represents each number which has passed an initial sieve test;
.Sq +
means a number has passed a single round of the Miller-Rabin primality test.
A newline means that the number has passed all the prime tests
(the actual number depends on the key size).
.Pp
The options are as follows:
.Bl -tag -width Ds
.It Fl 3 | f4
The public exponent to use, either 3 or 65537.
The default is 65537.
.It Xo
.Fl aes128 | aes192 | aes256 |
.Fl camellia128 | camellia192 | camellia256 |
.Fl des | des3 |
.Fl idea
.Xc
Encrypt the private key with the AES, CAMELLIA, DES, triple DES
or the IDEA ciphers, respectively, before outputting it.
If none of these options are specified, no encryption is used.
If encryption is used, a pass phrase is prompted for,
if it is not supplied via the
.Fl passout
option.
.It Fl out Ar file
The output file to write to,
1892
1893
1894
1895
1896
1897
1898
1899
1900

1901
1902
1903
1904
1905

1906

1907
1908
1909
1910
1911
1912
1913
1914

1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940

1941
1942
1943
1944
1945
1946

1947
1948
1949
1950
1951
1952
1953
is the certificates contained in it.
With the
.Fl toseq
option the situation is reversed:
a Netscape certificate sequence is created from a file of certificates.
.El
.Sh OCSP
.nr nS 1
.Nm "openssl ocsp"

.Op Fl CA Ar file
.Op Fl CAfile Ar file
.Op Fl CApath Ar directory
.Op Fl cert Ar file
.Op Fl dgst Ar alg

.Op Fl host Ar hostname : Ns Ar port

.Op Fl index Ar indexfile
.Op Fl issuer Ar file
.Op Fl ndays Ar days
.Op Fl nmin Ar minutes
.Op Fl no_cert_checks
.Op Fl no_cert_verify
.Op Fl no_certs
.Op Fl no_chain

.Op Fl no_intern
.Op Fl no_nonce
.Op Fl no_signature_verify
.Op Fl nonce
.Op Fl noverify
.Op Fl nrequest Ar number
.Op Fl out Ar file
.Op Fl path Ar path
.Op Fl port Ar portnum
.Op Fl req_text
.Op Fl reqin Ar file
.Op Fl reqout Ar file
.Op Fl resp_key_id
.Op Fl resp_no_certs
.Op Fl resp_text
.Op Fl respin Ar file
.Op Fl respout Ar file
.Op Fl rkey Ar file
.Op Fl rother Ar file
.Op Fl rsigner Ar file
.Op Fl serial Ar number
.Op Fl sign_other Ar file
.Op Fl signer Ar file
.Op Fl signkey Ar file
.Op Fl status_age Ar age
.Op Fl text

.Op Fl trust_other
.Op Fl url Ar responder_url
.Op Fl VAfile Ar file
.Op Fl validity_period Ar nsec
.Op Fl verify_other Ar file
.nr nS 0

.Pp
The Online Certificate Status Protocol (OCSP)
enables applications to determine the (revocation) state
of an identified certificate (RFC 2560).
.Pp
The
.Nm ocsp







|
|
>





>

>








>




















|





>





|
>







1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
is the certificates contained in it.
With the
.Fl toseq
option the situation is reversed:
a Netscape certificate sequence is created from a file of certificates.
.El
.Sh OCSP
.Bl -hang -width "openssl ocsp"
.It Nm openssl ocsp
.Bk -words
.Op Fl CA Ar file
.Op Fl CAfile Ar file
.Op Fl CApath Ar directory
.Op Fl cert Ar file
.Op Fl dgst Ar alg
.Op Fl header Ar name value
.Op Fl host Ar hostname : Ns Ar port
.Op Fl ignore_err
.Op Fl index Ar indexfile
.Op Fl issuer Ar file
.Op Fl ndays Ar days
.Op Fl nmin Ar minutes
.Op Fl no_cert_checks
.Op Fl no_cert_verify
.Op Fl no_certs
.Op Fl no_chain
.Op Fl no_explicit
.Op Fl no_intern
.Op Fl no_nonce
.Op Fl no_signature_verify
.Op Fl nonce
.Op Fl noverify
.Op Fl nrequest Ar number
.Op Fl out Ar file
.Op Fl path Ar path
.Op Fl port Ar portnum
.Op Fl req_text
.Op Fl reqin Ar file
.Op Fl reqout Ar file
.Op Fl resp_key_id
.Op Fl resp_no_certs
.Op Fl resp_text
.Op Fl respin Ar file
.Op Fl respout Ar file
.Op Fl rkey Ar file
.Op Fl rother Ar file
.Op Fl rsigner Ar file
.Op Fl serial Ar num
.Op Fl sign_other Ar file
.Op Fl signer Ar file
.Op Fl signkey Ar file
.Op Fl status_age Ar age
.Op Fl text
.Op Fl timeout Ar seconds
.Op Fl trust_other
.Op Fl url Ar responder_url
.Op Fl VAfile Ar file
.Op Fl validity_period Ar nsec
.Op Fl verify_other Ar file
.Ek
.El
.Pp
The Online Certificate Status Protocol (OCSP)
enables applications to determine the (revocation) state
of an identified certificate (RFC 2560).
.Pp
The
.Nm ocsp
1982
1983
1984
1985
1986
1987
1988




1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007


2008
2009
2010
2011
2012
2013
2014
.Ar hostname
on
.Ar port .
.Fl path
specifies the HTTP path name to use, or
.Pa /
by default.




.It Fl issuer Ar file
The current issuer certificate, in PEM format.
Can be used multiple times and must come before any
.Fl cert
options.
.It Fl no_cert_checks
Don't perform any additional checks on the OCSP response signer's certificate.
That is, do not make any checks to see if the signer's certificate is
authorised to provide the necessary status information:
as a result this option should only be used for testing purposes.
.It Fl no_cert_verify
Don't verify the OCSP response signer's certificate at all.
Since this option allows the OCSP response to be signed by any certificate,
it should only be used for testing purposes.
.It Fl no_certs
Don't include any certificates in the signed request.
.It Fl no_chain
Do not use certificates in the response as additional untrusted CA
certificates.


.It Fl no_intern
Ignore certificates contained in the OCSP response
when searching for the signer's certificate.
The signer's certificate must be specified with either the
.Fl verify_other
or
.Fl VAfile







>
>
>
>



















>
>







2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
.Ar hostname
on
.Ar port .
.Fl path
specifies the HTTP path name to use, or
.Pa /
by default.
.It Fl header Ar name value
Add the header name with the specified value to the OCSP request that is sent
to the responder.
This may be repeated.
.It Fl issuer Ar file
The current issuer certificate, in PEM format.
Can be used multiple times and must come before any
.Fl cert
options.
.It Fl no_cert_checks
Don't perform any additional checks on the OCSP response signer's certificate.
That is, do not make any checks to see if the signer's certificate is
authorised to provide the necessary status information:
as a result this option should only be used for testing purposes.
.It Fl no_cert_verify
Don't verify the OCSP response signer's certificate at all.
Since this option allows the OCSP response to be signed by any certificate,
it should only be used for testing purposes.
.It Fl no_certs
Don't include any certificates in the signed request.
.It Fl no_chain
Do not use certificates in the response as additional untrusted CA
certificates.
.It Fl no_explicit
Don't check the explicit trust for OCSP signing in the root CA certificate.
.It Fl no_intern
Ignore certificates contained in the OCSP response
when searching for the signer's certificate.
The signer's certificate must be specified with either the
.Fl verify_other
or
.Fl VAfile
2075
2076
2077
2078
2079
2080
2081


2082
2083
2084
2085
2086
2087
2088
.Fl signkey
option.
If the
.Fl signkey
option is not present, then the private key is read from the same file
as the certificate.
If neither option is specified, the OCSP request is not signed.


.It Fl trust_other
The certificates specified by the
.Fl verify_other
option should be explicitly trusted and no additional checks will be
performed on them.
This is useful when the complete responder certificate chain is not available
or trusting a root CA is not appropriate.







>
>







2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
.Fl signkey
option.
If the
.Fl signkey
option is not present, then the private key is read from the same file
as the certificate.
If neither option is specified, the OCSP request is not signed.
.It Fl timeout Ar seconds
Connection timeout to the OCSP responder in seconds.
.It Fl trust_other
The certificates specified by the
.Fl verify_other
option should be explicitly trusted and no additional checks will be
performed on them.
This is useful when the complete responder certificate chain is not available
or trusting a root CA is not appropriate.
2126
2127
2128
2129
2130
2131
2132


2133
2134
2135
2136
2137
2138
2139
.El
.Pp
The options for the OCSP server are as follows:
.Bl -tag -width "XXXX"
.It Fl CA Ar file
CA certificate corresponding to the revocation information in
.Ar indexfile .


.It Fl index Ar indexfile
.Ar indexfile
is a text index file in ca format
containing certificate revocation information.
.Pp
If this option is specified,
.Nm ocsp







>
>







2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
.El
.Pp
The options for the OCSP server are as follows:
.Bl -tag -width "XXXX"
.It Fl CA Ar file
CA certificate corresponding to the revocation information in
.Ar indexfile .
.It Fl ignore_err
Ignore the invalid response.
.It Fl index Ar indexfile
.Ar indexfile
is a text index file in ca format
containing certificate revocation information.
.Pp
If this option is specified,
.Nm ocsp
2228
2229
2230
2231
2232
2233
2234
2235
2236

2237
2238
2239
2240
2241
2242
2243
2244
2245
2246

2247
2248
2249
2250
2251
2252
2253
and has its own separate certificate chain,
then its root CA can be trusted for OCSP signing.
Alternatively, the responder certificate itself can be explicitly trusted
with the
.Fl VAfile
option.
.Sh PASSWD
.nr nS 1
.Nm "openssl passwd"

.Op Fl 1 | apr1 | crypt
.Op Fl in Ar file
.Op Fl noverify
.Op Fl quiet
.Op Fl reverse
.Op Fl salt Ar string
.Op Fl stdin
.Op Fl table
.Op Ar password
.nr nS 0

.Pp
The
.Nm passwd
command computes the hash of a password.
.Pp
The options are as follows:
.Bl -tag -width Ds







|
|
>









|
>







2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
and has its own separate certificate chain,
then its root CA can be trusted for OCSP signing.
Alternatively, the responder certificate itself can be explicitly trusted
with the
.Fl VAfile
option.
.Sh PASSWD
.Bl -hang -width "openssl passwd"
.It Nm openssl passwd
.Bk -words
.Op Fl 1 | apr1 | crypt
.Op Fl in Ar file
.Op Fl noverify
.Op Fl quiet
.Op Fl reverse
.Op Fl salt Ar string
.Op Fl stdin
.Op Fl table
.Op Ar password
.Ek
.El
.Pp
The
.Nm passwd
command computes the hash of a password.
.Pp
The options are as follows:
.Bl -tag -width Ds
2289
2290
2291
2292
2293
2294
2295
2296
2297

2298
2299
2300
2301
2302

2303
2304
2305

2306
2307
2308
2309
2310
2311
2312
.It Fl stdin
Read passwords from standard input.
.It Fl table
In the output list, prepend the cleartext password and a TAB character
to each password hash.
.El
.Sh PKCS7
.nr nS 1
.Nm "openssl pkcs7"

.Op Fl in Ar file
.Op Fl inform Cm der | pem
.Op Fl noout
.Op Fl out Ar file
.Op Fl outform Cm der | pem

.Op Fl print_certs
.Op Fl text
.nr nS 0

.Pp
The
.Nm pkcs7
command processes PKCS#7 files in DER or PEM format.
The PKCS#7 routines only understand PKCS#7 v 1.5 as specified in RFC 2315.
.Pp
The options are as follows:







|
|
>





>


|
>







2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
.It Fl stdin
Read passwords from standard input.
.It Fl table
In the output list, prepend the cleartext password and a TAB character
to each password hash.
.El
.Sh PKCS7
.Bl -hang -width "openssl pkcs7"
.It Nm openssl pkcs7
.Bk -words
.Op Fl in Ar file
.Op Fl inform Cm der | pem
.Op Fl noout
.Op Fl out Ar file
.Op Fl outform Cm der | pem
.Op Fl print
.Op Fl print_certs
.Op Fl text
.Ek
.El
.Pp
The
.Nm pkcs7
command processes PKCS#7 files in DER or PEM format.
The PKCS#7 routines only understand PKCS#7 v 1.5 as specified in RFC 2315.
.Pp
The options are as follows:
2322
2323
2324
2325
2326
2327
2328


2329
2330
2331
2332
2333
2334
2335
2336
2337

2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349

2350
2351
2352
2353
2354
2355
2356
.Fl print_certs
is set).
.It Fl out Ar file
The output to write to,
or standard output if not specified.
.It Fl outform Cm der | pem
The output format.


.It Fl print_certs
Print any certificates or CRLs contained in the file,
preceded by their subject and issuer names in a one-line format.
.It Fl text
Print certificate details in full rather than just subject and issuer names.
.El
.Sh PKCS8
.nr nS 1
.Nm "openssl pkcs8"

.Op Fl in Ar file
.Op Fl inform Cm der | pem
.Op Fl nocrypt
.Op Fl noiter
.Op Fl out Ar file
.Op Fl outform Cm der | pem
.Op Fl passin Ar arg
.Op Fl passout Ar arg
.Op Fl topk8
.Op Fl v1 Ar alg
.Op Fl v2 Ar alg
.nr nS 0

.Pp
The
.Nm pkcs8
command processes private keys
(both encrypted and unencrypted)
in PKCS#8 format
with a variety of PKCS#5 (v1.5 and v2.0) and PKCS#12 algorithms.







>
>







|
|
>











|
>







2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
.Fl print_certs
is set).
.It Fl out Ar file
The output to write to,
or standard output if not specified.
.It Fl outform Cm der | pem
The output format.
.It Fl print
Print the ASN.1 representation of PKCS#7 structure.
.It Fl print_certs
Print any certificates or CRLs contained in the file,
preceded by their subject and issuer names in a one-line format.
.It Fl text
Print certificate details in full rather than just subject and issuer names.
.El
.Sh PKCS8
.Bl -hang -width "openssl pkcs8"
.It Nm openssl pkcs8
.Bk -words
.Op Fl in Ar file
.Op Fl inform Cm der | pem
.Op Fl nocrypt
.Op Fl noiter
.Op Fl out Ar file
.Op Fl outform Cm der | pem
.Op Fl passin Ar arg
.Op Fl passout Ar arg
.Op Fl topk8
.Op Fl v1 Ar alg
.Op Fl v2 Ar alg
.Ek
.El
.Pp
The
.Nm pkcs8
command processes private keys
(both encrypted and unencrypted)
in PKCS#8 format
with a variety of PKCS#5 (v1.5 and v2.0) and PKCS#12 algorithms.
2410
2411
2412
2413
2414
2415
2416
2417
2418


2419


2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436

2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450

2451
2452

2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465

2466




2467
2468
2469
2470
2471
2472
2473
2474
2475
.Pp
.Ar alg
is the encryption algorithm to use;
valid values include des, des3, and rc2.
It is recommended that des3 is used.
.El
.Sh PKCS12
.nr nS 1
.Nm "openssl pkcs12"


.Op Fl aes128 | aes192 | aes256 | des | des3


.Op Fl cacerts
.Op Fl CAfile Ar file
.Op Fl caname Ar name
.Op Fl CApath Ar directory
.Op Fl certfile Ar file
.Op Fl certpbe Ar alg
.Op Fl chain
.Op Fl clcerts
.Op Fl CSP Ar name
.Op Fl descert
.Op Fl export
.Op Fl in Ar file
.Op Fl info
.Op Fl inkey Ar file
.Op Fl keyex
.Op Fl keypbe Ar alg
.Op Fl keysig

.Op Fl macalg Ar alg
.Op Fl maciter
.Op Fl name Ar name
.Op Fl nocerts
.Op Fl nodes
.Op Fl noiter
.Op Fl nokeys
.Op Fl nomac
.Op Fl nomaciter
.Op Fl nomacver
.Op Fl noout
.Op Fl out Ar file
.Op Fl passin Ar arg
.Op Fl passout Ar arg

.Op Fl twopass
.nr nS 0

.Pp
The
.Nm pkcs12
command allows PKCS#12 files
.Pq sometimes referred to as PFX files
to be created and parsed.
By default, a PKCS#12 file is parsed;
a PKCS#12 file can be created by using the
.Fl export
option.
.Pp
The options for parsing a PKCS12 file are as follows:
.Bl -tag -width "XXXX"

.It Fl aes128 | aes192 | aes256 | des | des3




Encrypt private keys
using AES, DES, or triple DES, respectively.
The default is triple DES.
.It Fl cacerts
Only output CA certificates
.Pq not client certificates .
.It Fl clcerts
Only output client certificates
.Pq not CA certificates .







|
|
>
>
|
>
>

















>














>

|
>













>
|
>
>
>
>
|
|







2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
.Pp
.Ar alg
is the encryption algorithm to use;
valid values include des, des3, and rc2.
It is recommended that des3 is used.
.El
.Sh PKCS12
.Bl -hang -width "openssl pkcs12"
.It Nm openssl pkcs12
.Bk -words
.Oo
.Fl aes128 | aes192 | aes256 | camellia128 |
.Fl camellia192 | camellia256 | des | des3 | idea
.Oc
.Op Fl cacerts
.Op Fl CAfile Ar file
.Op Fl caname Ar name
.Op Fl CApath Ar directory
.Op Fl certfile Ar file
.Op Fl certpbe Ar alg
.Op Fl chain
.Op Fl clcerts
.Op Fl CSP Ar name
.Op Fl descert
.Op Fl export
.Op Fl in Ar file
.Op Fl info
.Op Fl inkey Ar file
.Op Fl keyex
.Op Fl keypbe Ar alg
.Op Fl keysig
.Op Fl LMK
.Op Fl macalg Ar alg
.Op Fl maciter
.Op Fl name Ar name
.Op Fl nocerts
.Op Fl nodes
.Op Fl noiter
.Op Fl nokeys
.Op Fl nomac
.Op Fl nomaciter
.Op Fl nomacver
.Op Fl noout
.Op Fl out Ar file
.Op Fl passin Ar arg
.Op Fl passout Ar arg
.Op Fl password Ar arg
.Op Fl twopass
.Ek
.El
.Pp
The
.Nm pkcs12
command allows PKCS#12 files
.Pq sometimes referred to as PFX files
to be created and parsed.
By default, a PKCS#12 file is parsed;
a PKCS#12 file can be created by using the
.Fl export
option.
.Pp
The options for parsing a PKCS12 file are as follows:
.Bl -tag -width "XXXX"
.It Xo
.Fl aes128 | aes192 | aes256 |
.Fl camellia128 | camellia192 | camellia256 |
.Fl des | des3 |
.Fl idea
.Xc
Encrypt private keys using AES, CAMELLIA, DES, triple DES
or the IDEA ciphers, respectively.
The default is triple DES.
.It Fl cacerts
Only output CA certificates
.Pq not client certificates .
.It Fl clcerts
Only output client certificates
.Pq not CA certificates .
2566
2567
2568
2569
2570
2571
2572


2573
2574
2575
2576
2577
2578
2579
used for encryption purposes, but arbitrary length keys for signing.
The
.Fl keysig
option marks the key for signing only.
Signing only keys can be used for S/MIME signing, authenticode
(ActiveX control signing)
and SSL client authentication.


.It Fl macalg Ar alg
Specify the MAC digest algorithm.
The default is SHA1.
.It Fl maciter
Included for compatibility only:
it used to be needed to use MAC iterations counts
but they are now used by default.







>
>







2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
used for encryption purposes, but arbitrary length keys for signing.
The
.Fl keysig
option marks the key for signing only.
Signing only keys can be used for S/MIME signing, authenticode
(ActiveX control signing)
and SSL client authentication.
.It Fl LMK
Add local machine keyset attribute to private key.
.It Fl macalg Ar alg
Specify the MAC digest algorithm.
The default is SHA1.
.It Fl maciter
Included for compatibility only:
it used to be needed to use MAC iterations counts
but they are now used by default.
2601
2602
2603
2604
2605
2606
2607










2608
2609
2610

2611

2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624

2625
2626
2627
2628
2629
2630
2631
.It Fl out Ar file
The output file to write to,
or standard output if not specified.
.It Fl passin Ar arg
The key password source.
.It Fl passout Ar arg
The output file password source.










.El
.Sh PKEY
.nr nS 1

.Nm "openssl pkey"

.Op Ar cipher
.Op Fl in Ar file
.Op Fl inform Cm der | pem
.Op Fl noout
.Op Fl out Ar file
.Op Fl outform Cm der | pem
.Op Fl passin Ar arg
.Op Fl passout Ar arg
.Op Fl pubin
.Op Fl pubout
.Op Fl text
.Op Fl text_pub
.nr nS 0

.Pp
The
.Nm pkey
command processes public or private keys.
They can be converted between various forms
and their components printed out.
.Pp







>
>
>
>
>
>
>
>
>
>


<
>
|
>












|
>







2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731

2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
.It Fl out Ar file
The output file to write to,
or standard output if not specified.
.It Fl passin Ar arg
The key password source.
.It Fl passout Ar arg
The output file password source.
.It Fl password Ar arg
With
.Fl export ,
.Fl password
is equivalent to
.Fl passout .
Otherwise,
.Fl password
is equivalent to
.Fl passin .
.El
.Sh PKEY

.Bl -hang -width "openssl pkey"
.It Nm openssl pkey
.Bk -words
.Op Ar cipher
.Op Fl in Ar file
.Op Fl inform Cm der | pem
.Op Fl noout
.Op Fl out Ar file
.Op Fl outform Cm der | pem
.Op Fl passin Ar arg
.Op Fl passout Ar arg
.Op Fl pubin
.Op Fl pubout
.Op Fl text
.Op Fl text_pub
.Ek
.El
.Pp
The
.Nm pkey
command processes public or private keys.
They can be converted between various forms
and their components printed out.
.Pp
2689
2690
2691
2692
2693
2694
2695
2696
2697

2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718

2719
2720
2721
2722
2723
2724
2725
.It Fl out Ar file
The output file to write to,
or standard output if not specified.
.It Fl text
Print the parameters in plain text.
.El
.Sh PKEYUTL
.nr nS 1
.Nm "openssl pkeyutl"

.Op Fl asn1parse
.Op Fl certin
.Op Fl decrypt
.Op Fl derive
.Op Fl encrypt
.Op Fl hexdump
.Op Fl in Ar file
.Op Fl inkey Ar file
.Op Fl keyform Cm der | pem
.Op Fl out Ar file
.Op Fl passin Ar arg
.Op Fl peerform Cm der | pem
.Op Fl peerkey Ar file
.Op Fl pkeyopt Ar opt : Ns Ar value
.Op Fl pubin
.Op Fl rev
.Op Fl sigfile Ar file
.Op Fl sign
.Op Fl verify
.Op Fl verifyrecover
.nr nS 0

.Pp
The
.Nm pkeyutl
command can be used to perform public key operations using
any supported algorithm.
.Pp
The options are as follows:







|
|
>




















|
>







2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
.It Fl out Ar file
The output file to write to,
or standard output if not specified.
.It Fl text
Print the parameters in plain text.
.El
.Sh PKEYUTL
.Bl -hang -width "openssl pkeyutl"
.It Nm openssl pkeyutl
.Bk -words
.Op Fl asn1parse
.Op Fl certin
.Op Fl decrypt
.Op Fl derive
.Op Fl encrypt
.Op Fl hexdump
.Op Fl in Ar file
.Op Fl inkey Ar file
.Op Fl keyform Cm der | pem
.Op Fl out Ar file
.Op Fl passin Ar arg
.Op Fl peerform Cm der | pem
.Op Fl peerkey Ar file
.Op Fl pkeyopt Ar opt : Ns Ar value
.Op Fl pubin
.Op Fl rev
.Op Fl sigfile Ar file
.Op Fl sign
.Op Fl verify
.Op Fl verifyrecover
.Ek
.El
.Pp
The
.Nm pkeyutl
command can be used to perform public key operations using
any supported algorithm.
.Pp
The options are as follows:
2883
2884
2885
2886
2887
2888
2889
2890
2891

2892
2893
2894
2895
2896

2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916

2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928

2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939

2940
2941
2942
2943

2944
2945
2946
2947
2948
2949
2950
2951

2952
2953
2954
2955
2956
2957
2958
(i.e. a prime p so that (p-1)/2 is also prime).
.It Ar p
Test if number
.Ar p
is prime.
.El
.Sh RAND
.nr nS 1
.Nm "openssl rand"

.Op Fl base64
.Op Fl hex
.Op Fl out Ar file
.Ar num
.nr nS 0

.Pp
The
.Nm rand
command outputs
.Ar num
pseudo-random bytes.
.Pp
The options are as follows:
.Bl -tag -width Ds
.It Fl base64
Perform base64 encoding on the output.
.It Fl hex
Specify hexadecimal output.
.It Fl out Ar file
The output file to write to,
or standard output if not specified.
.El
.Sh REQ
.nr nS 1
.Nm "openssl req"

.Op Fl asn1-kludge
.Op Fl batch
.Op Fl config Ar file
.Op Fl days Ar n
.Op Fl extensions Ar section
.Op Fl in Ar file
.Op Fl inform Cm der | pem
.Op Fl key Ar keyfile
.Op Fl keyform Cm der | pem
.Op Fl keyout Ar file
.Op Fl md4 | md5 | sha1
.Op Fl modulus

.Op Fl nameopt Ar option
.Op Fl new
.Op Fl newhdr
.Op Fl newkey Ar arg
.Op Fl no-asn1-kludge
.Op Fl nodes
.Op Fl noout
.Op Fl out Ar file
.Op Fl outform Cm der | pem
.Op Fl passin Ar arg
.Op Fl passout Ar arg

.Op Fl pubkey
.Op Fl reqexts Ar section
.Op Fl reqopt Ar option
.Op Fl set_serial Ar n

.Op Fl subj Ar arg
.Op Fl subject
.Op Fl text
.Op Fl utf8
.Op Fl verbose
.Op Fl verify
.Op Fl x509
.nr nS 0

.Pp
The
.Nm req
command primarily creates and processes certificate requests
in PKCS#10 format.
It can additionally create self-signed certificates,
for use as root CAs, for example.







|
|
>




|
>


















|
|
>












>











>




>







|
>







3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
(i.e. a prime p so that (p-1)/2 is also prime).
.It Ar p
Test if number
.Ar p
is prime.
.El
.Sh RAND
.Bl -hang -width "openssl rand"
.It Nm openssl rand
.Bk -words
.Op Fl base64
.Op Fl hex
.Op Fl out Ar file
.Ar num
.Ek
.El
.Pp
The
.Nm rand
command outputs
.Ar num
pseudo-random bytes.
.Pp
The options are as follows:
.Bl -tag -width Ds
.It Fl base64
Perform base64 encoding on the output.
.It Fl hex
Specify hexadecimal output.
.It Fl out Ar file
The output file to write to,
or standard output if not specified.
.El
.Sh REQ
.Bl -hang -width "openssl req"
.It Nm openssl req
.Bk -words
.Op Fl asn1-kludge
.Op Fl batch
.Op Fl config Ar file
.Op Fl days Ar n
.Op Fl extensions Ar section
.Op Fl in Ar file
.Op Fl inform Cm der | pem
.Op Fl key Ar keyfile
.Op Fl keyform Cm der | pem
.Op Fl keyout Ar file
.Op Fl md4 | md5 | sha1
.Op Fl modulus
.Op Fl multivalue-rdn
.Op Fl nameopt Ar option
.Op Fl new
.Op Fl newhdr
.Op Fl newkey Ar arg
.Op Fl no-asn1-kludge
.Op Fl nodes
.Op Fl noout
.Op Fl out Ar file
.Op Fl outform Cm der | pem
.Op Fl passin Ar arg
.Op Fl passout Ar arg
.Op Fl pkeyopt Ar opt:value
.Op Fl pubkey
.Op Fl reqexts Ar section
.Op Fl reqopt Ar option
.Op Fl set_serial Ar n
.Op Fl sigopt Ar nm:v
.Op Fl subj Ar arg
.Op Fl subject
.Op Fl text
.Op Fl utf8
.Op Fl verbose
.Op Fl verify
.Op Fl x509
.Ek
.El
.Pp
The
.Nm req
command primarily creates and processes certificate requests
in PKCS#10 format.
It can additionally create self-signed certificates,
for use as root CAs, for example.
3005
3006
3007
3008
3009
3010
3011










3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
The message digest to sign the request with.
This overrides the digest algorithm specified in the configuration file.
.Pp
Some public key algorithms may override this choice.
For instance, DSA signatures always use SHA1.
.It Fl modulus
Print the value of the modulus of the public key contained in the request.










.It Fl nameopt Ar option , Fl reqopt Ar option
Determine how the subject or issuer names are displayed.
.Ar option
can be a single option or multiple options separated by commas.
Alternatively, these options may be used more than once to set multiple options.
See the
.Sx X509
section below for details.
.It Fl new
Generate a new certificate request.
The user is prompted for the relevant field values.
The actual fields prompted for and their maximum and minimum sizes
are specified in the configuration file and any requested extensions.
.Pp
If the
.Fl key
option is not used, it will generate a new RSA private
key using information specified in the configuration file.
.It Fl newhdr
Add the word NEW to the PEM file header and footer lines
on the outputed request.
Some software and CAs need this.
.It Fl newkey Ar arg
Create a new certificate request and a new private key.
The argument takes one of several forms.
.Pp
.No rsa : Ns Ar nbits
generates an RSA key







>
>
>
>
>
>
>
>
>
>




















|







3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
The message digest to sign the request with.
This overrides the digest algorithm specified in the configuration file.
.Pp
Some public key algorithms may override this choice.
For instance, DSA signatures always use SHA1.
.It Fl modulus
Print the value of the modulus of the public key contained in the request.
.It Fl multivalue-rdn
This option causes the
.Fl subj
argument to be interpreted with full support for multivalued RDNs,
for example
.Qq "/DC=org/DC=OpenSSL/DC=users/UID=123456+CN=John Doe" .
If
.Fl multivalue-rdn
is not used, the UID value is set to
.Qq "123456+CN=John Doe" .
.It Fl nameopt Ar option , Fl reqopt Ar option
Determine how the subject or issuer names are displayed.
.Ar option
can be a single option or multiple options separated by commas.
Alternatively, these options may be used more than once to set multiple options.
See the
.Sx X509
section below for details.
.It Fl new
Generate a new certificate request.
The user is prompted for the relevant field values.
The actual fields prompted for and their maximum and minimum sizes
are specified in the configuration file and any requested extensions.
.Pp
If the
.Fl key
option is not used, it will generate a new RSA private
key using information specified in the configuration file.
.It Fl newhdr
Add the word NEW to the PEM file header and footer lines
on the outputted request.
Some software and CAs need this.
.It Fl newkey Ar arg
Create a new certificate request and a new private key.
The argument takes one of several forms.
.Pp
.No rsa : Ns Ar nbits
generates an RSA key
3075
3076
3077
3078
3079
3080
3081





3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099



3100
3101
3102
3103
3104
3105
3106
or standard output if not specified.
.It Fl outform Cm der | pem
The output format.
.It Fl passin Ar arg
The key password source.
.It Fl passout Ar arg
The output file password source.





.It Fl pubkey
Output the public key.
.It Fl reqopt Ar option
Customise the output format used with
.Fl text .
The
.Ar option
argument can be a single option or multiple options separated by commas.
See also the discussion of
.Fl certopt
in the
.Nm x509
command.
.It Fl set_serial Ar n
Serial number to use when outputting a self-signed certificate.
This may be specified as a decimal value or a hex value if preceded by
.Sq 0x .
It is possible to use negative serial numbers but this is not recommended.



.It Fl subj Ar arg
Replaces the subject field of an input request
with the specified data and output the modified request.
.Ar arg
must be formatted as /type0=value0/type1=value1/type2=...;
characters may be escaped by
.Sq \e







>
>
>
>
>


















>
>
>







3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
or standard output if not specified.
.It Fl outform Cm der | pem
The output format.
.It Fl passin Ar arg
The key password source.
.It Fl passout Ar arg
The output file password source.
.It Fl pkeyopt Ar opt:value
Set the public key algorithm option
.Ar opt
to
.Ar value .
.It Fl pubkey
Output the public key.
.It Fl reqopt Ar option
Customise the output format used with
.Fl text .
The
.Ar option
argument can be a single option or multiple options separated by commas.
See also the discussion of
.Fl certopt
in the
.Nm x509
command.
.It Fl set_serial Ar n
Serial number to use when outputting a self-signed certificate.
This may be specified as a decimal value or a hex value if preceded by
.Sq 0x .
It is possible to use negative serial numbers but this is not recommended.
.It Fl sigopt Ar nm:v
Pass options to the signature algorithm during sign operation.
The names and values of these options are algorithm-specific.
.It Fl subj Ar arg
Replaces the subject field of an input request
with the specified data and output the modified request.
.Ar arg
must be formatted as /type0=value0/type1=value1/type2=...;
characters may be escaped by
.Sq \e
3326
3327
3328
3329
3330
3331
3332
3333
3334

3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346



3347
3348
3349

3350
3351
3352
3353
3354
3355
3356
.Cm oid_file
or
.Cm oid_section
options in the configuration file.
Any additional fields will be treated as though they were a
.Cm DirectoryString .
.Sh RSA
.nr nS 1
.Nm "openssl rsa"

.Op Fl aes128 | aes192 | aes256 | des | des3
.Op Fl check
.Op Fl in Ar file
.Op Fl inform Cm der | net | pem
.Op Fl modulus
.Op Fl noout
.Op Fl out Ar file
.Op Fl outform Cm der | net | pem
.Op Fl passin Ar arg
.Op Fl passout Ar arg
.Op Fl pubin
.Op Fl pubout



.Op Fl sgckey
.Op Fl text
.nr nS 0

.Pp
The
.Nm rsa
command processes RSA keys.
They can be converted between various forms and their components printed out.
.Nm rsa
uses the traditional







|
|
>



|



|




>
>
>


|
>







3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
.Cm oid_file
or
.Cm oid_section
options in the configuration file.
Any additional fields will be treated as though they were a
.Cm DirectoryString .
.Sh RSA
.Bl -hang -width "openssl rsa"
.It Nm openssl rsa
.Bk -words
.Op Fl aes128 | aes192 | aes256 | des | des3
.Op Fl check
.Op Fl in Ar file
.Op Fl inform Cm der | net | pem | pvk
.Op Fl modulus
.Op Fl noout
.Op Fl out Ar file
.Op Fl outform Cm der | net | pem | pvk
.Op Fl passin Ar arg
.Op Fl passout Ar arg
.Op Fl pubin
.Op Fl pubout
.Op Fl pvk-none | pvk-strong | pvk-weak
.Op Fl RSAPublicKey_in
.Op Fl RSAPublicKey_out
.Op Fl sgckey
.Op Fl text
.Ek
.El
.Pp
The
.Nm rsa
command processes RSA keys.
They can be converted between various forms and their components printed out.
.Nm rsa
uses the traditional
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403














3404
3405
3406
3407
3408
3409
3410
3411
3412

3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428

3429
3430
3431
3432
3433
3434
3435
These options can only be used with PEM format output files.
.It Fl check
Check the consistency of an RSA private key.
.It Fl in Ar file
The input file to read from,
or standard input if not specified.
If the key is encrypted, a pass phrase will be prompted for.
.It Fl inform Cm der | net | pem
The input format.
.It Fl noout
Do not output the encoded version of the key.
.It Fl modulus
Print the value of the modulus of the key.
.It Fl out Ar file
The output file to write to,
or standard output if not specified.
.It Fl outform Cm der | net | pem
The output format.
.It Fl passin Ar arg
The key password source.
.It Fl passout Ar arg
The output file password source.
.It Fl pubin
Read in a public key,
not a private key.
.It Fl pubout
Output a public key,
not a private key.
Automatically set if the input is a public key.














.It Fl sgckey
Use the modified NET algorithm used with some versions of Microsoft IIS
and SGC keys.
.It Fl text
Print the public/private key components in plain text.
.El
.Sh RSAUTL
.nr nS 1
.Nm "openssl rsautl"

.Op Fl asn1parse
.Op Fl certin
.Op Fl decrypt
.Op Fl encrypt
.Op Fl hexdump
.Op Fl in Ar file
.Op Fl inkey Ar file
.Op Fl keyform Cm der | pem
.Op Fl oaep | pkcs | raw | x931
.Op Fl out Ar file
.Op Fl passin Ar arg
.Op Fl pubin
.Op Fl rev
.Op Fl sign
.Op Fl verify
.nr nS 0

.Pp
The
.Nm rsautl
command can be used to sign, verify, encrypt and decrypt
data using the RSA algorithm.
.Pp
The options are as follows:







|








|












>
>
>
>
>
>
>
>
>
>
>
>
>
>







|
|
>















|
>







3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
These options can only be used with PEM format output files.
.It Fl check
Check the consistency of an RSA private key.
.It Fl in Ar file
The input file to read from,
or standard input if not specified.
If the key is encrypted, a pass phrase will be prompted for.
.It Fl inform Cm der | net | pem | pvk
The input format.
.It Fl noout
Do not output the encoded version of the key.
.It Fl modulus
Print the value of the modulus of the key.
.It Fl out Ar file
The output file to write to,
or standard output if not specified.
.It Fl outform Cm der | net | pem | pvk
The output format.
.It Fl passin Ar arg
The key password source.
.It Fl passout Ar arg
The output file password source.
.It Fl pubin
Read in a public key,
not a private key.
.It Fl pubout
Output a public key,
not a private key.
Automatically set if the input is a public key.
.It Xo
.Fl pvk-none | pvk-strong | pvk-weak
.Xc
Enable or disable PVK encoding.
The default is
.Fl pvk-strong .
.It Fl RSAPublicKey_in , RSAPublicKey_out
Same as
.Fl pubin
and
.Fl pubout
except
.Cm RSAPublicKey
format is used instead.
.It Fl sgckey
Use the modified NET algorithm used with some versions of Microsoft IIS
and SGC keys.
.It Fl text
Print the public/private key components in plain text.
.El
.Sh RSAUTL
.Bl -hang -width "openssl rsautl"
.It Nm openssl rsautl
.Bk -words
.Op Fl asn1parse
.Op Fl certin
.Op Fl decrypt
.Op Fl encrypt
.Op Fl hexdump
.Op Fl in Ar file
.Op Fl inkey Ar file
.Op Fl keyform Cm der | pem
.Op Fl oaep | pkcs | raw | x931
.Op Fl out Ar file
.Op Fl passin Ar arg
.Op Fl pubin
.Op Fl rev
.Op Fl sign
.Op Fl verify
.Ek
.El
.Pp
The
.Nm rsautl
command can be used to sign, verify, encrypt and decrypt
data using the RSA algorithm.
.Pp
The options are as follows:
3476
3477
3478
3479
3480
3481
3482
3483
3484

3485

3486
3487
3488
3489

3490
3491
3492
3493
3494
3495
3496

3497
3498

3499
3500
3501
3502




3503

3504
3505



3506
3507
3508
3509

3510
3511

3512
3513
3514
3515
3516
3517
3518



3519
3520
3521


3522
3523
3524
3525

3526

3527
3528
3529

3530
3531
3532
3533
3534
3535
3536
.It Fl sign
Sign the input data and output the signed result.
This requires an RSA private key.
.It Fl verify
Verify the input data and output the recovered data.
.El
.Sh S_CLIENT
.nr nS 1
.Nm "openssl s_client"

.Op Fl 4 | 6

.Op Fl bugs
.Op Fl CAfile Ar file
.Op Fl CApath Ar directory
.Op Fl cert Ar file

.Op Fl check_ss_sig
.Op Fl cipher Ar cipherlist
.Op Fl connect Ar host Ns Op : Ns Ar port
.Op Fl crl_check
.Op Fl crl_check_all
.Op Fl crlf
.Op Fl debug

.Op Fl extended_crl
.Op Fl groups

.Op Fl ign_eof
.Op Fl ignore_critical
.Op Fl issuer_checks
.Op Fl key Ar keyfile




.Op Fl msg

.Op Fl nbio
.Op Fl nbio_test



.Op Fl no_ticket
.Op Fl no_tls1
.Op Fl no_tls1_1
.Op Fl no_tls1_2

.Op Fl pause
.Op Fl policy_check

.Op Fl prexit
.Op Fl proxy Ar host : Ns Ar port
.Op Fl psk Ar key
.Op Fl psk_identity Ar identity
.Op Fl quiet
.Op Fl reconnect
.Op Fl servername Ar name



.Op Fl showcerts
.Op Fl starttls Ar protocol
.Op Fl state


.Op Fl tls1
.Op Fl tls1_1
.Op Fl tls1_2
.Op Fl tlsextdebug

.Op Fl verify Ar depth

.Op Fl x509_strict
.Op Fl xmpphost Ar host
.nr nS 0

.Pp
The
.Nm s_client
command implements a generic SSL/TLS client which connects
to a remote host using SSL/TLS.
.Pp
If a connection is established with an SSL server, any data received







|
|
>

>




>







>


>




>
>
>
>

>


>
>
>




>


>


<
<



>
>
>



>
>




>

>


|
>







3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700


3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
.It Fl sign
Sign the input data and output the signed result.
This requires an RSA private key.
.It Fl verify
Verify the input data and output the recovered data.
.El
.Sh S_CLIENT
.Bl -hang -width "openssl s_client"
.It Nm openssl s_client
.Bk -words
.Op Fl 4 | 6
.Op Fl alpn Ar protocols
.Op Fl bugs
.Op Fl CAfile Ar file
.Op Fl CApath Ar directory
.Op Fl cert Ar file
.Op Fl certform Cm der | pem
.Op Fl check_ss_sig
.Op Fl cipher Ar cipherlist
.Op Fl connect Ar host Ns Op : Ns Ar port
.Op Fl crl_check
.Op Fl crl_check_all
.Op Fl crlf
.Op Fl debug
.Op Fl dtls1
.Op Fl extended_crl
.Op Fl groups
.Op Fl host Ar host
.Op Fl ign_eof
.Op Fl ignore_critical
.Op Fl issuer_checks
.Op Fl key Ar keyfile
.Op Fl keyform Cm der | pem
.Op Fl keymatexport Ar label
.Op Fl keymatexportlen Ar len
.Op Fl legacy_server_connect
.Op Fl msg
.Op Fl mtu Ar mtu
.Op Fl nbio
.Op Fl nbio_test
.Op Fl no_comp
.Op Fl no_ign_eof
.Op Fl no_legacy_server_connect
.Op Fl no_ticket
.Op Fl no_tls1
.Op Fl no_tls1_1
.Op Fl no_tls1_2
.Op Fl pass Ar arg
.Op Fl pause
.Op Fl policy_check
.Op Fl port Ar port
.Op Fl prexit
.Op Fl proxy Ar host : Ns Ar port


.Op Fl quiet
.Op Fl reconnect
.Op Fl servername Ar name
.Op Fl serverpref
.Op Fl sess_in Ar file
.Op Fl sess_out Ar file
.Op Fl showcerts
.Op Fl starttls Ar protocol
.Op Fl state
.Op Fl status
.Op Fl timeout
.Op Fl tls1
.Op Fl tls1_1
.Op Fl tls1_2
.Op Fl tlsextdebug
.Op Fl use_srtp Ar profiles
.Op Fl verify Ar depth
.Op Fl verify_return_error
.Op Fl x509_strict
.Op Fl xmpphost Ar host
.Ek
.El
.Pp
The
.Nm s_client
command implements a generic SSL/TLS client which connects
to a remote host using SSL/TLS.
.Pp
If a connection is established with an SSL server, any data received
3548
3549
3550
3551
3552
3553
3554





3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574




3575
3576
3577
3578
3579
3580
3581
.Pp
The options are as follows:
.Bl -tag -width Ds
.It Fl 4
Attempt connections using IPv4 only.
.It Fl 6
Attempt connections using IPv6 only.





.It Fl bugs
Enable various workarounds for buggy implementations.
.It Fl CAfile Ar file
A
.Ar file
containing trusted certificates to use during server authentication
and to use when attempting to build the client certificate chain.
.It Fl CApath Ar directory
The
.Ar directory
to use for server certificate verification.
This directory must be in
.Qq hash format ;
see
.Fl verify
for more information.
These are also used when building the client certificate chain.
.It Fl cert Ar file
The certificate to use, if one is requested by the server.
The default is not to use a certificate.




.It Xo
.Fl check_ss_sig ,
.Fl crl_check ,
.Fl crl_check_all ,
.Fl extended_crl ,
.Fl ignore_critical ,
.Fl issuer_checks ,







>
>
>
>
>




















>
>
>
>







3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
.Pp
The options are as follows:
.Bl -tag -width Ds
.It Fl 4
Attempt connections using IPv4 only.
.It Fl 6
Attempt connections using IPv6 only.
.It Fl alpn Ar protocols
Enable the Application-Layer Protocol Negotiation.
.Ar protocols
is a comma-separated list of protocol names that the client should advertise
support for.
.It Fl bugs
Enable various workarounds for buggy implementations.
.It Fl CAfile Ar file
A
.Ar file
containing trusted certificates to use during server authentication
and to use when attempting to build the client certificate chain.
.It Fl CApath Ar directory
The
.Ar directory
to use for server certificate verification.
This directory must be in
.Qq hash format ;
see
.Fl verify
for more information.
These are also used when building the client certificate chain.
.It Fl cert Ar file
The certificate to use, if one is requested by the server.
The default is not to use a certificate.
.It Fl certform Cm der | pem
The certificate format.
The default is
.Cm pem .
.It Xo
.Fl check_ss_sig ,
.Fl crl_check ,
.Fl crl_check_all ,
.Fl extended_crl ,
.Fl ignore_critical ,
.Fl issuer_checks ,
3605
3606
3607
3608
3609
3610
3611


3612
3613





3614
3615
3616
3617
3618










3619
3620


3621
3622
3623
3624






3625
3626
3627
3628


3629
3630





3631
3632
3633
3634
3635
3636
3637
character,
which is useful for numeric IPv6 addresses.
.It Fl crlf
Translate a line feed from the terminal into CR+LF,
as required by some servers.
.It Fl debug
Print extensive debugging information, including a hex dump of all traffic.


.It Fl groups Ar ecgroups
Specify a colon-separated list of permitted EC curve groups.





.It Fl ign_eof
Inhibit shutting down the connection when end of file is reached in the input.
.It Fl key Ar keyfile
The private key to use.
If not specified, the certificate file will be used.










.It Fl msg
Show all protocol messages with hex dump.


.It Fl nbio
Turn on non-blocking I/O.
.It Fl nbio_test
Test non-blocking I/O.






.It Fl no_tls1 | no_tls1_1 | no_tls1_2
Disable the use of TLS1.0, 1.1, and 1.2, respectively.
.It Fl no_ticket
Disable RFC 4507 session ticket support.


.It Fl pause
Pause 1 second between each read and write call.





.It Fl prexit
Print session information when the program exits.
This will always attempt
to print out information even if the connection fails.
Normally, information will only be printed out once if the connection succeeds.
This option is useful because the cipher in use may be renegotiated
or the connection may fail because a client certificate is required or is







>
>


>
>
>
>
>





>
>
>
>
>
>
>
>
>
>


>
>




>
>
>
>
>
>




>
>


>
>
>
>
>







3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
3869
3870
3871
character,
which is useful for numeric IPv6 addresses.
.It Fl crlf
Translate a line feed from the terminal into CR+LF,
as required by some servers.
.It Fl debug
Print extensive debugging information, including a hex dump of all traffic.
.It Fl dtls1
Permit only DTLS1.0.
.It Fl groups Ar ecgroups
Specify a colon-separated list of permitted EC curve groups.
.It Fl host Ar host
The
.Ar host
to connect to.
The default is localhost.
.It Fl ign_eof
Inhibit shutting down the connection when end of file is reached in the input.
.It Fl key Ar keyfile
The private key to use.
If not specified, the certificate file will be used.
.It Fl keyform Cm der | pem
The private key format.
The default is
.Cm pem .
.It Fl keymatexport Ar label
Export keying material using label.
.It Fl keymatexportlen Ar len
Export len bytes of keying material (default 20).
.It Fl legacy_server_connect , no_legacy_server_connect
Allow or disallow initial connection to servers that don't support RI.
.It Fl msg
Show all protocol messages with hex dump.
.It Fl mtu Ar mtu
Set the link layer MTU.
.It Fl nbio
Turn on non-blocking I/O.
.It Fl nbio_test
Test non-blocking I/O.
.It Fl no_ign_eof
Shut down the connection when end of file is reached in the input.
Can be used to override the implicit
.Fl ign_eof
after
.Fl quiet .
.It Fl no_tls1 | no_tls1_1 | no_tls1_2
Disable the use of TLS1.0, 1.1, and 1.2, respectively.
.It Fl no_ticket
Disable RFC 4507 session ticket support.
.It Fl pass Ar arg
The private key password source.
.It Fl pause
Pause 1 second between each read and write call.
.It Fl port Ar port
The
.Ar port
to connect to.
The default is 4433.
.It Fl prexit
Print session information when the program exits.
This will always attempt
to print out information even if the connection fails.
Normally, information will only be printed out once if the connection succeeds.
This option is useful because the cipher in use may be renegotiated
or the connection may fail because a client certificate is required or is
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676







3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689





3690
3691
3692
3693


3694
3695
3696
3697
3698
3699
3700
3701


3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712

3713

3714
3715
3716
3717


3718
3719
3720
3721
3722
3723

3724
3725
3726


3727
3728
3729
3730




3731


3732
3733

3734


3735
3736
3737
3738
3739
3740
3741

3742
3743
3744





3745
3746
3747


3748
3749

3750
3751
3752

3753
3754
3755
3756
3757
3758
3759
.Ar port .
The connection to the proxy is done in cleartext and the
.Fl connect
argument is given to the proxy.
If not specified, localhost is used as final destination.
After that, switch the connection through the proxy to the destination
to TLS.
.It Fl psk Ar key
Use the PSK key
.Ar key
when using a PSK cipher suite.
The key is given as a hexadecimal number without the leading 0x,
for example -psk 1a2b3c4d.
.It Fl psk_identity Ar identity
Use the PSK
.Ar identity
when using a PSK cipher suite.
.It Fl quiet
Inhibit printing of session and certificate information.
This implicitly turns on
.Fl ign_eof
as well.
.It Fl reconnect
Reconnect to the same server 5 times using the same session ID; this can
be used as a test that session caching is working.
.It Fl servername Ar name
Include the TLS Server Name Indication (SNI) extension in the ClientHello
message, using the specified server
.Ar name .
.It Fl showcerts
Display the whole server certificate chain: normally only the server
certificate itself is displayed.







.It Fl starttls Ar protocol
Send the protocol-specific messages to switch to TLS for communication.
.Ar protocol
is a keyword for the intended protocol.
Currently, the supported keywords are
.Qq ftp ,
.Qq imap ,
.Qq smtp ,
.Qq pop3 ,
and
.Qq xmpp .
.It Fl state
Print the SSL session states.





.It Fl tls1 | tls1_1 | tls1_2
Permit only TLS1.0, 1.1, or 1.2, respectively.
.It Fl tlsextdebug
Print a hex dump of any TLS extensions received from the server.


.It Fl verify Ar depth
Turn on server certificate verification,
with a maximum length of
.Ar depth .
Currently the verify operation continues after errors so all the problems
with a certificate chain can be seen.
As a side effect the connection will never fail due to a server
certificate verify failure.


.It Fl xmpphost Ar hostname
When used with
.Fl starttls Ar xmpp ,
specify the host for the "to" attribute of the stream element.
If this option is not specified then the host specified with
.Fl connect
will be used.
.El
.Sh S_SERVER
.nr nS 1
.Nm "openssl s_server"

.Op Fl accept Ar port

.Op Fl bugs
.Op Fl CAfile Ar file
.Op Fl CApath Ar directory
.Op Fl cert Ar file


.Op Fl cipher Ar cipherlist
.Op Fl context Ar id
.Op Fl crl_check
.Op Fl crl_check_all
.Op Fl crlf
.Op Fl dcert Ar file

.Op Fl debug
.Op Fl dhparam Ar file
.Op Fl dkey Ar file


.Op Fl hack
.Op Fl HTTP
.Op Fl id_prefix Ar arg
.Op Fl key Ar keyfile




.Op Fl msg


.Op Fl nbio
.Op Fl nbio_test

.Op Fl no_dhe


.Op Fl no_tls1
.Op Fl no_tls1_1
.Op Fl no_tls1_2
.Op Fl no_tmp_rsa
.Op Fl nocert
.Op Fl psk Ar key
.Op Fl psk_hint Ar hint

.Op Fl quiet
.Op Fl serverpref
.Op Fl state





.Op Fl tls1
.Op Fl tls1_1
.Op Fl tls1_2


.Op Fl Verify Ar depth
.Op Fl verify Ar depth

.Op Fl WWW
.Op Fl www
.nr nS 0

.Pp
The
.Nm s_server
command implements a generic SSL/TLS server which listens
for connections on a given port using SSL/TLS.
.Pp
If a connection request is established with a client and neither the







<
<
<
<
<
<
<
<
<
<















>
>
>
>
>
>
>













>
>
>
>
>




>
>








>
>









|
|
>

>




>
>






>



>
>
|



>
>
>
>

>
>


>

>
>





|
|
>
|


>
>
>
>
>



>
>


>


|
>







3879
3880
3881
3882
3883
3884
3885










3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
3901
3902
3903
3904
3905
3906
3907
3908
3909
3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
3930
3931
3932
3933
3934
3935
3936
3937
3938
3939
3940
3941
3942
3943
3944
3945
3946
3947
3948
3949
3950
3951
3952
3953
3954
3955
3956
3957
3958
3959
3960
3961
3962
3963
3964
3965
3966
3967
3968
3969
3970
3971
3972
3973
3974
3975
3976
3977
3978
3979
3980
3981
3982
3983
3984
3985
3986
3987
3988
3989
3990
3991
3992
3993
3994
3995
3996
3997
3998
3999
4000
4001
4002
4003
4004
4005
4006
4007
4008
4009
4010
4011
4012
4013
4014
4015
4016
4017
4018
4019
4020
4021
4022
4023
4024
4025
.Ar port .
The connection to the proxy is done in cleartext and the
.Fl connect
argument is given to the proxy.
If not specified, localhost is used as final destination.
After that, switch the connection through the proxy to the destination
to TLS.










.It Fl quiet
Inhibit printing of session and certificate information.
This implicitly turns on
.Fl ign_eof
as well.
.It Fl reconnect
Reconnect to the same server 5 times using the same session ID; this can
be used as a test that session caching is working.
.It Fl servername Ar name
Include the TLS Server Name Indication (SNI) extension in the ClientHello
message, using the specified server
.Ar name .
.It Fl showcerts
Display the whole server certificate chain: normally only the server
certificate itself is displayed.
.It Fl serverpref
Use the server's cipher preferences.
.It Fl sess_in Ar file
Load TLS session from file.
The client will attempt to resume a connection from this session.
.It Fl sess_out Ar file
Output TLS session to file.
.It Fl starttls Ar protocol
Send the protocol-specific messages to switch to TLS for communication.
.Ar protocol
is a keyword for the intended protocol.
Currently, the supported keywords are
.Qq ftp ,
.Qq imap ,
.Qq smtp ,
.Qq pop3 ,
and
.Qq xmpp .
.It Fl state
Print the SSL session states.
.It Fl status
Send a certificate status request to the server (OCSP stapling).
The server response (if any) is printed out.
.It Fl timeout
Enable send/receive timeout on DTLS connections.
.It Fl tls1 | tls1_1 | tls1_2
Permit only TLS1.0, 1.1, or 1.2, respectively.
.It Fl tlsextdebug
Print a hex dump of any TLS extensions received from the server.
.It Fl use_srtp Ar profiles
Offer SRTP key management with a colon-separated profile list.
.It Fl verify Ar depth
Turn on server certificate verification,
with a maximum length of
.Ar depth .
Currently the verify operation continues after errors so all the problems
with a certificate chain can be seen.
As a side effect the connection will never fail due to a server
certificate verify failure.
.It Fl verify_return_error
Return verification error.
.It Fl xmpphost Ar hostname
When used with
.Fl starttls Ar xmpp ,
specify the host for the "to" attribute of the stream element.
If this option is not specified then the host specified with
.Fl connect
will be used.
.El
.Sh S_SERVER
.Bl -hang -width "openssl s_server"
.It Nm openssl s_server
.Bk -words
.Op Fl accept Ar port
.Op Fl alpn Ar protocols
.Op Fl bugs
.Op Fl CAfile Ar file
.Op Fl CApath Ar directory
.Op Fl cert Ar file
.Op Fl cert2 Ar file
.Op Fl certform Cm der | pem
.Op Fl cipher Ar cipherlist
.Op Fl context Ar id
.Op Fl crl_check
.Op Fl crl_check_all
.Op Fl crlf
.Op Fl dcert Ar file
.Op Fl dcertform Cm der | pem
.Op Fl debug
.Op Fl dhparam Ar file
.Op Fl dkey Ar file
.Op Fl dkeyform Cm der | pem
.Op Fl dpass Ar arg
.Op Fl dtls1
.Op Fl HTTP
.Op Fl id_prefix Ar arg
.Op Fl key Ar keyfile
.Op Fl key2 Ar keyfile
.Op Fl keyform Cm der | pem
.Op Fl keymatexport Ar label
.Op Fl keymatexportlen Ar len
.Op Fl msg
.Op Fl mtu Ar mtu
.Op Fl named_curve Ar arg
.Op Fl nbio
.Op Fl nbio_test
.Op Fl no_cache
.Op Fl no_dhe
.Op Fl no_ecdhe
.Op Fl no_ticket
.Op Fl no_tls1
.Op Fl no_tls1_1
.Op Fl no_tls1_2
.Op Fl no_tmp_rsa
.Op Fl nocert
.Op Fl pass Ar arg
.Op Fl quiet
.Op Fl servername Ar name
.Op Fl servername_fatal
.Op Fl serverpref
.Op Fl state
.Op Fl status
.Op Fl status_timeout Ar nsec
.Op Fl status_url Ar url
.Op Fl status_verbose
.Op Fl timeout
.Op Fl tls1
.Op Fl tls1_1
.Op Fl tls1_2
.Op Fl tlsextdebug
.Op Fl use_srtp Ar profiles
.Op Fl Verify Ar depth
.Op Fl verify Ar depth
.Op Fl verify_return_error
.Op Fl WWW
.Op Fl www
.Ek
.El
.Pp
The
.Nm s_server
command implements a generic SSL/TLS server which listens
for connections on a given port using SSL/TLS.
.Pp
If a connection request is established with a client and neither the
3782
3783
3784
3785
3786
3787
3788




3789
3790
3791
3792
3793
3794
3795
The options are as follows:
.Bl -tag -width Ds
.It Fl accept Ar port
Listen on TCP
.Ar port
for connections.
The default is port 4433.




.It Fl bugs
Enable various workarounds for buggy implementations.
.It Fl CAfile Ar file
A
.Ar file
containing trusted certificates to use during client authentication
and to use when attempting to build the server certificate chain.







>
>
>
>







4048
4049
4050
4051
4052
4053
4054
4055
4056
4057
4058
4059
4060
4061
4062
4063
4064
4065
The options are as follows:
.Bl -tag -width Ds
.It Fl accept Ar port
Listen on TCP
.Ar port
for connections.
The default is port 4433.
.It Fl alpn Ar protocols
Enable the Application-Layer Protocol Negotiation.
.Ar protocols
is a comma-separated list of supported protocol names.
.It Fl bugs
Enable various workarounds for buggy implementations.
.It Fl CAfile Ar file
A
.Ar file
containing trusted certificates to use during client authentication
and to use when attempting to build the server certificate chain.
3809
3810
3811
3812
3813
3814
3815






3816
3817
3818
3819
3820
3821
3822
The certificate to use: most server's cipher suites require the use of a
certificate and some require a certificate with a certain public key type.
For example, the DSS cipher suites require a certificate containing a DSS
(DSA) key.
If not specified, the file
.Pa server.pem
will be used.






.It Fl cipher Ar cipherlist
Modify the cipher list used by the server.
This allows the cipher list used by the server to be modified.
When the client sends a list of supported ciphers, the first client cipher
also included in the server list is used.
Because the client specifies the preference order, the order of the server
cipherlist is irrelevant.







>
>
>
>
>
>







4079
4080
4081
4082
4083
4084
4085
4086
4087
4088
4089
4090
4091
4092
4093
4094
4095
4096
4097
4098
The certificate to use: most server's cipher suites require the use of a
certificate and some require a certificate with a certain public key type.
For example, the DSS cipher suites require a certificate containing a DSS
(DSA) key.
If not specified, the file
.Pa server.pem
will be used.
.It Fl cert2 Ar file
The certificate to use for servername.
.It Fl certform Cm der | pem
The certificate format.
The default is
.Cm pem .
.It Fl cipher Ar cipherlist
Modify the cipher list used by the server.
This allows the cipher list used by the server to be modified.
When the client sends a list of supported ciphers, the first client cipher
also included in the server list is used.
Because the client specifies the preference order, the order of the server
cipherlist is irrelevant.
3840
3841
3842
3843
3844
3845
3846



3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
3869
3870
3871
3872
3873
3874
3875
3876
3877
3878
3879










3880
3881




3882
3883
3884
3885


3886
3887




3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
3901
3902
3903
3904
3905
3906
3907






3908
3909
3910
3911














3912
3913






3914
3915
3916
3917
3918
3919
3920
and
.Fl key
options except there is no default if they are not specified
(no additional certificate or key is used).
By using RSA and DSS certificates and keys,
a server can support clients which only support RSA or DSS cipher suites
by using an appropriate certificate.



.It Fl debug
Print extensive debugging information, including a hex dump of all traffic.
.It Fl dhparam Ar file
The DH parameter file to use.
The ephemeral DH cipher suites generate keys
using a set of DH parameters.
If not specified, an attempt is made to
load the parameters from the server certificate file.
If this fails, a static set of parameters hard coded into the
.Nm s_server
program will be used.
.It Fl hack
Enables a further workaround for some early Netscape SSL code.
.It Fl HTTP
Emulate a simple web server.
Pages are resolved relative to the current directory.
For example if the URL
.Pa https://myhost/page.html
is requested, the file
.Pa ./page.html
will be loaded.
The files loaded are assumed to contain a complete and correct HTTP
response (lines that are part of the HTTP response line and headers
must end with CRLF).
.It Fl id_prefix Ar arg
Generate SSL/TLS session IDs prefixed by
.Ar arg .
This is mostly useful for testing any SSL/TLS code
that wish to deal with multiple servers,
when each of which might be generating a unique range of session IDs.
.It Fl key Ar keyfile
The private key to use.
If not specified, the certificate file will be used.










.It Fl msg
Show all protocol messages with hex dump.




.It Fl nbio
Turn on non-blocking I/O.
.It Fl nbio_test
Test non-blocking I/O.


.It Fl no_dhe
Disable ephemeral DH cipher suites.




.It Fl no_tls1 | no_tls1_1 | no_tls1_2
Disable the use of TLS1.0, 1.1, and 1.2, respectively.
.It Fl no_tmp_rsa
Disable temporary RSA key generation.
.It Fl nocert
Do not use a certificate.
This restricts the cipher suites available to the anonymous ones
(currently just anonymous DH).
.It Fl psk Ar key
Use the PSK key
.Ar key
when using a PSK cipher suite.
The key is given as a hexadecimal number without the leading 0x,
for example -psk 1a2b3c4d.
.It Fl psk_hint Ar hint
Use the PSK identity hint
.Ar hint
when using a PSK cipher suite.
.It Fl quiet
Inhibit printing of session and certificate information.






.It Fl serverpref
Use server's cipher preferences.
.It Fl state
Print the SSL session states.














.It Fl tls1 | tls1_1 | tls1_2
Permit only TLS1.0, 1.1, or 1.2, respectively.






.It Fl WWW
Emulate a simple web server.
Pages are resolved relative to the current directory.
For example if the URL
.Pa https://myhost/page.html
is requested, the file
.Pa ./page.html







>
>
>











|
|




















>
>
>
>
>
>
>
>
>
>


>
>
>
>




>
>


>
>
>
>








|
<
|
<
<
<
<
<
<
<


>
>
>
>
>
>




>
>
>
>
>
>
>
>
>
>
>
>
>
>


>
>
>
>
>
>







4116
4117
4118
4119
4120
4121
4122
4123
4124
4125
4126
4127
4128
4129
4130
4131
4132
4133
4134
4135
4136
4137
4138
4139
4140
4141
4142
4143
4144
4145
4146
4147
4148
4149
4150
4151
4152
4153
4154
4155
4156
4157
4158
4159
4160
4161
4162
4163
4164
4165
4166
4167
4168
4169
4170
4171
4172
4173
4174
4175
4176
4177
4178
4179
4180
4181
4182
4183
4184
4185
4186
4187
4188
4189
4190
4191
4192
4193
4194
4195

4196







4197
4198
4199
4200
4201
4202
4203
4204
4205
4206
4207
4208
4209
4210
4211
4212
4213
4214
4215
4216
4217
4218
4219
4220
4221
4222
4223
4224
4225
4226
4227
4228
4229
4230
4231
4232
4233
4234
4235
4236
4237
and
.Fl key
options except there is no default if they are not specified
(no additional certificate or key is used).
By using RSA and DSS certificates and keys,
a server can support clients which only support RSA or DSS cipher suites
by using an appropriate certificate.
.It Fl dcertform Cm der | pem , Fl dkeyform Cm der | pem , Fl dpass Ar arg
Additional certificate and private key format, and private key password source,
respectively.
.It Fl debug
Print extensive debugging information, including a hex dump of all traffic.
.It Fl dhparam Ar file
The DH parameter file to use.
The ephemeral DH cipher suites generate keys
using a set of DH parameters.
If not specified, an attempt is made to
load the parameters from the server certificate file.
If this fails, a static set of parameters hard coded into the
.Nm s_server
program will be used.
.It Fl dtls1
Permit only DTLS1.0.
.It Fl HTTP
Emulate a simple web server.
Pages are resolved relative to the current directory.
For example if the URL
.Pa https://myhost/page.html
is requested, the file
.Pa ./page.html
will be loaded.
The files loaded are assumed to contain a complete and correct HTTP
response (lines that are part of the HTTP response line and headers
must end with CRLF).
.It Fl id_prefix Ar arg
Generate SSL/TLS session IDs prefixed by
.Ar arg .
This is mostly useful for testing any SSL/TLS code
that wish to deal with multiple servers,
when each of which might be generating a unique range of session IDs.
.It Fl key Ar keyfile
The private key to use.
If not specified, the certificate file will be used.
.It Fl key2 Ar keyfile
The private key to use for servername.
.It Fl keyform Cm der | pem
The private key format.
The default is
.Cm pem .
.It Fl keymatexport Ar label
Export keying material using label.
.It Fl keymatexportlen Ar len
Export len bytes of keying material (default 20).
.It Fl msg
Show all protocol messages with hex dump.
.It Fl mtu Ar mtu
Set the link layer MTU.
.It Fl named_curve Ar arg
Specify the elliptic curve name to use for ephemeral ECDH keys.
.It Fl nbio
Turn on non-blocking I/O.
.It Fl nbio_test
Test non-blocking I/O.
.It Fl no_cache
Disable session caching.
.It Fl no_dhe
Disable ephemeral DH cipher suites.
.It Fl no_ecdhe
Disable ephemeral ECDH cipher suites.
.It Fl no_ticket
Disable RFC 4507 session ticket support.
.It Fl no_tls1 | no_tls1_1 | no_tls1_2
Disable the use of TLS1.0, 1.1, and 1.2, respectively.
.It Fl no_tmp_rsa
Disable temporary RSA key generation.
.It Fl nocert
Do not use a certificate.
This restricts the cipher suites available to the anonymous ones
(currently just anonymous DH).
.It Fl pass Ar arg

The private key password source.







.It Fl quiet
Inhibit printing of session and certificate information.
.It Fl servername Ar name
Set the TLS Server Name Indication (SNI) extension with
.Ar name .
.It Fl servername_fatal
Send fatal alert if servername does not match.
The default is warning alert.
.It Fl serverpref
Use server's cipher preferences.
.It Fl state
Print the SSL session states.
.It Fl status
Enables certificate status request support (OCSP stapling).
.It Fl status_timeout Ar nsec
Sets the timeout for OCSP response in seconds.
.It Fl status_url Ar url
Sets a fallback responder URL to use if no responder URL is present in the
server certificate.
Without this option, an error is returned if the server certificate does not
contain a responder address.
.It Fl status_verbose
Enables certificate status request support (OCSP stapling) and gives a verbose
printout of the OCSP response.
.It Fl timeout
Enable send/receive timeout on DTLS connections.
.It Fl tls1 | tls1_1 | tls1_2
Permit only TLS1.0, 1.1, or 1.2, respectively.
.It Fl tlsextdebug
Print a hex dump of any TLS extensions received from the server.
.It Fl use_srtp Ar profiles
Offer SRTP key management with a colon-separated profile list.
.It Fl verify_return_error
Return verification error.
.It Fl WWW
Emulate a simple web server.
Pages are resolved relative to the current directory.
For example if the URL
.Pa https://myhost/page.html
is requested, the file
.Pa ./page.html
3932
3933
3934
3935
3936
3937
3938
3939
3940

3941
3942
3943
3944
3945
3946
3947
3948
3949
3950
3951
3952
3953
3954
3955

3956
3957
3958
3959
3960
3961
3962
.Fl Verify ,
the client must supply a certificate or an error occurs;
with
.Fl verify ,
a certificate is requested but the client does not have to send one.
.El
.Sh S_TIME
.nr nS 1
.Nm "openssl s_time"

.Op Fl bugs
.Op Fl CAfile Ar file
.Op Fl CApath Ar directory
.Op Fl cert Ar file
.Op Fl cipher Ar cipherlist
.Op Fl connect Ar host Ns Op : Ns Ar port
.Op Fl key Ar keyfile
.Op Fl nbio
.Op Fl new
.Op Fl no_shutdown
.Op Fl reuse
.Op Fl time Ar seconds
.Op Fl verify Ar depth
.Op Fl www Ar page
.nr nS 0

.Pp
The
.Nm s_time
command implements a generic SSL/TLS client which connects to a
remote host using SSL/TLS.
It can request a page from the server and includes
the time to transfer the payload data in its timing measurements.







|
|
>














|
>







4249
4250
4251
4252
4253
4254
4255
4256
4257
4258
4259
4260
4261
4262
4263
4264
4265
4266
4267
4268
4269
4270
4271
4272
4273
4274
4275
4276
4277
4278
4279
4280
4281
.Fl Verify ,
the client must supply a certificate or an error occurs;
with
.Fl verify ,
a certificate is requested but the client does not have to send one.
.El
.Sh S_TIME
.Bl -hang -width "openssl s_time"
.It Nm openssl s_time
.Bk -words
.Op Fl bugs
.Op Fl CAfile Ar file
.Op Fl CApath Ar directory
.Op Fl cert Ar file
.Op Fl cipher Ar cipherlist
.Op Fl connect Ar host Ns Op : Ns Ar port
.Op Fl key Ar keyfile
.Op Fl nbio
.Op Fl new
.Op Fl no_shutdown
.Op Fl reuse
.Op Fl time Ar seconds
.Op Fl verify Ar depth
.Op Fl www Ar page
.Ek
.El
.Pp
The
.Nm s_time
command implements a generic SSL/TLS client which connects to a
remote host using SSL/TLS.
It can request a page from the server and includes
the time to transfer the payload data in its timing measurements.
4040
4041
4042
4043
4044
4045
4046
4047
4048

4049
4050
4051
4052
4053
4054
4055
4056
4057

4058
4059
4060
4061
4062
4063
4064
gets the index.htm[l] page.
If this parameter is not specified,
.Nm s_time
will only perform the handshake to establish SSL connections
but not transfer any payload data.
.El
.Sh SESS_ID
.nr nS 1
.Nm "openssl sess_id"

.Op Fl cert
.Op Fl context Ar ID
.Op Fl in Ar file
.Op Fl inform Cm der | pem
.Op Fl noout
.Op Fl out Ar file
.Op Fl outform Cm der | pem
.Op Fl text
.nr nS 0

.Pp
The
.Nm sess_id
program processes the encoded version of the SSL session structure and
optionally prints out SSL session details
(for example the SSL session master key)
in human-readable format.







|
|
>








|
>







4359
4360
4361
4362
4363
4364
4365
4366
4367
4368
4369
4370
4371
4372
4373
4374
4375
4376
4377
4378
4379
4380
4381
4382
4383
4384
4385
gets the index.htm[l] page.
If this parameter is not specified,
.Nm s_time
will only perform the handshake to establish SSL connections
but not transfer any payload data.
.El
.Sh SESS_ID
.Bl -hang -width "openssl sess_id"
.It Nm openssl sess_id
.Bk -words
.Op Fl cert
.Op Fl context Ar ID
.Op Fl in Ar file
.Op Fl inform Cm der | pem
.Op Fl noout
.Op Fl out Ar file
.Op Fl outform Cm der | pem
.Op Fl text
.Ek
.El
.Pp
The
.Nm sess_id
program processes the encoded version of the SSL session structure and
optionally prints out SSL session details
(for example the SSL session master key)
in human-readable format.
4130
4131
4132
4133
4134
4135
4136
4137
4138

4139
4140
4141
4142
4143
4144
4145
Therefore appropriate security precautions
should be taken if the information is being output by a
.Qq real
application.
This is, however, strongly discouraged and should only be used for
debugging purposes.
.Sh SMIME
.nr nS 1
.Nm "openssl smime"

.Oo
.Fl aes128 | aes192 | aes256 | des |
.Fl des3 | rc2-40 | rc2-64 | rc2-128
.Oc
.Op Fl binary
.Op Fl CAfile Ar file
.Op Fl CApath Ar directory







|
|
>







4451
4452
4453
4454
4455
4456
4457
4458
4459
4460
4461
4462
4463
4464
4465
4466
4467
Therefore appropriate security precautions
should be taken if the information is being output by a
.Qq real
application.
This is, however, strongly discouraged and should only be used for
debugging purposes.
.Sh SMIME
.Bl -hang -width "openssl smime"
.It Nm openssl smime
.Bk -words
.Oo
.Fl aes128 | aes192 | aes256 | des |
.Fl des3 | rc2-40 | rc2-64 | rc2-128
.Oc
.Op Fl binary
.Op Fl CAfile Ar file
.Op Fl CApath Ar directory
4154
4155
4156
4157
4158
4159
4160
4161
4162
4163
4164
4165
4166
4167
4168
4169

4170
4171
4172
4173
4174
4175
4176
4177
4178
4179
4180
4181
4182
4183
4184
4185
4186
4187

4188
4189
4190
4191
4192
4193
4194
.Op Fl from Ar addr
.Op Fl ignore_critical
.Op Fl in Ar file
.Op Fl indef
.Op Fl inform Cm der | pem | smime
.Op Fl inkey Ar file
.Op Fl issuer_checks
.Op Fl keyform Cm pem
.Op Fl md Ar digest
.Op Fl noattr
.Op Fl nocerts
.Op Fl nochain
.Op Fl nodetach
.Op Fl noindef
.Op Fl nointern
.Op Fl nosigs

.Op Fl noverify
.Op Fl out Ar file
.Op Fl outform Cm der | pem | smime
.Op Fl passin Ar arg
.Op Fl pk7out
.Op Fl policy_check
.Op Fl recip Ar file
.Op Fl resign
.Op Fl sign
.Op Fl signer Ar file
.Op Fl stream
.Op Fl subject Ar s
.Op Fl text
.Op Fl to Ar addr
.Op Fl verify
.Op Fl x509_strict
.Op Ar cert.pem ...
.nr nS 0

.Pp
The
.Nm smime
command handles S/MIME mail.
It can encrypt, decrypt, sign, and verify S/MIME messages.
.Pp
The MIME message must be sent without any blank lines between the







|








>

















|
>







4476
4477
4478
4479
4480
4481
4482
4483
4484
4485
4486
4487
4488
4489
4490
4491
4492
4493
4494
4495
4496
4497
4498
4499
4500
4501
4502
4503
4504
4505
4506
4507
4508
4509
4510
4511
4512
4513
4514
4515
4516
4517
4518
.Op Fl from Ar addr
.Op Fl ignore_critical
.Op Fl in Ar file
.Op Fl indef
.Op Fl inform Cm der | pem | smime
.Op Fl inkey Ar file
.Op Fl issuer_checks
.Op Fl keyform Cm der | pem
.Op Fl md Ar digest
.Op Fl noattr
.Op Fl nocerts
.Op Fl nochain
.Op Fl nodetach
.Op Fl noindef
.Op Fl nointern
.Op Fl nosigs
.Op Fl nosmimecap
.Op Fl noverify
.Op Fl out Ar file
.Op Fl outform Cm der | pem | smime
.Op Fl passin Ar arg
.Op Fl pk7out
.Op Fl policy_check
.Op Fl recip Ar file
.Op Fl resign
.Op Fl sign
.Op Fl signer Ar file
.Op Fl stream
.Op Fl subject Ar s
.Op Fl text
.Op Fl to Ar addr
.Op Fl verify
.Op Fl x509_strict
.Op Ar cert.pem ...
.Ek
.El
.Pp
The
.Nm smime
command handles S/MIME mail.
It can encrypt, decrypt, sign, and verify S/MIME messages.
.Pp
The MIME message must be sent without any blank lines between the
4328
4329
4330
4331
4332
4333
4334
4335
4336


4337
4338
4339
4340
4341
4342
4343
the
.Fl recip
or
.Fl signer
file.
When signing,
this option can be used multiple times to specify successive keys.
.It Fl keyform Cm pem
Input private key format.


.It Fl md Ar digest
The digest algorithm to use when signing or resigning.
If not present then the default digest algorithm for the signing key is used
(usually SHA1).
.It Fl noattr
Do not include attributes.
.It Fl nocerts







|

>
>







4652
4653
4654
4655
4656
4657
4658
4659
4660
4661
4662
4663
4664
4665
4666
4667
4668
4669
the
.Fl recip
or
.Fl signer
file.
When signing,
this option can be used multiple times to specify successive keys.
.It Fl keyform Cm der | pem
Input private key format.
The default is
.Cm pem .
.It Fl md Ar digest
The digest algorithm to use when signing or resigning.
If not present then the default digest algorithm for the signing key is used
(usually SHA1).
.It Fl noattr
Do not include attributes.
.It Fl nocerts
4360
4361
4362
4363
4364
4365
4366



4367
4368
4369
4370
4371
4372
4373
(currently has no effect).
.It Fl nointern
Only use certificates specified in the
.Fl certfile .
The supplied certificates can still be used as untrusted CAs.
.It Fl nosigs
Do not try to verify the signatures on the message.



.It Fl noverify
Do not verify the signer's certificate of a signed message.
.It Fl out Ar file
The output file to write to.
.It Fl outform Cm der | pem | smime
The output format.
The default is smime, which writes an S/MIME format message.







>
>
>







4686
4687
4688
4689
4690
4691
4692
4693
4694
4695
4696
4697
4698
4699
4700
4701
4702
(currently has no effect).
.It Fl nointern
Only use certificates specified in the
.Fl certfile .
The supplied certificates can still be used as untrusted CAs.
.It Fl nosigs
Do not try to verify the signatures on the message.
.It Fl nosmimecap
Exclude the list of supported algorithms from signed attributes,
other options such as signing time and content type are still included.
.It Fl noverify
Do not verify the signer's certificate of a signed message.
.It Fl out Ar file
The output file to write to.
.It Fl outform Cm der | pem | smime
The output format.
The default is smime, which writes an S/MIME format message.
4418
4419
4420
4421
4422
4423
4424
4425
4426

4427
4428
4429
4430
4431
4432
4433

4434
4435
4436
4437
4438
4439
4440
An error occurred creating the file or when reading the message.
.It 4
An error occurred decrypting or verifying the message.
.It 5
An error occurred writing certificates.
.El
.Sh SPEED
.nr nS 1
.Nm "openssl speed"

.Op Ar algorithm
.Op Fl decrypt
.Op Fl elapsed
.Op Fl evp Ar algorithm
.Op Fl mr
.Op Fl multi Ar number
.nr nS 0

.Pp
The
.Nm speed
command is used to test the performance of cryptographic algorithms.
.Bl -tag -width "XXXX"
.It Ar algorithm
Perform the test using







|
|
>






|
>







4747
4748
4749
4750
4751
4752
4753
4754
4755
4756
4757
4758
4759
4760
4761
4762
4763
4764
4765
4766
4767
4768
4769
4770
4771
An error occurred creating the file or when reading the message.
.It 4
An error occurred decrypting or verifying the message.
.It 5
An error occurred writing certificates.
.El
.Sh SPEED
.Bl -hang -width "openssl speed"
.It Nm openssl speed
.Bk -words
.Op Ar algorithm
.Op Fl decrypt
.Op Fl elapsed
.Op Fl evp Ar algorithm
.Op Fl mr
.Op Fl multi Ar number
.Ek
.El
.Pp
The
.Nm speed
command is used to test the performance of cryptographic algorithms.
.Bl -tag -width "XXXX"
.It Ar algorithm
Perform the test using
4453
4454
4455
4456
4457
4458
4459
4460
4461

4462
4463
4464
4465
4466
4467
4468
4469
4470
4471
4472

4473
4474
4475
4476
4477
4478
4479
Produce machine readable output.
.It Fl multi Ar number
Run
.Ar number
benchmarks in parallel.
.El
.Sh SPKAC
.nr nS 1
.Nm "openssl spkac"

.Op Fl challenge Ar string
.Op Fl in Ar file
.Op Fl key Ar keyfile
.Op Fl noout
.Op Fl out Ar file
.Op Fl passin Ar arg
.Op Fl pubkey
.Op Fl spkac Ar spkacname
.Op Fl spksect Ar section
.Op Fl verify
.nr nS 0

.Pp
The
.Nm spkac
command processes signed public key and challenge (SPKAC) files.
It can print out their contents, verify the signature,
and produce its own SPKACs from a supplied private key.
.Pp







|
|
>










|
>







4784
4785
4786
4787
4788
4789
4790
4791
4792
4793
4794
4795
4796
4797
4798
4799
4800
4801
4802
4803
4804
4805
4806
4807
4808
4809
4810
4811
4812
Produce machine readable output.
.It Fl multi Ar number
Run
.Ar number
benchmarks in parallel.
.El
.Sh SPKAC
.Bl -hang -width "openssl spkac"
.It Nm openssl spkac
.Bk -words
.Op Fl challenge Ar string
.Op Fl in Ar file
.Op Fl key Ar keyfile
.Op Fl noout
.Op Fl out Ar file
.Op Fl passin Ar arg
.Op Fl pubkey
.Op Fl spkac Ar spkacname
.Op Fl spksect Ar section
.Op Fl verify
.Ek
.El
.Pp
The
.Nm spkac
command processes signed public key and challenge (SPKAC) files.
It can print out their contents, verify the signature,
and produce its own SPKACs from a supplied private key.
.Pp
4512
4513
4514
4515
4516
4517
4518
4519

4520
4521
4522
4523
4524
4525
4526
4527
4528
4529
4530
4531
4532
4533
4534
4535
4536
4537
4538
4539
4540
4541
4542
4543
4544
4545
4546
4547
4548
4549
4550
4551
4552
4553
4554
4555
4556
4557
4558
4559
4560
4561
4562
4563

4564
4565
4566
4567
4568
4569
4570
An alternative name for the
.Ar section
containing the SPKAC.
.It Fl verify
Verify the digital signature on the supplied SPKAC.
.El
.Sh TS
.nr nS 1

.Nm "openssl ts"
.Fl query
.Op Fl md4 | md5 | ripemd160 | sha1
.Op Fl cert
.Op Fl config Ar configfile
.Op Fl data Ar file_to_hash
.Op Fl digest Ar digest_bytes
.Op Fl in Ar request.tsq
.Op Fl no_nonce
.Op Fl out Ar request.tsq
.Op Fl policy Ar object_id
.Op Fl text
.nr nS 0
.Pp
.nr nS 1
.Nm "openssl ts"
.Fl reply
.Op Fl chain Ar certs_file.pem
.Op Fl config Ar configfile
.Op Fl in Ar response.tsr
.Op Fl inkey Ar private.pem
.Op Fl out Ar response.tsr
.Op Fl passin Ar arg
.Op Fl policy Ar object_id
.Op Fl queryfile Ar request.tsq
.Op Fl section Ar tsa_section
.Op Fl signer Ar tsa_cert.pem
.Op Fl text
.Op Fl token_in
.Op Fl token_out
.nr nS 0
.Pp
.nr nS 1
.Nm "openssl ts"
.Fl verify
.Op Fl CAfile Ar trusted_certs.pem
.Op Fl CApath Ar trusted_cert_path
.Op Fl data Ar file_to_hash
.Op Fl digest Ar digest_bytes
.Op Fl in Ar response.tsr
.Op Fl queryfile Ar request.tsq
.Op Fl token_in
.Op Fl untrusted Ar cert_file.pem
.nr nS 0

.Pp
The
.Nm ts
command is a basic Time Stamping Authority (TSA) client and server
application as specified in RFC 3161 (Time-Stamp Protocol, TSP).
A TSA can be part of a PKI deployment and its role is to provide long
term proof of the existence of specific data.







|
>
|











<
<
<
|














<
<
<
|









|
>







4845
4846
4847
4848
4849
4850
4851
4852
4853
4854
4855
4856
4857
4858
4859
4860
4861
4862
4863
4864
4865



4866
4867
4868
4869
4870
4871
4872
4873
4874
4875
4876
4877
4878
4879
4880



4881
4882
4883
4884
4885
4886
4887
4888
4889
4890
4891
4892
4893
4894
4895
4896
4897
4898
4899
An alternative name for the
.Ar section
containing the SPKAC.
.It Fl verify
Verify the digital signature on the supplied SPKAC.
.El
.Sh TS
.Bk -words
.Bl -hang -width "openssl ts"
.It Nm openssl ts
.Fl query
.Op Fl md4 | md5 | ripemd160 | sha1
.Op Fl cert
.Op Fl config Ar configfile
.Op Fl data Ar file_to_hash
.Op Fl digest Ar digest_bytes
.Op Fl in Ar request.tsq
.Op Fl no_nonce
.Op Fl out Ar request.tsq
.Op Fl policy Ar object_id
.Op Fl text



.It Nm openssl ts
.Fl reply
.Op Fl chain Ar certs_file.pem
.Op Fl config Ar configfile
.Op Fl in Ar response.tsr
.Op Fl inkey Ar private.pem
.Op Fl out Ar response.tsr
.Op Fl passin Ar arg
.Op Fl policy Ar object_id
.Op Fl queryfile Ar request.tsq
.Op Fl section Ar tsa_section
.Op Fl signer Ar tsa_cert.pem
.Op Fl text
.Op Fl token_in
.Op Fl token_out



.It Nm openssl ts
.Fl verify
.Op Fl CAfile Ar trusted_certs.pem
.Op Fl CApath Ar trusted_cert_path
.Op Fl data Ar file_to_hash
.Op Fl digest Ar digest_bytes
.Op Fl in Ar response.tsr
.Op Fl queryfile Ar request.tsq
.Op Fl token_in
.Op Fl untrusted Ar cert_file.pem
.El
.Ek
.Pp
The
.Nm ts
command is a basic Time Stamping Authority (TSA) client and server
application as specified in RFC 3161 (Time-Stamp Protocol, TSP).
A TSA can be part of a PKI deployment and its role is to provide long
term proof of the existence of specific data.
4739
4740
4741
4742
4743
4744
4745
4746
4747
4748
4749
4750
4751
4752
4753
See
.Nm verify
for additional details.
Either this option or
.Fl CApath
must be specified.
.It Fl CApath Ar trusted_cert_path
The directory containing the trused CA certificates of the client.
See
.Nm verify
for additional details.
Either this option or
.Fl CAfile
must be specified.
.It Fl data Ar file_to_hash







|







5068
5069
5070
5071
5072
5073
5074
5075
5076
5077
5078
5079
5080
5081
5082
See
.Nm verify
for additional details.
Either this option or
.Fl CApath
must be specified.
.It Fl CApath Ar trusted_cert_path
The directory containing the trusted CA certificates of the client.
See
.Nm verify
for additional details.
Either this option or
.Fl CAfile
must be specified.
.It Fl data Ar file_to_hash
4878
4879
4880
4881
4882
4883
4884
4885
4886

4887
4888
4889

4890
4891
4892
4893
4894
4895
4896
4897
4898
4899
4900

4901
4902
4903
4904
4905

4906
4907
4908
4909
4910
4911
4912
4913
4914
4915
4916
4917
4918
4919
4920
4921
4922
4923
option is specified then the certificate identifiers of the chain will also
be included in the SigningCertificate signed attribute.
If this variable is set to no,
only the signing certificate identifier is included.
The default is no.
.El
.Sh VERIFY
.nr nS 1
.Nm "openssl verify"

.Op Fl CAfile Ar file
.Op Fl CApath Ar directory
.Op Fl check_ss_sig

.Op Fl crl_check
.Op Fl crl_check_all
.Op Fl explicit_policy
.Op Fl extended_crl
.Op Fl help
.Op Fl ignore_critical
.Op Fl inhibit_any
.Op Fl inhibit_map
.Op Fl issuer_checks
.Op Fl policy_check
.Op Fl purpose Ar purpose

.Op Fl untrusted Ar file
.Op Fl verbose
.Op Fl x509_strict
.Op Ar certificates
.nr nS 0

.Pp
The
.Nm verify
command verifies certificate chains.
.Pp
The options are as follows:
.Bl -tag -width Ds
.It Fl check_ss_sig
Verify the signature on the self-signed root CA.
This is disabled by default
because it doesn't add any security.
.It Fl CAfile Ar file
A
.Ar file
of trusted certificates.
The
.Ar file
should contain multiple certificates in PEM format, concatenated together.







|
|
>



>











>




|
>







<
<
<
<







5207
5208
5209
5210
5211
5212
5213
5214
5215
5216
5217
5218
5219
5220
5221
5222
5223
5224
5225
5226
5227
5228
5229
5230
5231
5232
5233
5234
5235
5236
5237
5238
5239
5240
5241
5242
5243
5244
5245




5246
5247
5248
5249
5250
5251
5252
option is specified then the certificate identifiers of the chain will also
be included in the SigningCertificate signed attribute.
If this variable is set to no,
only the signing certificate identifier is included.
The default is no.
.El
.Sh VERIFY
.Bl -hang -width "openssl verify"
.It Nm openssl verify
.Bk -words
.Op Fl CAfile Ar file
.Op Fl CApath Ar directory
.Op Fl check_ss_sig
.Op Fl CRLfile Ar file
.Op Fl crl_check
.Op Fl crl_check_all
.Op Fl explicit_policy
.Op Fl extended_crl
.Op Fl help
.Op Fl ignore_critical
.Op Fl inhibit_any
.Op Fl inhibit_map
.Op Fl issuer_checks
.Op Fl policy_check
.Op Fl purpose Ar purpose
.Op Fl trusted Ar file
.Op Fl untrusted Ar file
.Op Fl verbose
.Op Fl x509_strict
.Op Ar certificates
.Ek
.El
.Pp
The
.Nm verify
command verifies certificate chains.
.Pp
The options are as follows:
.Bl -tag -width Ds




.It Fl CAfile Ar file
A
.Ar file
of trusted certificates.
The
.Ar file
should contain multiple certificates in PEM format, concatenated together.
4932
4933
4934
4935
4936
4937
4938








4939
4940
4941
4942
4943
4944
4945
.Ar hash
is the hashed certificate subject name
(see the
.Fl hash
option of the
.Nm x509
utility).








.It Fl crl_check
Check end entity certificate validity by attempting to look up a valid CRL.
If a valid CRL cannot be found an error occurs.
.It Fl crl_check_all
Check the validity of all certificates in the chain by attempting
to look up valid CRLs.
.It Fl explicit_policy







>
>
>
>
>
>
>
>







5261
5262
5263
5264
5265
5266
5267
5268
5269
5270
5271
5272
5273
5274
5275
5276
5277
5278
5279
5280
5281
5282
.Ar hash
is the hashed certificate subject name
(see the
.Fl hash
option of the
.Nm x509
utility).
.It Fl check_ss_sig
Verify the signature on the self-signed root CA.
This is disabled by default
because it doesn't add any security.
.It Fl CRLfile Ar file
The
.Ar file
should contain one or more CRLs in PEM format.
.It Fl crl_check
Check end entity certificate validity by attempting to look up a valid CRL.
If a valid CRL cannot be found an error occurs.
.It Fl crl_check_all
Check the validity of all certificates in the chain by attempting
to look up valid CRLs.
.It Fl explicit_policy
4970
4971
4972
4973
4974
4975
4976







4977
4978
4979
4980
4981
4982
4983
Currently accepted uses are
.Cm sslclient , sslserver ,
.Cm nssslserver , smimesign ,
.Cm smimeencrypt , crlsign ,
.Cm any ,
and
.Cm ocsphelper .







.It Fl untrusted Ar file
A
.Ar file
of untrusted certificates.
The
.Ar file
should contain multiple certificates.







>
>
>
>
>
>
>







5307
5308
5309
5310
5311
5312
5313
5314
5315
5316
5317
5318
5319
5320
5321
5322
5323
5324
5325
5326
5327
Currently accepted uses are
.Cm sslclient , sslserver ,
.Cm nssslserver , smimesign ,
.Cm smimeencrypt , crlsign ,
.Cm any ,
and
.Cm ocsphelper .
.It Fl trusted Ar file
A
.Ar file
of trusted certificates.
The
.Ar file
should contain multiple certificates.
.It Fl untrusted Ar file
A
.Ar file
of untrusted certificates.
The
.Ar file
should contain multiple certificates.
5221
5222
5223
5224
5225
5226
5227
5228
5229

5230
5231
5232
5233
5234
5235
5236
Platform setting.
.It Fl v
The current
.Nm openssl
version.
.El
.Sh X509
.nr nS 1
.Nm "openssl x509"

.Op Fl C
.Op Fl addreject Ar arg
.Op Fl addtrust Ar arg
.Op Fl alias
.Op Fl CA Ar file
.Op Fl CAcreateserial
.Op Fl CAform Cm der | pem







|
|
>







5565
5566
5567
5568
5569
5570
5571
5572
5573
5574
5575
5576
5577
5578
5579
5580
5581
Platform setting.
.It Fl v
The current
.Nm openssl
version.
.El
.Sh X509
.Bl -hang -width "openssl x509"
.It Nm openssl x509
.Bk -words
.Op Fl C
.Op Fl addreject Ar arg
.Op Fl addtrust Ar arg
.Op Fl alias
.Op Fl CA Ar file
.Op Fl CAcreateserial
.Op Fl CAform Cm der | pem
5255
5256
5257
5258
5259
5260
5261

5262
5263
5264
5265
5266
5267
5268
5269
5270
5271
5272
5273
5274

5275
5276
5277
5278
5279
5280
5281
5282

5283
5284
5285
5286
5287
5288
5289
.Op Fl issuer
.Op Fl issuer_hash
.Op Fl issuer_hash_old
.Op Fl keyform Cm der | pem
.Op Fl md5 | sha1
.Op Fl modulus
.Op Fl nameopt Ar option

.Op Fl noout
.Op Fl ocsp_uri
.Op Fl ocspid
.Op Fl out Ar file
.Op Fl outform Cm der | net | pem
.Op Fl passin Ar arg
.Op Fl pubkey
.Op Fl purpose
.Op Fl req
.Op Fl serial
.Op Fl set_serial Ar n
.Op Fl setalias Ar arg
.Op Fl signkey Ar file

.Op Fl startdate
.Op Fl subject
.Op Fl subject_hash
.Op Fl subject_hash_old
.Op Fl text
.Op Fl trustout
.Op Fl x509toreq
.nr nS 0

.Pp
The
.Nm x509
command is a multi-purpose certificate utility.
It can be used to display certificate information, convert certificates to
various forms, sign certificate requests like a
.Qq mini CA ,







>













>







|
>







5600
5601
5602
5603
5604
5605
5606
5607
5608
5609
5610
5611
5612
5613
5614
5615
5616
5617
5618
5619
5620
5621
5622
5623
5624
5625
5626
5627
5628
5629
5630
5631
5632
5633
5634
5635
5636
5637
.Op Fl issuer
.Op Fl issuer_hash
.Op Fl issuer_hash_old
.Op Fl keyform Cm der | pem
.Op Fl md5 | sha1
.Op Fl modulus
.Op Fl nameopt Ar option
.Op Fl next_serial
.Op Fl noout
.Op Fl ocsp_uri
.Op Fl ocspid
.Op Fl out Ar file
.Op Fl outform Cm der | net | pem
.Op Fl passin Ar arg
.Op Fl pubkey
.Op Fl purpose
.Op Fl req
.Op Fl serial
.Op Fl set_serial Ar n
.Op Fl setalias Ar arg
.Op Fl signkey Ar file
.Op Fl sigopt Ar nm:v
.Op Fl startdate
.Op Fl subject
.Op Fl subject_hash
.Op Fl subject_hash_old
.Op Fl text
.Op Fl trustout
.Op Fl x509toreq
.Ek
.El
.Pp
The
.Nm x509
command is a multi-purpose certificate utility.
It can be used to display certificate information, convert certificates to
various forms, sign certificate requests like a
.Qq mini CA ,
5535
5536
5537
5538
5539
5540
5541


5542
5543
5544
5545
5546
5547
5548
5549
5550
5551



5552
5553
5554
5555
5556
5557
5558
.Cm esc_msb )
may result in the correct display of multibyte characters.
Usually, multibyte characters larger than 0xff
are represented using the format \eUXXXX for 16 bits and \eWXXXXXXXX
for 32 bits,
and any UTF8Strings are converted to their character form first.
.El


.It Fl noout
Do not output the encoded version of the request.
.It Fl ocsp_uri
Print the OCSP responder addresses, if any.
.It Fl ocspid
Print OCSP hash values for the subject name and public key.
.It Fl pubkey
Print the public key.
.It Fl serial
Print the certificate serial number.



.It Fl startdate
Print the start date of the certificate; that is, the
.Cm notBefore
date.
.It Fl subject
Print the subject name.
.It Fl subject_hash







>
>










>
>
>







5883
5884
5885
5886
5887
5888
5889
5890
5891
5892
5893
5894
5895
5896
5897
5898
5899
5900
5901
5902
5903
5904
5905
5906
5907
5908
5909
5910
5911
.Cm esc_msb )
may result in the correct display of multibyte characters.
Usually, multibyte characters larger than 0xff
are represented using the format \eUXXXX for 16 bits and \eWXXXXXXXX
for 32 bits,
and any UTF8Strings are converted to their character form first.
.El
.It Fl next_serial
Print the next serial number.
.It Fl noout
Do not output the encoded version of the request.
.It Fl ocsp_uri
Print the OCSP responder addresses, if any.
.It Fl ocspid
Print OCSP hash values for the subject name and public key.
.It Fl pubkey
Print the public key.
.It Fl serial
Print the certificate serial number.
.It Fl sigopt Ar nm:v
Pass options to the signature algorithm during sign or certify operations.
The names and values of these options are algorithm-specific.
.It Fl startdate
Print the start date of the certificate; that is, the
.Cm notBefore
date.
.It Fl subject
Print the subject name.
.It Fl subject_hash
5935
5936
5937
5938
5939
5940
5941


5942
5943
5944
5945
5946
5947
5948
Distinguished Encoding Rules (DER)
is a binary format.
.It Cm net
Insecure legacy format.
.It Cm pem
Privacy Enhanced Mail (PEM)
is base64-encoded.


.It Cm smime
An SMIME format message.
.It Cm txt
Plain ASCII text.
.El
.Sh ENVIRONMENT
The following environment variables affect the execution of







>
>







6288
6289
6290
6291
6292
6293
6294
6295
6296
6297
6298
6299
6300
6301
6302
6303
Distinguished Encoding Rules (DER)
is a binary format.
.It Cm net
Insecure legacy format.
.It Cm pem
Privacy Enhanced Mail (PEM)
is base64-encoded.
.It Cm pvk
Private Key format.
.It Cm smime
An SMIME format message.
.It Cm txt
Plain ASCII text.
.El
.Sh ENVIRONMENT
The following environment variables affect the execution of
Changes to jni/libressl/apps/openssl/passwd.c.
1
2
3
4
5
6
7
8
/* $OpenBSD: passwd.c,v 1.9 2018/02/07 05:47:55 jsing Exp $ */

#if defined OPENSSL_NO_MD5
#define NO_MD5CRYPT_1
#endif

#if !defined(OPENSSL_NO_DES) || !defined(NO_MD5CRYPT_1)

|







1
2
3
4
5
6
7
8
/* $OpenBSD: passwd.c,v 1.10 2019/07/14 03:30:46 guenther Exp $ */

#if defined OPENSSL_NO_MD5
#define NO_MD5CRYPT_1
#endif

#if !defined(OPENSSL_NO_DES) || !defined(NO_MD5CRYPT_1)

49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
	char *salt;
	int table;
	int use1;
	int useapr1;
	int usecrypt;
} passwd_config;

static struct option passwd_options[] = {
#ifndef NO_MD5CRYPT_1
	{
		.name = "1",
		.desc = "Use MD5 based BSD password algorithm 1",
		.type = OPTION_FLAG,
		.opt.flag = &passwd_config.use1,
	},







|







49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
	char *salt;
	int table;
	int use1;
	int useapr1;
	int usecrypt;
} passwd_config;

static const struct option passwd_options[] = {
#ifndef NO_MD5CRYPT_1
	{
		.name = "1",
		.desc = "Use MD5 based BSD password algorithm 1",
		.type = OPTION_FLAG,
		.opt.flag = &passwd_config.use1,
	},
Changes to jni/libressl/apps/openssl/pkcs12.c.
1
2
3
4
5
6
7
8
/* $OpenBSD: pkcs12.c,v 1.10 2018/02/07 05:47:55 jsing Exp $ */
/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
 * project.
 */
/* ====================================================================
 * Copyright (c) 1999-2006 The OpenSSL Project.  All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
|







1
2
3
4
5
6
7
8
/* $OpenBSD: pkcs12.c,v 1.14 2019/07/26 12:35:59 inoguchi Exp $ */
/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
 * project.
 */
/* ====================================================================
 * Copyright (c) 1999-2006 The OpenSSL Project.  All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86






























































































































































































































































































































87







































































88



























89
90





91


92












93

94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133

134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358

359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398

399
400
401
402
403
404
405
406
407
408
409
410
411

412
413
414
415
416
417
418
419

420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446

447
448
449
450
451
452
453
454
455
456

457
458
459
460
461
462
463
464
465
466
467
468
469
470
471

472
473
474

475
476
477
478
479
480
481
482
483

484
485
486
487
488
489

490

491
492
493
494
495
496
497
498

499

500
501
502
503
504
505

506
507
508
509
510
511
512

513
514
515
516
517
518
519
520

521
522
523
524
525
526
527
528
529
530

531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558

559
560
561
562
563
564
565
566
567

568
569
570
571
572
573
574

575
576
577
578
579
580
581

582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
#include "apps.h"

#include <openssl/crypto.h>
#include <openssl/err.h>
#include <openssl/pem.h>
#include <openssl/pkcs12.h>

const EVP_CIPHER *enc;

#define NOKEYS		0x1
#define NOCERTS 	0x2
#define INFO		0x4
#define CLCERTS		0x8
#define CACERTS		0x10

int get_cert_chain(X509 * cert, X509_STORE * store, STACK_OF(X509) ** chain);
int dump_certs_keys_p12(BIO * out, PKCS12 * p12, char *pass, int passlen,
    int options, char *pempass);
int dump_certs_pkeys_bags(BIO * out, STACK_OF(PKCS12_SAFEBAG) * bags, char *pass,
    int passlen, int options, char *pempass);






























































































































































































































































































































int dump_certs_pkeys_bag(BIO * out, PKCS12_SAFEBAG * bags, char *pass, int passlen,







































































    int options, char *pempass);



























int print_attribs(BIO * out, STACK_OF(X509_ATTRIBUTE) * attrlst, const char *name);
void hex_prin(BIO * out, unsigned char *buf, int len);





int alg_print(BIO * x, X509_ALGOR * alg);


int cert_load(BIO * in, STACK_OF(X509) * sk);












static int set_pbe(BIO * err, int *ppbe, const char *str);


int
pkcs12_main(int argc, char **argv)
{
	char *infile = NULL, *outfile = NULL, *keyname = NULL;
	char *certfile = NULL;
	BIO *in = NULL, *out = NULL;
	char **args;
	char *name = NULL;
	char *csp_name = NULL;
	int add_lmk = 0;
	PKCS12 *p12 = NULL;
	char pass[50], macpass[50];
	int export_cert = 0;
	int options = 0;
	int chain = 0;
	int badarg = 0;
	int iter = PKCS12_DEFAULT_ITER;
	int maciter = PKCS12_DEFAULT_ITER;
	int twopass = 0;
	int keytype = 0;
	int cert_pbe;
	int key_pbe = NID_pbe_WithSHA1And3_Key_TripleDES_CBC;
	int ret = 1;
	int macver = 1;
	int noprompt = 0;
	STACK_OF(OPENSSL_STRING) * canames = NULL;
	char *cpass = NULL, *mpass = NULL;
	char *passargin = NULL, *passargout = NULL, *passarg = NULL;
	char *passin = NULL, *passout = NULL;
	char *macalg = NULL;
	char *CApath = NULL, *CAfile = NULL;

	if (single_execution) {
		if (pledge("stdio cpath wpath rpath tty", NULL) == -1) {
			perror("pledge");
			exit(1);
		}
	}


	cert_pbe = NID_pbe_WithSHA1And40BitRC2_CBC;

	enc = EVP_des_ede3_cbc();

	args = argv + 1;

	while (*args) {
		if (*args[0] == '-') {
			if (!strcmp(*args, "-nokeys"))
				options |= NOKEYS;
			else if (!strcmp(*args, "-keyex"))
				keytype = KEY_EX;
			else if (!strcmp(*args, "-keysig"))
				keytype = KEY_SIG;
			else if (!strcmp(*args, "-nocerts"))
				options |= NOCERTS;
			else if (!strcmp(*args, "-clcerts"))
				options |= CLCERTS;
			else if (!strcmp(*args, "-cacerts"))
				options |= CACERTS;
			else if (!strcmp(*args, "-noout"))
				options |= (NOKEYS | NOCERTS);
			else if (!strcmp(*args, "-info"))
				options |= INFO;
			else if (!strcmp(*args, "-chain"))
				chain = 1;
			else if (!strcmp(*args, "-twopass"))
				twopass = 1;
			else if (!strcmp(*args, "-nomacver"))
				macver = 0;
			else if (!strcmp(*args, "-descert"))
				cert_pbe = NID_pbe_WithSHA1And3_Key_TripleDES_CBC;
			else if (!strcmp(*args, "-export"))
				export_cert = 1;
			else if (!strcmp(*args, "-des"))
				enc = EVP_des_cbc();
			else if (!strcmp(*args, "-des3"))
				enc = EVP_des_ede3_cbc();
#ifndef OPENSSL_NO_IDEA
			else if (!strcmp(*args, "-idea"))
				enc = EVP_idea_cbc();
#endif
#ifndef OPENSSL_NO_AES
			else if (!strcmp(*args, "-aes128"))
				enc = EVP_aes_128_cbc();
			else if (!strcmp(*args, "-aes192"))
				enc = EVP_aes_192_cbc();
			else if (!strcmp(*args, "-aes256"))
				enc = EVP_aes_256_cbc();
#endif
#ifndef OPENSSL_NO_CAMELLIA
			else if (!strcmp(*args, "-camellia128"))
				enc = EVP_camellia_128_cbc();
			else if (!strcmp(*args, "-camellia192"))
				enc = EVP_camellia_192_cbc();
			else if (!strcmp(*args, "-camellia256"))
				enc = EVP_camellia_256_cbc();
#endif
			else if (!strcmp(*args, "-noiter"))
				iter = 1;
			else if (!strcmp(*args, "-maciter"))
				maciter = PKCS12_DEFAULT_ITER;
			else if (!strcmp(*args, "-nomaciter"))
				maciter = 1;
			else if (!strcmp(*args, "-nomac"))
				maciter = -1;
			else if (!strcmp(*args, "-macalg"))
				if (args[1]) {
					args++;
					macalg = *args;
				} else
					badarg = 1;
			else if (!strcmp(*args, "-nodes"))
				enc = NULL;
			else if (!strcmp(*args, "-certpbe")) {
				if (!set_pbe(bio_err, &cert_pbe, *++args))
					badarg = 1;
			} else if (!strcmp(*args, "-keypbe")) {
				if (!set_pbe(bio_err, &key_pbe, *++args))
					badarg = 1;
			} else if (!strcmp(*args, "-inkey")) {
				if (args[1]) {
					args++;
					keyname = *args;
				} else
					badarg = 1;
			} else if (!strcmp(*args, "-certfile")) {
				if (args[1]) {
					args++;
					certfile = *args;
				} else
					badarg = 1;
			} else if (!strcmp(*args, "-name")) {
				if (args[1]) {
					args++;
					name = *args;
				} else
					badarg = 1;
			} else if (!strcmp(*args, "-LMK"))
				add_lmk = 1;
			else if (!strcmp(*args, "-CSP")) {
				if (args[1]) {
					args++;
					csp_name = *args;
				} else
					badarg = 1;
			} else if (!strcmp(*args, "-caname")) {
				if (args[1]) {
					args++;
					if (!canames)
						canames = sk_OPENSSL_STRING_new_null();
					sk_OPENSSL_STRING_push(canames, *args);
				} else
					badarg = 1;
			} else if (!strcmp(*args, "-in")) {
				if (args[1]) {
					args++;
					infile = *args;
				} else
					badarg = 1;
			} else if (!strcmp(*args, "-out")) {
				if (args[1]) {
					args++;
					outfile = *args;
				} else
					badarg = 1;
			} else if (!strcmp(*args, "-passin")) {
				if (args[1]) {
					args++;
					passargin = *args;
				} else
					badarg = 1;
			} else if (!strcmp(*args, "-passout")) {
				if (args[1]) {
					args++;
					passargout = *args;
				} else
					badarg = 1;
			} else if (!strcmp(*args, "-password")) {
				if (args[1]) {
					args++;
					passarg = *args;
					noprompt = 1;
				} else
					badarg = 1;
			} else if (!strcmp(*args, "-CApath")) {
				if (args[1]) {
					args++;
					CApath = *args;
				} else
					badarg = 1;
			} else if (!strcmp(*args, "-CAfile")) {
				if (args[1]) {
					args++;
					CAfile = *args;
				} else
					badarg = 1;
			} else
				badarg = 1;

		} else
			badarg = 1;
		args++;
	}

	if (badarg) {
		BIO_printf(bio_err, "Usage: pkcs12 [options]\n");
		BIO_printf(bio_err, "where options are\n");
		BIO_printf(bio_err, "-export       output PKCS12 file\n");
		BIO_printf(bio_err, "-chain        add certificate chain\n");
		BIO_printf(bio_err, "-inkey file   private key if not infile\n");
		BIO_printf(bio_err, "-certfile f   add all certs in f\n");
		BIO_printf(bio_err, "-CApath arg   - PEM format directory of CA's\n");
		BIO_printf(bio_err, "-CAfile arg   - PEM format file of CA's\n");
		BIO_printf(bio_err, "-name \"name\"  use name as friendly name\n");
		BIO_printf(bio_err, "-caname \"nm\"  use nm as CA friendly name (can be used more than once).\n");
		BIO_printf(bio_err, "-in  infile   input filename\n");
		BIO_printf(bio_err, "-out outfile  output filename\n");
		BIO_printf(bio_err, "-noout        don't output anything, just verify.\n");
		BIO_printf(bio_err, "-nomacver     don't verify MAC.\n");
		BIO_printf(bio_err, "-nocerts      don't output certificates.\n");
		BIO_printf(bio_err, "-clcerts      only output client certificates.\n");
		BIO_printf(bio_err, "-cacerts      only output CA certificates.\n");
		BIO_printf(bio_err, "-nokeys       don't output private keys.\n");
		BIO_printf(bio_err, "-info         give info about PKCS#12 structure.\n");
		BIO_printf(bio_err, "-des          encrypt private keys with DES\n");
		BIO_printf(bio_err, "-des3         encrypt private keys with triple DES (default)\n");
#ifndef OPENSSL_NO_IDEA
		BIO_printf(bio_err, "-idea         encrypt private keys with idea\n");
#endif
#ifndef OPENSSL_NO_AES
		BIO_printf(bio_err, "-aes128, -aes192, -aes256\n");
		BIO_printf(bio_err, "              encrypt PEM output with cbc aes\n");
#endif
#ifndef OPENSSL_NO_CAMELLIA
		BIO_printf(bio_err, "-camellia128, -camellia192, -camellia256\n");
		BIO_printf(bio_err, "              encrypt PEM output with cbc camellia\n");
#endif
		BIO_printf(bio_err, "-nodes        don't encrypt private keys\n");
		BIO_printf(bio_err, "-noiter       don't use encryption iteration\n");
		BIO_printf(bio_err, "-nomaciter    don't use MAC iteration\n");
		BIO_printf(bio_err, "-maciter      use MAC iteration\n");
		BIO_printf(bio_err, "-nomac        don't generate MAC\n");
		BIO_printf(bio_err, "-twopass      separate MAC, encryption passwords\n");
		BIO_printf(bio_err, "-descert      encrypt PKCS#12 certificates with triple DES (default RC2-40)\n");
		BIO_printf(bio_err, "-certpbe alg  specify certificate PBE algorithm (default RC2-40)\n");
		BIO_printf(bio_err, "-keypbe alg   specify private key PBE algorithm (default 3DES)\n");
		BIO_printf(bio_err, "-macalg alg   digest algorithm used in MAC (default SHA1)\n");
		BIO_printf(bio_err, "-keyex        set MS key exchange type\n");
		BIO_printf(bio_err, "-keysig       set MS key signature type\n");
		BIO_printf(bio_err, "-password p   set import/export password source\n");
		BIO_printf(bio_err, "-passin p     input file pass phrase source\n");
		BIO_printf(bio_err, "-passout p    output file pass phrase source\n");
		BIO_printf(bio_err, "-CSP name     Microsoft CSP name\n");
		BIO_printf(bio_err, "-LMK          Add local machine keyset attribute to private key\n");
		goto end;
	}

	if (passarg) {
		if (export_cert)
			passargout = passarg;
		else
			passargin = passarg;
	}
	if (!app_passwd(bio_err, passargin, passargout, &passin, &passout)) {

		BIO_printf(bio_err, "Error getting passwords\n");
		goto end;
	}
	if (!cpass) {
		if (export_cert)
			cpass = passout;
		else
			cpass = passin;
	}
	if (cpass) {
		mpass = cpass;
		noprompt = 1;
	} else {
		cpass = pass;
		mpass = macpass;
	}

	if (!infile)
		in = BIO_new_fp(stdin, BIO_NOCLOSE);
	else
		in = BIO_new_file(infile, "rb");
	if (!in) {
		BIO_printf(bio_err, "Error opening input file %s\n",
		    infile ? infile : "<stdin>");
		perror(infile);
		goto end;
	}

	if (!outfile) {
		out = BIO_new_fp(stdout, BIO_NOCLOSE);
	} else
		out = BIO_new_file(outfile, "wb");
	if (!out) {
		BIO_printf(bio_err, "Error opening output file %s\n",
		    outfile ? outfile : "<stdout>");
		perror(outfile);
		goto end;
	}
	if (twopass) {
		if (EVP_read_pw_string(macpass, sizeof macpass, "Enter MAC Password:", export_cert)) {

			BIO_printf(bio_err, "Can't read Password\n");
			goto end;
		}
	}
	if (export_cert) {
		EVP_PKEY *key = NULL;
		X509 *ucert = NULL, *x = NULL;
		STACK_OF(X509) * certs = NULL;
		const EVP_MD *macmd = NULL;
		unsigned char *catmp = NULL;
		int i;

		if ((options & (NOCERTS | NOKEYS)) == (NOCERTS | NOKEYS)) {

			BIO_printf(bio_err, "Nothing to do!\n");
			goto export_end;
		}
		if (options & NOCERTS)
			chain = 0;

		if (!(options & NOKEYS)) {
			key = load_key(bio_err, keyname ? keyname : infile,

			    FORMAT_PEM, 1, passin, "private key");
			if (!key)
				goto export_end;
		}

		/* Load in all certs in input file */
		if (!(options & NOCERTS)) {
			certs = load_certs(bio_err, infile, FORMAT_PEM, NULL,
			    "certificates");
			if (!certs)
				goto export_end;

			if (key) {
				/* Look for matching private key */
				for (i = 0; i < sk_X509_num(certs); i++) {
					x = sk_X509_value(certs, i);
					if (X509_check_private_key(x, key)) {
						ucert = x;
						/* Zero keyid and alias */
						X509_keyid_set1(ucert, NULL, 0);
						X509_alias_set1(ucert, NULL, 0);
						/* Remove from list */
						(void) sk_X509_delete(certs, i);
						break;
					}
				}
				if (!ucert) {

					BIO_printf(bio_err, "No certificate matches private key\n");
					goto export_end;
				}
			}
		}

		/* Add any more certificates asked for */
		if (certfile) {
			STACK_OF(X509) * morecerts = NULL;
			if (!(morecerts = load_certs(bio_err, certfile, FORMAT_PEM,

			    NULL, "certificates from certfile")))
				goto export_end;
			while (sk_X509_num(morecerts) > 0)
				sk_X509_push(certs, sk_X509_shift(morecerts));
			sk_X509_free(morecerts);
		}


		/* If chaining get chain from user cert */
		if (chain) {
			int vret;
			STACK_OF(X509) * chain2;
			X509_STORE *store = X509_STORE_new();
			if (!store) {
				BIO_printf(bio_err, "Memory allocation error\n");

				goto export_end;
			}
			if (!X509_STORE_load_locations(store, CAfile, CApath))

				X509_STORE_set_default_paths(store);

			vret = get_cert_chain(ucert, store, &chain2);
			X509_STORE_free(store);

			if (!vret) {
				/* Exclude verified certificate */
				for (i = 1; i < sk_X509_num(chain2); i++)
					sk_X509_push(certs, sk_X509_value(chain2, i));

				/* Free first certificate */
				X509_free(sk_X509_value(chain2, 0));
				sk_X509_free(chain2);
			} else {
				if (vret >= 0)
					BIO_printf(bio_err, "Error %s getting chain.\n",

					    X509_verify_cert_error_string(vret));

				else
					ERR_print_errors(bio_err);
				goto export_end;
			}
		}
		/* Add any CA names */

		for (i = 0; i < sk_OPENSSL_STRING_num(canames); i++) {

			catmp = (unsigned char *) sk_OPENSSL_STRING_value(canames, i);

			X509_alias_set1(sk_X509_value(certs, i), catmp, -1);
		}

		if (csp_name && key)
			EVP_PKEY_add1_attr_by_NID(key, NID_ms_csp_name,
			    MBSTRING_ASC, (unsigned char *) csp_name, -1);


		if (add_lmk && key)
			EVP_PKEY_add1_attr_by_NID(key, NID_LocalKeySet, 0, NULL, -1);


		if (!noprompt &&
		    EVP_read_pw_string(pass, sizeof pass, "Enter Export Password:", 1)) {

			BIO_printf(bio_err, "Can't read Password\n");
			goto export_end;
		}
		if (!twopass)
			strlcpy(macpass, pass, sizeof macpass);


		p12 = PKCS12_create(cpass, name, key, ucert, certs,

		    key_pbe, cert_pbe, iter, -1, keytype);

		if (!p12) {
			ERR_print_errors(bio_err);
			goto export_end;
		}
		if (macalg) {
			macmd = EVP_get_digestbyname(macalg);
			if (!macmd) {
				BIO_printf(bio_err, "Unknown digest algorithm %s\n",

				    macalg);
			}
		}
		if (maciter != -1)
			PKCS12_set_mac(p12, mpass, -1, NULL, 0, maciter, macmd);


		i2d_PKCS12_bio(out, p12);

		ret = 0;

export_end:

		if (key)
			EVP_PKEY_free(key);
		if (certs)
			sk_X509_pop_free(certs, X509_free);
		if (ucert)
			X509_free(ucert);

		goto end;

	}
	if (!(p12 = d2i_PKCS12_bio(in, NULL))) {
		ERR_print_errors(bio_err);
		goto end;
	}
	if (!noprompt && EVP_read_pw_string(pass, sizeof pass, "Enter Import Password:", 0)) {

		BIO_printf(bio_err, "Can't read Password\n");
		goto end;
	}

	if (!twopass)
		strlcpy(macpass, pass, sizeof macpass);

	if ((options & INFO) && p12->mac)
		BIO_printf(bio_err, "MAC Iteration %ld\n", p12->mac->iter ? ASN1_INTEGER_get(p12->mac->iter) : 1);

	if (macver) {
		/* If we enter empty password try no password first */
		if (!mpass[0] && PKCS12_verify_mac(p12, NULL, 0)) {
			/* If mac and crypto pass the same set it to NULL too */
			if (!twopass)
				cpass = NULL;
		} else if (!PKCS12_verify_mac(p12, mpass, -1)) {

			BIO_printf(bio_err, "Mac verify error: invalid password?\n");
			ERR_print_errors(bio_err);
			goto end;
		}
		BIO_printf(bio_err, "MAC verified OK\n");
	}
	if (!dump_certs_keys_p12(out, p12, cpass, -1, options, passout)) {

		BIO_printf(bio_err, "Error outputting keys and certificates\n");
		ERR_print_errors(bio_err);
		goto end;
	}
	ret = 0;
 end:
	if (p12)
		PKCS12_free(p12);
	BIO_free(in);
	BIO_free_all(out);
	if (canames)
		sk_OPENSSL_STRING_free(canames);
	free(passin);
	free(passout);

	return (ret);
}

int
dump_certs_keys_p12(BIO * out, PKCS12 * p12, char *pass,
    int passlen, int options, char *pempass)
{
	STACK_OF(PKCS7) * asafes = NULL;
	STACK_OF(PKCS12_SAFEBAG) * bags;
	int i, bagnid;
	int ret = 0;
	PKCS7 *p7;

	if (!(asafes = PKCS12_unpack_authsafes(p12)))
		return 0;
	for (i = 0; i < sk_PKCS7_num(asafes); i++) {







<
<






|
|

|

>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
|
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
|
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
|
|
>
>
>
>
>
|
>
>
|
>
>
>
>
>
>
>
>
>
>
>
>
|
>




<
<

<
<
<
<


<
<
<
<
<
<
<
<
<
<

<
<
<

<

<
<








>
|
<
|
|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
|
<
|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<

<
<
<
<
|
<
|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<



|
|
|

|

|
>




|






|





|


|


|
|



|


|


|
|


|
|
>




|


|




|
>



|
|

|
|
>






|
|
|


















>
|






|
|
|
>
|








|

|


|
>


|
>








|
>





|
>
|
>







|
>
|
>



|

|
>

|
|
|

|
|
>



|



|
>
|





|
|

|
>
|


|
|
|





|
<
<
|
<
|
<
|








|
>




|


|
|
>
|



|


>
|





|
>






<
|


<
|







|


|
|







67
68
69
70
71
72
73


74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531


532




533
534










535



536

537


538
539
540
541
542
543
544
545
546
547

548
549



























550





























551

552































































































553




554

555
















































556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766


767

768

769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811

812
813
814

815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
#include "apps.h"

#include <openssl/crypto.h>
#include <openssl/err.h>
#include <openssl/pem.h>
#include <openssl/pkcs12.h>



#define NOKEYS		0x1
#define NOCERTS 	0x2
#define INFO		0x4
#define CLCERTS		0x8
#define CACERTS		0x10

int get_cert_chain(X509 *cert, X509_STORE *store, STACK_OF(X509) **chain);
int dump_certs_keys_p12(BIO *out, PKCS12 *p12, char *pass, int passlen,
    int options, char *pempass);
int dump_certs_pkeys_bags(BIO *out, STACK_OF(PKCS12_SAFEBAG) *bags, char *pass,
    int passlen, int options, char *pempass);
int dump_certs_pkeys_bag(BIO *out, PKCS12_SAFEBAG *bags, char *pass,
    int passlen, int options, char *pempass);
int print_attribs(BIO *out, STACK_OF(X509_ATTRIBUTE) *attrlst,
    const char *name);
void hex_prin(BIO *out, unsigned char *buf, int len);
int alg_print(BIO *x, X509_ALGOR *alg);
int cert_load(BIO *in, STACK_OF(X509) *sk);
static int set_pbe(BIO *err, int *ppbe, const char *str);

static struct {
	int add_lmk;
	char *CAfile;
	STACK_OF(OPENSSL_STRING) *canames;
	char *CApath;
	int cert_pbe;
	char *certfile;
	int chain;
	char *csp_name;
	const EVP_CIPHER *enc;
	int export_cert;
	int key_pbe;
	char *keyname;
	int keytype;
	char *infile;
	int iter;
	char *macalg;
	int maciter;
	int macver;
	char *name;
	int noprompt;
	int options;
	char *outfile;
	char *passarg;
	char *passargin;
	char *passargout;
	int twopass;
} pkcs12_config;

static int
pkcs12_opt_canames(char *arg)
{
	if (pkcs12_config.canames == NULL &&
	    (pkcs12_config.canames = sk_OPENSSL_STRING_new_null()) == NULL)
		return (1);

	if (!sk_OPENSSL_STRING_push(pkcs12_config.canames, arg))
		return (1);

	return (0);
}

static int
pkcs12_opt_cert_pbe(char *arg)
{
	return (!set_pbe(bio_err, &pkcs12_config.cert_pbe, arg));
}

static int
pkcs12_opt_key_pbe(char *arg)
{
	return (!set_pbe(bio_err, &pkcs12_config.key_pbe, arg));
}

static int
pkcs12_opt_passarg(char *arg)
{
	pkcs12_config.passarg = arg;
	pkcs12_config.noprompt = 1;
	return (0);
}

static const EVP_CIPHER *get_cipher_by_name(char *name)
{
	if (name == NULL || strcmp(name, "") == 0)
		return (NULL);
#ifndef OPENSSL_NO_AES
	else if (strcmp(name, "aes128") == 0)
		return EVP_aes_128_cbc();
	else if (strcmp(name, "aes192") == 0)
		return EVP_aes_192_cbc();
	else if (strcmp(name, "aes256") == 0)
		return EVP_aes_256_cbc();
#endif
#ifndef OPENSSL_NO_CAMELLIA
	else if (strcmp(name, "camellia128") == 0)
		return EVP_camellia_128_cbc();
	else if (strcmp(name, "camellia192") == 0)
		return EVP_camellia_192_cbc();
	else if (strcmp(name, "camellia256") == 0)
		return EVP_camellia_256_cbc();
#endif
#ifndef OPENSSL_NO_DES
	else if (strcmp(name, "des") == 0)
		return EVP_des_cbc();
	else if (strcmp(name, "des3") == 0)
		return EVP_des_ede3_cbc();
#endif
#ifndef OPENSSL_NO_IDEA
	else if (strcmp(name, "idea") == 0)
		return EVP_idea_cbc();
#endif
	else
		return (NULL);
}

static int
pkcs12_opt_enc(int argc, char **argv, int *argsused)
{
	char *name = argv[0];

	if (*name++ != '-')
		return (1);

	if (strcmp(name, "nodes") == 0)
		pkcs12_config.enc = NULL;
	else if ((pkcs12_config.enc = get_cipher_by_name(name)) == NULL)
		return (1);

	*argsused = 1;
	return (0);
}

static const struct option pkcs12_options[] = {
#ifndef OPENSSL_NO_AES
	{
		.name = "aes128",
		.desc = "Encrypt PEM output with CBC AES",
		.type = OPTION_ARGV_FUNC,
		.opt.argvfunc = pkcs12_opt_enc,
	},
	{
		.name = "aes192",
		.desc = "Encrypt PEM output with CBC AES",
		.type = OPTION_ARGV_FUNC,
		.opt.argvfunc = pkcs12_opt_enc,
	},
	{
		.name = "aes256",
		.desc = "Encrypt PEM output with CBC AES",
		.type = OPTION_ARGV_FUNC,
		.opt.argvfunc = pkcs12_opt_enc,
	},
#endif
#ifndef OPENSSL_NO_CAMELLIA
	{
		.name = "camellia128",
		.desc = "Encrypt PEM output with CBC Camellia",
		.type = OPTION_ARGV_FUNC,
		.opt.argvfunc = pkcs12_opt_enc,
	},
	{
		.name = "camellia192",
		.desc = "Encrypt PEM output with CBC Camellia",
		.type = OPTION_ARGV_FUNC,
		.opt.argvfunc = pkcs12_opt_enc,
	},
	{
		.name = "camellia256",
		.desc = "Encrypt PEM output with CBC Camellia",
		.type = OPTION_ARGV_FUNC,
		.opt.argvfunc = pkcs12_opt_enc,
	},
#endif
	{
		.name = "des",
		.desc = "Encrypt private keys with DES",
		.type = OPTION_ARGV_FUNC,
		.opt.argvfunc = pkcs12_opt_enc,
	},
	{
		.name = "des3",
		.desc = "Encrypt private keys with triple DES (default)",
		.type = OPTION_ARGV_FUNC,
		.opt.argvfunc = pkcs12_opt_enc,
	},
#ifndef OPENSSL_NO_IDEA
	{
		.name = "idea",
		.desc = "Encrypt private keys with IDEA",
		.type = OPTION_ARGV_FUNC,
		.opt.argvfunc = pkcs12_opt_enc,
	},
#endif
	{
		.name = "cacerts",
		.desc = "Only output CA certificates",
		.type = OPTION_VALUE_OR,
		.opt.value = &pkcs12_config.options,
		.value = CACERTS,
	},
	{
		.name = "CAfile",
		.argname = "file",
		.desc = "PEM format file of CA certificates",
		.type = OPTION_ARG,
		.opt.arg = &pkcs12_config.CAfile,
	},
	{
		.name = "caname",
		.argname = "name",
		.desc = "Use name as CA friendly name (can be used more than once)",
		.type = OPTION_ARG_FUNC,
		.opt.argfunc = pkcs12_opt_canames,
	},
	{
		.name = "CApath",
		.argname = "directory",
		.desc = "PEM format directory of CA certificates",
		.type = OPTION_ARG,
		.opt.arg = &pkcs12_config.CApath,
	},
	{
		.name = "certfile",
		.argname = "file",
		.desc = "Add all certs in file",
		.type = OPTION_ARG,
		.opt.arg = &pkcs12_config.certfile,
	},
	{
		.name = "certpbe",
		.argname = "alg",
		.desc = "Specify certificate PBE algorithm (default RC2-40)",
		.type = OPTION_ARG_FUNC,
		.opt.argfunc = pkcs12_opt_cert_pbe,
	},
	{
		.name = "chain",
		.desc = "Add certificate chain",
		.type = OPTION_FLAG,
		.opt.flag = &pkcs12_config.chain,
	},
	{
		.name = "clcerts",
		.desc = "Only output client certificates",
		.type = OPTION_VALUE_OR,
		.opt.value = &pkcs12_config.options,
		.value = CLCERTS,
	},
	{
		.name = "CSP",
		.argname = "name",
		.desc = "Microsoft CSP name",
		.type = OPTION_ARG,
		.opt.arg = &pkcs12_config.csp_name,
	},
	{
		.name = "descert",
		.desc = "Encrypt PKCS#12 certificates with triple DES (default RC2-40)",
		.type = OPTION_VALUE,
		.opt.value = &pkcs12_config.cert_pbe,
		.value = NID_pbe_WithSHA1And3_Key_TripleDES_CBC,
	},
	{
		.name = "export",
		.desc = "Output PKCS#12 file",
		.type = OPTION_FLAG,
		.opt.flag = &pkcs12_config.export_cert,
	},
	{
		.name = "in",
		.argname = "file",
		.desc = "Input filename",
		.type = OPTION_ARG,
		.opt.arg = &pkcs12_config.infile,
	},
	{
		.name = "info",
		.desc = "Give info about PKCS#12 structure",
		.type = OPTION_VALUE_OR,
		.opt.value = &pkcs12_config.options,
		.value = INFO,
	},
	{
		.name = "inkey",
		.argname = "file",
		.desc = "Private key if not infile",
		.type = OPTION_ARG,
		.opt.arg = &pkcs12_config.keyname,
	},
	{
		.name = "keyex",
		.desc = "Set MS key exchange type",
		.type = OPTION_VALUE,
		.opt.value = &pkcs12_config.keytype,
		.value = KEY_EX,
	},
	{
		.name = "keypbe",
		.argname = "alg",
		.desc = "Specify private key PBE algorithm (default 3DES)",
		.type = OPTION_ARG_FUNC,
		.opt.argfunc = pkcs12_opt_key_pbe,
	},
	{
		.name = "keysig",
		.desc = "Set MS key signature type",
		.type = OPTION_VALUE,
		.opt.value = &pkcs12_config.keytype,
		.value = KEY_SIG,
	},
	{
		.name = "LMK",
		.desc = "Add local machine keyset attribute to private key",
		.type = OPTION_FLAG,
		.opt.flag = &pkcs12_config.add_lmk,
	},
	{
		.name = "macalg",
		.argname = "alg",
		.desc = "Digest algorithm used in MAC (default SHA1)",
		.type = OPTION_ARG,
		.opt.arg = &pkcs12_config.macalg,
	},
	{
		.name = "maciter",
		.desc = "Use MAC iteration",
		.type = OPTION_VALUE,
		.opt.value = &pkcs12_config.maciter,
		.value = PKCS12_DEFAULT_ITER,
	},
	{
		.name = "name",
		.argname = "name",
		.desc = "Use name as friendly name",
		.type = OPTION_ARG,
		.opt.arg = &pkcs12_config.name,
	},
	{
		.name = "nocerts",
		.desc = "Don't output certificates",
		.type = OPTION_VALUE_OR,
		.opt.value = &pkcs12_config.options,
		.value = NOCERTS,
	},
	{
		.name = "nodes",
		.desc = "Don't encrypt private keys",
		.type = OPTION_ARGV_FUNC,
		.opt.argvfunc = pkcs12_opt_enc,
	},
	{
		.name = "noiter",
		.desc = "Don't use encryption iteration",
		.type = OPTION_VALUE,
		.opt.value = &pkcs12_config.iter,
		.value = 1,
	},
	{
		.name = "nokeys",
		.desc = "Don't output private keys",
		.type = OPTION_VALUE_OR,
		.opt.value = &pkcs12_config.options,
		.value = NOKEYS,
	},
	{
		.name = "nomac",
		.desc = "Don't generate MAC",
		.type = OPTION_VALUE,
		.opt.value = &pkcs12_config.maciter,
		.value = -1,
	},
	{
		.name = "nomaciter",
		.desc = "Don't use MAC iteration",
		.type = OPTION_VALUE,
		.opt.value = &pkcs12_config.maciter,
		.value = 1,
	},
	{
		.name = "nomacver",
		.desc = "Don't verify MAC",
		.type = OPTION_VALUE,
		.opt.value = &pkcs12_config.macver,
		.value = 0,
	},
	{
		.name = "noout",
		.desc = "Don't output anything, just verify",
		.type = OPTION_VALUE_OR,
		.opt.value = &pkcs12_config.options,
		.value = (NOKEYS | NOCERTS),
	},
	{
		.name = "out",
		.argname = "file",
		.desc = "Output filename",
		.type = OPTION_ARG,
		.opt.arg = &pkcs12_config.outfile,
	},
	{
		.name = "passin",
		.argname = "arg",
		.desc = "Input file passphrase source",
		.type = OPTION_ARG,
		.opt.arg = &pkcs12_config.passargin,
	},
	{
		.name = "passout",
		.argname = "arg",
		.desc = "Output file passphrase source",
		.type = OPTION_ARG,
		.opt.arg = &pkcs12_config.passargout,
	},
	{
		.name = "password",
		.argname = "arg",
		.desc = "Set import/export password source",
		.type = OPTION_ARG_FUNC,
		.opt.argfunc = pkcs12_opt_passarg,
	},
	{
		.name = "twopass",
		.desc = "Separate MAC, encryption passwords",
		.type = OPTION_FLAG,
		.opt.flag = &pkcs12_config.twopass,
	},
	{ NULL },
};

static void
pkcs12_usage(void)
{
	fprintf(stderr, "usage: pkcs12 [-aes128 | -aes192 | -aes256 |");
	fprintf(stderr, " -camellia128 |\n");
	fprintf(stderr, "    -camellia192 | -camellia256 | -des | -des3 |");
	fprintf(stderr, " -idea]\n");
	fprintf(stderr, "    [-cacerts] [-CAfile file] [-caname name]\n");
	fprintf(stderr, "    [-CApath directory] [-certfile file]");
	fprintf(stderr, " [-certpbe alg]\n");
	fprintf(stderr, "    [-chain] [-clcerts] [-CSP name] [-descert]");
	fprintf(stderr, " [-export]\n");
	fprintf(stderr, "    [-in file] [-info] [-inkey file] [-keyex]");
	fprintf(stderr, " [-keypbe alg]\n");
	fprintf(stderr, "    [-keysig] [-LMK] [-macalg alg] [-maciter]");
	fprintf(stderr, " [-name name]\n");
	fprintf(stderr, "    [-nocerts] [-nodes] [-noiter] [-nokeys]");
	fprintf(stderr, " [-nomac]\n");
	fprintf(stderr, "    [-nomaciter] [-nomacver] [-noout] [-out file]\n");
	fprintf(stderr, "    [-passin arg] [-passout arg] [-password arg]");
	fprintf(stderr, " [-twopass]\n\n");
	options_usage(pkcs12_options);
	fprintf(stderr, "\n");
}

int
pkcs12_main(int argc, char **argv)
{


	BIO *in = NULL, *out = NULL;




	PKCS12 *p12 = NULL;
	char pass[50], macpass[50];










	int ret = 1;



	char *cpass = NULL, *mpass = NULL;

	char *passin = NULL, *passout = NULL;



	if (single_execution) {
		if (pledge("stdio cpath wpath rpath tty", NULL) == -1) {
			perror("pledge");
			exit(1);
		}
	}

	memset(&pkcs12_config, 0, sizeof(pkcs12_config));
	pkcs12_config.cert_pbe = NID_pbe_WithSHA1And40BitRC2_CBC;

	pkcs12_config.enc = EVP_des_ede3_cbc();
	pkcs12_config.iter = PKCS12_DEFAULT_ITER;



























	pkcs12_config.key_pbe = NID_pbe_WithSHA1And3_Key_TripleDES_CBC;





























	pkcs12_config.maciter = PKCS12_DEFAULT_ITER;

	pkcs12_config.macver = 1;




































































































	if (options_parse(argc, argv, pkcs12_options, NULL, NULL) != 0) {

		pkcs12_usage();
















































		goto end;
	}

	if (pkcs12_config.passarg) {
		if (pkcs12_config.export_cert)
			pkcs12_config.passargout = pkcs12_config.passarg;
		else
			pkcs12_config.passargin = pkcs12_config.passarg;
	}
	if (!app_passwd(bio_err, pkcs12_config.passargin,
	    pkcs12_config.passargout, &passin, &passout)) {
		BIO_printf(bio_err, "Error getting passwords\n");
		goto end;
	}
	if (!cpass) {
		if (pkcs12_config.export_cert)
			cpass = passout;
		else
			cpass = passin;
	}
	if (cpass) {
		mpass = cpass;
		pkcs12_config.noprompt = 1;
	} else {
		cpass = pass;
		mpass = macpass;
	}

	if (!pkcs12_config.infile)
		in = BIO_new_fp(stdin, BIO_NOCLOSE);
	else
		in = BIO_new_file(pkcs12_config.infile, "rb");
	if (!in) {
		BIO_printf(bio_err, "Error opening input file %s\n",
		    pkcs12_config.infile ? pkcs12_config.infile : "<stdin>");
		perror(pkcs12_config.infile);
		goto end;
	}

	if (!pkcs12_config.outfile) {
		out = BIO_new_fp(stdout, BIO_NOCLOSE);
	} else
		out = BIO_new_file(pkcs12_config.outfile, "wb");
	if (!out) {
		BIO_printf(bio_err, "Error opening output file %s\n",
		    pkcs12_config.outfile ? pkcs12_config.outfile : "<stdout>");
		perror(pkcs12_config.outfile);
		goto end;
	}
	if (pkcs12_config.twopass) {
		if (EVP_read_pw_string(macpass, sizeof macpass,
		    "Enter MAC Password:", pkcs12_config.export_cert)) {
			BIO_printf(bio_err, "Can't read Password\n");
			goto end;
		}
	}
	if (pkcs12_config.export_cert) {
		EVP_PKEY *key = NULL;
		X509 *ucert = NULL, *x = NULL;
		STACK_OF(X509) *certs = NULL;
		const EVP_MD *macmd = NULL;
		unsigned char *catmp = NULL;
		int i;

		if ((pkcs12_config.options & (NOCERTS | NOKEYS)) ==
		    (NOCERTS | NOKEYS)) {
			BIO_printf(bio_err, "Nothing to do!\n");
			goto export_end;
		}
		if (pkcs12_config.options & NOCERTS)
			pkcs12_config.chain = 0;

		if (!(pkcs12_config.options & NOKEYS)) {
			key = load_key(bio_err, pkcs12_config.keyname ?
			    pkcs12_config.keyname : pkcs12_config.infile,
			    FORMAT_PEM, 1, passin, "private key");
			if (!key)
				goto export_end;
		}

		/* Load in all certs in input file */
		if (!(pkcs12_config.options & NOCERTS)) {
			certs = load_certs(bio_err, pkcs12_config.infile,
			    FORMAT_PEM, NULL, "certificates");
			if (!certs)
				goto export_end;

			if (key) {
				/* Look for matching private key */
				for (i = 0; i < sk_X509_num(certs); i++) {
					x = sk_X509_value(certs, i);
					if (X509_check_private_key(x, key)) {
						ucert = x;
						/* Zero keyid and alias */
						X509_keyid_set1(ucert, NULL, 0);
						X509_alias_set1(ucert, NULL, 0);
						/* Remove from list */
						(void) sk_X509_delete(certs, i);
						break;
					}
				}
				if (!ucert) {
					BIO_printf(bio_err,
					    "No certificate matches private key\n");
					goto export_end;
				}
			}
		}

		/* Add any more certificates asked for */
		if (pkcs12_config.certfile) {
			STACK_OF(X509) *morecerts = NULL;
			if (!(morecerts = load_certs(bio_err,
			    pkcs12_config.certfile, FORMAT_PEM, NULL,
			    "certificates from certfile")))
				goto export_end;
			while (sk_X509_num(morecerts) > 0)
				sk_X509_push(certs, sk_X509_shift(morecerts));
			sk_X509_free(morecerts);
		}


		/* If chaining get chain from user cert */
		if (pkcs12_config.chain) {
			int vret;
			STACK_OF(X509) *chain2;
			X509_STORE *store = X509_STORE_new();
			if (!store) {
				BIO_printf(bio_err,
				    "Memory allocation error\n");
				goto export_end;
			}
			if (!X509_STORE_load_locations(store,
			    pkcs12_config.CAfile, pkcs12_config.CApath))
				X509_STORE_set_default_paths(store);

			vret = get_cert_chain(ucert, store, &chain2);
			X509_STORE_free(store);

			if (!vret) {
				/* Exclude verified certificate */
				for (i = 1; i < sk_X509_num(chain2); i++)
					sk_X509_push(certs, sk_X509_value(
					    chain2, i));
				/* Free first certificate */
				X509_free(sk_X509_value(chain2, 0));
				sk_X509_free(chain2);
			} else {
				if (vret >= 0)
					BIO_printf(bio_err,
					    "Error %s getting chain.\n",
					    X509_verify_cert_error_string(
					    vret));
				else
					ERR_print_errors(bio_err);
				goto export_end;
			}
		}
		/* Add any CA names */

		for (i = 0; i < sk_OPENSSL_STRING_num(pkcs12_config.canames);
		    i++) {
			catmp = (unsigned char *) sk_OPENSSL_STRING_value(
			    pkcs12_config.canames, i);
			X509_alias_set1(sk_X509_value(certs, i), catmp, -1);
		}

		if (pkcs12_config.csp_name && key)
			EVP_PKEY_add1_attr_by_NID(key, NID_ms_csp_name,
			    MBSTRING_ASC,
			    (unsigned char *) pkcs12_config.csp_name, -1);

		if (pkcs12_config.add_lmk && key)
			EVP_PKEY_add1_attr_by_NID(key, NID_LocalKeySet, 0, NULL,
			    -1);

		if (!pkcs12_config.noprompt &&
		    EVP_read_pw_string(pass, sizeof pass,
		    "Enter Export Password:", 1)) {
			BIO_printf(bio_err, "Can't read Password\n");
			goto export_end;
		}
		if (!pkcs12_config.twopass)
			strlcpy(macpass, pass, sizeof macpass);


		p12 = PKCS12_create(cpass, pkcs12_config.name, key, ucert,
		    certs, pkcs12_config.key_pbe, pkcs12_config.cert_pbe,
		    pkcs12_config.iter, -1, pkcs12_config.keytype);

		if (!p12) {
			ERR_print_errors(bio_err);
			goto export_end;
		}
		if (pkcs12_config.macalg) {
			macmd = EVP_get_digestbyname(pkcs12_config.macalg);
			if (!macmd) {
				BIO_printf(bio_err,
				    "Unknown digest algorithm %s\n",
				    pkcs12_config.macalg);
			}
		}
		if (pkcs12_config.maciter != -1)
			PKCS12_set_mac(p12, mpass, -1, NULL, 0,
			    pkcs12_config.maciter, macmd);

		i2d_PKCS12_bio(out, p12);

		ret = 0;

 export_end:


		EVP_PKEY_free(key);

		sk_X509_pop_free(certs, X509_free);

		X509_free(ucert);

		goto end;

	}
	if (!(p12 = d2i_PKCS12_bio(in, NULL))) {
		ERR_print_errors(bio_err);
		goto end;
	}
	if (!pkcs12_config.noprompt && EVP_read_pw_string(pass, sizeof pass,
	    "Enter Import Password:", 0)) {
		BIO_printf(bio_err, "Can't read Password\n");
		goto end;
	}

	if (!pkcs12_config.twopass)
		strlcpy(macpass, pass, sizeof macpass);

	if ((pkcs12_config.options & INFO) && p12->mac)
		BIO_printf(bio_err, "MAC Iteration %ld\n",
		    p12->mac->iter ? ASN1_INTEGER_get(p12->mac->iter) : 1);
	if (pkcs12_config.macver) {
		/* If we enter empty password try no password first */
		if (!mpass[0] && PKCS12_verify_mac(p12, NULL, 0)) {
			/* If mac and crypto pass the same set it to NULL too */
			if (!pkcs12_config.twopass)
				cpass = NULL;
		} else if (!PKCS12_verify_mac(p12, mpass, -1)) {
			BIO_printf(bio_err,
			    "Mac verify error: invalid password?\n");
			ERR_print_errors(bio_err);
			goto end;
		}
		BIO_printf(bio_err, "MAC verified OK\n");
	}
	if (!dump_certs_keys_p12(out, p12, cpass, -1, pkcs12_config.options,
	    passout)) {
		BIO_printf(bio_err, "Error outputting keys and certificates\n");
		ERR_print_errors(bio_err);
		goto end;
	}
	ret = 0;
 end:

	PKCS12_free(p12);
	BIO_free(in);
	BIO_free_all(out);

	sk_OPENSSL_STRING_free(pkcs12_config.canames);
	free(passin);
	free(passout);

	return (ret);
}

int
dump_certs_keys_p12(BIO *out, PKCS12 *p12, char *pass,
    int passlen, int options, char *pempass)
{
	STACK_OF(PKCS7) *asafes = NULL;
	STACK_OF(PKCS12_SAFEBAG) *bags;
	int i, bagnid;
	int ret = 0;
	PKCS7 *p7;

	if (!(asafes = PKCS12_unpack_authsafes(p12)))
		return 0;
	for (i = 0; i < sk_PKCS7_num(asafes); i++) {
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681

682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701

702
703
704
705
706
707
708
		}
		sk_PKCS12_SAFEBAG_pop_free(bags, PKCS12_SAFEBAG_free);
		bags = NULL;
	}
	ret = 1;

 err:

	if (asafes)
		sk_PKCS7_pop_free(asafes, PKCS7_free);
	return ret;
}

int
dump_certs_pkeys_bags(BIO * out, STACK_OF(PKCS12_SAFEBAG) * bags,
    char *pass, int passlen, int options, char *pempass)
{
	int i;
	for (i = 0; i < sk_PKCS12_SAFEBAG_num(bags); i++) {
		if (!dump_certs_pkeys_bag(out,
			sk_PKCS12_SAFEBAG_value(bags, i),
			pass, passlen,
			options, pempass))
			return 0;
	}
	return 1;
}

int
dump_certs_pkeys_bag(BIO * out, PKCS12_SAFEBAG * bag, char *pass,
    int passlen, int options, char *pempass)
{
	EVP_PKEY *pkey;
	PKCS8_PRIV_KEY_INFO *p8;
	X509 *x509;

	switch (OBJ_obj2nid(bag->type)) {
	case NID_keyBag:
		if (options & INFO)
			BIO_printf(bio_err, "Key bag\n");
		if (options & NOKEYS)
			return 1;
		print_attribs(out, bag->attrib, "Bag Attributes");
		p8 = bag->value.keybag;
		if (!(pkey = EVP_PKCS82PKEY(p8)))
			return 0;
		print_attribs(out, p8->attributes, "Key Attributes");
		PEM_write_bio_PrivateKey(out, pkey, enc, NULL, 0, NULL, pempass);

		EVP_PKEY_free(pkey);
		break;

	case NID_pkcs8ShroudedKeyBag:
		if (options & INFO) {
			BIO_printf(bio_err, "Shrouded Keybag: ");
			alg_print(bio_err, bag->value.shkeybag->algor);
		}
		if (options & NOKEYS)
			return 1;
		print_attribs(out, bag->attrib, "Bag Attributes");
		if (!(p8 = PKCS12_decrypt_skey(bag, pass, passlen)))
			return 0;
		if (!(pkey = EVP_PKCS82PKEY(p8))) {
			PKCS8_PRIV_KEY_INFO_free(p8);
			return 0;
		}
		print_attribs(out, p8->attributes, "Key Attributes");
		PKCS8_PRIV_KEY_INFO_free(p8);
		PEM_write_bio_PrivateKey(out, pkey, enc, NULL, 0, NULL, pempass);

		EVP_PKEY_free(pkey);
		break;

	case NID_certBag:
		if (options & INFO)
			BIO_printf(bio_err, "Certificate bag\n");
		if (options & NOCERTS)







<
<
|




|














|

















|
>



















|
>







856
857
858
859
860
861
862


863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
		}
		sk_PKCS12_SAFEBAG_pop_free(bags, PKCS12_SAFEBAG_free);
		bags = NULL;
	}
	ret = 1;

 err:


	sk_PKCS7_pop_free(asafes, PKCS7_free);
	return ret;
}

int
dump_certs_pkeys_bags(BIO *out, STACK_OF(PKCS12_SAFEBAG) *bags,
    char *pass, int passlen, int options, char *pempass)
{
	int i;
	for (i = 0; i < sk_PKCS12_SAFEBAG_num(bags); i++) {
		if (!dump_certs_pkeys_bag(out,
			sk_PKCS12_SAFEBAG_value(bags, i),
			pass, passlen,
			options, pempass))
			return 0;
	}
	return 1;
}

int
dump_certs_pkeys_bag(BIO *out, PKCS12_SAFEBAG *bag, char *pass,
    int passlen, int options, char *pempass)
{
	EVP_PKEY *pkey;
	PKCS8_PRIV_KEY_INFO *p8;
	X509 *x509;

	switch (OBJ_obj2nid(bag->type)) {
	case NID_keyBag:
		if (options & INFO)
			BIO_printf(bio_err, "Key bag\n");
		if (options & NOKEYS)
			return 1;
		print_attribs(out, bag->attrib, "Bag Attributes");
		p8 = bag->value.keybag;
		if (!(pkey = EVP_PKCS82PKEY(p8)))
			return 0;
		print_attribs(out, p8->attributes, "Key Attributes");
		PEM_write_bio_PrivateKey(out, pkey, pkcs12_config.enc, NULL, 0,
		    NULL, pempass);
		EVP_PKEY_free(pkey);
		break;

	case NID_pkcs8ShroudedKeyBag:
		if (options & INFO) {
			BIO_printf(bio_err, "Shrouded Keybag: ");
			alg_print(bio_err, bag->value.shkeybag->algor);
		}
		if (options & NOKEYS)
			return 1;
		print_attribs(out, bag->attrib, "Bag Attributes");
		if (!(p8 = PKCS12_decrypt_skey(bag, pass, passlen)))
			return 0;
		if (!(pkey = EVP_PKCS82PKEY(p8))) {
			PKCS8_PRIV_KEY_INFO_free(p8);
			return 0;
		}
		print_attribs(out, p8->attributes, "Key Attributes");
		PKCS8_PRIV_KEY_INFO_free(p8);
		PEM_write_bio_PrivateKey(out, pkey, pkcs12_config.enc, NULL, 0,
		    NULL, pempass);
		EVP_PKEY_free(pkey);
		break;

	case NID_certBag:
		if (options & INFO)
			BIO_printf(bio_err, "Certificate bag\n");
		if (options & NOCERTS)
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
}

/* Given a single certificate return a verified chain or NULL if error */

/* Hope this is OK .... */

int
get_cert_chain(X509 * cert, X509_STORE * store, STACK_OF(X509) ** chain)
{
	X509_STORE_CTX store_ctx;
	STACK_OF(X509) * chn;
	int i = 0;

	/*
	 * FIXME: Should really check the return status of
	 * X509_STORE_CTX_init for an error, but how that fits into the
	 * return value of this function is less obvious.
	 */







|


|







962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
}

/* Given a single certificate return a verified chain or NULL if error */

/* Hope this is OK .... */

int
get_cert_chain(X509 *cert, X509_STORE *store, STACK_OF(X509) **chain)
{
	X509_STORE_CTX store_ctx;
	STACK_OF(X509) *chn;
	int i = 0;

	/*
	 * FIXME: Should really check the return status of
	 * X509_STORE_CTX_init for an error, but how that fits into the
	 * return value of this function is less obvious.
	 */
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
	X509_STORE_CTX_cleanup(&store_ctx);
	*chain = chn;

	return i;
}

int
alg_print(BIO * x, X509_ALGOR * alg)
{
	PBEPARAM *pbe;
	const unsigned char *p;
	p = alg->parameter->value.sequence->data;
	pbe = d2i_PBEPARAM(NULL, &p, alg->parameter->value.sequence->length);
	if (!pbe)
		return 1;
	BIO_printf(bio_err, "%s, Iteration %ld\n",
	    OBJ_nid2ln(OBJ_obj2nid(alg->algorithm)),
	    ASN1_INTEGER_get(pbe->iter));
	PBEPARAM_free(pbe);
	return 1;
}

/* Load all certificates from a given file */

int
cert_load(BIO * in, STACK_OF(X509) * sk)
{
	int ret;
	X509 *cert;
	ret = 0;
	while ((cert = PEM_read_bio_X509(in, NULL, NULL, NULL))) {
		ret = 1;
		sk_X509_push(sk, cert);
	}
	if (ret)
		ERR_clear_error();
	return ret;
}

/* Generalised attribute print: handle PKCS#8 and bag attributes */

int
print_attribs(BIO * out, STACK_OF(X509_ATTRIBUTE) * attrlst, const char *name)
{
	X509_ATTRIBUTE *attr;
	ASN1_TYPE *av;
	char *value;
	int i, attr_nid;
	if (!attrlst) {
		BIO_printf(out, "%s: <No Attributes>\n", name);







|

















|
















|







994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
	X509_STORE_CTX_cleanup(&store_ctx);
	*chain = chn;

	return i;
}

int
alg_print(BIO *x, X509_ALGOR *alg)
{
	PBEPARAM *pbe;
	const unsigned char *p;
	p = alg->parameter->value.sequence->data;
	pbe = d2i_PBEPARAM(NULL, &p, alg->parameter->value.sequence->length);
	if (!pbe)
		return 1;
	BIO_printf(bio_err, "%s, Iteration %ld\n",
	    OBJ_nid2ln(OBJ_obj2nid(alg->algorithm)),
	    ASN1_INTEGER_get(pbe->iter));
	PBEPARAM_free(pbe);
	return 1;
}

/* Load all certificates from a given file */

int
cert_load(BIO *in, STACK_OF(X509) *sk)
{
	int ret;
	X509 *cert;
	ret = 0;
	while ((cert = PEM_read_bio_X509(in, NULL, NULL, NULL))) {
		ret = 1;
		sk_X509_push(sk, cert);
	}
	if (ret)
		ERR_clear_error();
	return ret;
}

/* Generalised attribute print: handle PKCS#8 and bag attributes */

int
print_attribs(BIO *out, STACK_OF(X509_ATTRIBUTE) *attrlst, const char *name)
{
	X509_ATTRIBUTE *attr;
	ASN1_TYPE *av;
	char *value;
	int i, attr_nid;
	if (!attrlst) {
		BIO_printf(out, "%s: <No Attributes>\n", name);
836
837
838
839
840
841
842
843

844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862

863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
		} else
			BIO_printf(out, "%s: ", OBJ_nid2ln(attr_nid));

		if (sk_ASN1_TYPE_num(attr->value.set)) {
			av = sk_ASN1_TYPE_value(attr->value.set, 0);
			switch (av->type) {
			case V_ASN1_BMPSTRING:
				value = OPENSSL_uni2asc(av->value.bmpstring->data,

				    av->value.bmpstring->length);
				BIO_printf(out, "%s\n", value);
				free(value);
				break;

			case V_ASN1_OCTET_STRING:
				hex_prin(out, av->value.octet_string->data,
				    av->value.octet_string->length);
				BIO_printf(out, "\n");
				break;

			case V_ASN1_BIT_STRING:
				hex_prin(out, av->value.bit_string->data,
				    av->value.bit_string->length);
				BIO_printf(out, "\n");
				break;

			default:
				BIO_printf(out, "<Unsupported tag %d>\n", av->type);

				break;
			}
		} else
			BIO_printf(out, "<No Values>\n");
	}
	return 1;
}

void
hex_prin(BIO * out, unsigned char *buf, int len)
{
	int i;
	for (i = 0; i < len; i++)
		BIO_printf(out, "%02X ", buf[i]);
}

static int
set_pbe(BIO * err, int *ppbe, const char *str)
{
	if (!str)
		return 0;
	if (!strcmp(str, "NONE")) {
		*ppbe = -1;
		return 1;
	}







|
>


















|
>









|







|







1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
		} else
			BIO_printf(out, "%s: ", OBJ_nid2ln(attr_nid));

		if (sk_ASN1_TYPE_num(attr->value.set)) {
			av = sk_ASN1_TYPE_value(attr->value.set, 0);
			switch (av->type) {
			case V_ASN1_BMPSTRING:
				value = OPENSSL_uni2asc(
				    av->value.bmpstring->data,
				    av->value.bmpstring->length);
				BIO_printf(out, "%s\n", value);
				free(value);
				break;

			case V_ASN1_OCTET_STRING:
				hex_prin(out, av->value.octet_string->data,
				    av->value.octet_string->length);
				BIO_printf(out, "\n");
				break;

			case V_ASN1_BIT_STRING:
				hex_prin(out, av->value.bit_string->data,
				    av->value.bit_string->length);
				BIO_printf(out, "\n");
				break;

			default:
				BIO_printf(out, "<Unsupported tag %d>\n",
				    av->type);
				break;
			}
		} else
			BIO_printf(out, "<No Values>\n");
	}
	return 1;
}

void
hex_prin(BIO *out, unsigned char *buf, int len)
{
	int i;
	for (i = 0; i < len; i++)
		BIO_printf(out, "%02X ", buf[i]);
}

static int
set_pbe(BIO *err, int *ppbe, const char *str)
{
	if (!str)
		return 0;
	if (!strcmp(str, "NONE")) {
		*ppbe = -1;
		return 1;
	}
Changes to jni/libressl/apps/openssl/pkcs7.c.
1
2
3
4
5
6
7
8
/* $OpenBSD: pkcs7.c,v 1.10 2018/02/07 05:47:55 jsing Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
 * All rights reserved.
 *
 * This package is an SSL implementation written
 * by Eric Young (eay@cryptsoft.com).
 * The implementation was written so as to conform with Netscapes SSL.
 *
|







1
2
3
4
5
6
7
8
/* $OpenBSD: pkcs7.c,v 1.11 2019/07/14 03:30:46 guenther Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
 * All rights reserved.
 *
 * This package is an SSL implementation written
 * by Eric Young (eay@cryptsoft.com).
 * The implementation was written so as to conform with Netscapes SSL.
 *
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
	char *outfile;
	int outformat;
	int p7_print;
	int print_certs;
	int text;
} pkcs7_config;

static struct option pkcs7_options[] = {
	{
		.name = "in",
		.argname = "file",
		.desc = "Input file (default stdin)",
		.type = OPTION_ARG,
		.opt.arg = &pkcs7_config.infile,
	},







|







77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
	char *outfile;
	int outformat;
	int p7_print;
	int print_certs;
	int text;
} pkcs7_config;

static const struct option pkcs7_options[] = {
	{
		.name = "in",
		.argname = "file",
		.desc = "Input file (default stdin)",
		.type = OPTION_ARG,
		.opt.arg = &pkcs7_config.infile,
	},
Changes to jni/libressl/apps/openssl/pkcs8.c.
1
2
3
4
5
6
7
8
/* $OpenBSD: pkcs8.c,v 1.13 2018/08/24 22:56:45 jmc Exp $ */
/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
 * project 1999-2004.
 */
/* ====================================================================
 * Copyright (c) 1999 The OpenSSL Project.  All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
|







1
2
3
4
5
6
7
8
/* $OpenBSD: pkcs8.c,v 1.14 2019/07/14 03:30:46 guenther Exp $ */
/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
 * project 1999-2004.
 */
/* ====================================================================
 * Copyright (c) 1999 The OpenSSL Project.  All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
		fprintf(stderr, "Unknown cipher '%s'\n", arg);
		return (1);
	}

	return (0);
}

static struct option pkcs8_options[] = {
	{
		.name = "in",
		.argname = "file",
		.desc = "Input file (default stdin)",
		.type = OPTION_ARG,
		.opt.arg = &pkcs8_config.infile,
	},







|







99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
		fprintf(stderr, "Unknown cipher '%s'\n", arg);
		return (1);
	}

	return (0);
}

static const struct option pkcs8_options[] = {
	{
		.name = "in",
		.argname = "file",
		.desc = "Input file (default stdin)",
		.type = OPTION_ARG,
		.opt.arg = &pkcs8_config.infile,
	},
Changes to jni/libressl/apps/openssl/pkey.c.
1
2
3
4
5
6
7
8
/* $OpenBSD: pkey.c,v 1.14 2019/02/09 15:49:21 inoguchi Exp $ */
/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
 * project 2006
 */
/* ====================================================================
 * Copyright (c) 2006 The OpenSSL Project.  All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
|







1
2
3
4
5
6
7
8
/* $OpenBSD: pkey.c,v 1.15 2019/07/14 03:30:46 guenther Exp $ */
/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
 * project 2006
 */
/* ====================================================================
 * Copyright (c) 2006 The OpenSSL Project.  All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
		return (1);
	}

	*argsused = 1;
	return (0);
}

static struct option pkey_options[] = {
	{
		.name = "in",
		.argname = "file",
		.desc = "Input file (default stdin)",
		.type = OPTION_ARG,
		.opt.arg = &pkey_config.infile,
	},







|







93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
		return (1);
	}

	*argsused = 1;
	return (0);
}

static const struct option pkey_options[] = {
	{
		.name = "in",
		.argname = "file",
		.desc = "Input file (default stdin)",
		.type = OPTION_ARG,
		.opt.arg = &pkey_config.infile,
	},
Changes to jni/libressl/apps/openssl/pkeyparam.c.
1
2
3
4
5
6
7
8
/* $OpenBSD: pkeyparam.c,v 1.11 2018/02/07 05:47:55 jsing Exp $ */
/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
 * project 2006
 */
/* ====================================================================
 * Copyright (c) 2006 The OpenSSL Project.  All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
|







1
2
3
4
5
6
7
8
/* $OpenBSD: pkeyparam.c,v 1.12 2019/07/14 03:30:46 guenther Exp $ */
/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
 * project 2006
 */
/* ====================================================================
 * Copyright (c) 2006 The OpenSSL Project.  All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
struct {
	char *infile;
	int noout;
	char *outfile;
	int text;
} pkeyparam_config;

struct option pkeyparam_options[] = {
	{
		.name = "in",
		.argname = "file",
		.desc = "Input file (default stdin)",
		.type = OPTION_ARG,
		.opt.arg = &pkeyparam_config.infile,
	},







|







68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
struct {
	char *infile;
	int noout;
	char *outfile;
	int text;
} pkeyparam_config;

static const struct option pkeyparam_options[] = {
	{
		.name = "in",
		.argname = "file",
		.desc = "Input file (default stdin)",
		.type = OPTION_ARG,
		.opt.arg = &pkeyparam_config.infile,
	},
Changes to jni/libressl/apps/openssl/pkeyutl.c.
1
2
3
4
5
6
7
8
/* $OpenBSD: pkeyutl.c,v 1.15 2019/02/17 15:01:08 inoguchi Exp $ */
/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
 * project 2006.
 */
/* ====================================================================
 * Copyright (c) 2006 The OpenSSL Project.  All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
|







1
2
3
4
5
6
7
8
/* $OpenBSD: pkeyutl.c,v 1.16 2019/07/14 03:30:46 guenther Exp $ */
/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
 * project 2006.
 */
/* ====================================================================
 * Copyright (c) 2006 The OpenSSL Project.  All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106

static int pkeyutl_pkeyopt(char *pkeyopt);

static int do_keyop(EVP_PKEY_CTX * ctx, int pkey_op,
    unsigned char *out, size_t * poutlen,
    unsigned char *in, size_t inlen);

struct option pkeyutl_options[] = {
	{
		.name = "asn1parse",
		.desc = "ASN.1 parse the output data",
		.type = OPTION_FLAG,
		.opt.flag = &pkeyutl_config.asn1parse,
	},
	{







|







92
93
94
95
96
97
98
99
100
101
102
103
104
105
106

static int pkeyutl_pkeyopt(char *pkeyopt);

static int do_keyop(EVP_PKEY_CTX * ctx, int pkey_op,
    unsigned char *out, size_t * poutlen,
    unsigned char *in, size_t inlen);

static const struct option pkeyutl_options[] = {
	{
		.name = "asn1parse",
		.desc = "ASN.1 parse the output data",
		.type = OPTION_FLAG,
		.opt.flag = &pkeyutl_config.asn1parse,
	},
	{
Changes to jni/libressl/apps/openssl/prime.c.
1
2
3
4
5
6
7
8
/* $OpenBSD: prime.c,v 1.12 2019/01/20 01:59:06 tb Exp $ */
/* ====================================================================
 * Copyright (c) 2004 The OpenSSL Project.  All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 *
|







1
2
3
4
5
6
7
8
/* $OpenBSD: prime.c,v 1.13 2019/07/14 03:30:46 guenther Exp $ */
/* ====================================================================
 * Copyright (c) 2004 The OpenSSL Project.  All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 *
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
	int bits;
	int checks;
	int generate;
	int hex;
	int safe;
} prime_config;

struct option prime_options[] = {
	{
		.name = "bits",
		.argname = "n",
		.desc = "Number of bits in the generated prime number",
		.type = OPTION_ARG_INT,
		.opt.value = &prime_config.bits,
	},







|







60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
	int bits;
	int checks;
	int generate;
	int hex;
	int safe;
} prime_config;

static const struct option prime_options[] = {
	{
		.name = "bits",
		.argname = "n",
		.desc = "Number of bits in the generated prime number",
		.type = OPTION_ARG_INT,
		.opt.value = &prime_config.bits,
	},
Changes to jni/libressl/apps/openssl/rand.c.
1
2
3
4
5
6
7
8
/* $OpenBSD: rand.c,v 1.13 2018/02/07 05:47:55 jsing Exp $ */
/* ====================================================================
 * Copyright (c) 1998-2001 The OpenSSL Project.  All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 *
|







1
2
3
4
5
6
7
8
/* $OpenBSD: rand.c,v 1.14 2019/07/14 03:30:46 guenther Exp $ */
/* ====================================================================
 * Copyright (c) 1998-2001 The OpenSSL Project.  All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 *
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78

struct {
	int base64;
	int hex;
	char *outfile;
} rand_config;

struct option rand_options[] = {
	{
		.name = "base64",
		.desc = "Perform base64 encoding on output",
		.type = OPTION_FLAG,
		.opt.flag = &rand_config.base64,
	},
	{







|







64
65
66
67
68
69
70
71
72
73
74
75
76
77
78

struct {
	int base64;
	int hex;
	char *outfile;
} rand_config;

static const struct option rand_options[] = {
	{
		.name = "base64",
		.desc = "Perform base64 encoding on output",
		.type = OPTION_FLAG,
		.opt.flag = &rand_config.base64,
	},
	{
Changes to jni/libressl/apps/openssl/req.c.
1
2
3
4
5
6
7
8
/* $OpenBSD: req.c,v 1.15 2018/02/07 05:47:55 jsing Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
 * All rights reserved.
 *
 * This package is an SSL implementation written
 * by Eric Young (eay@cryptsoft.com).
 * The implementation was written so as to conform with Netscapes SSL.
 *
|







1
2
3
4
5
6
7
8
/* $OpenBSD: req.c,v 1.16 2019/07/03 03:24:02 deraadt Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
 * All rights reserved.
 *
 * This package is an SSL implementation written
 * by Eric Young (eay@cryptsoft.com).
 * The implementation was written so as to conform with Netscapes SSL.
 *
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
				type++;
			} else
				mval = 0;
			/* If OBJ not recognised ignore it */
			if ((nid = OBJ_txt2nid(type)) == NID_undef)
				goto start;
			ret = snprintf(buf, sizeof buf, "%s_default", v->name);
			if (ret == -1 || ret >= sizeof(buf)) {
				BIO_printf(bio_err, "Name '%s' too long for default\n",
				    v->name);
				return 0;
			}
			if ((def = NCONF_get_string(req_conf, dn_sect, buf)) == NULL) {
				ERR_clear_error();
				def = "";
			}
			ret = snprintf(buf, sizeof buf, "%s_value", v->name);
			if (ret == -1 || ret >= sizeof(buf)) {
				BIO_printf(bio_err, "Name '%s' too long for value\n",
				    v->name);
				return 0;
			}
			if ((value = NCONF_get_string(req_conf, dn_sect, buf)) == NULL) {
				ERR_clear_error();
				value = NULL;
			}
			ret = snprintf(buf, sizeof buf, "%s_min", v->name);
			if (ret == -1 || ret >= sizeof(buf)) {
				BIO_printf(bio_err, "Name '%s' too long for min\n",
				    v->name);
				return 0;
			}
			if (!NCONF_get_number(req_conf, dn_sect, buf, &n_min)) {
				ERR_clear_error();
				n_min = -1;
			}
			ret = snprintf(buf, sizeof buf, "%s_max", v->name);
			if (ret == -1 || ret >= sizeof(buf)) {
				BIO_printf(bio_err, "Name '%s' too long for max\n",
				    v->name);
				return 0;
			}
			if (!NCONF_get_number(req_conf, dn_sect, buf, &n_max)) {
				ERR_clear_error();
				n_max = -1;







|









|









|









|







1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
				type++;
			} else
				mval = 0;
			/* If OBJ not recognised ignore it */
			if ((nid = OBJ_txt2nid(type)) == NID_undef)
				goto start;
			ret = snprintf(buf, sizeof buf, "%s_default", v->name);
			if (ret < 0 || ret >= sizeof(buf)) {
				BIO_printf(bio_err, "Name '%s' too long for default\n",
				    v->name);
				return 0;
			}
			if ((def = NCONF_get_string(req_conf, dn_sect, buf)) == NULL) {
				ERR_clear_error();
				def = "";
			}
			ret = snprintf(buf, sizeof buf, "%s_value", v->name);
			if (ret < 0 || ret >= sizeof(buf)) {
				BIO_printf(bio_err, "Name '%s' too long for value\n",
				    v->name);
				return 0;
			}
			if ((value = NCONF_get_string(req_conf, dn_sect, buf)) == NULL) {
				ERR_clear_error();
				value = NULL;
			}
			ret = snprintf(buf, sizeof buf, "%s_min", v->name);
			if (ret < 0 || ret >= sizeof(buf)) {
				BIO_printf(bio_err, "Name '%s' too long for min\n",
				    v->name);
				return 0;
			}
			if (!NCONF_get_number(req_conf, dn_sect, buf, &n_min)) {
				ERR_clear_error();
				n_min = -1;
			}
			ret = snprintf(buf, sizeof buf, "%s_max", v->name);
			if (ret < 0 || ret >= sizeof(buf)) {
				BIO_printf(bio_err, "Name '%s' too long for max\n",
				    v->name);
				return 0;
			}
			if (!NCONF_get_number(req_conf, dn_sect, buf, &n_max)) {
				ERR_clear_error();
				n_max = -1;
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
					break;

				v = sk_CONF_VALUE_value(attr_sk, i);
				type = v->name;
				if ((nid = OBJ_txt2nid(type)) == NID_undef)
					goto start2;
				ret = snprintf(buf, sizeof buf, "%s_default", type);
				if (ret == -1 || ret >= sizeof(buf)) {
					BIO_printf(bio_err, "Name '%s' too long for default\n",
					    v->name);
					return 0;
				}
				if ((def = NCONF_get_string(req_conf, attr_sect, buf))
				    == NULL) {
					ERR_clear_error();
					def = "";
				}
				ret = snprintf(buf, sizeof buf, "%s_value", type);
				if (ret == -1 || ret >= sizeof(buf)) {
					BIO_printf(bio_err, "Name '%s' too long for value\n",
					    v->name);
					return 0;
				}
				if ((value = NCONF_get_string(req_conf, attr_sect, buf))
				    == NULL) {
					ERR_clear_error();
					value = NULL;
				}
				ret = snprintf(buf, sizeof buf, "%s_min", type);
				if (ret == -1 || ret >= sizeof(buf)) {
					BIO_printf(bio_err, "Name '%s' too long for min\n",
					    v->name);
					return 0;
				}
				if (!NCONF_get_number(req_conf, attr_sect, buf, &n_min)) {
					ERR_clear_error();
					n_min = -1;
				}
				ret = snprintf(buf, sizeof buf, "%s_max", type);
				if (ret == -1 || ret >= sizeof(buf)) {
					BIO_printf(bio_err, "Name '%s' too long for max\n",
					    v->name);
					return 0;
				}
				if (!NCONF_get_number(req_conf, attr_sect, buf, &n_max)) {
					ERR_clear_error();
					n_max = -1;







|










|










|









|







1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
					break;

				v = sk_CONF_VALUE_value(attr_sk, i);
				type = v->name;
				if ((nid = OBJ_txt2nid(type)) == NID_undef)
					goto start2;
				ret = snprintf(buf, sizeof buf, "%s_default", type);
				if (ret < 0 || ret >= sizeof(buf)) {
					BIO_printf(bio_err, "Name '%s' too long for default\n",
					    v->name);
					return 0;
				}
				if ((def = NCONF_get_string(req_conf, attr_sect, buf))
				    == NULL) {
					ERR_clear_error();
					def = "";
				}
				ret = snprintf(buf, sizeof buf, "%s_value", type);
				if (ret < 0 || ret >= sizeof(buf)) {
					BIO_printf(bio_err, "Name '%s' too long for value\n",
					    v->name);
					return 0;
				}
				if ((value = NCONF_get_string(req_conf, attr_sect, buf))
				    == NULL) {
					ERR_clear_error();
					value = NULL;
				}
				ret = snprintf(buf, sizeof buf, "%s_min", type);
				if (ret < 0 || ret >= sizeof(buf)) {
					BIO_printf(bio_err, "Name '%s' too long for min\n",
					    v->name);
					return 0;
				}
				if (!NCONF_get_number(req_conf, attr_sect, buf, &n_min)) {
					ERR_clear_error();
					n_min = -1;
				}
				ret = snprintf(buf, sizeof buf, "%s_max", type);
				if (ret < 0 || ret >= sizeof(buf)) {
					BIO_printf(bio_err, "Name '%s' too long for max\n",
					    v->name);
					return 0;
				}
				if (!NCONF_get_number(req_conf, attr_sect, buf, &n_max)) {
					ERR_clear_error();
					n_max = -1;
Changes to jni/libressl/apps/openssl/rsa.c.
1
2
3
4
5
6
7
8
/* $OpenBSD: rsa.c,v 1.13 2019/02/09 15:49:21 inoguchi Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
 * All rights reserved.
 *
 * This package is an SSL implementation written
 * by Eric Young (eay@cryptsoft.com).
 * The implementation was written so as to conform with Netscapes SSL.
 *
|







1
2
3
4
5
6
7
8
/* $OpenBSD: rsa.c,v 1.14 2019/07/14 03:30:46 guenther Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
 * All rights reserved.
 *
 * This package is an SSL implementation written
 * by Eric Young (eay@cryptsoft.com).
 * The implementation was written so as to conform with Netscapes SSL.
 *
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
		return (1);
	}

	*argsused = 1;
	return (0);
}

static struct option rsa_options[] = {
	{
		.name = "check",
		.desc = "Check consistency of RSA private key",
		.type = OPTION_FLAG,
		.opt.flag = &rsa_config.check,
	},
	{







|







105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
		return (1);
	}

	*argsused = 1;
	return (0);
}

static const struct option rsa_options[] = {
	{
		.name = "check",
		.desc = "Check consistency of RSA private key",
		.type = OPTION_FLAG,
		.opt.flag = &rsa_config.check,
	},
	{
Changes to jni/libressl/apps/openssl/rsautl.c.
1
2
3
4
5
6
7
8
/* $OpenBSD: rsautl.c,v 1.17 2019/02/04 11:21:05 tb Exp $ */
/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
 * project 2000.
 */
/* ====================================================================
 * Copyright (c) 2000 The OpenSSL Project.  All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
|







1
2
3
4
5
6
7
8
/* $OpenBSD: rsautl.c,v 1.18 2019/07/14 03:30:46 guenther Exp $ */
/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
 * project 2000.
 */
/* ====================================================================
 * Copyright (c) 2000 The OpenSSL Project.  All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
	char *outfile;
	int pad;
	char *passargin;
	int rev;
	int rsa_mode;
} rsautl_config;

struct option rsautl_options[] = {
	{
		.name = "asn1parse",
		.desc = "ASN.1 parse the output data",
		.type = OPTION_FLAG,
		.opt.flag = &rsautl_config.asn1parse,
	},
	{







|







85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
	char *outfile;
	int pad;
	char *passargin;
	int rev;
	int rsa_mode;
} rsautl_config;

static const struct option rsautl_options[] = {
	{
		.name = "asn1parse",
		.desc = "ASN.1 parse the output data",
		.type = OPTION_FLAG,
		.opt.flag = &rsautl_config.asn1parse,
	},
	{
Changes to jni/libressl/apps/openssl/s_client.c.
1
2
3
4
5
6
7
8
/* $OpenBSD: s_client.c,v 1.37 2018/11/14 06:24:21 tb Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
 * All rights reserved.
 *
 * This package is an SSL implementation written
 * by Eric Young (eay@cryptsoft.com).
 * The implementation was written so as to conform with Netscapes SSL.
 *
|







1
2
3
4
5
6
7
8
/* $OpenBSD: s_client.c,v 1.38 2019/06/28 13:35:02 deraadt Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
 * All rights reserved.
 *
 * This package is an SSL implementation written
 * by Eric Young (eay@cryptsoft.com).
 * The implementation was written so as to conform with Netscapes SSL.
 *
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
	}
	if (c_Pause & 0x01)
		SSL_set_debug(con, 1);

	if (SSL_version(con) == DTLS1_VERSION) {

		sbio = BIO_new_dgram(s, BIO_NOCLOSE);
		if (getsockname(s, &peer, (void *) &peerlen) < 0) {
			BIO_printf(bio_err, "getsockname:errno=%d\n",
			    errno);
			shutdown(s, SHUT_RD);
			close(s);
			goto end;
		}
		(void) BIO_ctrl_set_connected(sbio, 1, &peer);







|







755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
	}
	if (c_Pause & 0x01)
		SSL_set_debug(con, 1);

	if (SSL_version(con) == DTLS1_VERSION) {

		sbio = BIO_new_dgram(s, BIO_NOCLOSE);
		if (getsockname(s, &peer, (void *) &peerlen) == -1) {
			BIO_printf(bio_err, "getsockname:errno=%d\n",
			    errno);
			shutdown(s, SHUT_RD);
			close(s);
			goto end;
		}
		(void) BIO_ctrl_set_connected(sbio, 1, &peer);
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
			if (write_ssl)
				pfd[2].events |= POLLOUT;

/*			printf("mode tty(%d %d%d) ssl(%d%d)\n",
				tty_on,read_tty,write_tty,read_ssl,write_ssl);*/

			i = poll(pfd, 3, ptimeout);
			if (i < 0) {
				BIO_printf(bio_err, "bad select %d\n",
				    errno);
				goto shut;
				/* goto end; */
			}
		}
		if ((SSL_version(con) == DTLS1_VERSION) && DTLSv1_handle_timeout(con) > 0) {







|







1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
			if (write_ssl)
				pfd[2].events |= POLLOUT;

/*			printf("mode tty(%d %d%d) ssl(%d%d)\n",
				tty_on,read_tty,write_tty,read_ssl,write_ssl);*/

			i = poll(pfd, 3, ptimeout);
			if (i == -1) {
				BIO_printf(bio_err, "bad select %d\n",
				    errno);
				goto shut;
				/* goto end; */
			}
		}
		if ((SSL_version(con) == DTLS1_VERSION) && DTLSv1_handle_timeout(con) > 0) {
Changes to jni/libressl/apps/openssl/s_server.c.
1
2
3
4
5
6
7
8
/* $OpenBSD: s_server.c,v 1.30 2018/02/07 05:47:55 jsing Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
 * All rights reserved.
 *
 * This package is an SSL implementation written
 * by Eric Young (eay@cryptsoft.com).
 * The implementation was written so as to conform with Netscapes SSL.
 *
|







1
2
3
4
5
6
7
8
/* $OpenBSD: s_server.c,v 1.32 2019/10/04 09:47:34 bcook Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
 * All rights reserved.
 *
 * This package is an SSL implementation written
 * by Eric Young (eay@cryptsoft.com).
 * The implementation was written so as to conform with Netscapes SSL.
 *
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
				case SSL_ERROR_NONE: {
						int len, n;
						for (len = 0; len < i;) {
							do {
								n = write(fileno(stdout), buf + len, i - len);
							} while (n == -1 && errno == EINTR);

							if (n < 0) {
								BIO_printf(bio_s_out, "ERROR\n");
								goto err;
							}
							len += n;
						}
					}
					if (SSL_pending(con))







|







1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
				case SSL_ERROR_NONE: {
						int len, n;
						for (len = 0; len < i;) {
							do {
								n = write(fileno(stdout), buf + len, i - len);
							} while (n == -1 && errno == EINTR);

							if (n == -1) {
								BIO_printf(bio_s_out, "ERROR\n");
								goto err;
							}
							len += n;
						}
					}
					if (SSL_pending(con))
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
				case 1:
					dot = (e[0] == '.') ? 2 : 0;
					break;
				case 2:
					dot = (e[0] == '.') ? 3 : 0;
					break;
				case 3:
					dot = (e[0] == '/') ? -1 : 0;
					break;
				}
				if (dot == 0)
					dot = (e[0] == '/') ? 1 : 0;
			}
			dot = (dot == 3) || (dot == -1);	/* filename contains
								 * ".." component */

			if (*e == '\0') {
				BIO_puts(io, text);
				BIO_printf(io, "'%s' is an invalid file name\r\n", p);







|



|







1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
				case 1:
					dot = (e[0] == '.') ? 2 : 0;
					break;
				case 2:
					dot = (e[0] == '.') ? 3 : 0;
					break;
				case 3:
					dot = (e[0] == '/' || e[0] == '\\') ? -1 : 0;
					break;
				}
				if (dot == 0)
					dot = (e[0] == '/' || e[0] == '\\') ? 1 : 0;
			}
			dot = (dot == 3) || (dot == -1);	/* filename contains
								 * ".." component */

			if (*e == '\0') {
				BIO_puts(io, text);
				BIO_printf(io, "'%s' is an invalid file name\r\n", p);
Changes to jni/libressl/apps/openssl/s_socket.c.
1
2
3
4
5
6
7
8
/* $OpenBSD: s_socket.c,v 1.10 2018/08/19 20:07:06 tb Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
 * All rights reserved.
 *
 * This package is an SSL implementation written
 * by Eric Young (eay@cryptsoft.com).
 * The implementation was written so as to conform with Netscapes SSL.
 *
|







1
2
3
4
5
6
7
8
/* $OpenBSD: s_socket.c,v 1.11 2019/06/28 13:35:02 deraadt Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
 * All rights reserved.
 *
 * This package is an SSL implementation written
 * by Eric Young (eay@cryptsoft.com).
 * The implementation was written so as to conform with Netscapes SSL.
 *
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
		if (s == -1) {
			continue;
		}
		if (type == SOCK_STREAM) {
			i = 0;
			i = setsockopt(s, SOL_SOCKET, SO_KEEPALIVE,
			    (char *) &i, sizeof(i));
			if (i < 0) {
				perror("keepalive");
				goto out;
			}
		}
		if ((i = connect(s, ai->ai_addr, ai->ai_addrlen)) == 0) {
			*sock = s;
			freeaddrinfo(ai_top);







|







103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
		if (s == -1) {
			continue;
		}
		if (type == SOCK_STREAM) {
			i = 0;
			i = setsockopt(s, SOL_SOCKET, SO_KEEPALIVE,
			    (char *) &i, sizeof(i));
			if (i == -1) {
				perror("keepalive");
				goto out;
			}
		}
		if ((i = connect(s, ai->ai_addr, ai->ai_addrlen)) == 0) {
			*sock = s;
			freeaddrinfo(ai_top);
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
		perror("accept");
		return (0);
	}
/*
	ling.l_onoff=1;
	ling.l_linger=0;
	i=setsockopt(ret,SOL_SOCKET,SO_LINGER,(char *)&ling,sizeof(ling));
	if (i < 0) { perror("linger"); return(0); }
	i=0;
	i=setsockopt(ret,SOL_SOCKET,SO_KEEPALIVE,(char *)&i,sizeof(i));
	if (i < 0) { perror("keepalive"); return(0); }
*/

	if (host == NULL)
		goto end;
	h1 = gethostbyaddr((char *) &from.sin_addr.s_addr,
	    sizeof(from.sin_addr.s_addr), AF_INET);
	if (h1 == NULL) {







|


|







247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
		perror("accept");
		return (0);
	}
/*
	ling.l_onoff=1;
	ling.l_linger=0;
	i=setsockopt(ret,SOL_SOCKET,SO_LINGER,(char *)&ling,sizeof(ling));
	if (i == -1) { perror("linger"); return(0); }
	i=0;
	i=setsockopt(ret,SOL_SOCKET,SO_KEEPALIVE,(char *)&i,sizeof(i));
	if (i == -1) { perror("keepalive"); return(0); }
*/

	if (host == NULL)
		goto end;
	h1 = gethostbyaddr((char *) &from.sin_addr.s_addr,
	    sizeof(from.sin_addr.s_addr), AF_INET);
	if (h1 == NULL) {
Changes to jni/libressl/apps/openssl/s_time.c.
1
2
3
4
5
6
7
8
/* $OpenBSD: s_time.c,v 1.32 2018/09/17 15:37:35 cheloha Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
 * All rights reserved.
 *
 * This package is an SSL implementation written
 * by Eric Young (eay@cryptsoft.com).
 * The implementation was written so as to conform with Netscapes SSL.
 *
|







1
2
3
4
5
6
7
8
/* $OpenBSD: s_time.c,v 1.34 2019/07/14 03:30:46 guenther Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
 * All rights reserved.
 *
 * This package is an SSL implementation written
 * by Eric Young (eay@cryptsoft.com).
 * The implementation was written so as to conform with Netscapes SSL.
 *
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
	int no_shutdown;
	int perform;
	int verify;
	int verify_depth;
	char *www_path;
} s_time_config;

struct option s_time_options[] = {
	{
		.name = "bugs",
		.desc = "Enable workarounds for known SSL/TLS bugs",
		.type = OPTION_FLAG,
		.opt.flag = &s_time_config.bugs,
	},
	{







|







111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
	int no_shutdown;
	int perform;
	int verify;
	int verify_depth;
	char *www_path;
} s_time_config;

static const struct option s_time_options[] = {
	{
		.name = "bugs",
		.desc = "Enable workarounds for known SSL/TLS bugs",
		.type = OPTION_FLAG,
		.opt.flag = &s_time_config.bugs,
	},
	{
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
		else
			ERR_print_errors(bio_err);
		return 0;
	}
	if (s_time_config.www_path != NULL) {
		retval = snprintf(buf, sizeof buf,
		    "GET %s HTTP/1.0\r\n\r\n", s_time_config.www_path);
		if (retval == -1 || retval >= sizeof buf) {
			fprintf(stderr, "URL too long\n");
			return 0;
		}
		if (SSL_write(scon, buf, retval) != retval)
			return 0;
		while ((i = SSL_read(scon, buf, sizeof(buf))) > 0)
			bytes_read += i;







|







373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
		else
			ERR_print_errors(bio_err);
		return 0;
	}
	if (s_time_config.www_path != NULL) {
		retval = snprintf(buf, sizeof buf,
		    "GET %s HTTP/1.0\r\n\r\n", s_time_config.www_path);
		if (retval < 0 || retval >= sizeof buf) {
			fprintf(stderr, "URL too long\n");
			return 0;
		}
		if (SSL_write(scon, buf, retval) != retval)
			return 0;
		while ((i = SSL_read(scon, buf, sizeof(buf))) > 0)
			bytes_read += i;
Changes to jni/libressl/apps/openssl/sess_id.c.
1
2
3
4
5
6
7
8
/* $OpenBSD: sess_id.c,v 1.9 2018/02/07 05:47:55 jsing Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
 * All rights reserved.
 *
 * This package is an SSL implementation written
 * by Eric Young (eay@cryptsoft.com).
 * The implementation was written so as to conform with Netscapes SSL.
 *
|







1
2
3
4
5
6
7
8
/* $OpenBSD: sess_id.c,v 1.10 2019/07/14 03:30:46 guenther Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
 * All rights reserved.
 *
 * This package is an SSL implementation written
 * by Eric Young (eay@cryptsoft.com).
 * The implementation was written so as to conform with Netscapes SSL.
 *
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
	int informat;
	int noout;
	char *outfile;
	int outformat;
	int text;
} sess_id_config;

static struct option sess_id_options[] = {
	{
		.name = "cert",
		.desc = "Output certificate if present in session",
		.type = OPTION_FLAG,
		.opt.flag = &sess_id_config.cert,
	},
	{







|







76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
	int informat;
	int noout;
	char *outfile;
	int outformat;
	int text;
} sess_id_config;

static const struct option sess_id_options[] = {
	{
		.name = "cert",
		.desc = "Output certificate if present in session",
		.type = OPTION_FLAG,
		.opt.flag = &sess_id_config.cert,
	},
	{
Changes to jni/libressl/apps/openssl/speed.c.
155
156
157
158
159
160
161

162








163
164
165
166
167
168
169

static double Time_F(int s);
static void print_message(const char *s, long num, int length);
static void
pkey_print_message(const char *str, const char *str2,
    long num, int bits, int sec);
static void print_result(int alg, int run_no, int count, double time_used);

static int do_multi(int multi);









#define ALGOR_NUM	32
#define SIZE_NUM	5
#define RSA_NUM		4
#define DSA_NUM		3

#define EC_NUM       16







>

>
>
>
>
>
>
>
>







155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178

static double Time_F(int s);
static void print_message(const char *s, long num, int length);
static void
pkey_print_message(const char *str, const char *str2,
    long num, int bits, int sec);
static void print_result(int alg, int run_no, int count, double time_used);
#ifndef _WIN32
static int do_multi(int multi);
#else
void speed_signal(int sigcatch, void (*func)(int sigraised));
unsigned int speed_alarm(unsigned int seconds);
void speed_alarm_free(int run);
#define SIGALRM		14
#define signal(sigcatch, func)	speed_signal((sigcatch), (func))
#define alarm(seconds)		speed_alarm((seconds))
#endif

#define ALGOR_NUM	32
#define SIZE_NUM	5
#define RSA_NUM		4
#define DSA_NUM		3

#define EC_NUM       16
462
463
464
465
466
467
468

469
470

471
472
473
474
475
476
477
	int ecdsa_doit[EC_NUM];
	int ecdh_doit[EC_NUM];
	int doit[ALGOR_NUM];
	int pr_header = 0;
	const EVP_CIPHER *evp_cipher = NULL;
	const EVP_MD *evp_md = NULL;
	int decrypt = 0;

	int multi = 0;
	const char *errstr = NULL;


	if (single_execution) {
		if (pledge("stdio proc", NULL) == -1) {
			perror("pledge");
			exit(1);
		}
	}







>


>







471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
	int ecdsa_doit[EC_NUM];
	int ecdh_doit[EC_NUM];
	int doit[ALGOR_NUM];
	int pr_header = 0;
	const EVP_CIPHER *evp_cipher = NULL;
	const EVP_MD *evp_md = NULL;
	int decrypt = 0;
#ifndef _WIN32
	int multi = 0;
	const char *errstr = NULL;
#endif

	if (single_execution) {
		if (pledge("stdio proc", NULL) == -1) {
			perror("pledge");
			exit(1);
		}
	}
540
541
542
543
544
545
546

547
548
549
550
551
552
553
554
555
556
557
558
559
560
561

562
563
564
565
566
567
568
			}
			doit[D_EVP] = 1;
		} else if (argc > 0 && !strcmp(*argv, "-decrypt")) {
			decrypt = 1;
			j--;	/* Otherwise, -decrypt gets confused with an
				 * algorithm. */
		}

		else if ((argc > 0) && (strcmp(*argv, "-multi") == 0)) {
			argc--;
			argv++;
			if (argc == 0) {
				BIO_printf(bio_err, "no multi count given\n");
				goto end;
			}
			multi = strtonum(argv[0], 1, INT_MAX, &errstr);
			if (errstr) {
				BIO_printf(bio_err, "bad multi count: %s", errstr);
				goto end;
			}
			j--;	/* Otherwise, -multi gets confused with an
				 * algorithm. */
		}

		else if (argc > 0 && !strcmp(*argv, "-mr")) {
			mr = 1;
			j--;	/* Otherwise, -mr gets confused with an
				 * algorithm. */
		} else
#ifndef OPENSSL_NO_MD4
		if (strcmp(*argv, "md4") == 0)







>















>







551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
			}
			doit[D_EVP] = 1;
		} else if (argc > 0 && !strcmp(*argv, "-decrypt")) {
			decrypt = 1;
			j--;	/* Otherwise, -decrypt gets confused with an
				 * algorithm. */
		}
#ifndef _WIN32
		else if ((argc > 0) && (strcmp(*argv, "-multi") == 0)) {
			argc--;
			argv++;
			if (argc == 0) {
				BIO_printf(bio_err, "no multi count given\n");
				goto end;
			}
			multi = strtonum(argv[0], 1, INT_MAX, &errstr);
			if (errstr) {
				BIO_printf(bio_err, "bad multi count: %s", errstr);
				goto end;
			}
			j--;	/* Otherwise, -multi gets confused with an
				 * algorithm. */
		}
#endif
		else if (argc > 0 && !strcmp(*argv, "-mr")) {
			mr = 1;
			j--;	/* Otherwise, -mr gets confused with an
				 * algorithm. */
		} else
#ifndef OPENSSL_NO_MD4
		if (strcmp(*argv, "md4") == 0)
917
918
919
920
921
922
923

924

925
926
927
928
929
930
931

932
933

934
935
936
937
938
939
940

			BIO_printf(bio_err, "\n");
			BIO_printf(bio_err, "Available options:\n");
			BIO_printf(bio_err, "-elapsed        measure time in real time instead of CPU user time.\n");
			BIO_printf(bio_err, "-evp e          use EVP e.\n");
			BIO_printf(bio_err, "-decrypt        time decryption instead of encryption (only EVP).\n");
			BIO_printf(bio_err, "-mr             produce machine readable output.\n");

			BIO_printf(bio_err, "-multi n        run n benchmarks in parallel.\n");

			goto end;
		}
		argc--;
		argv++;
		j++;
	}


	if (multi && do_multi(multi))
		goto show_res;


	if (j == 0) {
		for (i = 0; i < ALGOR_NUM; i++) {
			if (i != D_EVP)
				doit[i] = 1;
		}
		for (i = 0; i < RSA_NUM; i++)







>

>







>


>







930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957

			BIO_printf(bio_err, "\n");
			BIO_printf(bio_err, "Available options:\n");
			BIO_printf(bio_err, "-elapsed        measure time in real time instead of CPU user time.\n");
			BIO_printf(bio_err, "-evp e          use EVP e.\n");
			BIO_printf(bio_err, "-decrypt        time decryption instead of encryption (only EVP).\n");
			BIO_printf(bio_err, "-mr             produce machine readable output.\n");
#ifndef _WIN32
			BIO_printf(bio_err, "-multi n        run n benchmarks in parallel.\n");
#endif
			goto end;
		}
		argc--;
		argv++;
		j++;
	}

#ifndef _WIN32
	if (multi && do_multi(multi))
		goto show_res;
#endif

	if (j == 0) {
		for (i = 0; i < ALGOR_NUM; i++) {
			if (i != D_EVP)
				doit[i] = 1;
		}
		for (i = 0; i < RSA_NUM; i++)
1767
1768
1769
1770
1771
1772
1773

1774

1775
1776
1777
1778
1779
1780
1781

		if (rsa_count <= 1) {
			/* if longer than 10s, don't do any more */
			for (j++; j < EC_NUM; j++)
				ecdh_doit[j] = 0;
		}
	}

show_res:

	if (!mr) {
		fprintf(stdout, "%s\n", SSLeay_version(SSLEAY_VERSION));
		fprintf(stdout, "%s\n", SSLeay_version(SSLEAY_BUILT_ON));
		printf("options:");
		printf("%s ", BN_options());
#ifndef OPENSSL_NO_RC4
		printf("%s ", RC4_options());







>

>







1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800

		if (rsa_count <= 1) {
			/* if longer than 10s, don't do any more */
			for (j++; j < EC_NUM; j++)
				ecdh_doit[j] = 0;
		}
	}
#ifndef _WIN32
show_res:
#endif
	if (!mr) {
		fprintf(stdout, "%s\n", SSLeay_version(SSLEAY_VERSION));
		fprintf(stdout, "%s\n", SSLeay_version(SSLEAY_BUILT_ON));
		printf("options:");
		printf("%s ", BN_options());
#ifndef OPENSSL_NO_RC4
		printf("%s ", RC4_options());
1940
1941
1942
1943
1944
1945
1946



1947
1948
1949
1950
1951

1952
1953
1954
1955
1956
1957
1958
	(void) BIO_flush(bio_err);
	alarm(tm);
}

static void
print_result(int alg, int run_no, int count, double time_used)
{



	BIO_printf(bio_err, mr ? "+R:%d:%s:%f\n"
	    : "%d %s's in %.2fs\n", count, names[alg], time_used);
	results[alg][run_no] = ((double) count) / time_used * lengths[run_no];
}


static char *
sstrsep(char **string, const char *delim)
{
	char isdelim[256];
	char *token = *string;

	if (**string == 0)







>
>
>





>







1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
	(void) BIO_flush(bio_err);
	alarm(tm);
}

static void
print_result(int alg, int run_no, int count, double time_used)
{
#ifdef _WIN32
	speed_alarm_free(run);
#endif
	BIO_printf(bio_err, mr ? "+R:%d:%s:%f\n"
	    : "%d %s's in %.2fs\n", count, names[alg], time_used);
	results[alg][run_no] = ((double) count) / time_used * lengths[run_no];
}

#ifndef _WIN32
static char *
sstrsep(char **string, const char *delim)
{
	char isdelim[256];
	char *token = *string;

	if (**string == 0)
2151
2152
2153
2154
2155
2156
2157
2158

		}

		fclose(f);
	}
	free(fds);
	return 1;
}
#endif









>
2174
2175
2176
2177
2178
2179
2180
2181
2182
		}

		fclose(f);
	}
	free(fds);
	return 1;
}
#endif
#endif
Changes to jni/libressl/apps/openssl/spkac.c.
1
2
3
4
5
6
7
8
/* $OpenBSD: spkac.c,v 1.10 2018/02/07 05:47:55 jsing Exp $ */
/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
 * project 1999. Based on an original idea by Massimiliano Pala
 * (madwolf@openca.org).
 */
/* ====================================================================
 * Copyright (c) 1999 The OpenSSL Project.  All rights reserved.
 *
|







1
2
3
4
5
6
7
8
/* $OpenBSD: spkac.c,v 1.11 2019/07/14 03:30:46 guenther Exp $ */
/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
 * project 1999. Based on an original idea by Massimiliano Pala
 * (madwolf@openca.org).
 */
/* ====================================================================
 * Copyright (c) 1999 The OpenSSL Project.  All rights reserved.
 *
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
	char *passargin;
	int pubkey;
	char *spkac;
	char *spksect;
	int verify;
} spkac_config;

static struct option spkac_options[] = {
	{
		.name = "challenge",
		.argname = "string",
		.desc = "Specify challenge string if SPKAC is generated",
		.type = OPTION_ARG,
		.opt.arg = &spkac_config.challenge,
	},







|







82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
	char *passargin;
	int pubkey;
	char *spkac;
	char *spksect;
	int verify;
} spkac_config;

static const struct option spkac_options[] = {
	{
		.name = "challenge",
		.argname = "string",
		.desc = "Specify challenge string if SPKAC is generated",
		.type = OPTION_ARG,
		.opt.arg = &spkac_config.challenge,
	},
Changes to jni/libressl/apps/openssl/version.c.
1
2
3
4
5
6
7
8
/* $OpenBSD: version.c,v 1.8 2015/10/17 15:00:11 doug Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
 * All rights reserved.
 *
 * This package is an SSL implementation written
 * by Eric Young (eay@cryptsoft.com).
 * The implementation was written so as to conform with Netscapes SSL.
 *
|







1
2
3
4
5
6
7
8
/* $OpenBSD: version.c,v 1.9 2019/07/14 03:30:46 guenther Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
 * All rights reserved.
 *
 * This package is an SSL implementation written
 * by Eric Young (eay@cryptsoft.com).
 * The implementation was written so as to conform with Netscapes SSL.
 *
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
	version_config.options = 1;
	version_config.platform = 1;
	version_config.version = 1;

	return (0);
}

static struct option version_options[] = {
	{
		.name = "a",
		.desc = "All information (same as setting all other flags)",
		.type = OPTION_FUNC,
		.opt.func = version_all_opts,
	},
	{







|







153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
	version_config.options = 1;
	version_config.platform = 1;
	version_config.version = 1;

	return (0);
}

static const struct option version_options[] = {
	{
		.name = "a",
		.desc = "All information (same as setting all other flags)",
		.type = OPTION_FUNC,
		.opt.func = version_all_opts,
	},
	{
Changes to jni/libressl/configure.
1
2
3
4
5
6
7
8
9
10
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.69 for libressl 2.9.2.
#
#
# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
#
#
# This configure script is free software; the Free Software Foundation
# gives unlimited permission to copy, distribute and modify it.


|







1
2
3
4
5
6
7
8
9
10
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.69 for libressl 3.0.2.
#
#
# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
#
#
# This configure script is free software; the Free Software Foundation
# gives unlimited permission to copy, distribute and modify it.
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
subdirs=
MFLAGS=
MAKEFLAGS=

# Identity of this package.
PACKAGE_NAME='libressl'
PACKAGE_TARNAME='libressl'
PACKAGE_VERSION='2.9.2'
PACKAGE_STRING='libressl 2.9.2'
PACKAGE_BUGREPORT=''
PACKAGE_URL=''

# Factoring default headers for most tests.
ac_includes_default="\
#include <stdio.h>
#ifdef HAVE_SYS_TYPES_H







|
|







583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
subdirs=
MFLAGS=
MAKEFLAGS=

# Identity of this package.
PACKAGE_NAME='libressl'
PACKAGE_TARNAME='libressl'
PACKAGE_VERSION='3.0.2'
PACKAGE_STRING='libressl 3.0.2'
PACKAGE_BUGREPORT=''
PACKAGE_URL=''

# Factoring default headers for most tests.
ac_includes_default="\
#include <stdio.h>
#ifdef HAVE_SYS_TYPES_H
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
#
# Report the --help message.
#
if test "$ac_init_help" = "long"; then
  # Omit some internal or obsolete options to make the list less imposing.
  # This message is too long to be a string in the A/UX 3.1 sh.
  cat <<_ACEOF
\`configure' configures libressl 2.9.2 to adapt to many kinds of systems.

Usage: $0 [OPTION]... [VAR=VALUE]...

To assign environment variables (e.g., CC, CFLAGS...), specify them as
VAR=VALUE.  See below for descriptions of some of the useful variables.

Defaults for the options are specified in brackets.







|







1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
#
# Report the --help message.
#
if test "$ac_init_help" = "long"; then
  # Omit some internal or obsolete options to make the list less imposing.
  # This message is too long to be a string in the A/UX 3.1 sh.
  cat <<_ACEOF
\`configure' configures libressl 3.0.2 to adapt to many kinds of systems.

Usage: $0 [OPTION]... [VAR=VALUE]...

To assign environment variables (e.g., CC, CFLAGS...), specify them as
VAR=VALUE.  See below for descriptions of some of the useful variables.

Defaults for the options are specified in brackets.
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
  --build=BUILD     configure for building on BUILD [guessed]
  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
_ACEOF
fi

if test -n "$ac_init_help"; then
  case $ac_init_help in
     short | recursive ) echo "Configuration of libressl 2.9.2:";;
   esac
  cat <<\_ACEOF

Optional Features:
  --disable-option-checking  ignore unrecognized --enable/--with options
  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]







|







1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
  --build=BUILD     configure for building on BUILD [guessed]
  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
_ACEOF
fi

if test -n "$ac_init_help"; then
  case $ac_init_help in
     short | recursive ) echo "Configuration of libressl 3.0.2:";;
   esac
  cat <<\_ACEOF

Optional Features:
  --disable-option-checking  ignore unrecognized --enable/--with options
  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
    cd "$ac_pwd" || { ac_status=$?; break; }
  done
fi

test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
  cat <<\_ACEOF
libressl configure 2.9.2
generated by GNU Autoconf 2.69

Copyright (C) 2012 Free Software Foundation, Inc.
This configure script is free software; the Free Software Foundation
gives unlimited permission to copy, distribute and modify it.
_ACEOF
  exit







|







1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
    cd "$ac_pwd" || { ac_status=$?; break; }
  done
fi

test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
  cat <<\_ACEOF
libressl configure 3.0.2
generated by GNU Autoconf 2.69

Copyright (C) 2012 Free Software Foundation, Inc.
This configure script is free software; the Free Software Foundation
gives unlimited permission to copy, distribute and modify it.
_ACEOF
  exit
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
  as_fn_set_status $ac_retval

} # ac_fn_c_compute_int
cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.

It was created by libressl $as_me 2.9.2, which was
generated by GNU Autoconf 2.69.  Invocation command line was

  $ $0 $@

_ACEOF
exec 5>>config.log
{







|







2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
  as_fn_set_status $ac_retval

} # ac_fn_c_compute_int
cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.

It was created by libressl $as_me 3.0.2, which was
generated by GNU Autoconf 2.69.  Invocation command line was

  $ $0 $@

_ACEOF
exec 5>>config.log
{
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu


LIBCRYPTO_VERSION=45:4:0

LIBSSL_VERSION=47:5:0

LIBTLS_VERSION=19:6:0


ac_aux_dir=
for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
  if test -f "$ac_dir/install-sh"; then
    ac_aux_dir=$ac_dir
    ac_install_sh="$ac_aux_dir/install-sh -c"







|

|

|







2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu


LIBCRYPTO_VERSION=45:5:0

LIBSSL_VERSION=47:6:0

LIBTLS_VERSION=19:7:0


ac_aux_dir=
for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
  if test -f "$ac_dir/install-sh"; then
    ac_aux_dir=$ac_dir
    ac_install_sh="$ac_aux_dir/install-sh -c"
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
    CYGPATH_W=echo
  fi
fi


# Define the identity of the package.
 PACKAGE='libressl'
 VERSION='2.9.2'


cat >>confdefs.h <<_ACEOF
#define PACKAGE "$PACKAGE"
_ACEOF









|







3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
    CYGPATH_W=echo
  fi
fi


# Define the identity of the package.
 PACKAGE='libressl'
 VERSION='3.0.2'


cat >>confdefs.h <<_ACEOF
#define PACKAGE "$PACKAGE"
_ACEOF


14838
14839
14840
14841
14842
14843
14844
14845
14846
14847
14848
14849
14850
14851
14852
test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1

cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# Save the log message, to keep $0 and so on meaningful, and to
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
This file was extended by libressl $as_me 2.9.2, which was
generated by GNU Autoconf 2.69.  Invocation command line was

  CONFIG_FILES    = $CONFIG_FILES
  CONFIG_HEADERS  = $CONFIG_HEADERS
  CONFIG_LINKS    = $CONFIG_LINKS
  CONFIG_COMMANDS = $CONFIG_COMMANDS
  $ $0 $@







|







14838
14839
14840
14841
14842
14843
14844
14845
14846
14847
14848
14849
14850
14851
14852
test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1

cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# Save the log message, to keep $0 and so on meaningful, and to
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
This file was extended by libressl $as_me 3.0.2, which was
generated by GNU Autoconf 2.69.  Invocation command line was

  CONFIG_FILES    = $CONFIG_FILES
  CONFIG_HEADERS  = $CONFIG_HEADERS
  CONFIG_LINKS    = $CONFIG_LINKS
  CONFIG_COMMANDS = $CONFIG_COMMANDS
  $ $0 $@
14895
14896
14897
14898
14899
14900
14901
14902
14903
14904
14905
14906
14907
14908
14909

Report bugs to the package provider."

_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
libressl config.status 2.9.2
configured by $0, generated by GNU Autoconf 2.69,
  with options \\"\$ac_cs_config\\"

Copyright (C) 2012 Free Software Foundation, Inc.
This config.status script is free software; the Free Software Foundation
gives unlimited permission to copy, distribute and modify it."








|







14895
14896
14897
14898
14899
14900
14901
14902
14903
14904
14905
14906
14907
14908
14909

Report bugs to the package provider."

_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
libressl config.status 3.0.2
configured by $0, generated by GNU Autoconf 2.69,
  with options \\"\$ac_cs_config\\"

Copyright (C) 2012 Free Software Foundation, Inc.
This config.status script is free software; the Free Software Foundation
gives unlimited permission to copy, distribute and modify it."

Changes to jni/libressl/crypto/CMakeLists.txt.
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
	add_definitions(-DRSA_ASM)
	add_definitions(-DSHA1_ASM)
	add_definitions(-DSHA256_ASM)
	add_definitions(-DSHA512_ASM)
	add_definitions(-DWHIRLPOOL_ASM)
	add_definitions(-DOPENSSL_CPUID_OBJ)
	set(CRYPTO_SRC ${CRYPTO_SRC} ${ASM_X86_64_MASM_SRC})
	set_property(SOURCE ${ASM_X86_64_MASM_SRC} PROPERTY LANGUAGE C)
endif()

if(HOST_ASM_MINGW64_X86_64)
	set(
		ASM_X86_64_MINGW64_SRC
		aes/aes-mingw64-x86_64.S
		aes/bsaes-mingw64-x86_64.S







|







143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
	add_definitions(-DRSA_ASM)
	add_definitions(-DSHA1_ASM)
	add_definitions(-DSHA256_ASM)
	add_definitions(-DSHA512_ASM)
	add_definitions(-DWHIRLPOOL_ASM)
	add_definitions(-DOPENSSL_CPUID_OBJ)
	set(CRYPTO_SRC ${CRYPTO_SRC} ${ASM_X86_64_MASM_SRC})
	set_property(SOURCE ${ASM_X86_64_MASM_SRC} PROPERTY LANGUAGE ASM_MASM)
endif()

if(HOST_ASM_MINGW64_X86_64)
	set(
		ASM_X86_64_MINGW64_SRC
		aes/aes-mingw64-x86_64.S
		aes/bsaes-mingw64-x86_64.S
464
465
466
467
468
469
470

471
472
473
474
475
476
477
	ec/ec_pmeth.c
	ec/ec_print.c
	ec/eck_prn.c
	ec/ecp_mont.c
	ec/ecp_nist.c
	ec/ecp_oct.c
	ec/ecp_smpl.c

	ecdh/ech_err.c
	ecdh/ech_key.c
	ecdh/ech_lib.c
	ecdsa/ecs_asn1.c
	ecdsa/ecs_err.c
	ecdsa/ecs_lib.c
	ecdsa/ecs_ossl.c







>







464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
	ec/ec_pmeth.c
	ec/ec_print.c
	ec/eck_prn.c
	ec/ecp_mont.c
	ec/ecp_nist.c
	ec/ecp_oct.c
	ec/ecp_smpl.c
	ecdh/ecdh_kdf.c
	ecdh/ech_err.c
	ecdh/ech_key.c
	ecdh/ech_lib.c
	ecdsa/ecs_asn1.c
	ecdsa/ecs_err.c
	ecdsa/ecs_lib.c
	ecdsa/ecs_ossl.c
916
917
918
919
920
921
922




923
924
925
926
927
928
929
930



931

932
933
934
935
936
937
938
	set(CRYPTO_SRC ${CRYPTO_SRC} compat/timingsafe_memcmp.c)
	set(EXTRA_EXPORT ${EXTRA_EXPORT} timingsafe_memcmp)
endif()

if(NOT ENABLE_ASM)
	add_definitions(-DOPENSSL_NO_ASM)
else()




	if(WIN32)
		add_definitions(-DOPENSSL_NO_ASM)
	endif()
endif()

if(NOT "${OPENSSLDIR}" STREQUAL "")
	add_definitions(-DOPENSSLDIR=\"${OPENSSLDIR}\")
else()



	add_definitions(-DOPENSSLDIR=\"${CMAKE_INSTALL_PREFIX}/etc/ssl\")

endif()

file(READ ${CMAKE_CURRENT_SOURCE_DIR}/crypto.sym SYMS)
foreach(SYM IN LISTS CRYPTO_UNEXPORT)
	string(REPLACE "${SYM}\n" "" SYMS ${SYMS})
endforeach()
file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/crypto_p.sym ${SYMS})







>
>
>
>
|







>
>
>
|
>







917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
	set(CRYPTO_SRC ${CRYPTO_SRC} compat/timingsafe_memcmp.c)
	set(EXTRA_EXPORT ${EXTRA_EXPORT} timingsafe_memcmp)
endif()

if(NOT ENABLE_ASM)
	add_definitions(-DOPENSSL_NO_ASM)
else()
	if(MSVC)
		if(NOT "${CMAKE_GENERATOR}" MATCHES "Win64")
			add_definitions(-DOPENSSL_NO_ASM)
		endif()
	elseif(WIN32)
		add_definitions(-DOPENSSL_NO_ASM)
	endif()
endif()

if(NOT "${OPENSSLDIR}" STREQUAL "")
	add_definitions(-DOPENSSLDIR=\"${OPENSSLDIR}\")
else()
	if(WIN32)
		add_definitions(-DOPENSSLDIR=\"C:/Windows/libressl/ssl\")
	else()
		add_definitions(-DOPENSSLDIR=\"${CMAKE_INSTALL_PREFIX}/etc/ssl\")
	endif()
endif()

file(READ ${CMAKE_CURRENT_SOURCE_DIR}/crypto.sym SYMS)
foreach(SYM IN LISTS CRYPTO_UNEXPORT)
	string(REPLACE "${SYM}\n" "" SYMS ${SYMS})
endforeach()
file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/crypto_p.sym ${SYMS})
947
948
949
950
951
952
953

954
955
956
957
958
959
960
target_include_directories(crypto
	PRIVATE
		.
		asn1
		bn
		dsa
		ec

		ecdsa
		evp
		modes
		../include/compat
	PUBLIC
		../include)








>







956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
target_include_directories(crypto
	PRIVATE
		.
		asn1
		bn
		dsa
		ec
		ecdh
		ecdsa
		evp
		modes
		../include/compat
	PUBLIC
		../include)

Changes to jni/libressl/crypto/Makefile.am.
1
2
3
4
5

6
7
8
9
10
11
12
include $(top_srcdir)/Makefile.am.common

AM_CPPFLAGS += -I$(top_srcdir)/crypto/asn1
AM_CPPFLAGS += -I$(top_srcdir)/crypto/bn
AM_CPPFLAGS += -I$(top_srcdir)/crypto/ec

AM_CPPFLAGS += -I$(top_srcdir)/crypto/ecdsa
AM_CPPFLAGS += -I$(top_srcdir)/crypto/evp
AM_CPPFLAGS += -I$(top_srcdir)/crypto/modes
AM_CPPFLAGS += -I$(top_srcdir)/crypto

lib_LTLIBRARIES = libcrypto.la






>







1
2
3
4
5
6
7
8
9
10
11
12
13
include $(top_srcdir)/Makefile.am.common

AM_CPPFLAGS += -I$(top_srcdir)/crypto/asn1
AM_CPPFLAGS += -I$(top_srcdir)/crypto/bn
AM_CPPFLAGS += -I$(top_srcdir)/crypto/ec
AM_CPPFLAGS += -I$(top_srcdir)/crypto/ecdh
AM_CPPFLAGS += -I$(top_srcdir)/crypto/ecdsa
AM_CPPFLAGS += -I$(top_srcdir)/crypto/evp
AM_CPPFLAGS += -I$(top_srcdir)/crypto/modes
AM_CPPFLAGS += -I$(top_srcdir)/crypto

lib_LTLIBRARIES = libcrypto.la

551
552
553
554
555
556
557

558
559
560
561
562
563
564
libcrypto_la_SOURCES += ec/ecp_mont.c
libcrypto_la_SOURCES += ec/ecp_nist.c
libcrypto_la_SOURCES += ec/ecp_oct.c
libcrypto_la_SOURCES += ec/ecp_smpl.c
noinst_HEADERS += ec/ec_lcl.h

# ecdh

libcrypto_la_SOURCES += ecdh/ech_err.c
libcrypto_la_SOURCES += ecdh/ech_key.c
libcrypto_la_SOURCES += ecdh/ech_lib.c
noinst_HEADERS += ecdh/ech_locl.h

# ecdsa
libcrypto_la_SOURCES += ecdsa/ecs_asn1.c







>







552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
libcrypto_la_SOURCES += ec/ecp_mont.c
libcrypto_la_SOURCES += ec/ecp_nist.c
libcrypto_la_SOURCES += ec/ecp_oct.c
libcrypto_la_SOURCES += ec/ecp_smpl.c
noinst_HEADERS += ec/ec_lcl.h

# ecdh
libcrypto_la_SOURCES += ecdh/ecdh_kdf.c
libcrypto_la_SOURCES += ecdh/ech_err.c
libcrypto_la_SOURCES += ecdh/ech_key.c
libcrypto_la_SOURCES += ecdh/ech_lib.c
noinst_HEADERS += ecdh/ech_locl.h

# ecdsa
libcrypto_la_SOURCES += ecdsa/ecs_asn1.c
Changes to jni/libressl/crypto/Makefile.in.
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
	dsa/dsa_meth.c dsa/dsa_ossl.c dsa/dsa_pmeth.c dsa/dsa_prn.c \
	dsa/dsa_sign.c dsa/dsa_vrf.c dso/dso_dlfcn.c dso/dso_err.c \
	dso/dso_lib.c dso/dso_null.c dso/dso_openssl.c ec/ec2_mult.c \
	ec/ec2_oct.c ec/ec2_smpl.c ec/ec_ameth.c ec/ec_asn1.c \
	ec/ec_check.c ec/ec_curve.c ec/ec_cvt.c ec/ec_err.c \
	ec/ec_key.c ec/ec_kmeth.c ec/ec_lib.c ec/ec_mult.c ec/ec_oct.c \
	ec/ec_pmeth.c ec/ec_print.c ec/eck_prn.c ec/ecp_mont.c \
	ec/ecp_nist.c ec/ecp_oct.c ec/ecp_smpl.c ecdh/ech_err.c \
	ecdh/ech_key.c ecdh/ech_lib.c ecdsa/ecs_asn1.c ecdsa/ecs_err.c \
	ecdsa/ecs_lib.c ecdsa/ecs_ossl.c ecdsa/ecs_sign.c \
	ecdsa/ecs_vrf.c engine/eng_all.c engine/eng_cnf.c \
	engine/eng_ctrl.c engine/eng_dyn.c engine/eng_err.c \
	engine/eng_fat.c engine/eng_init.c engine/eng_lib.c \
	engine/eng_list.c engine/eng_openssl.c engine/eng_pkey.c \
	engine/eng_table.c engine/tb_asnmth.c engine/tb_cipher.c \
	engine/tb_dh.c engine/tb_digest.c engine/tb_dsa.c \
	engine/tb_ecdh.c engine/tb_ecdsa.c engine/tb_eckey.c \
	engine/tb_pkmeth.c engine/tb_rand.c engine/tb_rsa.c \
	engine/tb_store.c err/err.c err/err_all.c err/err_prn.c \
	evp/bio_b64.c evp/bio_enc.c evp/bio_md.c evp/c_all.c \
	evp/digest.c evp/e_aes.c evp/e_aes_cbc_hmac_sha1.c evp/e_bf.c \
	evp/e_camellia.c evp/e_cast.c evp/e_chacha.c \
	evp/e_chacha20poly1305.c evp/e_des.c evp/e_des3.c \
	evp/e_gost2814789.c evp/e_idea.c evp/e_null.c evp/e_old.c \
	evp/e_rc2.c evp/e_rc4.c evp/e_rc4_hmac_md5.c evp/e_sm4.c \
	evp/e_xcbc_d.c evp/encode.c evp/evp_aead.c evp/evp_enc.c \
	evp/evp_err.c evp/evp_key.c evp/evp_lib.c evp/evp_pbe.c \
	evp/evp_pkey.c evp/m_dss.c evp/m_dss1.c evp/m_ecdsa.c \
	evp/m_gost2814789.c evp/m_gostr341194.c evp/m_md4.c \







|
|
|
|
|
|
|
|
|
|
|
|
|
|
|







406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
	dsa/dsa_meth.c dsa/dsa_ossl.c dsa/dsa_pmeth.c dsa/dsa_prn.c \
	dsa/dsa_sign.c dsa/dsa_vrf.c dso/dso_dlfcn.c dso/dso_err.c \
	dso/dso_lib.c dso/dso_null.c dso/dso_openssl.c ec/ec2_mult.c \
	ec/ec2_oct.c ec/ec2_smpl.c ec/ec_ameth.c ec/ec_asn1.c \
	ec/ec_check.c ec/ec_curve.c ec/ec_cvt.c ec/ec_err.c \
	ec/ec_key.c ec/ec_kmeth.c ec/ec_lib.c ec/ec_mult.c ec/ec_oct.c \
	ec/ec_pmeth.c ec/ec_print.c ec/eck_prn.c ec/ecp_mont.c \
	ec/ecp_nist.c ec/ecp_oct.c ec/ecp_smpl.c ecdh/ecdh_kdf.c \
	ecdh/ech_err.c ecdh/ech_key.c ecdh/ech_lib.c ecdsa/ecs_asn1.c \
	ecdsa/ecs_err.c ecdsa/ecs_lib.c ecdsa/ecs_ossl.c \
	ecdsa/ecs_sign.c ecdsa/ecs_vrf.c engine/eng_all.c \
	engine/eng_cnf.c engine/eng_ctrl.c engine/eng_dyn.c \
	engine/eng_err.c engine/eng_fat.c engine/eng_init.c \
	engine/eng_lib.c engine/eng_list.c engine/eng_openssl.c \
	engine/eng_pkey.c engine/eng_table.c engine/tb_asnmth.c \
	engine/tb_cipher.c engine/tb_dh.c engine/tb_digest.c \
	engine/tb_dsa.c engine/tb_ecdh.c engine/tb_ecdsa.c \
	engine/tb_eckey.c engine/tb_pkmeth.c engine/tb_rand.c \
	engine/tb_rsa.c engine/tb_store.c err/err.c err/err_all.c \
	err/err_prn.c evp/bio_b64.c evp/bio_enc.c evp/bio_md.c \
	evp/c_all.c evp/digest.c evp/e_aes.c evp/e_aes_cbc_hmac_sha1.c \
	evp/e_bf.c evp/e_camellia.c evp/e_cast.c evp/e_chacha.c \
	evp/e_chacha20poly1305.c evp/e_des.c evp/e_des3.c \
	evp/e_gost2814789.c evp/e_idea.c evp/e_null.c evp/e_old.c \
	evp/e_rc2.c evp/e_rc4.c evp/e_rc4_hmac_md5.c evp/e_sm4.c \
	evp/e_xcbc_d.c evp/encode.c evp/evp_aead.c evp/evp_enc.c \
	evp/evp_err.c evp/evp_key.c evp/evp_lib.c evp/evp_pbe.c \
	evp/evp_pkey.c evp/m_dss.c evp/m_dss1.c evp/m_ecdsa.c \
	evp/m_gost2814789.c evp/m_gostr341194.c evp/m_md4.c \
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
	ec/libcrypto_la-ec_curve.lo ec/libcrypto_la-ec_cvt.lo \
	ec/libcrypto_la-ec_err.lo ec/libcrypto_la-ec_key.lo \
	ec/libcrypto_la-ec_kmeth.lo ec/libcrypto_la-ec_lib.lo \
	ec/libcrypto_la-ec_mult.lo ec/libcrypto_la-ec_oct.lo \
	ec/libcrypto_la-ec_pmeth.lo ec/libcrypto_la-ec_print.lo \
	ec/libcrypto_la-eck_prn.lo ec/libcrypto_la-ecp_mont.lo \
	ec/libcrypto_la-ecp_nist.lo ec/libcrypto_la-ecp_oct.lo \
	ec/libcrypto_la-ecp_smpl.lo ecdh/libcrypto_la-ech_err.lo \
	ecdh/libcrypto_la-ech_key.lo ecdh/libcrypto_la-ech_lib.lo \
	ecdsa/libcrypto_la-ecs_asn1.lo ecdsa/libcrypto_la-ecs_err.lo \
	ecdsa/libcrypto_la-ecs_lib.lo ecdsa/libcrypto_la-ecs_ossl.lo \
	ecdsa/libcrypto_la-ecs_sign.lo ecdsa/libcrypto_la-ecs_vrf.lo \
	engine/libcrypto_la-eng_all.lo engine/libcrypto_la-eng_cnf.lo \
	engine/libcrypto_la-eng_ctrl.lo engine/libcrypto_la-eng_dyn.lo \
	engine/libcrypto_la-eng_err.lo engine/libcrypto_la-eng_fat.lo \
	engine/libcrypto_la-eng_init.lo engine/libcrypto_la-eng_lib.lo \
	engine/libcrypto_la-eng_list.lo \
	engine/libcrypto_la-eng_openssl.lo \
	engine/libcrypto_la-eng_pkey.lo \
	engine/libcrypto_la-eng_table.lo \
	engine/libcrypto_la-tb_asnmth.lo \
	engine/libcrypto_la-tb_cipher.lo engine/libcrypto_la-tb_dh.lo \
	engine/libcrypto_la-tb_digest.lo engine/libcrypto_la-tb_dsa.lo \
	engine/libcrypto_la-tb_ecdh.lo engine/libcrypto_la-tb_ecdsa.lo \







|
|
|
|
|
|
|
|
|
|







725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
	ec/libcrypto_la-ec_curve.lo ec/libcrypto_la-ec_cvt.lo \
	ec/libcrypto_la-ec_err.lo ec/libcrypto_la-ec_key.lo \
	ec/libcrypto_la-ec_kmeth.lo ec/libcrypto_la-ec_lib.lo \
	ec/libcrypto_la-ec_mult.lo ec/libcrypto_la-ec_oct.lo \
	ec/libcrypto_la-ec_pmeth.lo ec/libcrypto_la-ec_print.lo \
	ec/libcrypto_la-eck_prn.lo ec/libcrypto_la-ecp_mont.lo \
	ec/libcrypto_la-ecp_nist.lo ec/libcrypto_la-ecp_oct.lo \
	ec/libcrypto_la-ecp_smpl.lo ecdh/libcrypto_la-ecdh_kdf.lo \
	ecdh/libcrypto_la-ech_err.lo ecdh/libcrypto_la-ech_key.lo \
	ecdh/libcrypto_la-ech_lib.lo ecdsa/libcrypto_la-ecs_asn1.lo \
	ecdsa/libcrypto_la-ecs_err.lo ecdsa/libcrypto_la-ecs_lib.lo \
	ecdsa/libcrypto_la-ecs_ossl.lo ecdsa/libcrypto_la-ecs_sign.lo \
	ecdsa/libcrypto_la-ecs_vrf.lo engine/libcrypto_la-eng_all.lo \
	engine/libcrypto_la-eng_cnf.lo engine/libcrypto_la-eng_ctrl.lo \
	engine/libcrypto_la-eng_dyn.lo engine/libcrypto_la-eng_err.lo \
	engine/libcrypto_la-eng_fat.lo engine/libcrypto_la-eng_init.lo \
	engine/libcrypto_la-eng_lib.lo engine/libcrypto_la-eng_list.lo \
	engine/libcrypto_la-eng_openssl.lo \
	engine/libcrypto_la-eng_pkey.lo \
	engine/libcrypto_la-eng_table.lo \
	engine/libcrypto_la-tb_asnmth.lo \
	engine/libcrypto_la-tb_cipher.lo engine/libcrypto_la-tb_dh.lo \
	engine/libcrypto_la-tb_digest.lo engine/libcrypto_la-tb_dsa.lo \
	engine/libcrypto_la-tb_ecdh.lo engine/libcrypto_la-tb_ecdsa.lo \
1237
1238
1239
1240
1241
1242
1243

1244
1245
1246
1247
1248
1249
1250
	ec/$(DEPDIR)/libcrypto_la-ec_pmeth.Plo \
	ec/$(DEPDIR)/libcrypto_la-ec_print.Plo \
	ec/$(DEPDIR)/libcrypto_la-eck_prn.Plo \
	ec/$(DEPDIR)/libcrypto_la-ecp_mont.Plo \
	ec/$(DEPDIR)/libcrypto_la-ecp_nist.Plo \
	ec/$(DEPDIR)/libcrypto_la-ecp_oct.Plo \
	ec/$(DEPDIR)/libcrypto_la-ecp_smpl.Plo \

	ecdh/$(DEPDIR)/libcrypto_la-ech_err.Plo \
	ecdh/$(DEPDIR)/libcrypto_la-ech_key.Plo \
	ecdh/$(DEPDIR)/libcrypto_la-ech_lib.Plo \
	ecdsa/$(DEPDIR)/libcrypto_la-ecs_asn1.Plo \
	ecdsa/$(DEPDIR)/libcrypto_la-ecs_err.Plo \
	ecdsa/$(DEPDIR)/libcrypto_la-ecs_lib.Plo \
	ecdsa/$(DEPDIR)/libcrypto_la-ecs_ossl.Plo \







>







1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
	ec/$(DEPDIR)/libcrypto_la-ec_pmeth.Plo \
	ec/$(DEPDIR)/libcrypto_la-ec_print.Plo \
	ec/$(DEPDIR)/libcrypto_la-eck_prn.Plo \
	ec/$(DEPDIR)/libcrypto_la-ecp_mont.Plo \
	ec/$(DEPDIR)/libcrypto_la-ecp_nist.Plo \
	ec/$(DEPDIR)/libcrypto_la-ecp_oct.Plo \
	ec/$(DEPDIR)/libcrypto_la-ecp_smpl.Plo \
	ecdh/$(DEPDIR)/libcrypto_la-ecdh_kdf.Plo \
	ecdh/$(DEPDIR)/libcrypto_la-ech_err.Plo \
	ecdh/$(DEPDIR)/libcrypto_la-ech_key.Plo \
	ecdh/$(DEPDIR)/libcrypto_la-ech_lib.Plo \
	ecdsa/$(DEPDIR)/libcrypto_la-ecs_asn1.Plo \
	ecdsa/$(DEPDIR)/libcrypto_la-ecs_err.Plo \
	ecdsa/$(DEPDIR)/libcrypto_la-ecs_lib.Plo \
	ecdsa/$(DEPDIR)/libcrypto_la-ecs_ossl.Plo \
1766
1767
1768
1769
1770
1771
1772
1773

1774
1775
1776
1777
1778
1779
1780
1781
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
AM_CFLAGS = 
AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_srcdir)/include/compat \
	-DLIBRESSL_INTERNAL -D__BEGIN_HIDDEN_DECLS= \
	-D__END_HIDDEN_DECLS= -I$(top_srcdir)/crypto/asn1 \
	-I$(top_srcdir)/crypto/bn -I$(top_srcdir)/crypto/ec \
	-I$(top_srcdir)/crypto/ecdsa -I$(top_srcdir)/crypto/evp \

	-I$(top_srcdir)/crypto/modes -I$(top_srcdir)/crypto
lib_LTLIBRARIES = libcrypto.la

# needed for a CMake target
EXTRA_DIST = VERSION CMakeLists.txt crypto.sym compat/strcasecmp.c \
	$(ASM_ARM_ELF) $(ASM_X86_64_ELF) $(ASM_X86_64_MACOSX) \
	$(ASM_X86_64_MASM) $(ASM_X86_64_MINGW64)
BUILT_SOURCES = crypto_portable.sym







|
>
|







1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
AM_CFLAGS = 
AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_srcdir)/include/compat \
	-DLIBRESSL_INTERNAL -D__BEGIN_HIDDEN_DECLS= \
	-D__END_HIDDEN_DECLS= -I$(top_srcdir)/crypto/asn1 \
	-I$(top_srcdir)/crypto/bn -I$(top_srcdir)/crypto/ec \
	-I$(top_srcdir)/crypto/ecdh -I$(top_srcdir)/crypto/ecdsa \
	-I$(top_srcdir)/crypto/evp -I$(top_srcdir)/crypto/modes \
	-I$(top_srcdir)/crypto
lib_LTLIBRARIES = libcrypto.la

# needed for a CMake target
EXTRA_DIST = VERSION CMakeLists.txt crypto.sym compat/strcasecmp.c \
	$(ASM_ARM_ELF) $(ASM_X86_64_ELF) $(ASM_X86_64_MACOSX) \
	$(ASM_X86_64_MASM) $(ASM_X86_64_MINGW64)
BUILT_SOURCES = crypto_portable.sym
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000

2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018

2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
	dsa/dsa_pmeth.c dsa/dsa_prn.c dsa/dsa_sign.c dsa/dsa_vrf.c \
	dso/dso_dlfcn.c dso/dso_err.c dso/dso_lib.c dso/dso_null.c \
	dso/dso_openssl.c ec/ec2_mult.c ec/ec2_oct.c ec/ec2_smpl.c \
	ec/ec_ameth.c ec/ec_asn1.c ec/ec_check.c ec/ec_curve.c \
	ec/ec_cvt.c ec/ec_err.c ec/ec_key.c ec/ec_kmeth.c ec/ec_lib.c \
	ec/ec_mult.c ec/ec_oct.c ec/ec_pmeth.c ec/ec_print.c \
	ec/eck_prn.c ec/ecp_mont.c ec/ecp_nist.c ec/ecp_oct.c \
	ec/ecp_smpl.c ecdh/ech_err.c ecdh/ech_key.c ecdh/ech_lib.c \
	ecdsa/ecs_asn1.c ecdsa/ecs_err.c ecdsa/ecs_lib.c \
	ecdsa/ecs_ossl.c ecdsa/ecs_sign.c ecdsa/ecs_vrf.c \
	engine/eng_all.c engine/eng_cnf.c engine/eng_ctrl.c \
	engine/eng_dyn.c engine/eng_err.c engine/eng_fat.c \
	engine/eng_init.c engine/eng_lib.c engine/eng_list.c \
	engine/eng_openssl.c engine/eng_pkey.c engine/eng_table.c \
	engine/tb_asnmth.c engine/tb_cipher.c engine/tb_dh.c \
	engine/tb_digest.c engine/tb_dsa.c engine/tb_ecdh.c \
	engine/tb_ecdsa.c engine/tb_eckey.c engine/tb_pkmeth.c \

	engine/tb_rand.c engine/tb_rsa.c engine/tb_store.c err/err.c \
	err/err_all.c err/err_prn.c evp/bio_b64.c evp/bio_enc.c \
	evp/bio_md.c evp/c_all.c evp/digest.c evp/e_aes.c \
	evp/e_aes_cbc_hmac_sha1.c evp/e_bf.c evp/e_camellia.c \
	evp/e_cast.c evp/e_chacha.c evp/e_chacha20poly1305.c \
	evp/e_des.c evp/e_des3.c evp/e_gost2814789.c evp/e_idea.c \
	evp/e_null.c evp/e_old.c evp/e_rc2.c evp/e_rc4.c \
	evp/e_rc4_hmac_md5.c evp/e_sm4.c evp/e_xcbc_d.c evp/encode.c \
	evp/evp_aead.c evp/evp_enc.c evp/evp_err.c evp/evp_key.c \
	evp/evp_lib.c evp/evp_pbe.c evp/evp_pkey.c evp/m_dss.c \
	evp/m_dss1.c evp/m_ecdsa.c evp/m_gost2814789.c \
	evp/m_gostr341194.c evp/m_md4.c evp/m_md5.c evp/m_md5_sha1.c \
	evp/m_null.c evp/m_ripemd.c evp/m_sha1.c evp/m_sigver.c \
	evp/m_streebog.c evp/m_sm3.c evp/m_wp.c evp/names.c \
	evp/p5_crpt.c evp/p5_crpt2.c evp/p_dec.c evp/p_enc.c \
	evp/p_lib.c evp/p_open.c evp/p_seal.c evp/p_sign.c \
	evp/p_verify.c evp/pmeth_fn.c evp/pmeth_gn.c evp/pmeth_lib.c \
	gost/gost2814789.c gost/gost89_keywrap.c gost/gost89_params.c \

	gost/gost89imit_ameth.c gost/gost89imit_pmeth.c \
	gost/gost_asn1.c gost/gost_err.c gost/gostr341001.c \
	gost/gostr341001_ameth.c gost/gostr341001_key.c \
	gost/gostr341001_params.c gost/gostr341001_pmeth.c \
	gost/gostr341194.c gost/streebog.c hkdf/hkdf.c hmac/hm_ameth.c \
	hmac/hm_pmeth.c hmac/hmac.c idea/i_cbc.c idea/i_cfb64.c \
	idea/i_ecb.c idea/i_ofb64.c idea/i_skey.c lhash/lh_stats.c \
	lhash/lhash.c md4/md4_dgst.c md4/md4_one.c md5/md5_dgst.c \
	md5/md5_one.c modes/cbc128.c modes/ccm128.c modes/cfb128.c \
	modes/ctr128.c modes/cts128.c modes/gcm128.c modes/ofb128.c \
	modes/xts128.c objects/o_names.c objects/obj_dat.c \
	objects/obj_err.c objects/obj_lib.c objects/obj_xref.c \
	ocsp/ocsp_asn.c ocsp/ocsp_cl.c ocsp/ocsp_err.c ocsp/ocsp_ext.c \
	ocsp/ocsp_ht.c ocsp/ocsp_lib.c ocsp/ocsp_prn.c ocsp/ocsp_srv.c \
	ocsp/ocsp_vfy.c pem/pem_all.c pem/pem_err.c pem/pem_info.c \
	pem/pem_lib.c pem/pem_oth.c pem/pem_pk8.c pem/pem_pkey.c \
	pem/pem_seal.c pem/pem_sign.c pem/pem_x509.c pem/pem_xaux.c \
	pem/pvkfmt.c pkcs12/p12_add.c pkcs12/p12_asn.c \
	pkcs12/p12_attr.c pkcs12/p12_crpt.c pkcs12/p12_crt.c \
	pkcs12/p12_decr.c pkcs12/p12_init.c pkcs12/p12_key.c \
	pkcs12/p12_kiss.c pkcs12/p12_mutl.c pkcs12/p12_npas.c \
	pkcs12/p12_p8d.c pkcs12/p12_p8e.c pkcs12/p12_utl.c \
	pkcs12/pk12err.c pkcs7/bio_pk7.c pkcs7/pk7_asn1.c \
	pkcs7/pk7_attr.c pkcs7/pk7_doit.c pkcs7/pk7_lib.c \
	pkcs7/pk7_mime.c pkcs7/pk7_smime.c pkcs7/pkcs7err.c \
	poly1305/poly1305.c rand/rand_err.c rand/rand_lib.c \
	rand/randfile.c rc2/rc2_cbc.c rc2/rc2_ecb.c rc2/rc2_skey.c \
	rc2/rc2cfb64.c rc2/rc2ofb64.c ripemd/rmd_dgst.c \
	ripemd/rmd_one.c rsa/rsa_ameth.c rsa/rsa_asn1.c rsa/rsa_chk.c \
	rsa/rsa_crpt.c rsa/rsa_depr.c rsa/rsa_eay.c rsa/rsa_err.c \
	rsa/rsa_gen.c rsa/rsa_lib.c rsa/rsa_meth.c rsa/rsa_none.c \
	rsa/rsa_oaep.c rsa/rsa_pk1.c rsa/rsa_pmeth.c rsa/rsa_prn.c \
	rsa/rsa_pss.c rsa/rsa_saos.c rsa/rsa_sign.c rsa/rsa_x931.c \
	sha/sha1_one.c sha/sha1dgst.c sha/sha256.c sha/sha512.c \
	sm3/sm3.c sm4/sm4.c stack/stack.c ts/ts_asn1.c ts/ts_conf.c \







|
|
|
|
|
|
|
|
|
|
>
|
|
|
|
|
|
|
|
|
|
<
|
|
|
|
|
|
|
>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<
|
|
|
|
|
|
|
|
|
|







1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013

2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038

2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
	dsa/dsa_pmeth.c dsa/dsa_prn.c dsa/dsa_sign.c dsa/dsa_vrf.c \
	dso/dso_dlfcn.c dso/dso_err.c dso/dso_lib.c dso/dso_null.c \
	dso/dso_openssl.c ec/ec2_mult.c ec/ec2_oct.c ec/ec2_smpl.c \
	ec/ec_ameth.c ec/ec_asn1.c ec/ec_check.c ec/ec_curve.c \
	ec/ec_cvt.c ec/ec_err.c ec/ec_key.c ec/ec_kmeth.c ec/ec_lib.c \
	ec/ec_mult.c ec/ec_oct.c ec/ec_pmeth.c ec/ec_print.c \
	ec/eck_prn.c ec/ecp_mont.c ec/ecp_nist.c ec/ecp_oct.c \
	ec/ecp_smpl.c ecdh/ecdh_kdf.c ecdh/ech_err.c ecdh/ech_key.c \
	ecdh/ech_lib.c ecdsa/ecs_asn1.c ecdsa/ecs_err.c \
	ecdsa/ecs_lib.c ecdsa/ecs_ossl.c ecdsa/ecs_sign.c \
	ecdsa/ecs_vrf.c engine/eng_all.c engine/eng_cnf.c \
	engine/eng_ctrl.c engine/eng_dyn.c engine/eng_err.c \
	engine/eng_fat.c engine/eng_init.c engine/eng_lib.c \
	engine/eng_list.c engine/eng_openssl.c engine/eng_pkey.c \
	engine/eng_table.c engine/tb_asnmth.c engine/tb_cipher.c \
	engine/tb_dh.c engine/tb_digest.c engine/tb_dsa.c \
	engine/tb_ecdh.c engine/tb_ecdsa.c engine/tb_eckey.c \
	engine/tb_pkmeth.c engine/tb_rand.c engine/tb_rsa.c \
	engine/tb_store.c err/err.c err/err_all.c err/err_prn.c \
	evp/bio_b64.c evp/bio_enc.c evp/bio_md.c evp/c_all.c \
	evp/digest.c evp/e_aes.c evp/e_aes_cbc_hmac_sha1.c evp/e_bf.c \
	evp/e_camellia.c evp/e_cast.c evp/e_chacha.c \
	evp/e_chacha20poly1305.c evp/e_des.c evp/e_des3.c \
	evp/e_gost2814789.c evp/e_idea.c evp/e_null.c evp/e_old.c \
	evp/e_rc2.c evp/e_rc4.c evp/e_rc4_hmac_md5.c evp/e_sm4.c \
	evp/e_xcbc_d.c evp/encode.c evp/evp_aead.c evp/evp_enc.c \
	evp/evp_err.c evp/evp_key.c evp/evp_lib.c evp/evp_pbe.c \
	evp/evp_pkey.c evp/m_dss.c evp/m_dss1.c evp/m_ecdsa.c \

	evp/m_gost2814789.c evp/m_gostr341194.c evp/m_md4.c \
	evp/m_md5.c evp/m_md5_sha1.c evp/m_null.c evp/m_ripemd.c \
	evp/m_sha1.c evp/m_sigver.c evp/m_streebog.c evp/m_sm3.c \
	evp/m_wp.c evp/names.c evp/p5_crpt.c evp/p5_crpt2.c \
	evp/p_dec.c evp/p_enc.c evp/p_lib.c evp/p_open.c evp/p_seal.c \
	evp/p_sign.c evp/p_verify.c evp/pmeth_fn.c evp/pmeth_gn.c \
	evp/pmeth_lib.c gost/gost2814789.c gost/gost89_keywrap.c \
	gost/gost89_params.c gost/gost89imit_ameth.c \
	gost/gost89imit_pmeth.c gost/gost_asn1.c gost/gost_err.c \
	gost/gostr341001.c gost/gostr341001_ameth.c \
	gost/gostr341001_key.c gost/gostr341001_params.c \
	gost/gostr341001_pmeth.c gost/gostr341194.c gost/streebog.c \
	hkdf/hkdf.c hmac/hm_ameth.c hmac/hm_pmeth.c hmac/hmac.c \
	idea/i_cbc.c idea/i_cfb64.c idea/i_ecb.c idea/i_ofb64.c \
	idea/i_skey.c lhash/lh_stats.c lhash/lhash.c md4/md4_dgst.c \
	md4/md4_one.c md5/md5_dgst.c md5/md5_one.c modes/cbc128.c \
	modes/ccm128.c modes/cfb128.c modes/ctr128.c modes/cts128.c \
	modes/gcm128.c modes/ofb128.c modes/xts128.c objects/o_names.c \
	objects/obj_dat.c objects/obj_err.c objects/obj_lib.c \
	objects/obj_xref.c ocsp/ocsp_asn.c ocsp/ocsp_cl.c \
	ocsp/ocsp_err.c ocsp/ocsp_ext.c ocsp/ocsp_ht.c ocsp/ocsp_lib.c \
	ocsp/ocsp_prn.c ocsp/ocsp_srv.c ocsp/ocsp_vfy.c pem/pem_all.c \
	pem/pem_err.c pem/pem_info.c pem/pem_lib.c pem/pem_oth.c \
	pem/pem_pk8.c pem/pem_pkey.c pem/pem_seal.c pem/pem_sign.c \
	pem/pem_x509.c pem/pem_xaux.c pem/pvkfmt.c pkcs12/p12_add.c \

	pkcs12/p12_asn.c pkcs12/p12_attr.c pkcs12/p12_crpt.c \
	pkcs12/p12_crt.c pkcs12/p12_decr.c pkcs12/p12_init.c \
	pkcs12/p12_key.c pkcs12/p12_kiss.c pkcs12/p12_mutl.c \
	pkcs12/p12_npas.c pkcs12/p12_p8d.c pkcs12/p12_p8e.c \
	pkcs12/p12_utl.c pkcs12/pk12err.c pkcs7/bio_pk7.c \
	pkcs7/pk7_asn1.c pkcs7/pk7_attr.c pkcs7/pk7_doit.c \
	pkcs7/pk7_lib.c pkcs7/pk7_mime.c pkcs7/pk7_smime.c \
	pkcs7/pkcs7err.c poly1305/poly1305.c rand/rand_err.c \
	rand/rand_lib.c rand/randfile.c rc2/rc2_cbc.c rc2/rc2_ecb.c \
	rc2/rc2_skey.c rc2/rc2cfb64.c rc2/rc2ofb64.c ripemd/rmd_dgst.c \
	ripemd/rmd_one.c rsa/rsa_ameth.c rsa/rsa_asn1.c rsa/rsa_chk.c \
	rsa/rsa_crpt.c rsa/rsa_depr.c rsa/rsa_eay.c rsa/rsa_err.c \
	rsa/rsa_gen.c rsa/rsa_lib.c rsa/rsa_meth.c rsa/rsa_none.c \
	rsa/rsa_oaep.c rsa/rsa_pk1.c rsa/rsa_pmeth.c rsa/rsa_prn.c \
	rsa/rsa_pss.c rsa/rsa_saos.c rsa/rsa_sign.c rsa/rsa_x931.c \
	sha/sha1_one.c sha/sha1dgst.c sha/sha256.c sha/sha512.c \
	sm3/sm3.c sm4/sm4.c stack/stack.c ts/ts_asn1.c ts/ts_conf.c \
3062
3063
3064
3065
3066
3067
3068


3069
3070
3071
3072
3073
3074
3075
	ec/$(DEPDIR)/$(am__dirstamp)
ecdh/$(am__dirstamp):
	@$(MKDIR_P) ecdh
	@: > ecdh/$(am__dirstamp)
ecdh/$(DEPDIR)/$(am__dirstamp):
	@$(MKDIR_P) ecdh/$(DEPDIR)
	@: > ecdh/$(DEPDIR)/$(am__dirstamp)


ecdh/libcrypto_la-ech_err.lo: ecdh/$(am__dirstamp) \
	ecdh/$(DEPDIR)/$(am__dirstamp)
ecdh/libcrypto_la-ech_key.lo: ecdh/$(am__dirstamp) \
	ecdh/$(DEPDIR)/$(am__dirstamp)
ecdh/libcrypto_la-ech_lib.lo: ecdh/$(am__dirstamp) \
	ecdh/$(DEPDIR)/$(am__dirstamp)
ecdsa/$(am__dirstamp):







>
>







3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
	ec/$(DEPDIR)/$(am__dirstamp)
ecdh/$(am__dirstamp):
	@$(MKDIR_P) ecdh
	@: > ecdh/$(am__dirstamp)
ecdh/$(DEPDIR)/$(am__dirstamp):
	@$(MKDIR_P) ecdh/$(DEPDIR)
	@: > ecdh/$(DEPDIR)/$(am__dirstamp)
ecdh/libcrypto_la-ecdh_kdf.lo: ecdh/$(am__dirstamp) \
	ecdh/$(DEPDIR)/$(am__dirstamp)
ecdh/libcrypto_la-ech_err.lo: ecdh/$(am__dirstamp) \
	ecdh/$(DEPDIR)/$(am__dirstamp)
ecdh/libcrypto_la-ech_key.lo: ecdh/$(am__dirstamp) \
	ecdh/$(DEPDIR)/$(am__dirstamp)
ecdh/libcrypto_la-ech_lib.lo: ecdh/$(am__dirstamp) \
	ecdh/$(DEPDIR)/$(am__dirstamp)
ecdsa/$(am__dirstamp):
4273
4274
4275
4276
4277
4278
4279

4280
4281
4282
4283
4284
4285
4286
@AMDEP_TRUE@@am__include@ @am__quote@ec/$(DEPDIR)/libcrypto_la-ec_pmeth.Plo@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@ec/$(DEPDIR)/libcrypto_la-ec_print.Plo@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@ec/$(DEPDIR)/libcrypto_la-eck_prn.Plo@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@ec/$(DEPDIR)/libcrypto_la-ecp_mont.Plo@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@ec/$(DEPDIR)/libcrypto_la-ecp_nist.Plo@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@ec/$(DEPDIR)/libcrypto_la-ecp_oct.Plo@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@ec/$(DEPDIR)/libcrypto_la-ecp_smpl.Plo@am__quote@ # am--include-marker

@AMDEP_TRUE@@am__include@ @am__quote@ecdh/$(DEPDIR)/libcrypto_la-ech_err.Plo@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@ecdh/$(DEPDIR)/libcrypto_la-ech_key.Plo@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@ecdh/$(DEPDIR)/libcrypto_la-ech_lib.Plo@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@ecdsa/$(DEPDIR)/libcrypto_la-ecs_asn1.Plo@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@ecdsa/$(DEPDIR)/libcrypto_la-ecs_err.Plo@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@ecdsa/$(DEPDIR)/libcrypto_la-ecs_lib.Plo@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@ecdsa/$(DEPDIR)/libcrypto_la-ecs_ossl.Plo@am__quote@ # am--include-marker







>







4277
4278
4279
4280
4281
4282
4283
4284
4285
4286
4287
4288
4289
4290
4291
@AMDEP_TRUE@@am__include@ @am__quote@ec/$(DEPDIR)/libcrypto_la-ec_pmeth.Plo@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@ec/$(DEPDIR)/libcrypto_la-ec_print.Plo@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@ec/$(DEPDIR)/libcrypto_la-eck_prn.Plo@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@ec/$(DEPDIR)/libcrypto_la-ecp_mont.Plo@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@ec/$(DEPDIR)/libcrypto_la-ecp_nist.Plo@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@ec/$(DEPDIR)/libcrypto_la-ecp_oct.Plo@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@ec/$(DEPDIR)/libcrypto_la-ecp_smpl.Plo@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@ecdh/$(DEPDIR)/libcrypto_la-ecdh_kdf.Plo@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@ecdh/$(DEPDIR)/libcrypto_la-ech_err.Plo@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@ecdh/$(DEPDIR)/libcrypto_la-ech_key.Plo@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@ecdh/$(DEPDIR)/libcrypto_la-ech_lib.Plo@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@ecdsa/$(DEPDIR)/libcrypto_la-ecs_asn1.Plo@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@ecdsa/$(DEPDIR)/libcrypto_la-ecs_err.Plo@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@ecdsa/$(DEPDIR)/libcrypto_la-ecs_lib.Plo@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@ecdsa/$(DEPDIR)/libcrypto_la-ecs_ossl.Plo@am__quote@ # am--include-marker
7043
7044
7045
7046
7047
7048
7049







7050
7051
7052
7053
7054
7055
7056
ec/libcrypto_la-ecp_smpl.lo: ec/ecp_smpl.c
@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcrypto_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ec/libcrypto_la-ecp_smpl.lo -MD -MP -MF ec/$(DEPDIR)/libcrypto_la-ecp_smpl.Tpo -c -o ec/libcrypto_la-ecp_smpl.lo `test -f 'ec/ecp_smpl.c' || echo '$(srcdir)/'`ec/ecp_smpl.c
@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) ec/$(DEPDIR)/libcrypto_la-ecp_smpl.Tpo ec/$(DEPDIR)/libcrypto_la-ecp_smpl.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='ec/ecp_smpl.c' object='ec/libcrypto_la-ecp_smpl.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcrypto_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ec/libcrypto_la-ecp_smpl.lo `test -f 'ec/ecp_smpl.c' || echo '$(srcdir)/'`ec/ecp_smpl.c








ecdh/libcrypto_la-ech_err.lo: ecdh/ech_err.c
@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcrypto_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ecdh/libcrypto_la-ech_err.lo -MD -MP -MF ecdh/$(DEPDIR)/libcrypto_la-ech_err.Tpo -c -o ecdh/libcrypto_la-ech_err.lo `test -f 'ecdh/ech_err.c' || echo '$(srcdir)/'`ecdh/ech_err.c
@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) ecdh/$(DEPDIR)/libcrypto_la-ech_err.Tpo ecdh/$(DEPDIR)/libcrypto_la-ech_err.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='ecdh/ech_err.c' object='ecdh/libcrypto_la-ech_err.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcrypto_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ecdh/libcrypto_la-ech_err.lo `test -f 'ecdh/ech_err.c' || echo '$(srcdir)/'`ecdh/ech_err.c








>
>
>
>
>
>
>







7048
7049
7050
7051
7052
7053
7054
7055
7056
7057
7058
7059
7060
7061
7062
7063
7064
7065
7066
7067
7068
ec/libcrypto_la-ecp_smpl.lo: ec/ecp_smpl.c
@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcrypto_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ec/libcrypto_la-ecp_smpl.lo -MD -MP -MF ec/$(DEPDIR)/libcrypto_la-ecp_smpl.Tpo -c -o ec/libcrypto_la-ecp_smpl.lo `test -f 'ec/ecp_smpl.c' || echo '$(srcdir)/'`ec/ecp_smpl.c
@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) ec/$(DEPDIR)/libcrypto_la-ecp_smpl.Tpo ec/$(DEPDIR)/libcrypto_la-ecp_smpl.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='ec/ecp_smpl.c' object='ec/libcrypto_la-ecp_smpl.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcrypto_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ec/libcrypto_la-ecp_smpl.lo `test -f 'ec/ecp_smpl.c' || echo '$(srcdir)/'`ec/ecp_smpl.c

ecdh/libcrypto_la-ecdh_kdf.lo: ecdh/ecdh_kdf.c
@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcrypto_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ecdh/libcrypto_la-ecdh_kdf.lo -MD -MP -MF ecdh/$(DEPDIR)/libcrypto_la-ecdh_kdf.Tpo -c -o ecdh/libcrypto_la-ecdh_kdf.lo `test -f 'ecdh/ecdh_kdf.c' || echo '$(srcdir)/'`ecdh/ecdh_kdf.c
@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) ecdh/$(DEPDIR)/libcrypto_la-ecdh_kdf.Tpo ecdh/$(DEPDIR)/libcrypto_la-ecdh_kdf.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='ecdh/ecdh_kdf.c' object='ecdh/libcrypto_la-ecdh_kdf.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcrypto_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ecdh/libcrypto_la-ecdh_kdf.lo `test -f 'ecdh/ecdh_kdf.c' || echo '$(srcdir)/'`ecdh/ecdh_kdf.c

ecdh/libcrypto_la-ech_err.lo: ecdh/ech_err.c
@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcrypto_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ecdh/libcrypto_la-ech_err.lo -MD -MP -MF ecdh/$(DEPDIR)/libcrypto_la-ech_err.Tpo -c -o ecdh/libcrypto_la-ech_err.lo `test -f 'ecdh/ech_err.c' || echo '$(srcdir)/'`ecdh/ech_err.c
@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) ecdh/$(DEPDIR)/libcrypto_la-ech_err.Tpo ecdh/$(DEPDIR)/libcrypto_la-ech_err.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='ecdh/ech_err.c' object='ecdh/libcrypto_la-ech_err.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcrypto_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ecdh/libcrypto_la-ech_err.lo `test -f 'ecdh/ech_err.c' || echo '$(srcdir)/'`ecdh/ech_err.c

9757
9758
9759
9760
9761
9762
9763

9764
9765
9766
9767
9768
9769
9770
	-rm -f ec/$(DEPDIR)/libcrypto_la-ec_pmeth.Plo
	-rm -f ec/$(DEPDIR)/libcrypto_la-ec_print.Plo
	-rm -f ec/$(DEPDIR)/libcrypto_la-eck_prn.Plo
	-rm -f ec/$(DEPDIR)/libcrypto_la-ecp_mont.Plo
	-rm -f ec/$(DEPDIR)/libcrypto_la-ecp_nist.Plo
	-rm -f ec/$(DEPDIR)/libcrypto_la-ecp_oct.Plo
	-rm -f ec/$(DEPDIR)/libcrypto_la-ecp_smpl.Plo

	-rm -f ecdh/$(DEPDIR)/libcrypto_la-ech_err.Plo
	-rm -f ecdh/$(DEPDIR)/libcrypto_la-ech_key.Plo
	-rm -f ecdh/$(DEPDIR)/libcrypto_la-ech_lib.Plo
	-rm -f ecdsa/$(DEPDIR)/libcrypto_la-ecs_asn1.Plo
	-rm -f ecdsa/$(DEPDIR)/libcrypto_la-ecs_err.Plo
	-rm -f ecdsa/$(DEPDIR)/libcrypto_la-ecs_lib.Plo
	-rm -f ecdsa/$(DEPDIR)/libcrypto_la-ecs_ossl.Plo







>







9769
9770
9771
9772
9773
9774
9775
9776
9777
9778
9779
9780
9781
9782
9783
	-rm -f ec/$(DEPDIR)/libcrypto_la-ec_pmeth.Plo
	-rm -f ec/$(DEPDIR)/libcrypto_la-ec_print.Plo
	-rm -f ec/$(DEPDIR)/libcrypto_la-eck_prn.Plo
	-rm -f ec/$(DEPDIR)/libcrypto_la-ecp_mont.Plo
	-rm -f ec/$(DEPDIR)/libcrypto_la-ecp_nist.Plo
	-rm -f ec/$(DEPDIR)/libcrypto_la-ecp_oct.Plo
	-rm -f ec/$(DEPDIR)/libcrypto_la-ecp_smpl.Plo
	-rm -f ecdh/$(DEPDIR)/libcrypto_la-ecdh_kdf.Plo
	-rm -f ecdh/$(DEPDIR)/libcrypto_la-ech_err.Plo
	-rm -f ecdh/$(DEPDIR)/libcrypto_la-ech_key.Plo
	-rm -f ecdh/$(DEPDIR)/libcrypto_la-ech_lib.Plo
	-rm -f ecdsa/$(DEPDIR)/libcrypto_la-ecs_asn1.Plo
	-rm -f ecdsa/$(DEPDIR)/libcrypto_la-ecs_err.Plo
	-rm -f ecdsa/$(DEPDIR)/libcrypto_la-ecs_lib.Plo
	-rm -f ecdsa/$(DEPDIR)/libcrypto_la-ecs_ossl.Plo
10468
10469
10470
10471
10472
10473
10474

10475
10476
10477
10478
10479
10480
10481
	-rm -f ec/$(DEPDIR)/libcrypto_la-ec_pmeth.Plo
	-rm -f ec/$(DEPDIR)/libcrypto_la-ec_print.Plo
	-rm -f ec/$(DEPDIR)/libcrypto_la-eck_prn.Plo
	-rm -f ec/$(DEPDIR)/libcrypto_la-ecp_mont.Plo
	-rm -f ec/$(DEPDIR)/libcrypto_la-ecp_nist.Plo
	-rm -f ec/$(DEPDIR)/libcrypto_la-ecp_oct.Plo
	-rm -f ec/$(DEPDIR)/libcrypto_la-ecp_smpl.Plo

	-rm -f ecdh/$(DEPDIR)/libcrypto_la-ech_err.Plo
	-rm -f ecdh/$(DEPDIR)/libcrypto_la-ech_key.Plo
	-rm -f ecdh/$(DEPDIR)/libcrypto_la-ech_lib.Plo
	-rm -f ecdsa/$(DEPDIR)/libcrypto_la-ecs_asn1.Plo
	-rm -f ecdsa/$(DEPDIR)/libcrypto_la-ecs_err.Plo
	-rm -f ecdsa/$(DEPDIR)/libcrypto_la-ecs_lib.Plo
	-rm -f ecdsa/$(DEPDIR)/libcrypto_la-ecs_ossl.Plo







>







10481
10482
10483
10484
10485
10486
10487
10488
10489
10490
10491
10492
10493
10494
10495
	-rm -f ec/$(DEPDIR)/libcrypto_la-ec_pmeth.Plo
	-rm -f ec/$(DEPDIR)/libcrypto_la-ec_print.Plo
	-rm -f ec/$(DEPDIR)/libcrypto_la-eck_prn.Plo
	-rm -f ec/$(DEPDIR)/libcrypto_la-ecp_mont.Plo
	-rm -f ec/$(DEPDIR)/libcrypto_la-ecp_nist.Plo
	-rm -f ec/$(DEPDIR)/libcrypto_la-ecp_oct.Plo
	-rm -f ec/$(DEPDIR)/libcrypto_la-ecp_smpl.Plo
	-rm -f ecdh/$(DEPDIR)/libcrypto_la-ecdh_kdf.Plo
	-rm -f ecdh/$(DEPDIR)/libcrypto_la-ech_err.Plo
	-rm -f ecdh/$(DEPDIR)/libcrypto_la-ech_key.Plo
	-rm -f ecdh/$(DEPDIR)/libcrypto_la-ech_lib.Plo
	-rm -f ecdsa/$(DEPDIR)/libcrypto_la-ecs_asn1.Plo
	-rm -f ecdsa/$(DEPDIR)/libcrypto_la-ecs_err.Plo
	-rm -f ecdsa/$(DEPDIR)/libcrypto_la-ecs_lib.Plo
	-rm -f ecdsa/$(DEPDIR)/libcrypto_la-ecs_ossl.Plo
Changes to jni/libressl/crypto/VERSION.
1
45:4:0
|
1
45:5:0
Changes to jni/libressl/crypto/aes/aes-masm-x86_64.S.







1




2
























































3
4
5
6
7
8
9







OPTION	DOTNAME




#include "x86_arch.h"

























































.text$	SEGMENT ALIGN(64) 'CODE'

ALIGN	16
_x86_64_AES_encrypt	PROC PRIVATE
	xor	eax,DWORD PTR[r15]
	xor	ebx,DWORD PTR[4+r15]
>
>
>
>
>
>
>

>
>
>
>
|
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
; 1 "crypto/aes/aes-masm-x86_64.S.tmp"
; 1 "<built-in>" 1
; 1 "<built-in>" 3
; 349 "<built-in>" 3
; 1 "<command line>" 1
; 1 "<built-in>" 2
; 1 "crypto/aes/aes-masm-x86_64.S.tmp" 2
OPTION	DOTNAME

; 1 "./crypto/x86_arch.h" 1


; 16 "./crypto/x86_arch.h"









; 40 "./crypto/x86_arch.h"













































; 3 "crypto/aes/aes-masm-x86_64.S.tmp" 2

.text$	SEGMENT ALIGN(64) 'CODE'

ALIGN	16
_x86_64_AES_encrypt	PROC PRIVATE
	xor	eax,DWORD PTR[r15]
	xor	ebx,DWORD PTR[4+r15]
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
$L$cbc_picked_te::

	mov	r10d,DWORD PTR[OPENSSL_ia32cap_P]
	cmp	rdx,512
	jb	$L$cbc_slow_prologue
	test	rdx,15
	jnz	$L$cbc_slow_prologue
	bt	r10d,IA32CAP_BIT0_HT
	jc	$L$cbc_slow_prologue


	lea	r15,QWORD PTR[((-88-248))+rsp]
	and	r15,-64









|







1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
$L$cbc_picked_te::

	mov	r10d,DWORD PTR[OPENSSL_ia32cap_P]
	cmp	rdx,512
	jb	$L$cbc_slow_prologue
	test	rdx,15
	jnz	$L$cbc_slow_prologue
	bt	r10d,28
	jc	$L$cbc_slow_prologue


	lea	r15,QWORD PTR[((-88-248))+rsp]
	and	r15,-64


2874
2875
2876
2877
2878
2879
2880

	DD	imagerel $L$dec_key_prologue,imagerel $L$dec_key_epilogue	
$L$SEH_info_AES_cbc_encrypt::
DB	9,0,0,0
	DD	imagerel cbc_se_handler

.xdata	ENDS
END








>
2941
2942
2943
2944
2945
2946
2947
2948
	DD	imagerel $L$dec_key_prologue,imagerel $L$dec_key_epilogue	
$L$SEH_info_AES_cbc_encrypt::
DB	9,0,0,0
	DD	imagerel cbc_se_handler

.xdata	ENDS
END

Changes to jni/libressl/crypto/aes/aesni-masm-x86_64.S.







1




2
























































3
4
5
6
7
8
9







OPTION	DOTNAME




#include "x86_arch.h"
























































.text$	SEGMENT ALIGN(64) 'CODE'
PUBLIC	aesni_encrypt

ALIGN	16
aesni_encrypt	PROC PUBLIC
	movups	xmm2,XMMWORD PTR[rcx]
	mov	eax,DWORD PTR[240+r8]
>
>
>
>
>
>
>

>
>
>
>
|
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
; 1 "crypto/aes/aesni-masm-x86_64.S.tmp"
; 1 "<built-in>" 1
; 1 "<built-in>" 3
; 349 "<built-in>" 3
; 1 "<command line>" 1
; 1 "<built-in>" 2
; 1 "crypto/aes/aesni-masm-x86_64.S.tmp" 2
OPTION	DOTNAME

; 1 "./crypto/x86_arch.h" 1


; 16 "./crypto/x86_arch.h"









; 40 "./crypto/x86_arch.h"













































; 3 "crypto/aes/aesni-masm-x86_64.S.tmp" 2
.text$	SEGMENT ALIGN(64) 'CODE'
PUBLIC	aesni_encrypt

ALIGN	16
aesni_encrypt	PROC PUBLIC
	movups	xmm2,XMMWORD PTR[rcx]
	mov	eax,DWORD PTR[240+r8]
3025
3026
3027
3028
3029
3030
3031

	DD	imagerel cbc_se_handler
$L$SEH_info_key::
DB	001h,004h,001h,000h
DB	004h,002h,000h,000h	

.xdata	ENDS
END








>
3092
3093
3094
3095
3096
3097
3098
3099
	DD	imagerel cbc_se_handler
$L$SEH_info_key::
DB	001h,004h,001h,000h
DB	004h,002h,000h,000h	

.xdata	ENDS
END

Changes to jni/libressl/crypto/aes/aesni-sha1-masm-x86_64.S.







1




2
























































3
4
5
6
7
8
9







OPTION	DOTNAME




#include "x86_arch.h"
























































.text$	SEGMENT ALIGN(64) 'CODE'
EXTERN	OPENSSL_ia32cap_P:NEAR


PUBLIC	aesni_cbc_sha1_enc

ALIGN	16
>
>
>
>
>
>
>

>
>
>
>
|
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
; 1 "crypto/aes/aesni-sha1-masm-x86_64.S.tmp"
; 1 "<built-in>" 1
; 1 "<built-in>" 3
; 349 "<built-in>" 3
; 1 "<command line>" 1
; 1 "<built-in>" 2
; 1 "crypto/aes/aesni-sha1-masm-x86_64.S.tmp" 2
OPTION	DOTNAME

; 1 "./crypto/x86_arch.h" 1


; 16 "./crypto/x86_arch.h"









; 40 "./crypto/x86_arch.h"













































; 3 "crypto/aes/aesni-sha1-masm-x86_64.S.tmp" 2
.text$	SEGMENT ALIGN(64) 'CODE'
EXTERN	OPENSSL_ia32cap_P:NEAR


PUBLIC	aesni_cbc_sha1_enc

ALIGN	16
1542
1543
1544
1545
1546
1547
1548

$L$SEH_info_aesni_cbc_sha1_enc_ssse3::
DB	9,0,0,0
	DD	imagerel ssse3_handler
	DD	imagerel $L$prologue_ssse3,imagerel $L$epilogue_ssse3	

.xdata	ENDS
END








>
1609
1610
1611
1612
1613
1614
1615
1616
$L$SEH_info_aesni_cbc_sha1_enc_ssse3::
DB	9,0,0,0
	DD	imagerel ssse3_handler
	DD	imagerel $L$prologue_ssse3,imagerel $L$epilogue_ssse3	

.xdata	ENDS
END

Changes to jni/libressl/crypto/aes/bsaes-masm-x86_64.S.







1




2
























































3
4
5
6
7
8
9







OPTION	DOTNAME




#include "x86_arch.h"
























































.text$	SEGMENT ALIGN(64) 'CODE'

EXTERN	asm_AES_encrypt:NEAR
EXTERN	asm_AES_decrypt:NEAR


ALIGN	64
>
>
>
>
>
>
>

>
>
>
>
|
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
; 1 "crypto/aes/bsaes-masm-x86_64.S.tmp"
; 1 "<built-in>" 1
; 1 "<built-in>" 3
; 349 "<built-in>" 3
; 1 "<command line>" 1
; 1 "<built-in>" 2
; 1 "crypto/aes/bsaes-masm-x86_64.S.tmp" 2
OPTION	DOTNAME

; 1 "./crypto/x86_arch.h" 1


; 16 "./crypto/x86_arch.h"









; 40 "./crypto/x86_arch.h"













































; 3 "crypto/aes/bsaes-masm-x86_64.S.tmp" 2
.text$	SEGMENT ALIGN(64) 'CODE'

EXTERN	asm_AES_encrypt:NEAR
EXTERN	asm_AES_decrypt:NEAR


ALIGN	64
2729
2730
2731
2732
2733
2734
2735

$L$xts_dec_info::
DB	9,0,0,0
	DD	imagerel se_handler
	DD	imagerel $L$xts_dec_body,imagerel $L$xts_dec_epilogue	

.xdata	ENDS
END








>
2796
2797
2798
2799
2800
2801
2802
2803
$L$xts_dec_info::
DB	9,0,0,0
	DD	imagerel se_handler
	DD	imagerel $L$xts_dec_body,imagerel $L$xts_dec_epilogue	

.xdata	ENDS
END

Changes to jni/libressl/crypto/aes/vpaes-masm-x86_64.S.







1




2
























































3
4
5
6
7
8
9







OPTION	DOTNAME




#include "x86_arch.h"
























































.text$	SEGMENT ALIGN(64) 'CODE'






>
>
>
>
>
>
>

>
>
>
>
|
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
; 1 "crypto/aes/vpaes-masm-x86_64.S.tmp"
; 1 "<built-in>" 1
; 1 "<built-in>" 3
; 349 "<built-in>" 3
; 1 "<command line>" 1
; 1 "<built-in>" 2
; 1 "crypto/aes/vpaes-masm-x86_64.S.tmp" 2
OPTION	DOTNAME

; 1 "./crypto/x86_arch.h" 1


; 16 "./crypto/x86_arch.h"









; 40 "./crypto/x86_arch.h"













































; 3 "crypto/aes/vpaes-masm-x86_64.S.tmp" 2
.text$	SEGMENT ALIGN(64) 'CODE'






1139
1140
1141
1142
1143
1144
1145

$L$SEH_info_vpaes_cbc_encrypt::
DB	9,0,0,0
	DD	imagerel se_handler
	DD	imagerel $L$cbc_body,imagerel $L$cbc_epilogue		

.xdata	ENDS
END








>
1206
1207
1208
1209
1210
1211
1212
1213
$L$SEH_info_vpaes_cbc_encrypt::
DB	9,0,0,0
	DD	imagerel se_handler
	DD	imagerel $L$cbc_body,imagerel $L$cbc_epilogue		

.xdata	ENDS
END

Changes to jni/libressl/crypto/arm_arch.h.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19




20
21
22
23
24
25
26
27
/* $OpenBSD: arm_arch.h,v 1.9 2019/03/13 10:18:30 patrick Exp $ */
#ifndef __ARM_ARCH_H__
#define __ARM_ARCH_H__

#if !defined(__ARM_ARCH__)
# if defined(__CC_ARM)
#  define __ARM_ARCH__ __TARGET_ARCH_ARM
#  if defined(__BIG_ENDIAN)
#   define __ARMEB__
#  else
#   define __ARMEL__
#  endif
# elif defined(__GNUC__)
  /*
   * Why doesn't gcc define __ARM_ARCH__? Instead it defines
   * bunch of below macros. See all_architectures[] table in
   * gcc/config/arm/arm.c. On a side note it defines
   * __ARMEL__/__ARMEB__ for little-/big-endian.
   */




#  if	defined(__ARM_ARCH_7__)	|| defined(__ARM_ARCH_7A__)	|| \
	defined(__ARM_ARCH_7R__)|| defined(__ARM_ARCH_7M__)	|| \
	defined(__ARM_ARCH_7EM__)
#   define __ARM_ARCH__ 7
#  elif	defined(__ARM_ARCH_6__)	|| defined(__ARM_ARCH_6J__)	|| \
	defined(__ARM_ARCH_6K__)|| defined(__ARM_ARCH_6M__)	|| \
	defined(__ARM_ARCH_6Z__)|| defined(__ARM_ARCH_6ZK__)	|| \
	defined(__ARM_ARCH_6T2__)
|


















>
>
>
>
|







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
/* $OpenBSD: arm_arch.h,v 1.10 2019/07/02 19:31:28 patrick Exp $ */
#ifndef __ARM_ARCH_H__
#define __ARM_ARCH_H__

#if !defined(__ARM_ARCH__)
# if defined(__CC_ARM)
#  define __ARM_ARCH__ __TARGET_ARCH_ARM
#  if defined(__BIG_ENDIAN)
#   define __ARMEB__
#  else
#   define __ARMEL__
#  endif
# elif defined(__GNUC__)
  /*
   * Why doesn't gcc define __ARM_ARCH__? Instead it defines
   * bunch of below macros. See all_architectures[] table in
   * gcc/config/arm/arm.c. On a side note it defines
   * __ARMEL__/__ARMEB__ for little-/big-endian.
   */
#  if	defined(__ARM_ARCH)
#   define __ARM_ARCH__ __ARM_ARCH
#  elif	defined(__ARM_ARCH_8A__)
#   define __ARM_ARCH__ 8
#  elif	defined(__ARM_ARCH_7__)	|| defined(__ARM_ARCH_7A__)	|| \
	defined(__ARM_ARCH_7R__)|| defined(__ARM_ARCH_7M__)	|| \
	defined(__ARM_ARCH_7EM__)
#   define __ARM_ARCH__ 7
#  elif	defined(__ARM_ARCH_6__)	|| defined(__ARM_ARCH_6J__)	|| \
	defined(__ARM_ARCH_6K__)|| defined(__ARM_ARCH_6M__)	|| \
	defined(__ARM_ARCH_6Z__)|| defined(__ARM_ARCH_6ZK__)	|| \
	defined(__ARM_ARCH_6T2__)
Changes to jni/libressl/crypto/asn1/a_enum.c.
1
2
3
4
5
6
7
8
/* $OpenBSD: a_enum.c,v 1.19 2018/04/25 11:48:21 tb Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
 * All rights reserved.
 *
 * This package is an SSL implementation written
 * by Eric Young (eay@cryptsoft.com).
 * The implementation was written so as to conform with Netscapes SSL.
 *
|







1
2
3
4
5
6
7
8
/* $OpenBSD: a_enum.c,v 1.20 2019/04/28 05:05:56 tb Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
 * All rights reserved.
 *
 * This package is an SSL implementation written
 * by Eric Young (eay@cryptsoft.com).
 * The implementation was written so as to conform with Netscapes SSL.
 *
52
53
54
55
56
57
58

59
60
61
62
63
64
65
 *
 * The licence and distribution terms for any publically available version or
 * derivative of this code cannot be changed.  i.e. this code cannot simply be
 * copied and put under another distribution licence
 * [including the GNU Public Licence.]
 */


#include <stdio.h>

#include <openssl/asn1.h>
#include <openssl/bn.h>
#include <openssl/err.h>

/*







>







52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
 *
 * The licence and distribution terms for any publically available version or
 * derivative of this code cannot be changed.  i.e. this code cannot simply be
 * copied and put under another distribution licence
 * [including the GNU Public Licence.]
 */

#include <limits.h>
#include <stdio.h>

#include <openssl/asn1.h>
#include <openssl/bn.h>
#include <openssl/err.h>

/*
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130




131
132
133
134
135
136
137
138
139
140
	return (1);
}

long
ASN1_ENUMERATED_get(const ASN1_ENUMERATED *a)
{
	int neg = 0, i;
	long r = 0;

	if (a == NULL)
		return (0L);
	i = a->type;
	if (i == V_ASN1_NEG_ENUMERATED)
		neg = 1;
	else if (i != V_ASN1_ENUMERATED)
		return -1;

	if (a->length > (int)sizeof(long)) {
		/* hmm... a bit ugly */
		return -1;
	}
	if (a->data == NULL)
		return 0;

	for (i = 0; i < a->length; i++) {
		r <<= 8;
		r |= (unsigned char)a->data[i];
	}




	if (neg)
		r = -r;
	return (r);
}

ASN1_ENUMERATED *
BN_to_ASN1_ENUMERATED(const BIGNUM *bn, ASN1_ENUMERATED *ai)
{
	ASN1_ENUMERATED *ret;
	int len, j;







|




















>
>
>
>

|
|







104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
	return (1);
}

long
ASN1_ENUMERATED_get(const ASN1_ENUMERATED *a)
{
	int neg = 0, i;
	unsigned long r = 0;

	if (a == NULL)
		return (0L);
	i = a->type;
	if (i == V_ASN1_NEG_ENUMERATED)
		neg = 1;
	else if (i != V_ASN1_ENUMERATED)
		return -1;

	if (a->length > (int)sizeof(long)) {
		/* hmm... a bit ugly */
		return -1;
	}
	if (a->data == NULL)
		return 0;

	for (i = 0; i < a->length; i++) {
		r <<= 8;
		r |= (unsigned char)a->data[i];
	}

	if (r > LONG_MAX)
		return -1;

	if (neg)
		return -(long)r;
	return (long)r;
}

ASN1_ENUMERATED *
BN_to_ASN1_ENUMERATED(const BIGNUM *bn, ASN1_ENUMERATED *ai)
{
	ASN1_ENUMERATED *ret;
	int len, j;
Changes to jni/libressl/crypto/asn1/a_int.c.
1
2
3
4
5
6
7
8
/* $OpenBSD: a_int.c,v 1.33 2019/03/26 09:15:07 jsing Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
 * All rights reserved.
 *
 * This package is an SSL implementation written
 * by Eric Young (eay@cryptsoft.com).
 * The implementation was written so as to conform with Netscapes SSL.
 *
|







1
2
3
4
5
6
7
8
/* $OpenBSD: a_int.c,v 1.34 2019/04/28 05:03:56 tb Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
 * All rights reserved.
 *
 * This package is an SSL implementation written
 * by Eric Young (eay@cryptsoft.com).
 * The implementation was written so as to conform with Netscapes SSL.
 *
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
 * ugly" is preserved for posterity, unfortunately this is probably
 * unfixable without changing public API
 */
long
ASN1_INTEGER_get(const ASN1_INTEGER *a)
{
	int neg = 0, i;
	long r = 0;

	if (a == NULL)
		return (0L);
	i = a->type;
	if (i == V_ASN1_NEG_INTEGER)
		neg = 1;
	else if (i != V_ASN1_INTEGER)







|







414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
 * ugly" is preserved for posterity, unfortunately this is probably
 * unfixable without changing public API
 */
long
ASN1_INTEGER_get(const ASN1_INTEGER *a)
{
	int neg = 0, i;
	unsigned long r = 0;

	if (a == NULL)
		return (0L);
	i = a->type;
	if (i == V_ASN1_NEG_INTEGER)
		neg = 1;
	else if (i != V_ASN1_INTEGER)
438
439
440
441
442
443
444




445
446
447
448
449
450
451
452
453
454
	if (a->data == NULL)
		return 0;

	for (i = 0; i < a->length; i++) {
		r <<= 8;
		r |= (unsigned char)a->data[i];
	}




	if (neg)
		r = -r;
	return (r);
}

ASN1_INTEGER *
BN_to_ASN1_INTEGER(const BIGNUM *bn, ASN1_INTEGER *ai)
{
	ASN1_INTEGER *ret;
	int len, j;







>
>
>
>

|
|







438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
	if (a->data == NULL)
		return 0;

	for (i = 0; i < a->length; i++) {
		r <<= 8;
		r |= (unsigned char)a->data[i];
	}

	if (r > LONG_MAX)
		return -1;

	if (neg)
		return -(long)r;
	return (long)r;
}

ASN1_INTEGER *
BN_to_ASN1_INTEGER(const BIGNUM *bn, ASN1_INTEGER *ai)
{
	ASN1_INTEGER *ret;
	int len, j;
Changes to jni/libressl/crypto/asn1/t_crl.c.
1
2
3
4
5
6
7
8
/* $OpenBSD: t_crl.c,v 1.17 2017/01/29 17:49:22 beck Exp $ */
/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
 * project 1999.
 */
/* ====================================================================
 * Copyright (c) 1999 The OpenSSL Project.  All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
|







1
2
3
4
5
6
7
8
/* $OpenBSD: t_crl.c,v 1.18 2019/05/12 15:56:31 tb Exp $ */
/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
 * project 1999.
 */
/* ====================================================================
 * Copyright (c) 1999 The OpenSSL Project.  All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
53
54
55
56
57
58
59

60
61
62
63
64
65
66
 * This product includes cryptographic software written by Eric Young
 * (eay@cryptsoft.com).  This product includes software written by Tim
 * Hudson (tjh@cryptsoft.com).
 *
 */

#include <stdio.h>


#include <openssl/bn.h>
#include <openssl/buffer.h>
#include <openssl/err.h>
#include <openssl/objects.h>
#include <openssl/x509.h>
#include <openssl/x509v3.h>







>







53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
 * This product includes cryptographic software written by Eric Young
 * (eay@cryptsoft.com).  This product includes software written by Tim
 * Hudson (tjh@cryptsoft.com).
 *
 */

#include <stdio.h>
#include <limits.h>

#include <openssl/bn.h>
#include <openssl/buffer.h>
#include <openssl/err.h>
#include <openssl/objects.h>
#include <openssl/x509.h>
#include <openssl/x509v3.h>
88
89
90
91
92
93
94


95
96
97
98
99
100
101
	X509_REVOKED *r;
	long l;
	int i;
	char *p;

	BIO_printf(out, "Certificate Revocation List (CRL):\n");
	l = X509_CRL_get_version(x);


	BIO_printf(out, "%8sVersion %lu (0x%lx)\n", "", l + 1, l);
	i = OBJ_obj2nid(x->sig_alg->algorithm);
	if (X509_signature_print(out, x->sig_alg, NULL) == 0)
		goto err;
	p = X509_NAME_oneline(X509_CRL_get_issuer(x), NULL, 0);
	if (p == NULL)
		goto err;







>
>







89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
	X509_REVOKED *r;
	long l;
	int i;
	char *p;

	BIO_printf(out, "Certificate Revocation List (CRL):\n");
	l = X509_CRL_get_version(x);
	if (l < 0 || l == LONG_MAX)
		goto err;
	BIO_printf(out, "%8sVersion %lu (0x%lx)\n", "", l + 1, l);
	i = OBJ_obj2nid(x->sig_alg->algorithm);
	if (X509_signature_print(out, x->sig_alg, NULL) == 0)
		goto err;
	p = X509_NAME_oneline(X509_CRL_get_issuer(x), NULL, 0);
	if (p == NULL)
		goto err;
Changes to jni/libressl/crypto/asn1/x_long.c.
1
2
3
4
5
6
7
8
/* $OpenBSD: x_long.c,v 1.14 2019/04/01 15:48:50 jsing Exp $ */
/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
 * project 2000.
 */
/* ====================================================================
 * Copyright (c) 2000 The OpenSSL Project.  All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
|







1
2
3
4
5
6
7
8
/* $OpenBSD: x_long.c,v 1.16 2019/04/20 11:13:15 jsing Exp $ */
/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
 * project 2000.
 */
/* ====================================================================
 * Copyright (c) 2000 The OpenSSL Project.  All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
	if (ltmp == it->size)
		return -1;
	/* Convert the long to positive: we subtract one if negative so
	 * we can cleanly handle the padding if only the MSB of the leading
	 * octet is set.
	 */
	if (ltmp < 0)
		utmp = -ltmp - 1;
	else
		utmp = ltmp;
	clen = BN_num_bits_word(utmp);
	/* If MSB of leading octet set we need to pad */
	if (!(clen & 0x7))
		pad = 1;
	else







|







138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
	if (ltmp == it->size)
		return -1;
	/* Convert the long to positive: we subtract one if negative so
	 * we can cleanly handle the padding if only the MSB of the leading
	 * octet is set.
	 */
	if (ltmp < 0)
		utmp = -(ltmp + 1);
	else
		utmp = ltmp;
	clen = BN_num_bits_word(utmp);
	/* If MSB of leading octet set we need to pad */
	if (!(clen & 0x7))
		pad = 1;
	else
191
192
193
194
195
196
197
198
199

200
201
202
203
204
205
206
		if (neg)
			utmp |= cont[i] ^ 0xff;
		else
			utmp |= cont[i];
	}
	ltmp = (long)utmp;
	if (neg) {
		ltmp++;
		ltmp = -ltmp;

	}
	if (ltmp == it->size) {
		ASN1error(ASN1_R_INTEGER_TOO_LARGE_FOR_LONG);
		return 0;
	}
	memcpy(cp, &ltmp, sizeof(long));
	return 1;







<

>







191
192
193
194
195
196
197

198
199
200
201
202
203
204
205
206
		if (neg)
			utmp |= cont[i] ^ 0xff;
		else
			utmp |= cont[i];
	}
	ltmp = (long)utmp;
	if (neg) {

		ltmp = -ltmp;
		ltmp--;
	}
	if (ltmp == it->size) {
		ASN1error(ASN1_R_INTEGER_TOO_LARGE_FOR_LONG);
		return 0;
	}
	memcpy(cp, &ltmp, sizeof(long));
	return 1;
Changes to jni/libressl/crypto/bio/b_print.c.
1
2
3
4
5
6
7
8
/* $OpenBSD: b_print.c,v 1.25 2014/06/12 15:49:28 deraadt Exp $ */

/* Theo de Raadt places this file in the public domain. */

#include <openssl/bio.h>

int
BIO_printf(BIO *bio, const char *format, ...)
|







1
2
3
4
5
6
7
8
/* $OpenBSD: b_print.c,v 1.26 2019/06/28 05:47:57 deraadt Exp $ */

/* Theo de Raadt places this file in the public domain. */

#include <openssl/bio.h>

int
BIO_printf(BIO *bio, const char *format, ...)
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
int
BIO_vprintf(BIO *bio, const char *format, va_list args)
{
	int ret;
	char *buf = NULL;

	ret = vasprintf(&buf, format, args);
	if (buf == NULL) {
		ret = -1;
		goto fail;
	}
	BIO_write(bio, buf, ret);
	free(buf);
fail:
	return (ret);
}

#endif /* HAVE_FUNOPEN */

/*
 * BIO_snprintf and BIO_vsnprintf return -1 for overflow,







|
|
<
<


<







45
46
47
48
49
50
51
52
53


54
55

56
57
58
59
60
61
62
int
BIO_vprintf(BIO *bio, const char *format, va_list args)
{
	int ret;
	char *buf = NULL;

	ret = vasprintf(&buf, format, args);
	if (ret == -1)
		return (ret);


	BIO_write(bio, buf, ret);
	free(buf);

	return (ret);
}

#endif /* HAVE_FUNOPEN */

/*
 * BIO_snprintf and BIO_vsnprintf return -1 for overflow,
Changes to jni/libressl/crypto/bio/bio_lib.c.
1
2
3
4
5
6
7
8
/* $OpenBSD: bio_lib.c,v 1.28 2018/05/01 13:29:09 tb Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
 * All rights reserved.
 *
 * This package is an SSL implementation written
 * by Eric Young (eay@cryptsoft.com).
 * The implementation was written so as to conform with Netscapes SSL.
 *
|







1
2
3
4
5
6
7
8
/* $OpenBSD: bio_lib.c,v 1.29 2019/04/14 17:39:03 jsing Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
 * All rights reserved.
 *
 * This package is an SSL implementation written
 * by Eric Young (eay@cryptsoft.com).
 * The implementation was written so as to conform with Netscapes SSL.
 *
246
247
248
249
250
251
252


253




254
255
256
257
258
259
260

int
BIO_read(BIO *b, void *out, int outl)
{
	int i;
	long (*cb)(BIO *, int, const char *, int, long, long);



	if ((b == NULL) || (b->method == NULL) || (b->method->bread == NULL)) {




		BIOerror(BIO_R_UNSUPPORTED_METHOD);
		return (-2);
	}

	cb = b->callback;
	if ((cb != NULL) &&
	    ((i = (int)cb(b, BIO_CB_READ, out, outl, 0L, 1L)) <= 0))







>
>
|
>
>
>
>







246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266

int
BIO_read(BIO *b, void *out, int outl)
{
	int i;
	long (*cb)(BIO *, int, const char *, int, long, long);

	if (b == NULL)
		return (0);

	if (out == NULL || outl <= 0)
		return (0);

	if (b->method == NULL || b->method->bread == NULL) {
		BIOerror(BIO_R_UNSUPPORTED_METHOD);
		return (-2);
	}

	cb = b->callback;
	if ((cb != NULL) &&
	    ((i = (int)cb(b, BIO_CB_READ, out, outl, 0L, 1L)) <= 0))
269
270
271
272
273
274
275

276
277
278
279
280
281
282
283
284
285
286
287


288
289
290
291
292
293

294
295
296
297
298
299
300

	if (i > 0)
		b->num_read += (unsigned long)i;

	if (cb != NULL)
		i = (int)cb(b, BIO_CB_READ|BIO_CB_RETURN, out, outl,
		    0L, (long)i);

	return (i);
}

int
BIO_write(BIO *b, const void *in, int inl)
{
	int i;
	long (*cb)(BIO *, int, const char *, int, long, long);

	if (b == NULL)
		return (0);



	cb = b->callback;
	if ((b->method == NULL) || (b->method->bwrite == NULL)) {
		BIOerror(BIO_R_UNSUPPORTED_METHOD);
		return (-2);
	}


	if ((cb != NULL) &&
	    ((i = (int)cb(b, BIO_CB_WRITE, in, inl, 0L, 1L)) <= 0))
		return (i);

	if (!b->init) {
		BIOerror(BIO_R_UNINITIALIZED);
		return (-2);







>












>
>
|
|




>







275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310

	if (i > 0)
		b->num_read += (unsigned long)i;

	if (cb != NULL)
		i = (int)cb(b, BIO_CB_READ|BIO_CB_RETURN, out, outl,
		    0L, (long)i);

	return (i);
}

int
BIO_write(BIO *b, const void *in, int inl)
{
	int i;
	long (*cb)(BIO *, int, const char *, int, long, long);

	if (b == NULL)
		return (0);

	if (in == NULL || inl <= 0)
		return (0);

	if (b->method == NULL || b->method->bwrite == NULL) {
		BIOerror(BIO_R_UNSUPPORTED_METHOD);
		return (-2);
	}

	cb = b->callback;
	if ((cb != NULL) &&
	    ((i = (int)cb(b, BIO_CB_WRITE, in, inl, 0L, 1L)) <= 0))
		return (i);

	if (!b->init) {
		BIOerror(BIO_R_UNINITIALIZED);
		return (-2);
Changes to jni/libressl/crypto/bn/bn_ctx.c.
1
2
3
4
5
6
7
8
/* $OpenBSD: bn_ctx.c,v 1.15 2017/01/29 17:49:22 beck Exp $ */
/* Written by Ulf Moeller for the OpenSSL project. */
/* ====================================================================
 * Copyright (c) 1998-2004 The OpenSSL Project.  All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
|







1
2
3
4
5
6
7
8
/* $OpenBSD: bn_ctx.c,v 1.16 2019/08/20 10:59:09 schwarze Exp $ */
/* Written by Ulf Moeller for the OpenSSL project. */
/* ====================================================================
 * Copyright (c) 1998-2004 The OpenSSL Project.  All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
279
280
281
282
283
284
285



286
287
288
289
290
291
292
	}
	CTXDBG_EXIT(ctx);
}

void
BN_CTX_end(BN_CTX *ctx)
{



	CTXDBG_ENTRY("BN_CTX_end", ctx);

	if (ctx->err_stack)
		ctx->err_stack--;
	else {
		unsigned int fp = BN_STACK_pop(&ctx->stack);
		/* Does this stack frame have anything to release? */







>
>
>







279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
	}
	CTXDBG_EXIT(ctx);
}

void
BN_CTX_end(BN_CTX *ctx)
{
	if (ctx == NULL)
		return;

	CTXDBG_ENTRY("BN_CTX_end", ctx);

	if (ctx->err_stack)
		ctx->err_stack--;
	else {
		unsigned int fp = BN_STACK_pop(&ctx->stack);
		/* Does this stack frame have anything to release? */
Changes to jni/libressl/crypto/bn/bn_lib.c.
1
2
3
4
5
6
7
8
/* $OpenBSD: bn_lib.c,v 1.46 2019/03/23 18:48:15 beck Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
 * All rights reserved.
 *
 * This package is an SSL implementation written
 * by Eric Young (eay@cryptsoft.com).
 * The implementation was written so as to conform with Netscapes SSL.
 *
|







1
2
3
4
5
6
7
8
/* $OpenBSD: bn_lib.c,v 1.47 2019/06/17 17:11:48 tb Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
 * All rights reserved.
 *
 * This package is an SSL implementation written
 * by Eric Young (eay@cryptsoft.com).
 * The implementation was written so as to conform with Netscapes SSL.
 *
147
148
149
150
151
152
153


154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173

174
175
176
177

178
179
180
181


182


183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207

	return (&const_one);
}

int
BN_num_bits_word(BN_ULONG l)
{


	static const unsigned char bits[256] = {
		0, 1, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4,
		5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
		6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
		6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
		7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
		7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
		7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
		7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
		8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,  8, 8, 8, 8,
		8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
		8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
		8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
		8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
		8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
		8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
		8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
	};

#ifdef _LP64

	if (l & 0xffffffff00000000L) {
		if (l & 0xffff000000000000L) {
			if (l & 0xff00000000000000L) {
				return (bits[(int)(l >> 56)] + 56);

			} else
				return (bits[(int)(l >> 48)] + 48);
		} else {
			if (l & 0x0000ff0000000000L) {


				return (bits[(int)(l >> 40)] + 40);


			} else
				return (bits[(int)(l >> 32)] + 32);
		}
	} else
#endif
	{
		if (l & 0xffff0000L) {
			if (l & 0xff000000L)
				return (bits[(int)(l >> 24L)] + 24);
			else
				return (bits[(int)(l >> 16L)] + 16);
		} else {
			if (l & 0xff00L)
				return (bits[(int)(l >> 8)] + 8);
			else
				return (bits[(int)(l)]);
		}
	}
}

int
BN_num_bits(const BIGNUM *a)
{
	int i = a->top - 1;








>
>
|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<

<
>
|
<
<
<
>
|
|
<
<
>
>
|
>
>
|
<
|
<
<
<
<
<
<
<
<
<
<
<
<
|
<
<







147
148
149
150
151
152
153
154
155
156

















157

158
159



160
161
162


163
164
165
166
167
168

169












170


171
172
173
174
175
176
177

	return (&const_one);
}

int
BN_num_bits_word(BN_ULONG l)
{
	BN_ULONG x, mask;
	int bits;
	unsigned int shift;



















	/* Constant time calculation of floor(log2(l)) + 1. */
	bits = (l != 0);



	shift = BN_BITS4;	/* On _LP64 this is 32, otherwise 16. */
	do {
		x = l >> shift;


		/* If x is 0, set mask to 0, otherwise set it to all 1s. */
		mask = ((~x & (x - 1)) >> (BN_BITS2 - 1)) - 1;
		bits += shift & mask;
		/* If x is 0, leave l alone, otherwise set l = x. */
		l ^= (x ^ l) & mask;
	} while ((shift /= 2) != 0);














	return bits;


}

int
BN_num_bits(const BIGNUM *a)
{
	int i = a->top - 1;

Changes to jni/libressl/crypto/bn/gf2m-masm-x86_64.S.







1




2
























































3
4
5
6
7
8
9







OPTION	DOTNAME




#include "x86_arch.h"
























































.text$	SEGMENT ALIGN(64) 'CODE'


ALIGN	16
_mul_1x1	PROC PRIVATE
	sub	rsp,128+8
	mov	r9,-1
>
>
>
>
>
>
>

>
>
>
>
|
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
; 1 "crypto/bn/gf2m-masm-x86_64.S.tmp"
; 1 "<built-in>" 1
; 1 "<built-in>" 3
; 349 "<built-in>" 3
; 1 "<command line>" 1
; 1 "<built-in>" 2
; 1 "crypto/bn/gf2m-masm-x86_64.S.tmp" 2
OPTION	DOTNAME

; 1 "./crypto/x86_arch.h" 1


; 16 "./crypto/x86_arch.h"









; 40 "./crypto/x86_arch.h"













































; 3 "crypto/bn/gf2m-masm-x86_64.S.tmp" 2
.text$	SEGMENT ALIGN(64) 'CODE'


ALIGN	16
_mul_1x1	PROC PRIVATE
	sub	rsp,128+8
	mov	r9,-1
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
EXTERN	OPENSSL_ia32cap_P:NEAR

PUBLIC	bn_GF2m_mul_2x2

ALIGN	16
bn_GF2m_mul_2x2	PROC PUBLIC
	mov	eax,DWORD PTR[((OPENSSL_ia32cap_P+4))]
	bt	eax,IA32CAP_BIT1_PCLMUL
	jnc	$L$vanilla_mul_2x2

	movd	xmm0,rdx
	movd	xmm1,r9
	movd	xmm2,r8
	movq	xmm3,QWORD PTR[40+rsp]
	movdqa	xmm4,xmm0







|







268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
EXTERN	OPENSSL_ia32cap_P:NEAR

PUBLIC	bn_GF2m_mul_2x2

ALIGN	16
bn_GF2m_mul_2x2	PROC PUBLIC
	mov	eax,DWORD PTR[((OPENSSL_ia32cap_P+4))]
	bt	eax,1
	jnc	$L$vanilla_mul_2x2

	movd	xmm0,rdx
	movd	xmm1,r9
	movd	xmm2,r8
	movq	xmm3,QWORD PTR[40+rsp]
	movdqa	xmm4,xmm0
395
396
397
398
399
400
401

DB	007h,001h,011h,000h	
$L$SEH_info_2x2::
DB	9,0,0,0
	DD	imagerel se_handler

.xdata	ENDS
END








>
462
463
464
465
466
467
468
469
DB	007h,001h,011h,000h	
$L$SEH_info_2x2::
DB	9,0,0,0
	DD	imagerel se_handler

.xdata	ENDS
END

Changes to jni/libressl/crypto/bn/modexp512-masm-x86_64.S.







1




2
























































3
4
5
6
7
8
9







OPTION	DOTNAME




#include "x86_arch.h"
























































.text$	SEGMENT ALIGN(64) 'CODE'


ALIGN	16
MULADD_128x512	PROC PRIVATE
	mov	rax,QWORD PTR[rsi]
	mul	rbp
>
>
>
>
>
>
>

>
>
>
>
|
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
; 1 "crypto/bn/modexp512-masm-x86_64.S.tmp"
; 1 "<built-in>" 1
; 1 "<built-in>" 3
; 349 "<built-in>" 3
; 1 "<command line>" 1
; 1 "<built-in>" 2
; 1 "crypto/bn/modexp512-masm-x86_64.S.tmp" 2
OPTION	DOTNAME

; 1 "./crypto/x86_arch.h" 1


; 16 "./crypto/x86_arch.h"









; 40 "./crypto/x86_arch.h"













































; 3 "crypto/bn/modexp512-masm-x86_64.S.tmp" 2
.text$	SEGMENT ALIGN(64) 'CODE'


ALIGN	16
MULADD_128x512	PROC PRIVATE
	mov	rax,QWORD PTR[rsi]
	mul	rbp
1785
1786
1787
1788
1789
1790
1791

	mov	rsi,QWORD PTR[16+rsp]
	DB	0F3h,0C3h		;repret
$L$SEH_end_mod_exp_512::
mod_exp_512	ENDP

.text$	ENDS
END








>
1852
1853
1854
1855
1856
1857
1858
1859
	mov	rsi,QWORD PTR[16+rsp]
	DB	0F3h,0C3h		;repret
$L$SEH_end_mod_exp_512::
mod_exp_512	ENDP

.text$	ENDS
END

Changes to jni/libressl/crypto/bn/mont-masm-x86_64.S.







1




2
























































3
4
5
6
7
8
9







OPTION	DOTNAME




#include "x86_arch.h"
























































.text$	SEGMENT ALIGN(64) 'CODE'

PUBLIC	bn_mul_mont

ALIGN	16
bn_mul_mont	PROC PUBLIC
	mov	QWORD PTR[8+rsp],rdi	;WIN64 prologue
>
>
>
>
>
>
>

>
>
>
>
|
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
; 1 "crypto/bn/mont-masm-x86_64.S.tmp"
; 1 "<built-in>" 1
; 1 "<built-in>" 3
; 349 "<built-in>" 3
; 1 "<command line>" 1
; 1 "<built-in>" 2
; 1 "crypto/bn/mont-masm-x86_64.S.tmp" 2
OPTION	DOTNAME

; 1 "./crypto/x86_arch.h" 1


; 16 "./crypto/x86_arch.h"









; 40 "./crypto/x86_arch.h"













































; 3 "crypto/bn/mont-masm-x86_64.S.tmp" 2
.text$	SEGMENT ALIGN(64) 'CODE'

PUBLIC	bn_mul_mont

ALIGN	16
bn_mul_mont	PROC PUBLIC
	mov	QWORD PTR[8+rsp],rdi	;WIN64 prologue
1422
1423
1424
1425
1426
1427
1428

DB	54,95,54,52,44,32,67,82,89,80,84,79,71,65,77,83
DB	32,98,121,32,60,97,112,112,114,111,64,111,112,101,110,115
DB	115,108,46,111,114,103,62,0
ALIGN	16

.text$	ENDS
END








>
1489
1490
1491
1492
1493
1494
1495
1496
DB	54,95,54,52,44,32,67,82,89,80,84,79,71,65,77,83
DB	32,98,121,32,60,97,112,112,114,111,64,111,112,101,110,115
DB	115,108,46,111,114,103,62,0
ALIGN	16

.text$	ENDS
END

Changes to jni/libressl/crypto/bn/mont5-masm-x86_64.S.







1




2
























































3
4
5
6
7
8
9







OPTION	DOTNAME




#include "x86_arch.h"
























































.text$	SEGMENT ALIGN(64) 'CODE'

PUBLIC	bn_mul_mont_gather5

ALIGN	64
bn_mul_mont_gather5	PROC PUBLIC
	mov	QWORD PTR[8+rsp],rdi	;WIN64 prologue
>
>
>
>
>
>
>

>
>
>
>
|
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
; 1 "crypto/bn/mont5-masm-x86_64.S.tmp"
; 1 "<built-in>" 1
; 1 "<built-in>" 3
; 349 "<built-in>" 3
; 1 "<command line>" 1
; 1 "<built-in>" 2
; 1 "crypto/bn/mont5-masm-x86_64.S.tmp" 2
OPTION	DOTNAME

; 1 "./crypto/x86_arch.h" 1


; 16 "./crypto/x86_arch.h"









; 40 "./crypto/x86_arch.h"













































; 3 "crypto/bn/mont5-masm-x86_64.S.tmp" 2
.text$	SEGMENT ALIGN(64) 'CODE'

PUBLIC	bn_mul_mont_gather5

ALIGN	64
bn_mul_mont_gather5	PROC PUBLIC
	mov	QWORD PTR[8+rsp],rdi	;WIN64 prologue
1338
1339
1340
1341
1342
1343
1344

DB	001h,00bh,003h,00ah
DB	00bh,001h,021h,000h	
DB	004h,0a3h,000h,000h	
ALIGN	8

.xdata	ENDS
END








>
1405
1406
1407
1408
1409
1410
1411
1412
DB	001h,00bh,003h,00ah
DB	00bh,001h,021h,000h	
DB	004h,0a3h,000h,000h	
ALIGN	8

.xdata	ENDS
END

Changes to jni/libressl/crypto/camellia/cmll-masm-x86_64.S.







1




2
























































3
4
5
6
7
8
9







OPTION	DOTNAME




#include "x86_arch.h"
























































.text$	SEGMENT ALIGN(64) 'CODE'


PUBLIC	Camellia_EncryptBlock

ALIGN	16
Camellia_EncryptBlock	PROC PUBLIC
>
>
>
>
>
>
>

>
>
>
>
|
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
; 1 "crypto/camellia/cmll-masm-x86_64.S.tmp"
; 1 "<built-in>" 1
; 1 "<built-in>" 3
; 349 "<built-in>" 3
; 1 "<command line>" 1
; 1 "<built-in>" 2
; 1 "crypto/camellia/cmll-masm-x86_64.S.tmp" 2
OPTION	DOTNAME

; 1 "./crypto/x86_arch.h" 1


; 16 "./crypto/x86_arch.h"









; 40 "./crypto/x86_arch.h"













































; 3 "crypto/camellia/cmll-masm-x86_64.S.tmp" 2
.text$	SEGMENT ALIGN(64) 'CODE'


PUBLIC	Camellia_EncryptBlock

ALIGN	16
Camellia_EncryptBlock	PROC PUBLIC
1892
1893
1894
1895
1896
1897
1898


DB	67,97,109,101,108,108,105,97,32,102,111,114,32,120,56,54
DB	95,54,52,32,98,121,32,60,97,112,112,114,111,64,111,112
DB	101,110,115,115,108,46,111,114,103,62,0

.text$	ENDS
END








>
1959
1960
1961
1962
1963
1964
1965
1966

DB	67,97,109,101,108,108,105,97,32,102,111,114,32,120,56,54
DB	95,54,52,32,98,121,32,60,97,112,112,114,111,64,111,112
DB	101,110,115,115,108,46,111,114,103,62,0

.text$	ENDS
END

Changes to jni/libressl/crypto/compat/arc4random_linux.h.
1
2
3
4
5
6
7
8
/*	$OpenBSD: arc4random_linux.h,v 1.11 2016/06/30 12:19:51 bcook Exp $	*/

/*
 * Copyright (c) 1996, David Mazieres <dm@uun.org>
 * Copyright (c) 2008, Damien Miller <djm@openbsd.org>
 * Copyright (c) 2013, Markus Friedl <markus@openbsd.org>
 * Copyright (c) 2014, Theo de Raadt <deraadt@openbsd.org>
 *
|







1
2
3
4
5
6
7
8
/*	$OpenBSD: arc4random_linux.h,v 1.12 2019/07/11 10:37:28 inoguchi Exp $	*/

/*
 * Copyright (c) 1996, David Mazieres <dm@uun.org>
 * Copyright (c) 2008, Damien Miller <djm@openbsd.org>
 * Copyright (c) 2013, Markus Friedl <markus@openbsd.org>
 * Copyright (c) 2014, Theo de Raadt <deraadt@openbsd.org>
 *
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#include <pthread.h>
#include <signal.h>

static pthread_mutex_t arc4random_mtx = PTHREAD_MUTEX_INITIALIZER;
#define _ARC4_LOCK()   pthread_mutex_lock(&arc4random_mtx)
#define _ARC4_UNLOCK() pthread_mutex_unlock(&arc4random_mtx)

#ifdef __GLIBC__
extern void *__dso_handle;
extern int __register_atfork(void (*)(void), void(*)(void), void (*)(void), void *);
#define _ARC4_ATFORK(f) __register_atfork(NULL, NULL, (f), __dso_handle)
#else
#define _ARC4_ATFORK(f) pthread_atfork(NULL, NULL, (f))
#endif








|







28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#include <pthread.h>
#include <signal.h>

static pthread_mutex_t arc4random_mtx = PTHREAD_MUTEX_INITIALIZER;
#define _ARC4_LOCK()   pthread_mutex_lock(&arc4random_mtx)
#define _ARC4_UNLOCK() pthread_mutex_unlock(&arc4random_mtx)

#if defined(__GLIBC__) && !(defined(__UCLIBC__) && !defined(__ARCH_USE_MMU__))
extern void *__dso_handle;
extern int __register_atfork(void (*)(void), void(*)(void), void (*)(void), void *);
#define _ARC4_ATFORK(f) __register_atfork(NULL, NULL, (f), __dso_handle)
#else
#define _ARC4_ATFORK(f) pthread_atfork(NULL, NULL, (f))
#endif

Changes to jni/libressl/crypto/compat/getprogname_linux.c.
1
2
3
4
5
6
7

8
9
10

11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#include <stdlib.h>

#include <errno.h>

const char *
getprogname(void)
{

	/*
	 * Android added getprogname with API 21 [0]. We should not end up here
	 * with APIs bigger than 21. Still write a precise check.

	 *
	 * Since Android is using portions of OpenBSD libc, it should have
	 * a symbol called __progname [1].
	 *
	 * Regarding program_invocation_short_name, it is a GNU libc ext [2] and
	 * so make it conditional to __GLIBC__ [3].
	 *
	 * .. [0] https://github.com/aosp-mirror/platform_bionic/blob/1eb6d3/libc/include/stdlib.h#L160
	 *
	 * .. [1] https://github.com/aosp-mirror/platform_bionic/commit/692207
	 *
	 * .. [2] https://linux.die.net/man/3/program_invocation_short_name
	 *
	 * .. [3] https://android.googlesource.com/platform/system/core/+/2819c0/base/logging.cpp#65
	 */
#if defined(__ANDROID_API__) && __ANDROID_API__ < 21
	extern const char *__progname;
	return __progname;
#else
	return program_invocation_short_name;
#endif
}







>

|
|
>


|
<
<
<
<
<
<
|
<
<
<
<

<






1
2
3
4
5
6
7
8
9
10
11
12
13
14
15






16




17

18
19
20
21
22
23
#include <stdlib.h>

#include <errno.h>

const char *
getprogname(void)
{
#if defined(__ANDROID_API__) && __ANDROID_API__ < 21
	/*
	 * Android added getprogname with API 21, so we should not end up here
	 * with APIs newer than 21.
	 * https://github.com/aosp-mirror/platform_bionic/blob/1eb6d3/libc/include/stdlib.h#L160
	 *
	 * Since Android is using portions of OpenBSD libc, it should have
	 * a symbol called __progname.






	 * https://github.com/aosp-mirror/platform_bionic/commit/692207




	 */

	extern const char *__progname;
	return __progname;
#else
	return program_invocation_short_name;
#endif
}
Changes to jni/libressl/crypto/compat/posix_win.c.
158
159
160
161
162
163
164
165

166
167
168
169
170
171
172
173
174
175
176
177

178
179
180
181
182
183
184
185
186
187
188
189

190
191
192
193
194
195
196
}

int
posix_close(int fd)
{
	if (closesocket(fd) == SOCKET_ERROR) {
		int err = WSAGetLastError();
		return (err == WSAENOTSOCK || err == WSAEBADF) ?

			close(fd) : wsa_errno(err);
	}
	return 0;
}

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) ?

			read(fd, buf, count) : wsa_errno(err);
	}
	return rc;
}

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) ?

			write(fd, buf, count) : wsa_errno(err);
	}
	return rc;
}

int
posix_getsockopt(int sockfd, int level, int optname,







|
>











|
>











|
>







158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
}

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);
	}
	return 0;
}

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);
	}
	return rc;
}

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);
	}
	return rc;
}

int
posix_getsockopt(int sockfd, int level, int optname,
Changes to jni/libressl/crypto/cpuid-masm-x86_64.S.







1




2
























































3
4
5
6
7
8
9







OPTION	DOTNAME




#include "x86_arch.h"
























































EXTERN	OPENSSL_cpuid_setup:NEAR

.CRT$XCU	SEGMENT READONLY ALIGN(8)
		DQ	OPENSSL_cpuid_setup

EXTERN	OPENSSL_ia32cap_P:NEAR

>
>
>
>
>
>
>

>
>
>
>
|
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
; 1 "crypto/cpuid-masm-x86_64.S.tmp"
; 1 "<built-in>" 1
; 1 "<built-in>" 3
; 349 "<built-in>" 3
; 1 "<command line>" 1
; 1 "<built-in>" 2
; 1 "crypto/cpuid-masm-x86_64.S.tmp" 2
OPTION	DOTNAME

; 1 "./crypto/x86_arch.h" 1


; 16 "./crypto/x86_arch.h"









; 40 "./crypto/x86_arch.h"













































; 3 "crypto/cpuid-masm-x86_64.S.tmp" 2
EXTERN	OPENSSL_cpuid_setup:NEAR

.CRT$XCU	SEGMENT READONLY ALIGN(8)
		DQ	OPENSSL_cpuid_setup

EXTERN	OPENSSL_ia32cap_P:NEAR

62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
	mov	eax,080000000h
	cpuid
	cmp	eax,080000001h
	jb	$L$intel
	mov	r10d,eax
	mov	eax,080000001h
	cpuid
	and	r9d,IA32CAP_MASK1_AMD_XOP
	or	r9d,1

	cmp	r10d,080000008h
	jb	$L$intel

	mov	eax,080000008h
	cpuid
	movzx	r10,cl
	inc	r10

	mov	eax,1
	cpuid
	bt	edx,IA32CAP_BIT0_HT
	jnc	$L$generic
	shr	ebx,16
	cmp	bl,r10b
	ja	$L$generic
	xor	edx,IA32CAP_MASK0_HT
	jmp	$L$generic

$L$intel::
	cmp	r11d,4
	mov	r10d,-1
	jb	$L$nocacheinfo

	mov	eax,4
	mov	ecx,0
	cpuid
	mov	r10d,eax
	shr	r10d,14
	and	r10d,0fffh

$L$nocacheinfo::
	mov	eax,1
	cpuid

	and	edx,(~(IA32CAP_MASK0_INTELP4 | IA32CAP_MASK0_INTEL))
	cmp	r9d,0
	jne	$L$notintel

	or	edx,IA32CAP_MASK0_INTEL
	and	ah,15
	cmp	ah,15
	jne	$L$notintel

	or	edx,IA32CAP_MASK0_INTELP4
$L$notintel::
	bt	edx,IA32CAP_BIT0_HT
	jnc	$L$generic
	xor	edx,IA32CAP_MASK0_HT
	cmp	r10d,0
	je	$L$generic

	or	edx,IA32CAP_MASK0_HT
	shr	ebx,16
	cmp	bl,1
	ja	$L$generic
	xor	edx,IA32CAP_MASK0_HT

$L$generic::
	and	r9d,IA32CAP_MASK1_AMD_XOP
	and	ecx,(~IA32CAP_MASK1_AMD_XOP)
	or	r9d,ecx

	mov	r10d,edx
	bt	r9d,IA32CAP_BIT1_OSXSAVE
	jnc	$L$clear_avx
	xor	ecx,ecx
DB	00fh,001h,0d0h		
	and	eax,6
	cmp	eax,6
	je	$L$done
$L$clear_avx::
	mov	eax,(~(IA32CAP_MASK1_AVX | IA32CAP_MASK1_FMA3 | IA32CAP_MASK1_AMD_XOP))
	and	r9d,eax
$L$done::
	shl	r9,32
	mov	eax,r10d
	mov	rbx,r8
	or	rax,r9
	DB	0F3h,0C3h		;repret







|












|




|


















|



|




|

|

|



|



|


|
|



|







|







129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
	mov	eax,080000000h
	cpuid
	cmp	eax,080000001h
	jb	$L$intel
	mov	r10d,eax
	mov	eax,080000001h
	cpuid
	and	r9d,(1 SHL 11)
	or	r9d,1

	cmp	r10d,080000008h
	jb	$L$intel

	mov	eax,080000008h
	cpuid
	movzx	r10,cl
	inc	r10

	mov	eax,1
	cpuid
	bt	edx,28
	jnc	$L$generic
	shr	ebx,16
	cmp	bl,r10b
	ja	$L$generic
	xor	edx,(1 SHL 28)
	jmp	$L$generic

$L$intel::
	cmp	r11d,4
	mov	r10d,-1
	jb	$L$nocacheinfo

	mov	eax,4
	mov	ecx,0
	cpuid
	mov	r10d,eax
	shr	r10d,14
	and	r10d,0fffh

$L$nocacheinfo::
	mov	eax,1
	cpuid

	and	edx,(NOT((1 SHL 20) OR (1 SHL 30)))
	cmp	r9d,0
	jne	$L$notintel

	or	edx,(1 SHL 30)
	and	ah,15
	cmp	ah,15
	jne	$L$notintel

	or	edx,(1 SHL 20)
$L$notintel::
	bt	edx,28
	jnc	$L$generic
	xor	edx,(1 SHL 28)
	cmp	r10d,0
	je	$L$generic

	or	edx,(1 SHL 28)
	shr	ebx,16
	cmp	bl,1
	ja	$L$generic
	xor	edx,(1 SHL 28)

$L$generic::
	and	r9d,(1 SHL 11)
	and	ecx,(NOT(1 SHL 11))
	or	r9d,ecx

	mov	r10d,edx
	bt	r9d,27
	jnc	$L$clear_avx
	xor	ecx,ecx
DB	00fh,001h,0d0h		
	and	eax,6
	cmp	eax,6
	je	$L$done
$L$clear_avx::
	mov	eax,(NOT((1 SHL 28) OR (1 SHL 12) OR (1 SHL 11)))
	and	r9d,eax
$L$done::
	shl	r9,32
	mov	eax,r10d
	mov	rbx,r8
	or	rax,r9
	DB	0F3h,0C3h		;repret
179
180
181
182
183
184
185

	xor	r11,r11
	lea	rax,QWORD PTR[8+rsp]
	DB	0F3h,0C3h		;repret
OPENSSL_wipe_cpu	ENDP

.text$	ENDS
END








>
246
247
248
249
250
251
252
253
	xor	r11,r11
	lea	rax,QWORD PTR[8+rsp]
	DB	0F3h,0C3h		;repret
OPENSSL_wipe_cpu	ENDP

.text$	ENDS
END

Changes to jni/libressl/crypto/crypto.sym.
2308
2309
2310
2311
2312
2313
2314



2315










2316

2317

2318




2319
2320




2321
2322
2323
2324
2325
2326
2327
RSA_get0_key
RSA_get_default_method
RSA_get_ex_data
RSA_get_ex_new_index
RSA_get_method
RSA_meth_dup
RSA_meth_free



RSA_meth_get_finish










RSA_meth_new

RSA_meth_set1_name

RSA_meth_set_finish




RSA_meth_set_priv_dec
RSA_meth_set_priv_enc




RSA_new
RSA_new_method
RSA_padding_add_PKCS1_OAEP
RSA_padding_add_PKCS1_PSS
RSA_padding_add_PKCS1_PSS_mgf1
RSA_padding_add_PKCS1_type_1
RSA_padding_add_PKCS1_type_2







>
>
>

>
>
>
>
>
>
>
>
>
>

>

>

>
>
>
>


>
>
>
>







2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
RSA_get0_key
RSA_get_default_method
RSA_get_ex_data
RSA_get_ex_new_index
RSA_get_method
RSA_meth_dup
RSA_meth_free
RSA_meth_get0_app_data
RSA_meth_get0_name
RSA_meth_get_bn_mod_exp
RSA_meth_get_finish
RSA_meth_get_flags
RSA_meth_get_init
RSA_meth_get_keygen
RSA_meth_get_mod_exp
RSA_meth_get_priv_dec
RSA_meth_get_priv_enc
RSA_meth_get_pub_dec
RSA_meth_get_pub_enc
RSA_meth_get_sign
RSA_meth_get_verify
RSA_meth_new
RSA_meth_set0_app_data
RSA_meth_set1_name
RSA_meth_set_bn_mod_exp
RSA_meth_set_finish
RSA_meth_set_flags
RSA_meth_set_init
RSA_meth_set_keygen
RSA_meth_set_mod_exp
RSA_meth_set_priv_dec
RSA_meth_set_priv_enc
RSA_meth_set_pub_dec
RSA_meth_set_pub_enc
RSA_meth_set_sign
RSA_meth_set_verify
RSA_new
RSA_new_method
RSA_padding_add_PKCS1_OAEP
RSA_padding_add_PKCS1_PSS
RSA_padding_add_PKCS1_PSS_mgf1
RSA_padding_add_PKCS1_type_1
RSA_padding_add_PKCS1_type_2
Changes to jni/libressl/crypto/curve25519/curve25519-generic.c.

1
2
3
4
5
6
7

/*
 * Copyright (c) 2015, Google Inc.
 *
 * Permission to use, copy, modify, and/or distribute this software for any
 * purpose with or without fee is hereby granted, provided that the above
 * copyright notice and this permission notice appear in all copies.
 *
>







1
2
3
4
5
6
7
8
/*	$OpenBSD: curve25519-generic.c,v 1.2 2019/05/11 15:55:52 tb Exp $ */
/*
 * Copyright (c) 2015, Google Inc.
 *
 * Permission to use, copy, modify, and/or distribute this software for any
 * purpose with or without fee is hereby granted, provided that the above
 * copyright notice and this permission notice appear in all copies.
 *
Changes to jni/libressl/crypto/curve25519/curve25519.c.

1
2
3
4
5
6
7

/*
 * Copyright (c) 2015, Google Inc.
 *
 * Permission to use, copy, modify, and/or distribute this software for any
 * purpose with or without fee is hereby granted, provided that the above
 * copyright notice and this permission notice appear in all copies.
 *
>







1
2
3
4
5
6
7
8
/*	$OpenBSD: curve25519.c,v 1.5 2019/05/11 15:55:52 tb Exp $ */
/*
 * Copyright (c) 2015, Google Inc.
 *
 * Permission to use, copy, modify, and/or distribute this software for any
 * purpose with or without fee is hereby granted, provided that the above
 * copyright notice and this permission notice appear in all copies.
 *
Changes to jni/libressl/crypto/curve25519/curve25519_internal.h.

1
2
3
4
5
6
7

/*
 * Copyright (c) 2015, Google Inc.
 *
 * Permission to use, copy, modify, and/or distribute this software for any
 * purpose with or without fee is hereby granted, provided that the above
 * copyright notice and this permission notice appear in all copies.
 *
>







1
2
3
4
5
6
7
8
/*	$OpenBSD: curve25519_internal.h,v 1.3 2019/05/11 15:55:52 tb Exp $ */
/*
 * Copyright (c) 2015, Google Inc.
 *
 * Permission to use, copy, modify, and/or distribute this software for any
 * purpose with or without fee is hereby granted, provided that the above
 * copyright notice and this permission notice appear in all copies.
 *
Changes to jni/libressl/crypto/dsa/dsa_ossl.c.
1
2
3
4
5
6
7
8
/* $OpenBSD: dsa_ossl.c,v 1.40 2018/11/06 07:02:33 tb Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
 * All rights reserved.
 *
 * This package is an SSL implementation written
 * by Eric Young (eay@cryptsoft.com).
 * The implementation was written so as to conform with Netscapes SSL.
 * 
|







1
2
3
4
5
6
7
8
/* $OpenBSD: dsa_ossl.c,v 1.42 2019/06/04 18:12:26 tb Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
 * All rights reserved.
 *
 * This package is an SSL implementation written
 * by Eric Young (eay@cryptsoft.com).
 * The implementation was written so as to conform with Netscapes SSL.
 * 
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
	 * Compute:
	 *
	 *  s = inv(k)(m + xr) mod q
	 *
	 * In order to reduce the possibility of a side-channel attack, the
	 * following is calculated using a blinding value:
	 *
	 *  s = inv(k)inv(b)(bm + bxr) mod q
	 *
	 * Where b is a random value in the range [1, q).
	 */
	if (!bn_rand_interval(&b, BN_value_one(), dsa->q))
		goto err;
	if (BN_mod_inverse_ct(&binv, &b, dsa->q, ctx) == NULL)
		goto err;

	if (!BN_mod_mul(&bxr, &b, dsa->priv_key, dsa->q, ctx))	/* bx */
		goto err;
	if (!BN_mod_mul(&bxr, &bxr, r, dsa->q, ctx))		/* bxr */
		goto err;
	if (!BN_mod_mul(&bm, &b, &m, dsa->q, ctx))		/* bm */
		goto err;
	if (!BN_mod_add(s, &bxr, &bm, dsa->q, ctx))		/* s = bm + bxr */
		goto err;
	if (!BN_mod_mul(s, s, &binv, dsa->q, ctx))		/* s = m + xr */
		goto err;
	if (!BN_mod_mul(s, s, kinv, dsa->q, ctx))
		goto err;

	/*
	 * Redo if r or s is zero as required by FIPS 186-3: this is very
	 * unlikely.
	 */
	if (BN_is_zero(r) || BN_is_zero(s)) {







|










|

|

|

|

|







144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
	 * Compute:
	 *
	 *  s = inv(k)(m + xr) mod q
	 *
	 * In order to reduce the possibility of a side-channel attack, the
	 * following is calculated using a blinding value:
	 *
	 *  s = inv(b)(bm + bxr)inv(k) mod q
	 *
	 * Where b is a random value in the range [1, q).
	 */
	if (!bn_rand_interval(&b, BN_value_one(), dsa->q))
		goto err;
	if (BN_mod_inverse_ct(&binv, &b, dsa->q, ctx) == NULL)
		goto err;

	if (!BN_mod_mul(&bxr, &b, dsa->priv_key, dsa->q, ctx))	/* bx */
		goto err;
	if (!BN_mod_mul(&bxr, &bxr, r, dsa->q, ctx))	/* bxr */
		goto err;
	if (!BN_mod_mul(&bm, &b, &m, dsa->q, ctx))	/* bm */
		goto err;
	if (!BN_mod_add(s, &bxr, &bm, dsa->q, ctx))	/* s = bm + bxr */
		goto err;
	if (!BN_mod_mul(s, s, kinv, dsa->q, ctx))	/* s = b(m + xr)k^-1 */
		goto err;
	if (!BN_mod_mul(s, s, &binv, dsa->q, ctx))	/* s = (m + xr)k^-1 */
		goto err;

	/*
	 * Redo if r or s is zero as required by FIPS 186-3: this is very
	 * unlikely.
	 */
	if (BN_is_zero(r) || BN_is_zero(s)) {
Changes to jni/libressl/crypto/dsa/dsa_pmeth.c.
1
2
3
4
5
6
7
8
/* $OpenBSD: dsa_pmeth.c,v 1.11 2017/01/29 17:49:22 beck Exp $ */
/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
 * project 2006.
 */
/* ====================================================================
 * Copyright (c) 2006 The OpenSSL Project.  All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
|







1
2
3
4
5
6
7
8
/* $OpenBSD: dsa_pmeth.c,v 1.12 2019/09/09 18:06:25 jsing Exp $ */
/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
 * project 2006.
 */
/* ====================================================================
 * Copyright (c) 2006 The OpenSSL Project.  All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
209
210
211
212
213
214
215




216
217
218
219
220
221
222
			break;
		default:
			DSAerror(DSA_R_INVALID_DIGEST_TYPE);
			return 0;
		}
		dctx->md = p2;
		return 1;





	case EVP_PKEY_CTRL_DIGESTINIT:
	case EVP_PKEY_CTRL_PKCS7_SIGN:
	case EVP_PKEY_CTRL_CMS_SIGN:
		return 1;
		
	case EVP_PKEY_CTRL_PEER_KEY:







>
>
>
>







209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
			break;
		default:
			DSAerror(DSA_R_INVALID_DIGEST_TYPE);
			return 0;
		}
		dctx->md = p2;
		return 1;

	case EVP_PKEY_CTRL_GET_MD:
		*(const EVP_MD **)p2 = dctx->md;
		return 1;

	case EVP_PKEY_CTRL_DIGESTINIT:
	case EVP_PKEY_CTRL_PKCS7_SIGN:
	case EVP_PKEY_CTRL_CMS_SIGN:
		return 1;
		
	case EVP_PKEY_CTRL_PEER_KEY:
Changes to jni/libressl/crypto/ec/ec_ameth.c.
1
2
3
4
5
6
7
8
/* $OpenBSD: ec_ameth.c,v 1.25 2018/08/24 20:22:15 tb Exp $ */
/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
 * project 2006.
 */
/* ====================================================================
 * Copyright (c) 2006 The OpenSSL Project.  All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
|







1
2
3
4
5
6
7
8
/* $OpenBSD: ec_ameth.c,v 1.28 2019/09/09 20:26:16 tb Exp $ */
/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
 * project 2006.
 */
/* ====================================================================
 * Copyright (c) 2006 The OpenSSL Project.  All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
57
58
59
60
61
62
63

64
65
66
67
68
69





70
71
72
73
74
75
76
 */

#include <stdio.h>

#include <openssl/opensslconf.h>

#include <openssl/bn.h>

#include <openssl/ec.h>
#include <openssl/err.h>
#include <openssl/x509.h>


#include "asn1_locl.h"






static int 
eckey_param2type(int *pptype, void **ppval, EC_KEY * ec_key)
{
	const EC_GROUP *group;
	int nid;
	if (ec_key == NULL || (group = EC_KEY_get0_group(ec_key)) == NULL) {







>




<

>
>
>
>
>







57
58
59
60
61
62
63
64
65
66
67
68

69
70
71
72
73
74
75
76
77
78
79
80
81
 */

#include <stdio.h>

#include <openssl/opensslconf.h>

#include <openssl/bn.h>
#include <openssl/cms.h>
#include <openssl/ec.h>
#include <openssl/err.h>
#include <openssl/x509.h>


#include "asn1_locl.h"

#ifndef OPENSSL_NO_CMS
static int ecdh_cms_decrypt(CMS_RecipientInfo *ri);
static int ecdh_cms_encrypt(CMS_RecipientInfo *ri);
#endif

static int 
eckey_param2type(int *pptype, void **ppval, EC_KEY * ec_key)
{
	const EC_GROUP *group;
	int nid;
	if (ec_key == NULL || (group = EC_KEY_get0_group(ec_key)) == NULL) {
134
135
136
137
138
139
140

141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177

178
179
180
181
182

183
184
185
186
187
188
189
	free(penc);
	return 0;
}

static EC_KEY *
eckey_type2param(int ptype, const void *pval)
{

	EC_KEY *eckey = NULL;

	if (ptype == V_ASN1_SEQUENCE) {
		const ASN1_STRING *pstr = pval;
		const unsigned char *pm = NULL;
		int pmlen;

		pm = pstr->data;
		pmlen = pstr->length;
		if (!(eckey = d2i_ECParameters(NULL, &pm, pmlen))) {
			ECerror(EC_R_DECODE_ERROR);
			goto ecerr;
		}
	} else if (ptype == V_ASN1_OBJECT) {
		const ASN1_OBJECT *poid = pval;
		EC_GROUP *group;

		/*
		 * type == V_ASN1_OBJECT => the parameters are given by an
		 * asn1 OID
		 */
		if ((eckey = EC_KEY_new()) == NULL) {
			ECerror(ERR_R_MALLOC_FAILURE);
			goto ecerr;
		}
		group = EC_GROUP_new_by_curve_name(OBJ_obj2nid(poid));
		if (group == NULL)
			goto ecerr;
		EC_GROUP_set_asn1_flag(group, OPENSSL_EC_NAMED_CURVE);
		if (EC_KEY_set_group(eckey, group) == 0)
			goto ecerr;
		EC_GROUP_free(group);
	} else {
		ECerror(EC_R_DECODE_ERROR);
		goto ecerr;
	}


	return eckey;

 ecerr:
	if (eckey)
		EC_KEY_free(eckey);

	return NULL;
}

static int 
eckey_pub_decode(EVP_PKEY * pkey, X509_PUBKEY * pubkey)
{
	const unsigned char *p = NULL;







>















<















<





>



<
|
>







139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161

162
163
164
165
166
167
168
169
170
171
172
173
174
175
176

177
178
179
180
181
182
183
184
185

186
187
188
189
190
191
192
193
194
	free(penc);
	return 0;
}

static EC_KEY *
eckey_type2param(int ptype, const void *pval)
{
	EC_GROUP *group = NULL;
	EC_KEY *eckey = NULL;

	if (ptype == V_ASN1_SEQUENCE) {
		const ASN1_STRING *pstr = pval;
		const unsigned char *pm = NULL;
		int pmlen;

		pm = pstr->data;
		pmlen = pstr->length;
		if (!(eckey = d2i_ECParameters(NULL, &pm, pmlen))) {
			ECerror(EC_R_DECODE_ERROR);
			goto ecerr;
		}
	} else if (ptype == V_ASN1_OBJECT) {
		const ASN1_OBJECT *poid = pval;


		/*
		 * type == V_ASN1_OBJECT => the parameters are given by an
		 * asn1 OID
		 */
		if ((eckey = EC_KEY_new()) == NULL) {
			ECerror(ERR_R_MALLOC_FAILURE);
			goto ecerr;
		}
		group = EC_GROUP_new_by_curve_name(OBJ_obj2nid(poid));
		if (group == NULL)
			goto ecerr;
		EC_GROUP_set_asn1_flag(group, OPENSSL_EC_NAMED_CURVE);
		if (EC_KEY_set_group(eckey, group) == 0)
			goto ecerr;

	} else {
		ECerror(EC_R_DECODE_ERROR);
		goto ecerr;
	}

	EC_GROUP_free(group);
	return eckey;

 ecerr:

	EC_KEY_free(eckey);
	EC_GROUP_free(group);
	return NULL;
}

static int 
eckey_pub_decode(EVP_PKEY * pkey, X509_PUBKEY * pubkey)
{
	const unsigned char *p = NULL;
568
569
570
571
572
573
574






























575
576
577
578
579
580
581
582
583
584
585












































































































































































































































































































































586
587
588
589
590
591
592
			if (hnid == NID_undef)
				return -1;
			if (!OBJ_find_sigid_by_algs(&snid, hnid, EVP_PKEY_id(pkey)))
				return -1;
			X509_ALGOR_set0(alg2, OBJ_nid2obj(snid), V_ASN1_UNDEF, 0);
		}
		return 1;































	case ASN1_PKEY_CTRL_DEFAULT_MD_NID:
		*(int *) arg2 = NID_sha1;
		return 2;

	default:
		return -2;

	}

}













































































































































































































































































































































const EVP_PKEY_ASN1_METHOD eckey_asn1_meth = {
	.pkey_id = EVP_PKEY_EC,
	.pkey_base_id = EVP_PKEY_EC,

	.pem_str = "EC",
	.info = "OpenSSL EC algorithm",







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>











>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
			if (hnid == NID_undef)
				return -1;
			if (!OBJ_find_sigid_by_algs(&snid, hnid, EVP_PKEY_id(pkey)))
				return -1;
			X509_ALGOR_set0(alg2, OBJ_nid2obj(snid), V_ASN1_UNDEF, 0);
		}
		return 1;

#ifndef OPENSSL_NO_CMS
	case ASN1_PKEY_CTRL_CMS_SIGN:
		if (arg1 == 0) {
			X509_ALGOR *alg1, *alg2;
			int snid, hnid;

			CMS_SignerInfo_get0_algs(arg2, NULL, NULL, &alg1, &alg2);
			if (alg1 == NULL || alg1->algorithm == NULL)
				return -1;
			hnid = OBJ_obj2nid(alg1->algorithm);
			if (hnid == NID_undef)
				return -1;
			if (!OBJ_find_sigid_by_algs(&snid, hnid, EVP_PKEY_id(pkey)))
				return -1;
			X509_ALGOR_set0(alg2, OBJ_nid2obj(snid), V_ASN1_UNDEF, 0);
		}
		return 1;

	case ASN1_PKEY_CTRL_CMS_ENVELOPE:
		if (arg1 == 0)
			return ecdh_cms_encrypt(arg2);
		else if (arg1 == 1)
			return ecdh_cms_decrypt(arg2);
		return -2;

	case ASN1_PKEY_CTRL_CMS_RI_TYPE:
		*(int *)arg2 = CMS_RECIPINFO_AGREE;
		return 1;
#endif

	case ASN1_PKEY_CTRL_DEFAULT_MD_NID:
		*(int *) arg2 = NID_sha1;
		return 2;

	default:
		return -2;

	}

}

#ifndef OPENSSL_NO_CMS

static int
ecdh_cms_set_peerkey(EVP_PKEY_CTX *pctx, X509_ALGOR *alg,
    ASN1_BIT_STRING *pubkey)
{
	const ASN1_OBJECT *aoid;
	int atype;
	const void *aval;
	int rv = 0;
	EVP_PKEY *pkpeer = NULL;
	EC_KEY *ecpeer = NULL;
	const unsigned char *p;
	int plen;

	X509_ALGOR_get0(&aoid, &atype, &aval, alg);
	if (OBJ_obj2nid(aoid) != NID_X9_62_id_ecPublicKey)
		goto err;

	/* If absent parameters get group from main key */
	if (atype == V_ASN1_UNDEF || atype == V_ASN1_NULL) {
		const EC_GROUP *grp;
		EVP_PKEY *pk;

		pk = EVP_PKEY_CTX_get0_pkey(pctx);
		if (!pk)
			goto err;
		grp = EC_KEY_get0_group(pk->pkey.ec);
		ecpeer = EC_KEY_new();
		if (ecpeer == NULL)
			goto err;
		if (!EC_KEY_set_group(ecpeer, grp))
			goto err;
	} else {
		ecpeer = eckey_type2param(atype, aval);
		if (!ecpeer)
			goto err;
	}

	/* We have parameters now set public key */
	plen = ASN1_STRING_length(pubkey);
	p = ASN1_STRING_get0_data(pubkey);
	if (!p || !plen)
		goto err;
	if (!o2i_ECPublicKey(&ecpeer, &p, plen))
		goto err;
	pkpeer = EVP_PKEY_new();
	if (pkpeer == NULL)
		goto err;
	EVP_PKEY_set1_EC_KEY(pkpeer, ecpeer);
	if (EVP_PKEY_derive_set_peer(pctx, pkpeer) > 0)
		rv = 1;
 err:
	EC_KEY_free(ecpeer);
	EVP_PKEY_free(pkpeer);
	return rv;
}

/* Set KDF parameters based on KDF NID */
static int
ecdh_cms_set_kdf_param(EVP_PKEY_CTX *pctx, int eckdf_nid)
{
	int kdf_nid, kdfmd_nid, cofactor;
	const EVP_MD *kdf_md;

	if (eckdf_nid == NID_undef)
		return 0;

	/* Lookup KDF type, cofactor mode and digest */
	if (!OBJ_find_sigid_algs(eckdf_nid, &kdfmd_nid, &kdf_nid))
		return 0;

	if (kdf_nid == NID_dh_std_kdf)
		cofactor = 0;
	else if (kdf_nid == NID_dh_cofactor_kdf)
		cofactor = 1;
	else
		return 0;

	if (EVP_PKEY_CTX_set_ecdh_cofactor_mode(pctx, cofactor) <= 0)
		return 0;

	if (EVP_PKEY_CTX_set_ecdh_kdf_type(pctx, EVP_PKEY_ECDH_KDF_X9_63) <= 0)
		return 0;

	kdf_md = EVP_get_digestbynid(kdfmd_nid);
	if (!kdf_md)
		return 0;

	if (EVP_PKEY_CTX_set_ecdh_kdf_md(pctx, kdf_md) <= 0)
		return 0;

	return 1;
}

static int
ecdh_cms_set_shared_info(EVP_PKEY_CTX *pctx, CMS_RecipientInfo *ri)
{
	X509_ALGOR *alg, *kekalg = NULL;
	ASN1_OCTET_STRING *ukm;
	const unsigned char *p;
	unsigned char *der = NULL;
	int plen, keylen;
	const EVP_CIPHER *kekcipher;
	EVP_CIPHER_CTX *kekctx;
	int rv = 0;

	if (!CMS_RecipientInfo_kari_get0_alg(ri, &alg, &ukm))
		return 0;

	if (!ecdh_cms_set_kdf_param(pctx, OBJ_obj2nid(alg->algorithm))) {
		ECerror(EC_R_KDF_PARAMETER_ERROR);
		return 0;
	}

	if (alg->parameter->type != V_ASN1_SEQUENCE)
		return 0;

	p = alg->parameter->value.sequence->data;
	plen = alg->parameter->value.sequence->length;
	kekalg = d2i_X509_ALGOR(NULL, &p, plen);
	if (!kekalg)
		goto err;
	kekctx = CMS_RecipientInfo_kari_get0_ctx(ri);
	if (!kekctx)
		goto err;
	kekcipher = EVP_get_cipherbyobj(kekalg->algorithm);
	if (!kekcipher || EVP_CIPHER_mode(kekcipher) != EVP_CIPH_WRAP_MODE)
		goto err;
	if (!EVP_EncryptInit_ex(kekctx, kekcipher, NULL, NULL, NULL))
		goto err;
	if (EVP_CIPHER_asn1_to_param(kekctx, kekalg->parameter) <= 0)
		goto err;

	keylen = EVP_CIPHER_CTX_key_length(kekctx);
	if (EVP_PKEY_CTX_set_ecdh_kdf_outlen(pctx, keylen) <= 0)
		goto err;

	plen = CMS_SharedInfo_encode(&der, kekalg, ukm, keylen);
	if (!plen)
		goto err;

	if (EVP_PKEY_CTX_set0_ecdh_kdf_ukm(pctx, der, plen) <= 0)
		goto err;
	der = NULL;

	rv = 1;
 err:
	X509_ALGOR_free(kekalg);
	free(der);
	return rv;
}

static int
ecdh_cms_decrypt(CMS_RecipientInfo *ri)
{
	EVP_PKEY_CTX *pctx;

	pctx = CMS_RecipientInfo_get0_pkey_ctx(ri);
	if (!pctx)
		return 0;

	/* See if we need to set peer key */
	if (!EVP_PKEY_CTX_get0_peerkey(pctx)) {
		X509_ALGOR *alg;
		ASN1_BIT_STRING *pubkey;

		if (!CMS_RecipientInfo_kari_get0_orig_id(ri, &alg, &pubkey,
		    NULL, NULL, NULL))
			return 0;
		if (!alg || !pubkey)
			return 0;
		if (!ecdh_cms_set_peerkey(pctx, alg, pubkey)) {
			ECerror(EC_R_PEER_KEY_ERROR);
			return 0;
		}
	}

	/* Set ECDH derivation parameters and initialise unwrap context */
	if (!ecdh_cms_set_shared_info(pctx, ri)) {
		ECerror(EC_R_SHARED_INFO_ERROR);
		return 0;
	}

	return 1;
}

static int
ecdh_cms_encrypt(CMS_RecipientInfo *ri)
{
	EVP_PKEY_CTX *pctx;
	EVP_PKEY *pkey;
	EVP_CIPHER_CTX *ctx;
	int keylen;
	X509_ALGOR *talg, *wrap_alg = NULL;
	const ASN1_OBJECT *aoid;
	ASN1_BIT_STRING *pubkey;
	ASN1_STRING *wrap_str;
	ASN1_OCTET_STRING *ukm;
	unsigned char *penc = NULL;
	int penclen;
	int ecdh_nid, kdf_type, kdf_nid, wrap_nid;
	const EVP_MD *kdf_md;
	int rv = 0;

	pctx = CMS_RecipientInfo_get0_pkey_ctx(ri);
	if (!pctx)
		return 0;
	/* Get ephemeral key */
	pkey = EVP_PKEY_CTX_get0_pkey(pctx);
	if (!CMS_RecipientInfo_kari_get0_orig_id(ri, &talg, &pubkey,
	    NULL, NULL, NULL))
		goto err;
	X509_ALGOR_get0(&aoid, NULL, NULL, talg);

	/* Is everything uninitialised? */
	if (aoid == OBJ_nid2obj(NID_undef)) {
		EC_KEY *eckey = pkey->pkey.ec;
		unsigned char *p;

		/* Set the key */
		penclen = i2o_ECPublicKey(eckey, NULL);
		if (penclen <= 0)
			goto err;
		penc = malloc(penclen);
		if (penc == NULL)
			goto err;
		p = penc;
		penclen = i2o_ECPublicKey(eckey, &p);
		if (penclen <= 0)
			goto err;
		ASN1_STRING_set0(pubkey, penc, penclen);
		pubkey->flags &= ~(ASN1_STRING_FLAG_BITS_LEFT | 0x07);
		pubkey->flags |= ASN1_STRING_FLAG_BITS_LEFT;
		penc = NULL;

		X509_ALGOR_set0(talg, OBJ_nid2obj(NID_X9_62_id_ecPublicKey),
		    V_ASN1_UNDEF, NULL);
	}

	/* See if custom parameters set */
	kdf_type = EVP_PKEY_CTX_get_ecdh_kdf_type(pctx);
	if (kdf_type <= 0)
		goto err;
	if (!EVP_PKEY_CTX_get_ecdh_kdf_md(pctx, &kdf_md))
		goto err;
	ecdh_nid = EVP_PKEY_CTX_get_ecdh_cofactor_mode(pctx);
	if (ecdh_nid < 0)
		goto err;
	else if (ecdh_nid == 0)
		ecdh_nid = NID_dh_std_kdf;
	else if (ecdh_nid == 1)
		ecdh_nid = NID_dh_cofactor_kdf;

	if (kdf_type == EVP_PKEY_ECDH_KDF_NONE) {
		kdf_type = EVP_PKEY_ECDH_KDF_X9_63;
		if (EVP_PKEY_CTX_set_ecdh_kdf_type(pctx, kdf_type) <= 0)
			goto err;
	} else {
		/* Unknown KDF */
		goto err;
	}
	if (kdf_md == NULL) {
		/* Fixme later for better MD */
		kdf_md = EVP_sha1();
		if (EVP_PKEY_CTX_set_ecdh_kdf_md(pctx, kdf_md) <= 0)
			goto err;
	}

	if (!CMS_RecipientInfo_kari_get0_alg(ri, &talg, &ukm))
		goto err;

	/* Lookup NID for KDF+cofactor+digest */
	if (!OBJ_find_sigid_by_algs(&kdf_nid, EVP_MD_type(kdf_md), ecdh_nid))
		goto err;

	/* Get wrap NID */
	ctx = CMS_RecipientInfo_kari_get0_ctx(ri);
	wrap_nid = EVP_CIPHER_CTX_type(ctx);
	keylen = EVP_CIPHER_CTX_key_length(ctx);

	/* Package wrap algorithm in an AlgorithmIdentifier */

	wrap_alg = X509_ALGOR_new();
	if (wrap_alg == NULL)
		goto err;
	wrap_alg->algorithm = OBJ_nid2obj(wrap_nid);
	wrap_alg->parameter = ASN1_TYPE_new();
	if (wrap_alg->parameter == NULL)
		goto err;
	if (EVP_CIPHER_param_to_asn1(ctx, wrap_alg->parameter) <= 0)
		goto err;
	if (ASN1_TYPE_get(wrap_alg->parameter) == NID_undef) {
		ASN1_TYPE_free(wrap_alg->parameter);
		wrap_alg->parameter = NULL;
	}

	if (EVP_PKEY_CTX_set_ecdh_kdf_outlen(pctx, keylen) <= 0)
		goto err;

	penclen = CMS_SharedInfo_encode(&penc, wrap_alg, ukm, keylen);
	if (!penclen)
		goto err;

	if (EVP_PKEY_CTX_set0_ecdh_kdf_ukm(pctx, penc, penclen) <= 0)
		goto err;
	penc = NULL;

	/*
	 * Now need to wrap encoding of wrap AlgorithmIdentifier into parameter
	 * of another AlgorithmIdentifier.
	 */
	penclen = i2d_X509_ALGOR(wrap_alg, &penc);
	if (!penc || !penclen)
		goto err;
	wrap_str = ASN1_STRING_new();
	if (wrap_str == NULL)
		goto err;
	ASN1_STRING_set0(wrap_str, penc, penclen);
	penc = NULL;
	X509_ALGOR_set0(talg, OBJ_nid2obj(kdf_nid), V_ASN1_SEQUENCE, wrap_str);

	rv = 1;

 err:
	free(penc);
	X509_ALGOR_free(wrap_alg);
	return rv;
}

#endif

const EVP_PKEY_ASN1_METHOD eckey_asn1_meth = {
	.pkey_id = EVP_PKEY_EC,
	.pkey_base_id = EVP_PKEY_EC,

	.pem_str = "EC",
	.info = "OpenSSL EC algorithm",
Changes to jni/libressl/crypto/ec/ec_err.c.
1
2
3
4
5
6
7
8
/* $OpenBSD: ec_err.c,v 1.10 2017/01/29 17:49:23 beck Exp $ */
/* ====================================================================
 * Copyright (c) 1999-2011 The OpenSSL Project.  All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 *
|







1
2
3
4
5
6
7
8
/* $OpenBSD: ec_err.c,v 1.12 2019/09/29 10:09:09 tb Exp $ */
/* ====================================================================
 * Copyright (c) 1999-2011 The OpenSSL Project.  All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 *
92
93
94
95
96
97
98

99
100
101
102
103
104
105
106

107
108
109
110
111
112
113
114
115
116

117
118
119

120
121
122

123
124
125
126
127
128
129
	{ERR_REASON(EC_R_GROUP2PKPARAMETERS_FAILURE), "group2pkparameters failure"},
	{ERR_REASON(EC_R_I2D_ECPKPARAMETERS_FAILURE), "i2d ecpkparameters failure"},
	{ERR_REASON(EC_R_INCOMPATIBLE_OBJECTS), "incompatible objects"},
	{ERR_REASON(EC_R_INVALID_ARGUMENT), "invalid argument"},
	{ERR_REASON(EC_R_INVALID_COMPRESSED_POINT), "invalid compressed point"},
	{ERR_REASON(EC_R_INVALID_COMPRESSION_BIT), "invalid compression bit"},
	{ERR_REASON(EC_R_INVALID_CURVE), "invalid curve"},

	{ERR_REASON(EC_R_INVALID_DIGEST_TYPE), "invalid digest type"},
	{ERR_REASON(EC_R_INVALID_ENCODING), "invalid encoding"},
	{ERR_REASON(EC_R_INVALID_FIELD), "invalid field"},
	{ERR_REASON(EC_R_INVALID_FORM), "invalid form"},
	{ERR_REASON(EC_R_INVALID_GROUP_ORDER), "invalid group order"},
	{ERR_REASON(EC_R_INVALID_PENTANOMIAL_BASIS), "invalid pentanomial basis"},
	{ERR_REASON(EC_R_INVALID_PRIVATE_KEY), "invalid private key"},
	{ERR_REASON(EC_R_INVALID_TRINOMIAL_BASIS), "invalid trinomial basis"},

	{ERR_REASON(EC_R_KEYS_NOT_SET), "keys not set"},
	{ERR_REASON(EC_R_MISSING_PARAMETERS), "missing parameters"},
	{ERR_REASON(EC_R_MISSING_PRIVATE_KEY), "missing private key"},
	{ERR_REASON(EC_R_NOT_A_NIST_PRIME), "not a NIST prime"},
	{ERR_REASON(EC_R_NOT_A_SUPPORTED_NIST_PRIME), "not a supported NIST prime"},
	{ERR_REASON(EC_R_NOT_IMPLEMENTED), "not implemented"},
	{ERR_REASON(EC_R_NOT_INITIALIZED), "not initialized"},
	{ERR_REASON(EC_R_NO_FIELD_MOD), "no field mod"},
	{ERR_REASON(EC_R_NO_PARAMETERS_SET), "no parameters set"},
	{ERR_REASON(EC_R_PASSED_NULL_PARAMETER), "passed null parameter"},

	{ERR_REASON(EC_R_PKPARAMETERS2GROUP_FAILURE), "pkparameters2group failure"},
	{ERR_REASON(EC_R_POINT_AT_INFINITY), "point at infinity"},
	{ERR_REASON(EC_R_POINT_IS_NOT_ON_CURVE), "point is not on curve"},

	{ERR_REASON(EC_R_SLOT_FULL), "slot full"},
	{ERR_REASON(EC_R_UNDEFINED_GENERATOR), "undefined generator"},
	{ERR_REASON(EC_R_UNDEFINED_ORDER), "undefined order"},

	{ERR_REASON(EC_R_UNKNOWN_GROUP), "unknown group"},
	{ERR_REASON(EC_R_UNKNOWN_ORDER), "unknown order"},
	{ERR_REASON(EC_R_UNSUPPORTED_FIELD), "unsupported field"},
	{ERR_REASON(EC_R_WRONG_CURVE_PARAMETERS), "wrong curve parameters"},
	{ERR_REASON(EC_R_WRONG_ORDER), "wrong order"},
	{0, NULL}
};







>








>










>



>



>







92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
	{ERR_REASON(EC_R_GROUP2PKPARAMETERS_FAILURE), "group2pkparameters failure"},
	{ERR_REASON(EC_R_I2D_ECPKPARAMETERS_FAILURE), "i2d ecpkparameters failure"},
	{ERR_REASON(EC_R_INCOMPATIBLE_OBJECTS), "incompatible objects"},
	{ERR_REASON(EC_R_INVALID_ARGUMENT), "invalid argument"},
	{ERR_REASON(EC_R_INVALID_COMPRESSED_POINT), "invalid compressed point"},
	{ERR_REASON(EC_R_INVALID_COMPRESSION_BIT), "invalid compression bit"},
	{ERR_REASON(EC_R_INVALID_CURVE), "invalid curve"},
	{ERR_REASON(EC_R_INVALID_DIGEST), "invalid digest"},
	{ERR_REASON(EC_R_INVALID_DIGEST_TYPE), "invalid digest type"},
	{ERR_REASON(EC_R_INVALID_ENCODING), "invalid encoding"},
	{ERR_REASON(EC_R_INVALID_FIELD), "invalid field"},
	{ERR_REASON(EC_R_INVALID_FORM), "invalid form"},
	{ERR_REASON(EC_R_INVALID_GROUP_ORDER), "invalid group order"},
	{ERR_REASON(EC_R_INVALID_PENTANOMIAL_BASIS), "invalid pentanomial basis"},
	{ERR_REASON(EC_R_INVALID_PRIVATE_KEY), "invalid private key"},
	{ERR_REASON(EC_R_INVALID_TRINOMIAL_BASIS), "invalid trinomial basis"},
	{ERR_REASON(EC_R_KDF_PARAMETER_ERROR), "kdf parameter error"},
	{ERR_REASON(EC_R_KEYS_NOT_SET), "keys not set"},
	{ERR_REASON(EC_R_MISSING_PARAMETERS), "missing parameters"},
	{ERR_REASON(EC_R_MISSING_PRIVATE_KEY), "missing private key"},
	{ERR_REASON(EC_R_NOT_A_NIST_PRIME), "not a NIST prime"},
	{ERR_REASON(EC_R_NOT_A_SUPPORTED_NIST_PRIME), "not a supported NIST prime"},
	{ERR_REASON(EC_R_NOT_IMPLEMENTED), "not implemented"},
	{ERR_REASON(EC_R_NOT_INITIALIZED), "not initialized"},
	{ERR_REASON(EC_R_NO_FIELD_MOD), "no field mod"},
	{ERR_REASON(EC_R_NO_PARAMETERS_SET), "no parameters set"},
	{ERR_REASON(EC_R_PASSED_NULL_PARAMETER), "passed null parameter"},
	{ERR_REASON(EC_R_PEER_KEY_ERROR), "peer key error"},
	{ERR_REASON(EC_R_PKPARAMETERS2GROUP_FAILURE), "pkparameters2group failure"},
	{ERR_REASON(EC_R_POINT_AT_INFINITY), "point at infinity"},
	{ERR_REASON(EC_R_POINT_IS_NOT_ON_CURVE), "point is not on curve"},
	{ERR_REASON(EC_R_SHARED_INFO_ERROR), "shared info error"},
	{ERR_REASON(EC_R_SLOT_FULL), "slot full"},
	{ERR_REASON(EC_R_UNDEFINED_GENERATOR), "undefined generator"},
	{ERR_REASON(EC_R_UNDEFINED_ORDER), "undefined order"},
	{ERR_REASON(EC_R_UNKNOWN_COFACTOR), "unknown cofactor"},
	{ERR_REASON(EC_R_UNKNOWN_GROUP), "unknown group"},
	{ERR_REASON(EC_R_UNKNOWN_ORDER), "unknown order"},
	{ERR_REASON(EC_R_UNSUPPORTED_FIELD), "unsupported field"},
	{ERR_REASON(EC_R_WRONG_CURVE_PARAMETERS), "wrong curve parameters"},
	{ERR_REASON(EC_R_WRONG_ORDER), "wrong order"},
	{0, NULL}
};
Changes to jni/libressl/crypto/ec/ec_kmeth.c.
1
2
3
4
5
6
7
8
/*	$OpenBSD: ec_kmeth.c,v 1.4 2019/01/19 01:18:56 tb Exp $	*/
/*
 * Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
 * project.
 */
/* ====================================================================
 * Copyright (c) 2015 The OpenSSL Project.  All rights reserved.
 *
|







1
2
3
4
5
6
7
8
/*	$OpenBSD: ec_kmeth.c,v 1.5 2019/05/10 19:15:06 bcook Exp $	*/
/*
 * Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
 * project.
 */
/* ====================================================================
 * Copyright (c) 2015 The OpenSSL Project.  All rights reserved.
 *
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
}

EC_KEY_METHOD *
EC_KEY_METHOD_new(const EC_KEY_METHOD *meth)
{
	EC_KEY_METHOD *ret;

	if ((ret = malloc(sizeof(*meth))) == NULL)
		return NULL;
	if (meth != NULL)
		*ret = *meth;
	ret->flags |= EC_KEY_METHOD_DYNAMIC;
	return ret;
}








|







182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
}

EC_KEY_METHOD *
EC_KEY_METHOD_new(const EC_KEY_METHOD *meth)
{
	EC_KEY_METHOD *ret;

	if ((ret = calloc(1, sizeof(*meth))) == NULL)
		return NULL;
	if (meth != NULL)
		*ret = *meth;
	ret->flags |= EC_KEY_METHOD_DYNAMIC;
	return ret;
}

Changes to jni/libressl/crypto/ec/ec_lib.c.
1
2
3
4
5
6
7
8
/* $OpenBSD: ec_lib.c,v 1.31 2018/11/06 07:02:33 tb Exp $ */
/*
 * Originally written by Bodo Moeller for the OpenSSL project.
 */
/* ====================================================================
 * Copyright (c) 1998-2003 The OpenSSL Project.  All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
|







1
2
3
4
5
6
7
8
/* $OpenBSD: ec_lib.c,v 1.32 2019/09/29 10:09:09 tb Exp $ */
/*
 * Originally written by Bodo Moeller for the OpenSSL project.
 */
/* ====================================================================
 * Copyright (c) 1998-2003 The OpenSSL Project.  All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
64
65
66
67
68
69
70

71
72
73
74
75
76
77
#include <string.h>

#include <openssl/opensslconf.h>

#include <openssl/err.h>
#include <openssl/opensslv.h>


#include "ec_lcl.h"

/* functions for EC_GROUP objects */

EC_GROUP *
EC_GROUP_new(const EC_METHOD * meth)
{







>







64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
#include <string.h>

#include <openssl/opensslconf.h>

#include <openssl/err.h>
#include <openssl/opensslv.h>

#include "bn_lcl.h"
#include "ec_lcl.h"

/* functions for EC_GROUP objects */

EC_GROUP *
EC_GROUP_new(const EC_METHOD * meth)
{
248
249
250
251
252
253
254



255







































































256
257
258
259
260
261
262
263



























264
265
266
267
268
269
270
271
272
273
274
275
276
277

278
279
280
281
282

283
284
285
286
287
288
289

int 
EC_METHOD_get_field_type(const EC_METHOD *meth)
{
	return meth->field_type;
}












































































int 
EC_GROUP_set_generator(EC_GROUP *group, const EC_POINT *generator,
    const BIGNUM *order, const BIGNUM *cofactor)
{
	if (generator == NULL) {
		ECerror(ERR_R_PASSED_NULL_PARAMETER);
		return 0;
	}



























	if (group->generator == NULL) {
		group->generator = EC_POINT_new(group);
		if (group->generator == NULL)
			return 0;
	}
	if (!EC_POINT_copy(group->generator, generator))
		return 0;

	if (order != NULL) {
		if (!BN_copy(&group->order, order))
			return 0;
	} else
		BN_zero(&group->order);


	if (cofactor != NULL) {
		if (!BN_copy(&group->cofactor, cofactor))
			return 0;
	} else
		BN_zero(&group->cofactor);


	return 1;
}


const EC_POINT *
EC_GROUP_get0_generator(const EC_GROUP *group)







>
>
>
|
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>








>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>








<
|
|
<
<

>
|


|
<
>







249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373

374
375


376
377
378
379
380
381

382
383
384
385
386
387
388
389

int 
EC_METHOD_get_field_type(const EC_METHOD *meth)
{
	return meth->field_type;
}

/*
 * Try computing the cofactor from generator order n and field cardinality q.
 * This works for all curves of cryptographic interest.
 *
 * Hasse's theorem: | h * n - (q + 1) | <= 2 * sqrt(q)
 *
 * So: h_min = (q + 1 - 2*sqrt(q)) / n and h_max = (q + 1 + 2*sqrt(q)) / n and
 * therefore h_max - h_min = 4*sqrt(q) / n. So if n > 4*sqrt(q) holds, there is
 * only one possible value for h:
 *
 *	h = \lfloor (h_min + h_max)/2 \rceil = \lfloor (q + 1)/n \rceil
 *
 * Otherwise, zero cofactor and return success.
 */
static int
ec_guess_cofactor(EC_GROUP *group)
{
	BN_CTX *ctx = NULL;
	BIGNUM *q = NULL;
	int ret = 0;

	/*
	 * If the cofactor is too large, we cannot guess it and default to zero.
	 * The RHS of below is a strict overestimate of log(4 * sqrt(q)).
	 */
	if (BN_num_bits(&group->order) <=
	    (BN_num_bits(&group->field) + 1) / 2 + 3) {
		BN_zero(&group->cofactor);
		return 1;
	}

	if ((ctx = BN_CTX_new()) == NULL)
		goto err;

	BN_CTX_start(ctx);
	if ((q = BN_CTX_get(ctx)) == NULL)
		goto err;

	/* Set q = 2**m for binary fields; q = p otherwise. */
	if (group->meth->field_type == NID_X9_62_characteristic_two_field) {
		BN_zero(q);
		if (!BN_set_bit(q, BN_num_bits(&group->field) - 1))
			goto err;
	} else {
		if (!BN_copy(q, &group->field))
			goto err;
	}
	
	/*
	 * Compute
	 *     h = \lfloor (q + 1)/n \rceil = \lfloor (q + 1 + n/2) / n \rfloor.
	 */

	/* h = n/2 */
	if (!BN_rshift1(&group->cofactor, &group->order))
		goto err;
	/* h = 1 + n/2 */
	if (!BN_add(&group->cofactor, &group->cofactor, BN_value_one()))
		goto err;
	/* h = q + 1 + n/2 */
	if (!BN_add(&group->cofactor, &group->cofactor, q))
		goto err;
	/* h = (q + 1 + n/2) / n */
	if (!BN_div_ct(&group->cofactor, NULL, &group->cofactor, &group->order,
	    ctx))
		goto err;

	ret = 1;
 err:
	BN_CTX_end(ctx);
	BN_CTX_free(ctx);
	BN_zero(&group->cofactor);
	return ret;
}

int 
EC_GROUP_set_generator(EC_GROUP *group, const EC_POINT *generator,
    const BIGNUM *order, const BIGNUM *cofactor)
{
	if (generator == NULL) {
		ECerror(ERR_R_PASSED_NULL_PARAMETER);
		return 0;
	}

	/* Require group->field >= 1. */
	if (BN_is_zero(&group->field) || BN_is_negative(&group->field)) {
		ECerror(EC_R_INVALID_FIELD);
		return 0;
	}

	/*
	 * Require order >= 1 and enforce an upper bound of at most one bit more
	 * than the field cardinality due to Hasse's theorem.
	 */
	if (order == NULL || BN_is_zero(order) || BN_is_negative(order) ||
	    BN_num_bits(order) > BN_num_bits(&group->field) + 1) {
		ECerror(EC_R_INVALID_GROUP_ORDER);
		return 0;
	}

	/*
	 * Unfortunately, the cofactor is an optional field in many standards.
	 * Internally, the library uses a 0 cofactor as a marker for "unknown
	 * cofactor".  So accept cofactor == NULL or cofactor >= 0.
	 */
	if (cofactor != NULL && BN_is_negative(cofactor)) {
		ECerror(EC_R_UNKNOWN_COFACTOR);
		return 0;
	}

	if (group->generator == NULL) {
		group->generator = EC_POINT_new(group);
		if (group->generator == NULL)
			return 0;
	}
	if (!EC_POINT_copy(group->generator, generator))
		return 0;


	if (!BN_copy(&group->order, order))
		return 0;



	/* Either take the provided positive cofactor, or try to compute it. */
	if (cofactor != NULL && !BN_is_zero(cofactor)) {
		if (!BN_copy(&group->cofactor, cofactor))
			return 0;
	} else if (!ec_guess_cofactor(group))

		return 0;

	return 1;
}


const EC_POINT *
EC_GROUP_get0_generator(const EC_GROUP *group)
Changes to jni/libressl/crypto/ec/ec_pmeth.c.
1
2
3
4
5
6
7
8
/* $OpenBSD: ec_pmeth.c,v 1.10 2017/01/29 17:49:23 beck Exp $ */
/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
 * project 2006.
 */
/* ====================================================================
 * Copyright (c) 2006 The OpenSSL Project.  All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
|







1
2
3
4
5
6
7
8
/* $OpenBSD: ec_pmeth.c,v 1.12 2019/09/09 18:06:25 jsing Exp $ */
/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
 * project 2006.
 */
/* ====================================================================
 * Copyright (c) 2006 The OpenSSL Project.  All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
62
63
64
65
66
67
68


69
70
71
72
73
74
75
76
77













78
79
80
81
82
83

84
85

86

87
88

89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108


















109
110
111
112
113
114
115

116
117


118

119
120
121
122
123
124
125
#include <openssl/asn1t.h>
#include <openssl/ec.h>
#include <openssl/ecdsa.h>
#include <openssl/err.h>
#include <openssl/evp.h>
#include <openssl/x509.h>



#include "evp_locl.h"

/* EC pkey context structure */

typedef struct {
	/* Key and paramgen group */
	EC_GROUP *gen_group;
	/* message digest */
	const EVP_MD *md;













} EC_PKEY_CTX;

static int 
pkey_ec_init(EVP_PKEY_CTX * ctx)
{
	EC_PKEY_CTX *dctx;

	dctx = malloc(sizeof(EC_PKEY_CTX));
	if (!dctx)

		return 0;

	dctx->gen_group = NULL;
	dctx->md = NULL;


	ctx->data = dctx;

	return 1;
}

static int 
pkey_ec_copy(EVP_PKEY_CTX * dst, EVP_PKEY_CTX * src)
{
	EC_PKEY_CTX *dctx, *sctx;
	if (!pkey_ec_init(dst))
		return 0;
	sctx = src->data;
	dctx = dst->data;
	if (sctx->gen_group) {
		dctx->gen_group = EC_GROUP_dup(sctx->gen_group);
		if (!dctx->gen_group)
			return 0;
	}
	dctx->md = sctx->md;


















	return 1;
}

static void 
pkey_ec_cleanup(EVP_PKEY_CTX * ctx)
{
	EC_PKEY_CTX *dctx = ctx->data;

	if (dctx) {
		EC_GROUP_free(dctx->gen_group);


		free(dctx);

	}
}

static int 
pkey_ec_sign(EVP_PKEY_CTX * ctx, unsigned char *sig, size_t * siglen,
    const unsigned char *tbs, size_t tbslen)
{







>
>









>
>
>
>
>
>
>
>
>
>
>
>
>






>
|
<
>

>
|
|
>




















>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







>
|

>
>

>







62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100

101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
#include <openssl/asn1t.h>
#include <openssl/ec.h>
#include <openssl/ecdsa.h>
#include <openssl/err.h>
#include <openssl/evp.h>
#include <openssl/x509.h>

#include "ec_lcl.h"
#include "ech_locl.h"
#include "evp_locl.h"

/* EC pkey context structure */

typedef struct {
	/* Key and paramgen group */
	EC_GROUP *gen_group;
	/* message digest */
	const EVP_MD *md;
	/* Duplicate key if custom cofactor needed */
	EC_KEY *co_key;
	/* Cofactor mode */
	signed char cofactor_mode;
	/* KDF (if any) to use for ECDH */
	char kdf_type;
	/* Message digest to use for key derivation */
	const EVP_MD *kdf_md;
	/* User key material */
	unsigned char *kdf_ukm;
	size_t kdf_ukmlen;
	/* KDF output length */
	size_t kdf_outlen;
} EC_PKEY_CTX;

static int 
pkey_ec_init(EVP_PKEY_CTX * ctx)
{
	EC_PKEY_CTX *dctx;

	if ((dctx = calloc(1, sizeof(EC_PKEY_CTX))) == NULL) {

		ECerror(ERR_R_MALLOC_FAILURE);
		return 0;
	}

	dctx->cofactor_mode = -1;
	dctx->kdf_type = EVP_PKEY_ECDH_KDF_NONE;

	ctx->data = dctx;

	return 1;
}

static int 
pkey_ec_copy(EVP_PKEY_CTX * dst, EVP_PKEY_CTX * src)
{
	EC_PKEY_CTX *dctx, *sctx;
	if (!pkey_ec_init(dst))
		return 0;
	sctx = src->data;
	dctx = dst->data;
	if (sctx->gen_group) {
		dctx->gen_group = EC_GROUP_dup(sctx->gen_group);
		if (!dctx->gen_group)
			return 0;
	}
	dctx->md = sctx->md;

	if (sctx->co_key) {
		dctx->co_key = EC_KEY_dup(sctx->co_key);
		if (!dctx->co_key)
			return 0;
	}
	dctx->kdf_type = sctx->kdf_type;
	dctx->kdf_md = sctx->kdf_md;
	dctx->kdf_outlen = sctx->kdf_outlen;
	if (sctx->kdf_ukm) {
		if ((dctx->kdf_ukm = calloc(1, sctx->kdf_ukmlen)) == NULL)
			return 0;
		memcpy(dctx->kdf_ukm, sctx->kdf_ukm, sctx->kdf_ukmlen);
	} else
		dctx->kdf_ukm = NULL;

	dctx->kdf_ukmlen = sctx->kdf_ukmlen;

	return 1;
}

static void 
pkey_ec_cleanup(EVP_PKEY_CTX * ctx)
{
	EC_PKEY_CTX *dctx = ctx->data;

	if (dctx != NULL) {
		EC_GROUP_free(dctx->gen_group);
		EC_KEY_free(dctx->co_key);
		free(dctx->kdf_ukm);
		free(dctx);
		ctx->data = NULL;
	}
}

static int 
pkey_ec_sign(EVP_PKEY_CTX * ctx, unsigned char *sig, size_t * siglen,
    const unsigned char *tbs, size_t tbslen)
{
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
		return 0;
	}
	if (dctx->md)
		type = EVP_MD_type(dctx->md);
	else
		type = NID_sha1;


	ret = ECDSA_sign(type, tbs, tbslen, sig, &sltmp, ec);

	if (ret <= 0)
		return ret;
	*siglen = (size_t) sltmp;
	return 1;
}

static int 







<

<







176
177
178
179
180
181
182

183

184
185
186
187
188
189
190
		return 0;
	}
	if (dctx->md)
		type = EVP_MD_type(dctx->md);
	else
		type = NID_sha1;


	ret = ECDSA_sign(type, tbs, tbslen, sig, &sltmp, ec);

	if (ret <= 0)
		return ret;
	*siglen = (size_t) sltmp;
	return 1;
}

static int 
170
171
172
173
174
175
176



177
178
179
180


181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198

199

200
201





































202
203
204
205
206
207

208
209
210
211
212
213
214
215
216
217
















































































218
219
220
221
222
223
224
225
226
227
228
229
230




231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260




















261
262
263
264
265
266
267

static int 
pkey_ec_derive(EVP_PKEY_CTX * ctx, unsigned char *key, size_t * keylen)
{
	int ret;
	size_t outlen;
	const EC_POINT *pubkey = NULL;



	if (!ctx->pkey || !ctx->peerkey) {
		ECerror(EC_R_KEYS_NOT_SET);
		return 0;
	}


	if (!key) {
		const EC_GROUP *group;
		group = EC_KEY_get0_group(ctx->pkey->pkey.ec);
		*keylen = (EC_GROUP_get_degree(group) + 7) / 8;
		return 1;
	}
	pubkey = EC_KEY_get0_public_key(ctx->peerkey->pkey.ec);

	/*
	 * NB: unlike PKCS#3 DH, if *outlen is less than maximum size this is
	 * not an error, the result is truncated.
	 */

	outlen = *keylen;

	ret = ECDH_compute_key(key, outlen, pubkey, ctx->pkey->pkey.ec, 0);
	if (ret < 0)
		return ret;

	*keylen = ret;

	return 1;
}






































static int 
pkey_ec_ctrl(EVP_PKEY_CTX * ctx, int type, int p1, void *p2)
{
	EC_PKEY_CTX *dctx = ctx->data;
	EC_GROUP *group;

	switch (type) {
	case EVP_PKEY_CTRL_EC_PARAMGEN_CURVE_NID:
		group = EC_GROUP_new_by_curve_name(p1);
		if (group == NULL) {
			ECerror(EC_R_INVALID_CURVE);
			return 0;
		}
		EC_GROUP_free(dctx->gen_group);
		dctx->gen_group = group;
		return 1;

















































































	case EVP_PKEY_CTRL_MD:
		if (EVP_MD_type((const EVP_MD *) p2) != NID_sha1 &&
		    EVP_MD_type((const EVP_MD *) p2) != NID_ecdsa_with_SHA1 &&
		    EVP_MD_type((const EVP_MD *) p2) != NID_sha224 &&
		    EVP_MD_type((const EVP_MD *) p2) != NID_sha256 &&
		    EVP_MD_type((const EVP_MD *) p2) != NID_sha384 &&
		    EVP_MD_type((const EVP_MD *) p2) != NID_sha512) {
			ECerror(EC_R_INVALID_DIGEST_TYPE);
			return 0;
		}
		dctx->md = p2;
		return 1;





	case EVP_PKEY_CTRL_PEER_KEY:
		/* Default behaviour is OK */
	case EVP_PKEY_CTRL_DIGESTINIT:
	case EVP_PKEY_CTRL_PKCS7_SIGN:
	case EVP_PKEY_CTRL_CMS_SIGN:
		return 1;

	default:
		return -2;

	}
}

static int 
pkey_ec_ctrl_str(EVP_PKEY_CTX * ctx,
    const char *type, const char *value)
{
	if (!strcmp(type, "ec_paramgen_curve")) {
		int nid;
		nid = EC_curve_nist2nid(value);
		if (nid == NID_undef)
			nid = OBJ_sn2nid(value);
		if (nid == NID_undef)
			nid = OBJ_ln2nid(value);
		if (nid == NID_undef) {
			ECerror(EC_R_INVALID_CURVE);
			return 0;
		}
		return EVP_PKEY_CTX_set_ec_paramgen_curve_nid(ctx, nid);




















	}
	return -2;
}

static int 
pkey_ec_paramgen(EVP_PKEY_CTX * ctx, EVP_PKEY * pkey)
{







>
>
>




>
>


|












|
|
|
>

>


>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>






>










>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>













>
>
>
>















|
<













>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413

414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453

static int 
pkey_ec_derive(EVP_PKEY_CTX * ctx, unsigned char *key, size_t * keylen)
{
	int ret;
	size_t outlen;
	const EC_POINT *pubkey = NULL;
	EC_KEY *eckey;
	EC_PKEY_CTX *dctx = ctx->data;

	if (!ctx->pkey || !ctx->peerkey) {
		ECerror(EC_R_KEYS_NOT_SET);
		return 0;
	}

	eckey = dctx->co_key ? dctx->co_key : ctx->pkey->pkey.ec;
	if (!key) {
		const EC_GROUP *group;
		group = EC_KEY_get0_group(eckey);
		*keylen = (EC_GROUP_get_degree(group) + 7) / 8;
		return 1;
	}
	pubkey = EC_KEY_get0_public_key(ctx->peerkey->pkey.ec);

	/*
	 * NB: unlike PKCS#3 DH, if *outlen is less than maximum size this is
	 * not an error, the result is truncated.
	 */

	outlen = *keylen;

	ret = ECDH_compute_key(key, outlen, pubkey, eckey, 0);
	if (ret <= 0)
		return 0;

	*keylen = ret;

	return 1;
}

static int
pkey_ec_kdf_derive(EVP_PKEY_CTX *ctx, unsigned char *key, size_t *keylen)
{
	EC_PKEY_CTX *dctx = ctx->data;
	unsigned char *ktmp = NULL;
	size_t ktmplen;
	int rv = 0;

	if (dctx->kdf_type == EVP_PKEY_ECDH_KDF_NONE)
		return pkey_ec_derive(ctx, key, keylen);

	if (!key) {
		*keylen = dctx->kdf_outlen;
		return 1;
	}
	if (*keylen != dctx->kdf_outlen)
		return 0;
	if (!pkey_ec_derive(ctx, NULL, &ktmplen))
		return 0;
	if ((ktmp = calloc(1, ktmplen)) == NULL) {
		ECerror(ERR_R_MALLOC_FAILURE);
		return 0;
	}
	if (!pkey_ec_derive(ctx, ktmp, &ktmplen))
		goto err;
	/* Do KDF stuff */
	if (!ecdh_KDF_X9_63(key, *keylen, ktmp, ktmplen, dctx->kdf_ukm,
	    dctx->kdf_ukmlen, dctx->kdf_md))
		goto err;
	rv = 1;

 err:
	freezero(ktmp, ktmplen);

	return rv;
}

static int 
pkey_ec_ctrl(EVP_PKEY_CTX * ctx, int type, int p1, void *p2)
{
	EC_PKEY_CTX *dctx = ctx->data;
	EC_GROUP *group;

	switch (type) {
	case EVP_PKEY_CTRL_EC_PARAMGEN_CURVE_NID:
		group = EC_GROUP_new_by_curve_name(p1);
		if (group == NULL) {
			ECerror(EC_R_INVALID_CURVE);
			return 0;
		}
		EC_GROUP_free(dctx->gen_group);
		dctx->gen_group = group;
		return 1;

	case EVP_PKEY_CTRL_EC_PARAM_ENC:
		if (!dctx->gen_group) {
			ECerror(EC_R_NO_PARAMETERS_SET);
			return 0;
		}
		EC_GROUP_set_asn1_flag(dctx->gen_group, p1);
		return 1;

	case EVP_PKEY_CTRL_EC_ECDH_COFACTOR:
		if (p1 == -2) {
			if (dctx->cofactor_mode != -1)
				return dctx->cofactor_mode;
			else {
				EC_KEY *ec_key = ctx->pkey->pkey.ec;
				return EC_KEY_get_flags(ec_key) & EC_FLAG_COFACTOR_ECDH ? 1 : 0;
			}
		} else if (p1 < -1 || p1 > 1)
			return -2;
		dctx->cofactor_mode = p1;
		if (p1 != -1) {
			EC_KEY *ec_key = ctx->pkey->pkey.ec;
			if (!ec_key->group)
				return -2;
			/* If cofactor is 1 cofactor mode does nothing */
			if (BN_is_one(&ec_key->group->cofactor))
				return 1;
			if (!dctx->co_key) {
				dctx->co_key = EC_KEY_dup(ec_key);
				if (!dctx->co_key)
					return 0;
			}
			if (p1)
				EC_KEY_set_flags(dctx->co_key, EC_FLAG_COFACTOR_ECDH);
			else
				EC_KEY_clear_flags(dctx->co_key, EC_FLAG_COFACTOR_ECDH);
		} else {
			EC_KEY_free(dctx->co_key);
			dctx->co_key = NULL;
		}
		return 1;

	case EVP_PKEY_CTRL_EC_KDF_TYPE:
		if (p1 == -2)
			return dctx->kdf_type;
		if (p1 != EVP_PKEY_ECDH_KDF_NONE && p1 != EVP_PKEY_ECDH_KDF_X9_63)
			return -2;
		dctx->kdf_type = p1;
		return 1;

	case EVP_PKEY_CTRL_EC_KDF_MD:
		dctx->kdf_md = p2;
		return 1;

	case EVP_PKEY_CTRL_GET_EC_KDF_MD:
		*(const EVP_MD **)p2 = dctx->kdf_md;
		return 1;

	case EVP_PKEY_CTRL_EC_KDF_OUTLEN:
		if (p1 <= 0)
			return -2;
		dctx->kdf_outlen = (size_t)p1;
		return 1;

	case EVP_PKEY_CTRL_GET_EC_KDF_OUTLEN:
		*(int *)p2 = dctx->kdf_outlen;
		return 1;

	case EVP_PKEY_CTRL_EC_KDF_UKM:
		free(dctx->kdf_ukm);
		dctx->kdf_ukm = p2;
		if (p2)
			dctx->kdf_ukmlen = p1;
		else
			dctx->kdf_ukmlen = 0;
		return 1;

	case EVP_PKEY_CTRL_GET_EC_KDF_UKM:
		*(unsigned char **)p2 = dctx->kdf_ukm;
		return dctx->kdf_ukmlen;

	case EVP_PKEY_CTRL_MD:
		if (EVP_MD_type((const EVP_MD *) p2) != NID_sha1 &&
		    EVP_MD_type((const EVP_MD *) p2) != NID_ecdsa_with_SHA1 &&
		    EVP_MD_type((const EVP_MD *) p2) != NID_sha224 &&
		    EVP_MD_type((const EVP_MD *) p2) != NID_sha256 &&
		    EVP_MD_type((const EVP_MD *) p2) != NID_sha384 &&
		    EVP_MD_type((const EVP_MD *) p2) != NID_sha512) {
			ECerror(EC_R_INVALID_DIGEST_TYPE);
			return 0;
		}
		dctx->md = p2;
		return 1;

	case EVP_PKEY_CTRL_GET_MD:
		*(const EVP_MD **)p2 = dctx->md;
		return 1;

	case EVP_PKEY_CTRL_PEER_KEY:
		/* Default behaviour is OK */
	case EVP_PKEY_CTRL_DIGESTINIT:
	case EVP_PKEY_CTRL_PKCS7_SIGN:
	case EVP_PKEY_CTRL_CMS_SIGN:
		return 1;

	default:
		return -2;

	}
}

static int 
pkey_ec_ctrl_str(EVP_PKEY_CTX * ctx, const char *type, const char *value)

{
	if (!strcmp(type, "ec_paramgen_curve")) {
		int nid;
		nid = EC_curve_nist2nid(value);
		if (nid == NID_undef)
			nid = OBJ_sn2nid(value);
		if (nid == NID_undef)
			nid = OBJ_ln2nid(value);
		if (nid == NID_undef) {
			ECerror(EC_R_INVALID_CURVE);
			return 0;
		}
		return EVP_PKEY_CTX_set_ec_paramgen_curve_nid(ctx, nid);
	} else if (strcmp(type, "ec_param_enc") == 0) {
		int param_enc;
		if (strcmp(value, "explicit") == 0)
			param_enc = 0;
		else if (strcmp(value, "named_curve") == 0)
			param_enc = OPENSSL_EC_NAMED_CURVE;
		else
			return -2;
		return EVP_PKEY_CTX_set_ec_param_enc(ctx, param_enc);
	} else if (strcmp(type, "ecdh_kdf_md") == 0) {
		const EVP_MD *md;
		if ((md = EVP_get_digestbyname(value)) == NULL) {
			ECerror(EC_R_INVALID_DIGEST);
			return 0;
		}
		return EVP_PKEY_CTX_set_ecdh_kdf_md(ctx, md);
	} else if (strcmp(type, "ecdh_cofactor_mode") == 0) {
		int co_mode;
		co_mode = atoi(value);
		return EVP_PKEY_CTX_set_ecdh_cofactor_mode(ctx, co_mode);
	}
	return -2;
}

static int 
pkey_ec_paramgen(EVP_PKEY_CTX * ctx, EVP_PKEY * pkey)
{
283
284
285
286
287
288
289


290
291
292
293
294
295
296
297



298

299
300





301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
	return ret;
}

static int 
pkey_ec_keygen(EVP_PKEY_CTX * ctx, EVP_PKEY * pkey)
{
	EC_KEY *ec = NULL;


	if (ctx->pkey == NULL) {
		ECerror(EC_R_NO_PARAMETERS_SET);
		return 0;
	}
	ec = EC_KEY_new();
	if (!ec)
		return 0;
	EVP_PKEY_assign_EC_KEY(pkey, ec);



	/* Note: if error return, pkey is freed by parent routine */

	if (!EVP_PKEY_copy_parameters(pkey, ctx->pkey))
		return 0;





	return EC_KEY_generate_key(pkey->pkey.ec);
}

const EVP_PKEY_METHOD ec_pkey_meth = {
	.pkey_id = EVP_PKEY_EC,

	.init = pkey_ec_init,
	.copy = pkey_ec_copy,
	.cleanup = pkey_ec_cleanup,

	.paramgen = pkey_ec_paramgen,

	.keygen = pkey_ec_keygen,

	.sign = pkey_ec_sign,

	.verify = pkey_ec_verify,

	.derive = pkey_ec_derive,

	.ctrl = pkey_ec_ctrl,
	.ctrl_str = pkey_ec_ctrl_str
};







>
>
|




|

|
>
>
>
|
>
|
|
>
>
>
>
>
|

















|




469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
	return ret;
}

static int 
pkey_ec_keygen(EVP_PKEY_CTX * ctx, EVP_PKEY * pkey)
{
	EC_KEY *ec = NULL;
	EC_PKEY_CTX *dctx = ctx->data;

	if (ctx->pkey == NULL && dctx->gen_group == NULL) {
		ECerror(EC_R_NO_PARAMETERS_SET);
		return 0;
	}
	ec = EC_KEY_new();
	if (ec == NULL)
		return 0;
	if (!EVP_PKEY_assign_EC_KEY(pkey, ec)) {
		EC_KEY_free(ec);
		return 0;
	}
	/* Note: if error is returned, we count on caller to free pkey->pkey.ec */
	if (ctx->pkey != NULL) {
		if (!EVP_PKEY_copy_parameters(pkey, ctx->pkey))
			return 0;
	} else {
		if (!EC_KEY_set_group(ec, dctx->gen_group))
			return 0;
	}

	return EC_KEY_generate_key(ec);
}

const EVP_PKEY_METHOD ec_pkey_meth = {
	.pkey_id = EVP_PKEY_EC,

	.init = pkey_ec_init,
	.copy = pkey_ec_copy,
	.cleanup = pkey_ec_cleanup,

	.paramgen = pkey_ec_paramgen,

	.keygen = pkey_ec_keygen,

	.sign = pkey_ec_sign,

	.verify = pkey_ec_verify,

	.derive = pkey_ec_kdf_derive,

	.ctrl = pkey_ec_ctrl,
	.ctrl_str = pkey_ec_ctrl_str
};
Added jni/libressl/crypto/ecdh/ecdh_kdf.c.














































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
/*
 * Written by Stephen Henson for the OpenSSL project.
 */
/* ====================================================================
 * Copyright (c) 2013 The OpenSSL Project.  All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 *
 * 1. Redistributions of source code must retain the above copyright
 *	notice, this list of conditions and the following disclaimer.
 *
 * 2. Redistributions in binary form must reproduce the above copyright
 *	notice, this list of conditions and the following disclaimer in
 *	the documentation and/or other materials provided with the
 *	distribution.
 *
 * 3. All advertising materials mentioning features or use of this
 *	software must display the following acknowledgment:
 *	"This product includes software developed by the OpenSSL Project
 *	for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
 *
 * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
 *	endorse or promote products derived from this software without
 *	prior written permission. For written permission, please contact
 *	openssl-core@openssl.org.
 *
 * 5. Products derived from this software may not be called "OpenSSL"
 *	nor may "OpenSSL" appear in their names without prior written
 *	permission of the OpenSSL Project.
 *
 * 6. Redistributions of any form whatsoever must retain the following
 *	acknowledgment:
 *	"This product includes software developed by the OpenSSL Project
 *	for use in the OpenSSL Toolkit (http://www.openssl.org/)"
 *
 * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
 * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
 * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
 * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
 * OF THE POSSIBILITY OF SUCH DAMAGE.
 * ====================================================================
 */

#include <string.h>

#include <openssl/ec.h>
#include <openssl/evp.h>

#include "ech_locl.h"

/*
 * Key derivation function from X9.63/SECG.
 */

/* Way more than we will ever need */
#define ECDH_KDF_MAX	(1 << 30)

int
ecdh_KDF_X9_63(unsigned char *out, size_t outlen, const unsigned char *Z,
    size_t Zlen, const unsigned char *sinfo, size_t sinfolen, const EVP_MD *md)
{
	EVP_MD_CTX *mctx = NULL;
	unsigned int i;
	size_t mdlen;
	unsigned char ctr[4];
	int rv = 0;

	if (sinfolen > ECDH_KDF_MAX || outlen > ECDH_KDF_MAX ||
	    Zlen > ECDH_KDF_MAX)
		return 0;
	mctx = EVP_MD_CTX_new();
	if (mctx == NULL)
		return 0;
	mdlen = EVP_MD_size(md);
	for (i = 1;; i++) {
		unsigned char mtmp[EVP_MAX_MD_SIZE];
		if (!EVP_DigestInit_ex(mctx, md, NULL))
			goto err;
		ctr[3] = i & 0xFF;
		ctr[2] = (i >> 8) & 0xFF;
		ctr[1] = (i >> 16) & 0xFF;
		ctr[0] = (i >> 24) & 0xFF;
		if (!EVP_DigestUpdate(mctx, Z, Zlen))
			goto err;
		if (!EVP_DigestUpdate(mctx, ctr, sizeof(ctr)))
			goto err;
		if (!EVP_DigestUpdate(mctx, sinfo, sinfolen))
			goto err;
		if (outlen >= mdlen) {
			if (!EVP_DigestFinal(mctx, out, NULL))
				goto err;
			outlen -= mdlen;
			if (outlen == 0)
				break;
			out += mdlen;
		} else {
			if (!EVP_DigestFinal(mctx, mtmp, NULL))
				goto err;
			memcpy(out, mtmp, outlen);
			explicit_bzero(mtmp, mdlen);
			break;
		}
	}
	rv = 1;

 err:
	EVP_MD_CTX_free(mctx);

	return rv;
}
Changes to jni/libressl/crypto/ecdh/ech_locl.h.
1
2
3
4
5
6
7
8
/* $OpenBSD: ech_locl.h,v 1.5 2016/12/21 15:49:29 jsing Exp $ */
/* ====================================================================
 * Copyright (c) 2000-2005 The OpenSSL Project.  All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 *
|







1
2
3
4
5
6
7
8
/* $OpenBSD: ech_locl.h,v 1.6 2019/09/05 16:12:36 jsing Exp $ */
/* ====================================================================
 * Copyright (c) 2000-2005 The OpenSSL Project.  All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 *
84
85
86
87
88
89
90






91
92
93
	int	flags;
	const ECDH_METHOD *meth;
	CRYPTO_EX_DATA ex_data;
} ECDH_DATA;

ECDH_DATA *ecdh_check(EC_KEY *);







__END_HIDDEN_DECLS

#endif /* HEADER_ECH_LOCL_H */







>
>
>
>
>
>



84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
	int	flags;
	const ECDH_METHOD *meth;
	CRYPTO_EX_DATA ex_data;
} ECDH_DATA;

ECDH_DATA *ecdh_check(EC_KEY *);

/*
 * ECDH Key Derivation Function as defined in ANSI X9.63.
 */
int ecdh_KDF_X9_63(unsigned char *out, size_t outlen, const unsigned char *Z,
    size_t Zlen, const unsigned char *sinfo, size_t sinfolen, const EVP_MD *md);

__END_HIDDEN_DECLS

#endif /* HEADER_ECH_LOCL_H */
Changes to jni/libressl/crypto/ecdsa/ecs_ossl.c.
1
2
3
4
5
6
7
8
/* $OpenBSD: ecs_ossl.c,v 1.18 2019/01/19 01:12:48 tb Exp $ */
/*
 * Written by Nils Larsch for the OpenSSL project
 */
/* ====================================================================
 * Copyright (c) 1998-2004 The OpenSSL Project.  All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
|







1
2
3
4
5
6
7
8
/* $OpenBSD: ecs_ossl.c,v 1.20 2019/06/04 18:15:27 tb Exp $ */
/*
 * Written by Nils Larsch for the OpenSSL project
 */
/* ====================================================================
 * Copyright (c) 1998-2004 The OpenSSL Project.  All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
		 * Compute:
		 *
		 *  s = inv(k)(m + xr) mod order
		 *
		 * In order to reduce the possibility of a side-channel attack,
		 * the following is calculated using a blinding value:
		 *
		 *  s = inv(k)inv(b)(bm + bxr) mod order
		 *
		 * where b is a random value in the range [1, order-1].
		 */

		/* Generate b in range [1, order-1]. */
		if (!BN_sub(range, order, BN_value_one())) {
			ECDSAerror(ERR_R_BN_LIB);







|







325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
		 * Compute:
		 *
		 *  s = inv(k)(m + xr) mod order
		 *
		 * In order to reduce the possibility of a side-channel attack,
		 * the following is calculated using a blinding value:
		 *
		 *  s = inv(b)(bm + bxr)inv(k) mod order
		 *
		 * where b is a random value in the range [1, order-1].
		 */

		/* Generate b in range [1, order-1]. */
		if (!BN_sub(range, order, BN_value_one())) {
			ECDSAerror(ERR_R_BN_LIB);
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
			ECDSAerror(ERR_R_BN_LIB);
			goto err;
		}
		if (!BN_mod_add(s, bm, bxr, order, ctx)) { /* s = bm + bxr */
			ECDSAerror(ERR_R_BN_LIB);
			goto err;
		}
		if (!BN_mod_mul(s, s, binv, order, ctx)) { /* s = m + xr */
			ECDSAerror(ERR_R_BN_LIB);
			goto err;
		}
		if (!BN_mod_mul(s, s, ckinv, order, ctx)) {
			ECDSAerror(ERR_R_BN_LIB);
			goto err;
		}

		if (BN_is_zero(s)) {
			/*
			 * If kinv and r have been supplied by the caller,







|



|







365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
			ECDSAerror(ERR_R_BN_LIB);
			goto err;
		}
		if (!BN_mod_add(s, bm, bxr, order, ctx)) { /* s = bm + bxr */
			ECDSAerror(ERR_R_BN_LIB);
			goto err;
		}
		if (!BN_mod_mul(s, s, ckinv, order, ctx)) { /* s = b(m + xr)k^-1 */
			ECDSAerror(ERR_R_BN_LIB);
			goto err;
		}
		if (!BN_mod_mul(s, s, binv, order, ctx)) { /* s = (m + xr)k^-1 */
			ECDSAerror(ERR_R_BN_LIB);
			goto err;
		}

		if (BN_is_zero(s)) {
			/*
			 * If kinv and r have been supplied by the caller,
Changes to jni/libressl/crypto/err/err_all.c.
1
2
3
4
5
6
7
8
/* $OpenBSD: err_all.c,v 1.24 2018/03/17 16:20:01 beck Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
 * All rights reserved.
 *
 * This package is an SSL implementation written
 * by Eric Young (eay@cryptsoft.com).
 * The implementation was written so as to conform with Netscapes SSL.
 *
|







1
2
3
4
5
6
7
8
/* $OpenBSD: err_all.c,v 1.25 2019/09/09 17:56:21 jsing Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
 * All rights reserved.
 *
 * This package is an SSL implementation written
 * by Eric Young (eay@cryptsoft.com).
 * The implementation was written so as to conform with Netscapes SSL.
 *
62
63
64
65
66
67
68

69
70
71
72
73
74
75
#include <openssl/opensslconf.h>

#include <openssl/asn1.h>
#include <openssl/bio.h>
#include <openssl/bn.h>
#include <openssl/buffer.h>
#include <openssl/conf.h>

#include <openssl/dso.h>
#include <openssl/err.h>
#include <openssl/evp.h>
#include <openssl/objects.h>
#include <openssl/ocsp.h>
#include <openssl/pem2.h>
#include <openssl/pkcs12.h>







>







62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
#include <openssl/opensslconf.h>

#include <openssl/asn1.h>
#include <openssl/bio.h>
#include <openssl/bn.h>
#include <openssl/buffer.h>
#include <openssl/conf.h>
#include <openssl/cms.h>
#include <openssl/dso.h>
#include <openssl/err.h>
#include <openssl/evp.h>
#include <openssl/objects.h>
#include <openssl/ocsp.h>
#include <openssl/pem2.h>
#include <openssl/pkcs12.h>
150
151
152
153
154
155
156



157
158
159
160
161
162
163
164
165
	ERR_load_ENGINE_strings();
#endif
	ERR_load_OCSP_strings();
	ERR_load_UI_strings();
#ifndef OPENSSL_NO_GOST
	ERR_load_GOST_strings();
#endif



#endif
}

void
ERR_load_crypto_strings(void)
{
	static pthread_once_t loaded = PTHREAD_ONCE_INIT;
	(void) pthread_once(&loaded, ERR_load_crypto_strings_internal);
}







>
>
>









151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
	ERR_load_ENGINE_strings();
#endif
	ERR_load_OCSP_strings();
	ERR_load_UI_strings();
#ifndef OPENSSL_NO_GOST
	ERR_load_GOST_strings();
#endif
#ifndef OPENSSL_NO_CMS
	ERR_load_CMS_strings();
#endif
#endif
}

void
ERR_load_crypto_strings(void)
{
	static pthread_once_t loaded = PTHREAD_ONCE_INIT;
	(void) pthread_once(&loaded, ERR_load_crypto_strings_internal);
}
Changes to jni/libressl/crypto/evp/digest.c.
1
2
3
4
5
6
7
8
/* $OpenBSD: digest.c,v 1.30 2018/04/14 07:09:21 tb Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
 * All rights reserved.
 *
 * This package is an SSL implementation written
 * by Eric Young (eay@cryptsoft.com).
 * The implementation was written so as to conform with Netscapes SSL.
 *
|







1
2
3
4
5
6
7
8
/* $OpenBSD: digest.c,v 1.31 2019/04/19 17:04:45 jsing Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
 * All rights reserved.
 *
 * This package is an SSL implementation written
 * by Eric Young (eay@cryptsoft.com).
 * The implementation was written so as to conform with Netscapes SSL.
 *
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
		    !EVP_MD_CTX_test_flags(ctx, EVP_MD_CTX_FLAG_REUSE)) {
			freezero(ctx->md_data, ctx->digest->ctx_size);
			ctx->md_data = NULL;
		}
		ctx->digest = type;
		if (!(ctx->flags & EVP_MD_CTX_FLAG_NO_INIT) && type->ctx_size) {
			ctx->update = type->update;
			ctx->md_data = malloc(type->ctx_size);
			if (ctx->md_data == NULL) {
				EVP_PKEY_CTX_free(ctx->pctx);
				ctx->pctx = NULL;
				EVPerror(ERR_R_MALLOC_FAILURE);
				return 0;
			}
		}







|







182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
		    !EVP_MD_CTX_test_flags(ctx, EVP_MD_CTX_FLAG_REUSE)) {
			freezero(ctx->md_data, ctx->digest->ctx_size);
			ctx->md_data = NULL;
		}
		ctx->digest = type;
		if (!(ctx->flags & EVP_MD_CTX_FLAG_NO_INIT) && type->ctx_size) {
			ctx->update = type->update;
			ctx->md_data = calloc(1, type->ctx_size);
			if (ctx->md_data == NULL) {
				EVP_PKEY_CTX_free(ctx->pctx);
				ctx->pctx = NULL;
				EVPerror(ERR_R_MALLOC_FAILURE);
				return 0;
			}
		}
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
		EVP_MD_CTX_set_flags(out, EVP_MD_CTX_FLAG_REUSE);
	} else
		tmp_buf = NULL;
	EVP_MD_CTX_cleanup(out);
	memcpy(out, in, sizeof *out);

	if (in->md_data && out->digest->ctx_size) {
		if (tmp_buf)
			out->md_data = tmp_buf;
		else {
			out->md_data = malloc(out->digest->ctx_size);
			if (!out->md_data) {
				EVPerror(ERR_R_MALLOC_FAILURE);
				return 0;
			}
		}
		memcpy(out->md_data, in->md_data, out->digest->ctx_size);
	}








|

|
|
|







277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
		EVP_MD_CTX_set_flags(out, EVP_MD_CTX_FLAG_REUSE);
	} else
		tmp_buf = NULL;
	EVP_MD_CTX_cleanup(out);
	memcpy(out, in, sizeof *out);

	if (in->md_data && out->digest->ctx_size) {
		if (tmp_buf) {
			out->md_data = tmp_buf;
		} else {
			out->md_data = calloc(1, out->digest->ctx_size);
			if (out->md_data == NULL) {
				EVPerror(ERR_R_MALLOC_FAILURE);
				return 0;
			}
		}
		memcpy(out->md_data, in->md_data, out->digest->ctx_size);
	}

Changes to jni/libressl/crypto/evp/e_aes.c.
1
2
3
4
5
6
7
8
/* $OpenBSD: e_aes.c,v 1.35 2019/03/17 18:07:41 tb Exp $ */
/* ====================================================================
 * Copyright (c) 2001-2011 The OpenSSL Project.  All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 *
|







1
2
3
4
5
6
7
8
/* $OpenBSD: e_aes.c,v 1.39 2019/05/12 15:52:46 tb Exp $ */
/* ====================================================================
 * Copyright (c) 2001-2011 The OpenSSL Project.  All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 *
830
831
832
833
834
835
836

837
838
839
840
841
842
843
844
845
846
847
848
		EVP_AES_GCM_CTX *gctx_out = out->cipher_data;

		if (gctx->gcm.key) {
			if (gctx->gcm.key != &gctx->ks)
				return 0;
			gctx_out->gcm.key = &gctx_out->ks;
		}

		if (gctx->iv == c->iv)
			gctx_out->iv = out->iv;
		else {
			gctx_out->iv = malloc(gctx->ivlen);
			if (!gctx_out->iv)
				return 0;
			memcpy(gctx_out->iv, gctx->iv, gctx->ivlen);
		}
		return 1;
	    }

	default:







>
|

|
|
<







830
831
832
833
834
835
836
837
838
839
840
841

842
843
844
845
846
847
848
		EVP_AES_GCM_CTX *gctx_out = out->cipher_data;

		if (gctx->gcm.key) {
			if (gctx->gcm.key != &gctx->ks)
				return 0;
			gctx_out->gcm.key = &gctx_out->ks;
		}

		if (gctx->iv == c->iv) {
			gctx_out->iv = out->iv;
		} else {
			if ((gctx_out->iv = calloc(1, gctx->ivlen)) == NULL)

				return 0;
			memcpy(gctx_out->iv, gctx->iv, gctx->ivlen);
		}
		return 1;
	    }

	default:
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
		tag_len = EVP_AEAD_AES_GCM_TAG_LEN;

	if (tag_len > EVP_AEAD_AES_GCM_TAG_LEN) {
		EVPerror(EVP_R_TAG_TOO_LARGE);
		return 0;
	}

	gcm_ctx = malloc(sizeof(struct aead_aes_gcm_ctx));
	if (gcm_ctx == NULL)
		return 0;

#ifdef AESNI_CAPABLE
	if (AESNI_CAPABLE) {
		aesni_set_encrypt_key(key, key_bits, &gcm_ctx->ks.ks);
		CRYPTO_gcm128_init(&gcm_ctx->gcm, &gcm_ctx->ks.ks,
		    (block128_f)aesni_encrypt);







|
<







1392
1393
1394
1395
1396
1397
1398
1399

1400
1401
1402
1403
1404
1405
1406
		tag_len = EVP_AEAD_AES_GCM_TAG_LEN;

	if (tag_len > EVP_AEAD_AES_GCM_TAG_LEN) {
		EVPerror(EVP_R_TAG_TOO_LARGE);
		return 0;
	}

	if ((gcm_ctx = calloc(1, sizeof(struct aead_aes_gcm_ctx))) == NULL)

		return 0;

#ifdef AESNI_CAPABLE
	if (AESNI_CAPABLE) {
		aesni_set_encrypt_key(key, key_bits, &gcm_ctx->ks.ks);
		CRYPTO_gcm128_init(&gcm_ctx->gcm, &gcm_ctx->ks.ks,
		    (block128_f)aesni_encrypt);
Changes to jni/libressl/crypto/evp/e_des3.c.
1
2
3
4
5
6
7
8
/* $OpenBSD: e_des3.c,v 1.19 2015/10/12 06:05:52 guenther Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
 * All rights reserved.
 *
 * This package is an SSL implementation written
 * by Eric Young (eay@cryptsoft.com).
 * The implementation was written so as to conform with Netscapes SSL.
 *
|







1
2
3
4
5
6
7
8
/* $OpenBSD: e_des3.c,v 1.20 2019/05/14 15:40:44 beck Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
 * All rights reserved.
 *
 * This package is an SSL implementation written
 * by Eric Young (eay@cryptsoft.com).
 * The implementation was written so as to conform with Netscapes SSL.
 *
159
160
161
162
163
164
165


166
167
168
169
170
171
172
   way, so wrap it here */
static int
des_ede3_cfb1_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
    const unsigned char *in, size_t inl)
{
	size_t n;
	unsigned char c[1], d[1];



	for (n = 0; n < inl; ++n) {
		c[0] = (in[n/8]&(1 << (7 - n % 8))) ? 0x80 : 0;
		DES_ede3_cfb_encrypt(c, d, 1, 1,
		    &data(ctx)->ks1, &data(ctx)->ks2, &data(ctx)->ks3,
		    (DES_cblock *)ctx->iv, ctx->encrypt);
		out[n / 8] = (out[n / 8] & ~(0x80 >> (unsigned int)(n % 8))) |







>
>







159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
   way, so wrap it here */
static int
des_ede3_cfb1_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
    const unsigned char *in, size_t inl)
{
	size_t n;
	unsigned char c[1], d[1];
	if (!(ctx->flags & EVP_CIPH_FLAG_LENGTH_BITS))
		inl *= 8;

	for (n = 0; n < inl; ++n) {
		c[0] = (in[n/8]&(1 << (7 - n % 8))) ? 0x80 : 0;
		DES_ede3_cfb_encrypt(c, d, 1, 1,
		    &data(ctx)->ks1, &data(ctx)->ks2, &data(ctx)->ks3,
		    (DES_cblock *)ctx->iv, ctx->encrypt);
		out[n / 8] = (out[n / 8] & ~(0x80 >> (unsigned int)(n % 8))) |
Changes to jni/libressl/crypto/evp/evp_enc.c.
1
2
3
4
5
6
7
8
/* $OpenBSD: evp_enc.c,v 1.40 2019/03/17 18:07:41 tb Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
 * All rights reserved.
 *
 * This package is an SSL implementation written
 * by Eric Young (eay@cryptsoft.com).
 * The implementation was written so as to conform with Netscapes SSL.
 *
|







1
2
3
4
5
6
7
8
/* $OpenBSD: evp_enc.c,v 1.43 2019/04/14 17:16:57 jsing Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
 * All rights reserved.
 *
 * This package is an SSL implementation written
 * by Eric Young (eay@cryptsoft.com).
 * The implementation was written so as to conform with Netscapes SSL.
 *
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
			ctx->engine = impl;
		} else
			ctx->engine = NULL;
#endif

		ctx->cipher = cipher;
		if (ctx->cipher->ctx_size) {
			ctx->cipher_data = malloc(ctx->cipher->ctx_size);
			if (!ctx->cipher_data) {
				EVPerror(ERR_R_MALLOC_FAILURE);
				return 0;
			}
		} else {
			ctx->cipher_data = NULL;
		}
		ctx->key_len = cipher->key_len;







|
|







140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
			ctx->engine = impl;
		} else
			ctx->engine = NULL;
#endif

		ctx->cipher = cipher;
		if (ctx->cipher->ctx_size) {
			ctx->cipher_data = calloc(1, ctx->cipher->ctx_size);
			if (ctx->cipher_data == NULL) {
				EVPerror(ERR_R_MALLOC_FAILURE);
				return 0;
			}
		} else {
			ctx->cipher_data = NULL;
		}
		ctx->key_len = cipher->key_len;
577
578
579
580
581
582
583

584
585
586
587
588
589
590
	if (c->cipher != NULL) {
		if (c->cipher->cleanup && !c->cipher->cleanup(c))
			return 0;
		/* Cleanse cipher context data */
		if (c->cipher_data)
			explicit_bzero(c->cipher_data, c->cipher->ctx_size);
	}

	free(c->cipher_data);
#ifndef OPENSSL_NO_ENGINE
	ENGINE_finish(c->engine);
#endif
	explicit_bzero(c, sizeof(EVP_CIPHER_CTX));
	return 1;
}







>







577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
	if (c->cipher != NULL) {
		if (c->cipher->cleanup && !c->cipher->cleanup(c))
			return 0;
		/* Cleanse cipher context data */
		if (c->cipher_data)
			explicit_bzero(c->cipher_data, c->cipher->ctx_size);
	}
	/* XXX - store size of cipher_data so we can always freezero(). */
	free(c->cipher_data);
#ifndef OPENSSL_NO_ENGINE
	ENGINE_finish(c->engine);
#endif
	explicit_bzero(c, sizeof(EVP_CIPHER_CTX));
	return 1;
}
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679













680
681
	}
#endif

	EVP_CIPHER_CTX_cleanup(out);
	memcpy(out, in, sizeof *out);

	if (in->cipher_data && in->cipher->ctx_size) {
		out->cipher_data = malloc(in->cipher->ctx_size);
		if (!out->cipher_data) {
			EVPerror(ERR_R_MALLOC_FAILURE);
			return 0;
		}
		memcpy(out->cipher_data, in->cipher_data, in->cipher->ctx_size);
	}

	if (in->cipher->flags & EVP_CIPH_CUSTOM_COPY)
		return in->cipher->ctrl((EVP_CIPHER_CTX *)in,
		    EVP_CTRL_COPY, 0, out);













	return 1;
}







|
|






|
|
|
>
>
>
>
>
>
>
>
>
>
>
>
>


663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
	}
#endif

	EVP_CIPHER_CTX_cleanup(out);
	memcpy(out, in, sizeof *out);

	if (in->cipher_data && in->cipher->ctx_size) {
		out->cipher_data = calloc(1, in->cipher->ctx_size);
		if (out->cipher_data == NULL) {
			EVPerror(ERR_R_MALLOC_FAILURE);
			return 0;
		}
		memcpy(out->cipher_data, in->cipher_data, in->cipher->ctx_size);
	}

	if (in->cipher->flags & EVP_CIPH_CUSTOM_COPY) {
		if (!in->cipher->ctrl((EVP_CIPHER_CTX *)in, EVP_CTRL_COPY,
		    0, out)) {
			/*
			 * If the custom copy control failed, assume that there
			 * may still be pointers copied in the cipher_data that
			 * we do not own. This may result in a leak from a bad
			 * custom copy control, but that's preferable to a
			 * double free...
			 */
			freezero(out->cipher_data, in->cipher->ctx_size);
			out->cipher_data = NULL;
			return 0;
		}
	}

	return 1;
}
Changes to jni/libressl/crypto/gost/streebog.c.
1
2
3
4
5
6
7
8
/* $OpenBSD: streebog.c,v 1.5 2015/09/10 15:56:25 jsing Exp $ */
/*
 * Copyright (c) 2014 Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
 * Copyright (c) 2005-2006 Cryptocom LTD
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
|







1
2
3
4
5
6
7
8
/* $OpenBSD: streebog.c,v 1.6 2019/05/09 22:54:28 tb Exp $ */
/*
 * Copyright (c) 2014 Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
 * Copyright (c) 2005-2006 Cryptocom LTD
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
1236
1237
1238
1239
1240
1241
1242

1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260

1261
1262
1263
1264
1265
1266

1267
1268
1269
1270
1271
1272
1273
}


static void
streebog_single_block(STREEBOG_CTX *ctx, const unsigned char *in, size_t num)
{
	STREEBOG_LONG64 M[8], l;

	int i;

	for (i = 0; i < 8; i++)
		M[i] = PULL64(in[i*8]);

	gN(ctx->h, M, ctx->N);

	l = ctx->N[0];
	ctx->N[0] += num;

	if (ctx->N[0] < l || ctx->N[0] < num) {
		for (i = 1; i < 8; i++) {
			ctx->N[i]++;
			if (ctx->N[i] != 0)
				break;
		}
	}


	ctx->Sigma[0] += M[0];
	for (i = 1; i < 8; i++)
		if (ctx->Sigma[i-1] < M[i-1])
			ctx->Sigma[i] += M[i] + 1;
		else
			ctx->Sigma[i] += M[i];

}



static void
streebog_block_data_order(STREEBOG_CTX *ctx, const unsigned char *in,
    size_t num)







>


















>

|
|
|
<
|
>







1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266

1267
1268
1269
1270
1271
1272
1273
1274
1275
}


static void
streebog_single_block(STREEBOG_CTX *ctx, const unsigned char *in, size_t num)
{
	STREEBOG_LONG64 M[8], l;
	STREEBOG_LONG64 CF;
	int i;

	for (i = 0; i < 8; i++)
		M[i] = PULL64(in[i*8]);

	gN(ctx->h, M, ctx->N);

	l = ctx->N[0];
	ctx->N[0] += num;

	if (ctx->N[0] < l || ctx->N[0] < num) {
		for (i = 1; i < 8; i++) {
			ctx->N[i]++;
			if (ctx->N[i] != 0)
				break;
		}
	}

	CF = 0;
	ctx->Sigma[0] += M[0];
	for (i = 1; i < 8; i++) {
		if (ctx->Sigma[i-1] != M[i-1])
			CF = (ctx->Sigma[i-1] < M[i-1]);

		ctx->Sigma[i] += M[i] + CF;
	}
}



static void
streebog_block_data_order(STREEBOG_CTX *ctx, const unsigned char *in,
    size_t num)
Changes to jni/libressl/crypto/lhash/lhash.c.
1
2
3
4
5
6
7
8
/* $OpenBSD: lhash.c,v 1.18 2016/11/08 20:20:06 miod Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
 * All rights reserved.
 *
 * This package is an SSL implementation written
 * by Eric Young (eay@cryptsoft.com).
 * The implementation was written so as to conform with Netscapes SSL.
 *
|







1
2
3
4
5
6
7
8
/* $OpenBSD: lhash.c,v 1.19 2019/05/12 00:09:59 beck Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
 * All rights reserved.
 *
 * This package is an SSL implementation written
 * by Eric Young (eay@cryptsoft.com).
 * The implementation was written so as to conform with Netscapes SSL.
 *
112
113
114
115
116
117
118
119
120
121
122

123
124
125
126

127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
static void contract(_LHASH *lh);
static LHASH_NODE **getrn(_LHASH *lh, const void *data, unsigned long *rhash);

_LHASH *
lh_new(LHASH_HASH_FN_TYPE h, LHASH_COMP_FN_TYPE c)
{
	_LHASH *ret;
	int i;

	if ((ret = malloc(sizeof(_LHASH))) == NULL)
		goto err0;

	if ((ret->b = reallocarray(NULL, MIN_NODES, sizeof(LHASH_NODE *))) == NULL)
		goto err1;
	for (i = 0; i < MIN_NODES; i++)
		ret->b[i] = NULL;

	ret->comp = ((c == NULL) ? (LHASH_COMP_FN_TYPE)strcmp : c);
	ret->hash = ((h == NULL) ? (LHASH_HASH_FN_TYPE)lh_strhash : h);
	ret->num_nodes = MIN_NODES / 2;
	ret->num_alloc_nodes = MIN_NODES;
	ret->p = 0;
	ret->pmax = MIN_NODES / 2;
	ret->up_load = UP_LOAD;
	ret->down_load = DOWN_LOAD;
	ret->num_items = 0;

	ret->num_expands = 0;
	ret->num_expand_reallocs = 0;
	ret->num_contracts = 0;
	ret->num_contract_reallocs = 0;
	ret->num_hash_calls = 0;
	ret->num_comp_calls = 0;
	ret->num_insert = 0;
	ret->num_replace = 0;
	ret->num_delete = 0;
	ret->num_no_delete = 0;
	ret->num_retrieve = 0;
	ret->num_retrieve_miss = 0;
	ret->num_hash_comps = 0;

	ret->error = 0;
	return (ret);

err1:
	free(ret);
err0:
	return (NULL);
}

void
lh_free(_LHASH *lh)
{
	unsigned int i;
	LHASH_NODE *n, *nn;







<

|
<
>
|
|
<
|
>




<



<

<
<
<
<
<
<
<
<
<
<
<
<
<
<
<

<
<
<
<
<







112
113
114
115
116
117
118

119
120

121
122
123

124
125
126
127
128
129

130
131
132

133















134





135
136
137
138
139
140
141
static void contract(_LHASH *lh);
static LHASH_NODE **getrn(_LHASH *lh, const void *data, unsigned long *rhash);

_LHASH *
lh_new(LHASH_HASH_FN_TYPE h, LHASH_COMP_FN_TYPE c)
{
	_LHASH *ret;


	if ((ret = calloc(1, sizeof(_LHASH))) == NULL)

		return NULL;
	if ((ret->b = calloc(MIN_NODES, sizeof(LHASH_NODE *))) == NULL) {
		free(ret);

		return NULL;
	}
	ret->comp = ((c == NULL) ? (LHASH_COMP_FN_TYPE)strcmp : c);
	ret->hash = ((h == NULL) ? (LHASH_HASH_FN_TYPE)lh_strhash : h);
	ret->num_nodes = MIN_NODES / 2;
	ret->num_alloc_nodes = MIN_NODES;

	ret->pmax = MIN_NODES / 2;
	ret->up_load = UP_LOAD;
	ret->down_load = DOWN_LOAD;

















	return (ret);





}

void
lh_free(_LHASH *lh)
{
	unsigned int i;
	LHASH_NODE *n, *nn;
Changes to jni/libressl/crypto/md5/md5-masm-x86_64.S.







1




2
























































3
4
5
6
7
8
9







OPTION	DOTNAME




#include "x86_arch.h"
























































.text$	SEGMENT ALIGN(64) 'CODE'
ALIGN	16

PUBLIC	md5_block_asm_data_order

md5_block_asm_data_order	PROC PUBLIC
	mov	QWORD PTR[8+rsp],rdi	;WIN64 prologue
>
>
>
>
>
>
>

>
>
>
>
|
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
; 1 "crypto/md5/md5-masm-x86_64.S.tmp"
; 1 "<built-in>" 1
; 1 "<built-in>" 3
; 349 "<built-in>" 3
; 1 "<command line>" 1
; 1 "<built-in>" 2
; 1 "crypto/md5/md5-masm-x86_64.S.tmp" 2
OPTION	DOTNAME

; 1 "./crypto/x86_arch.h" 1


; 16 "./crypto/x86_arch.h"









; 40 "./crypto/x86_arch.h"













































; 3 "crypto/md5/md5-masm-x86_64.S.tmp" 2
.text$	SEGMENT ALIGN(64) 'CODE'
ALIGN	16

PUBLIC	md5_block_asm_data_order

md5_block_asm_data_order	PROC PUBLIC
	mov	QWORD PTR[8+rsp],rdi	;WIN64 prologue
679
680
681
682
683
684
685

	mov	rsi,QWORD PTR[16+rsp]
	DB	0F3h,0C3h		;repret
$L$SEH_end_md5_block_asm_data_order::
md5_block_asm_data_order	ENDP

.text$	ENDS
END








>
746
747
748
749
750
751
752
753
	mov	rsi,QWORD PTR[16+rsp]
	DB	0F3h,0C3h		;repret
$L$SEH_end_md5_block_asm_data_order::
md5_block_asm_data_order	ENDP

.text$	ENDS
END

Changes to jni/libressl/crypto/modes/ccm128.c.
1
2
3
4
5
6
7
8
/* $OpenBSD: ccm128.c,v 1.4 2015/02/10 09:46:30 miod Exp $ */
/* ====================================================================
 * Copyright (c) 2011 The OpenSSL Project.  All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 *
|







1
2
3
4
5
6
7
8
/* $OpenBSD: ccm128.c,v 1.5 2019/05/08 14:18:25 tb Exp $ */
/* ====================================================================
 * Copyright (c) 2011 The OpenSSL Project.  All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 *
431
432
433
434
435
436
437
438
439
440
441
	return 0;
}

size_t CRYPTO_ccm128_tag(CCM128_CONTEXT *ctx,unsigned char *tag,size_t len)
{	unsigned int M = (ctx->nonce.c[0]>>3)&7;	/* the M parameter */

	M *= 2; M += 2;
	if (len<M)	return 0;
	memcpy(tag,ctx->cmac.c,M);
	return M;
}







|



431
432
433
434
435
436
437
438
439
440
441
	return 0;
}

size_t CRYPTO_ccm128_tag(CCM128_CONTEXT *ctx,unsigned char *tag,size_t len)
{	unsigned int M = (ctx->nonce.c[0]>>3)&7;	/* the M parameter */

	M *= 2; M += 2;
	if (len != M)	return 0;
	memcpy(tag,ctx->cmac.c,M);
	return M;
}
Changes to jni/libressl/crypto/modes/ghash-masm-x86_64.S.







1




2
























































3
4
5
6
7
8
9







OPTION	DOTNAME




#include "x86_arch.h"
























































.text$	SEGMENT ALIGN(64) 'CODE'

PUBLIC	gcm_gmult_4bit

ALIGN	16
gcm_gmult_4bit	PROC PUBLIC
	mov	QWORD PTR[8+rsp],rdi	;WIN64 prologue
>
>
>
>
>
>
>

>
>
>
>
|
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
; 1 "crypto/modes/ghash-masm-x86_64.S.tmp"
; 1 "<built-in>" 1
; 1 "<built-in>" 3
; 349 "<built-in>" 3
; 1 "<command line>" 1
; 1 "<built-in>" 2
; 1 "crypto/modes/ghash-masm-x86_64.S.tmp" 2
OPTION	DOTNAME

; 1 "./crypto/x86_arch.h" 1


; 16 "./crypto/x86_arch.h"









; 40 "./crypto/x86_arch.h"













































; 3 "crypto/modes/ghash-masm-x86_64.S.tmp" 2
.text$	SEGMENT ALIGN(64) 'CODE'

PUBLIC	gcm_gmult_4bit

ALIGN	16
gcm_gmult_4bit	PROC PUBLIC
	mov	QWORD PTR[8+rsp],rdi	;WIN64 prologue
1182
1183
1184
1185
1186
1187
1188

DB	013h,088h,002h,000h	
DB	00dh,078h,001h,000h	
DB	008h,068h,000h,000h	
DB	004h,0a2h,000h,000h	

.xdata	ENDS
END








>
1249
1250
1251
1252
1253
1254
1255
1256
DB	013h,088h,002h,000h	
DB	00dh,078h,001h,000h	
DB	008h,068h,000h,000h	
DB	004h,0a2h,000h,000h	

.xdata	ENDS
END

Changes to jni/libressl/crypto/objects/obj_dat.c.
1
2
3
4
5
6
7
8
/* $OpenBSD: obj_dat.c,v 1.41 2018/09/08 13:49:26 tb Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
 * All rights reserved.
 *
 * This package is an SSL implementation written
 * by Eric Young (eay@cryptsoft.com).
 * The implementation was written so as to conform with Netscapes SSL.
 *
|







1
2
3
4
5
6
7
8
/* $OpenBSD: obj_dat.c,v 1.42 2019/07/03 03:24:04 deraadt Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
 * All rights reserved.
 *
 * This package is an SSL implementation written
 * by Eric Young (eay@cryptsoft.com).
 * The implementation was written so as to conform with Netscapes SSL.
 *
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
			char *bndec;

			bndec = BN_bn2dec(bl);
			if (!bndec)
				goto err;
			i = snprintf(buf, buf_len, ".%s", bndec);
			free(bndec);
			if (i == -1)
				goto err;
			if (i >= buf_len) {
				buf_len = 0;
			} else {
				buf += i;
				buf_len -= i;
			}
			ret += i;
		} else {
			i = snprintf(buf, buf_len, ".%lu", l);
			if (i == -1)
				goto err;
			if (i >= buf_len) {
				buf_len = 0;
			} else {
				buf += i;
				buf_len -= i;
			}







|










|







604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
			char *bndec;

			bndec = BN_bn2dec(bl);
			if (!bndec)
				goto err;
			i = snprintf(buf, buf_len, ".%s", bndec);
			free(bndec);
			if (i < 0)
				goto err;
			if (i >= buf_len) {
				buf_len = 0;
			} else {
				buf += i;
				buf_len -= i;
			}
			ret += i;
		} else {
			i = snprintf(buf, buf_len, ".%lu", l);
			if (i < 0)
				goto err;
			if (i >= buf_len) {
				buf_len = 0;
			} else {
				buf += i;
				buf_len -= i;
			}
Changes to jni/libressl/crypto/objects/obj_dat.h.
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
 * 
 * The licence and distribution terms for any publically available version or
 * derivative of this code cannot be changed.  i.e. this code cannot simply be
 * copied and put under another distribution licence
 * [including the GNU Public Licence.]
 */

#define NUM_NID 980
#define NUM_SN 973
#define NUM_LN 973
#define NUM_OBJ 905

static const unsigned char lvalues[6336]={
0x2A,0x86,0x48,0x86,0xF7,0x0D,               /* [  0] OBJ_rsadsi */
0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,          /* [  6] OBJ_pkcs */
0x2A,0x86,0x48,0x86,0xF7,0x0D,0x02,0x02,     /* [ 13] OBJ_md2 */
0x2A,0x86,0x48,0x86,0xF7,0x0D,0x02,0x05,     /* [ 21] OBJ_md5 */
0x2A,0x86,0x48,0x86,0xF7,0x0D,0x03,0x04,     /* [ 29] OBJ_rc4 */
0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x01,0x01,/* [ 37] OBJ_rsaEncryption */
0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x01,0x02,/* [ 46] OBJ_md2WithRSAEncryption */







|
|
|
|

|







58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
 * 
 * The licence and distribution terms for any publically available version or
 * derivative of this code cannot be changed.  i.e. this code cannot simply be
 * copied and put under another distribution licence
 * [including the GNU Public Licence.]
 */

#define NUM_NID 992
#define NUM_SN 985
#define NUM_LN 985
#define NUM_OBJ 915

static const unsigned char lvalues[6402]={
0x2A,0x86,0x48,0x86,0xF7,0x0D,               /* [  0] OBJ_rsadsi */
0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,          /* [  6] OBJ_pkcs */
0x2A,0x86,0x48,0x86,0xF7,0x0D,0x02,0x02,     /* [ 13] OBJ_md2 */
0x2A,0x86,0x48,0x86,0xF7,0x0D,0x02,0x05,     /* [ 21] OBJ_md5 */
0x2A,0x86,0x48,0x86,0xF7,0x0D,0x03,0x04,     /* [ 29] OBJ_rc4 */
0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x01,0x01,/* [ 37] OBJ_rsaEncryption */
0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x01,0x02,/* [ 46] OBJ_md2WithRSAEncryption */
963
964
965
966
967
968
969










970
971
972
973
974
975
976
0x2A,0x81,0x1C,0xCF,0x55,0x01,0x68,0x01,     /* [6279] OBJ_sm4_ecb */
0x2A,0x81,0x1C,0xCF,0x55,0x01,0x68,0x02,     /* [6287] OBJ_sm4_cbc */
0x2A,0x81,0x1C,0xCF,0x55,0x01,0x68,0x03,     /* [6295] OBJ_sm4_ofb128 */
0x2A,0x81,0x1C,0xCF,0x55,0x01,0x68,0x04,     /* [6303] OBJ_sm4_cfb128 */
0x2A,0x81,0x1C,0xCF,0x55,0x01,0x68,0x05,     /* [6311] OBJ_sm4_cfb1 */
0x2A,0x81,0x1C,0xCF,0x55,0x01,0x68,0x06,     /* [6319] OBJ_sm4_cfb8 */
0x2A,0x81,0x1C,0xCF,0x55,0x01,0x68,0x07,     /* [6327] OBJ_sm4_ctr */










};

static const ASN1_OBJECT nid_objs[NUM_NID]={
{"UNDEF","undefined",NID_undef,0,NULL,0},
{"rsadsi","RSA Data Security, Inc.",NID_rsadsi,6,&(lvalues[0]),0},
{"pkcs","RSA Data Security, Inc. PKCS",NID_pkcs,7,&(lvalues[6]),0},
{"MD2","md2",NID_md2,8,&(lvalues[13]),0},







>
>
>
>
>
>
>
>
>
>







963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
0x2A,0x81,0x1C,0xCF,0x55,0x01,0x68,0x01,     /* [6279] OBJ_sm4_ecb */
0x2A,0x81,0x1C,0xCF,0x55,0x01,0x68,0x02,     /* [6287] OBJ_sm4_cbc */
0x2A,0x81,0x1C,0xCF,0x55,0x01,0x68,0x03,     /* [6295] OBJ_sm4_ofb128 */
0x2A,0x81,0x1C,0xCF,0x55,0x01,0x68,0x04,     /* [6303] OBJ_sm4_cfb128 */
0x2A,0x81,0x1C,0xCF,0x55,0x01,0x68,0x05,     /* [6311] OBJ_sm4_cfb1 */
0x2A,0x81,0x1C,0xCF,0x55,0x01,0x68,0x06,     /* [6319] OBJ_sm4_cfb8 */
0x2A,0x81,0x1C,0xCF,0x55,0x01,0x68,0x07,     /* [6327] OBJ_sm4_ctr */
0x2B,0x81,0x05,0x10,0x86,0x48,0x3F,0x00,0x02,/* [6335] OBJ_dhSinglePass_stdDH_sha1kdf_scheme */
0x2B,0x81,0x04,0x01,0x0B,0x00,               /* [6344] OBJ_dhSinglePass_stdDH_sha224kdf_scheme */
0x2B,0x81,0x04,0x01,0x0B,0x01,               /* [6350] OBJ_dhSinglePass_stdDH_sha256kdf_scheme */
0x2B,0x81,0x04,0x01,0x0B,0x02,               /* [6356] OBJ_dhSinglePass_stdDH_sha384kdf_scheme */
0x2B,0x81,0x04,0x01,0x0B,0x03,               /* [6362] OBJ_dhSinglePass_stdDH_sha512kdf_scheme */
0x2B,0x81,0x05,0x10,0x86,0x48,0x3F,0x00,0x03,/* [6368] OBJ_dhSinglePass_cofactorDH_sha1kdf_scheme */
0x2B,0x81,0x04,0x01,0x0E,0x00,               /* [6377] OBJ_dhSinglePass_cofactorDH_sha224kdf_scheme */
0x2B,0x81,0x04,0x01,0x0E,0x01,               /* [6383] OBJ_dhSinglePass_cofactorDH_sha256kdf_scheme */
0x2B,0x81,0x04,0x01,0x0E,0x02,               /* [6389] OBJ_dhSinglePass_cofactorDH_sha384kdf_scheme */
0x2B,0x81,0x04,0x01,0x0E,0x03,               /* [6395] OBJ_dhSinglePass_cofactorDH_sha512kdf_scheme */
};

static const ASN1_OBJECT nid_objs[NUM_NID]={
{"UNDEF","undefined",NID_undef,0,NULL,0},
{"rsadsi","RSA Data Security, Inc.",NID_rsadsi,6,&(lvalues[0]),0},
{"pkcs","RSA Data Security, Inc. PKCS",NID_pkcs,7,&(lvalues[6]),0},
{"MD2","md2",NID_md2,8,&(lvalues[13]),0},
2534
2535
2536
2537
2538
2539
2540
































2541
2542
2543
2544
2545
2546
2547
{"SM4-ECB","sm4-ecb",NID_sm4_ecb,8,&(lvalues[6279]),0},
{"SM4-CBC","sm4-cbc",NID_sm4_cbc,8,&(lvalues[6287]),0},
{"SM4-OFB","sm4-ofb",NID_sm4_ofb128,8,&(lvalues[6295]),0},
{"SM4-CFB","sm4-cfb",NID_sm4_cfb128,8,&(lvalues[6303]),0},
{"SM4-CFB1","sm4-cfb1",NID_sm4_cfb1,8,&(lvalues[6311]),0},
{"SM4-CFB8","sm4-cfb8",NID_sm4_cfb8,8,&(lvalues[6319]),0},
{"SM4-CTR","sm4-ctr",NID_sm4_ctr,8,&(lvalues[6327]),0},
































};

static const unsigned int sn_objs[NUM_SN]={
364,	/* "AD_DVCS" */
419,	/* "AES-128-CBC" */
916,	/* "AES-128-CBC-HMAC-SHA1" */
421,	/* "AES-128-CFB" */







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
{"SM4-ECB","sm4-ecb",NID_sm4_ecb,8,&(lvalues[6279]),0},
{"SM4-CBC","sm4-cbc",NID_sm4_cbc,8,&(lvalues[6287]),0},
{"SM4-OFB","sm4-ofb",NID_sm4_ofb128,8,&(lvalues[6295]),0},
{"SM4-CFB","sm4-cfb",NID_sm4_cfb128,8,&(lvalues[6303]),0},
{"SM4-CFB1","sm4-cfb1",NID_sm4_cfb1,8,&(lvalues[6311]),0},
{"SM4-CFB8","sm4-cfb8",NID_sm4_cfb8,8,&(lvalues[6319]),0},
{"SM4-CTR","sm4-ctr",NID_sm4_ctr,8,&(lvalues[6327]),0},
{"dhSinglePass-stdDH-sha1kdf-scheme",
	"dhSinglePass-stdDH-sha1kdf-scheme",
	NID_dhSinglePass_stdDH_sha1kdf_scheme,9,&(lvalues[6335]),0},
{"dhSinglePass-stdDH-sha224kdf-scheme",
	"dhSinglePass-stdDH-sha224kdf-scheme",
	NID_dhSinglePass_stdDH_sha224kdf_scheme,6,&(lvalues[6344]),0},
{"dhSinglePass-stdDH-sha256kdf-scheme",
	"dhSinglePass-stdDH-sha256kdf-scheme",
	NID_dhSinglePass_stdDH_sha256kdf_scheme,6,&(lvalues[6350]),0},
{"dhSinglePass-stdDH-sha384kdf-scheme",
	"dhSinglePass-stdDH-sha384kdf-scheme",
	NID_dhSinglePass_stdDH_sha384kdf_scheme,6,&(lvalues[6356]),0},
{"dhSinglePass-stdDH-sha512kdf-scheme",
	"dhSinglePass-stdDH-sha512kdf-scheme",
	NID_dhSinglePass_stdDH_sha512kdf_scheme,6,&(lvalues[6362]),0},
{"dhSinglePass-cofactorDH-sha1kdf-scheme",
	"dhSinglePass-cofactorDH-sha1kdf-scheme",
	NID_dhSinglePass_cofactorDH_sha1kdf_scheme,9,&(lvalues[6368]),0},
{"dhSinglePass-cofactorDH-sha224kdf-scheme",
	"dhSinglePass-cofactorDH-sha224kdf-scheme",
	NID_dhSinglePass_cofactorDH_sha224kdf_scheme,6,&(lvalues[6377]),0},
{"dhSinglePass-cofactorDH-sha256kdf-scheme",
	"dhSinglePass-cofactorDH-sha256kdf-scheme",
	NID_dhSinglePass_cofactorDH_sha256kdf_scheme,6,&(lvalues[6383]),0},
{"dhSinglePass-cofactorDH-sha384kdf-scheme",
	"dhSinglePass-cofactorDH-sha384kdf-scheme",
	NID_dhSinglePass_cofactorDH_sha384kdf_scheme,6,&(lvalues[6389]),0},
{"dhSinglePass-cofactorDH-sha512kdf-scheme",
	"dhSinglePass-cofactorDH-sha512kdf-scheme",
	NID_dhSinglePass_cofactorDH_sha512kdf_scheme,6,&(lvalues[6395]),0},
{"dh-std-kdf","dh-std-kdf",NID_dh_std_kdf,0,NULL,0},
{"dh-cofactor-kdf","dh-cofactor-kdf",NID_dh_cofactor_kdf,0,NULL,0},
};

static const unsigned int sn_objs[NUM_SN]={
364,	/* "AD_DVCS" */
419,	/* "AES-128-CBC" */
916,	/* "AES-128-CBC-HMAC-SHA1" */
421,	/* "AES-128-CFB" */
2844
2845
2846
2847
2848
2849
2850


2851










2852
2853
2854
2855
2856
2857
2858
495,	/* "dSAQuality" */
434,	/* "data" */
390,	/* "dcobject" */
140,	/* "deltaCRL" */
891,	/* "deltaRevocationList" */
107,	/* "description" */
871,	/* "destinationIndicator" */


28,	/* "dhKeyAgreement" */










382,	/* "directory" */
887,	/* "distinguishedName" */
892,	/* "dmdName" */
174,	/* "dnQualifier" */
447,	/* "document" */
471,	/* "documentAuthor" */
468,	/* "documentIdentifier" */







>
>

>
>
>
>
>
>
>
>
>
>







2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
495,	/* "dSAQuality" */
434,	/* "data" */
390,	/* "dcobject" */
140,	/* "deltaCRL" */
891,	/* "deltaRevocationList" */
107,	/* "description" */
871,	/* "destinationIndicator" */
991,	/* "dh-cofactor-kdf" */
990,	/* "dh-std-kdf" */
28,	/* "dhKeyAgreement" */
985,	/* "dhSinglePass-cofactorDH-sha1kdf-scheme" */
986,	/* "dhSinglePass-cofactorDH-sha224kdf-scheme" */
987,	/* "dhSinglePass-cofactorDH-sha256kdf-scheme" */
988,	/* "dhSinglePass-cofactorDH-sha384kdf-scheme" */
989,	/* "dhSinglePass-cofactorDH-sha512kdf-scheme" */
980,	/* "dhSinglePass-stdDH-sha1kdf-scheme" */
981,	/* "dhSinglePass-stdDH-sha224kdf-scheme" */
982,	/* "dhSinglePass-stdDH-sha256kdf-scheme" */
983,	/* "dhSinglePass-stdDH-sha384kdf-scheme" */
984,	/* "dhSinglePass-stdDH-sha512kdf-scheme" */
382,	/* "directory" */
887,	/* "distinguishedName" */
892,	/* "dmdName" */
174,	/* "dnQualifier" */
447,	/* "document" */
471,	/* "documentAuthor" */
468,	/* "documentIdentifier" */
3823
3824
3825
3826
3827
3828
3829


3830










3831
3832
3833
3834
3835
3836
3837
658,	/* "des-ede3-cfb1" */
659,	/* "des-ede3-cfb8" */
63,	/* "des-ede3-ofb" */
45,	/* "des-ofb" */
107,	/* "description" */
871,	/* "destinationIndicator" */
80,	/* "desx-cbc" */


28,	/* "dhKeyAgreement" */










11,	/* "directory services (X.500)" */
378,	/* "directory services - algorithms" */
887,	/* "distinguishedName" */
892,	/* "dmdName" */
174,	/* "dnQualifier" */
447,	/* "document" */
471,	/* "documentAuthor" */







>
>

>
>
>
>
>
>
>
>
>
>







3877
3878
3879
3880
3881
3882
3883
3884
3885
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
3901
3902
3903
658,	/* "des-ede3-cfb1" */
659,	/* "des-ede3-cfb8" */
63,	/* "des-ede3-ofb" */
45,	/* "des-ofb" */
107,	/* "description" */
871,	/* "destinationIndicator" */
80,	/* "desx-cbc" */
991,	/* "dh-cofactor-kdf" */
990,	/* "dh-std-kdf" */
28,	/* "dhKeyAgreement" */
985,	/* "dhSinglePass-cofactorDH-sha1kdf-scheme" */
986,	/* "dhSinglePass-cofactorDH-sha224kdf-scheme" */
987,	/* "dhSinglePass-cofactorDH-sha256kdf-scheme" */
988,	/* "dhSinglePass-cofactorDH-sha384kdf-scheme" */
989,	/* "dhSinglePass-cofactorDH-sha512kdf-scheme" */
980,	/* "dhSinglePass-stdDH-sha1kdf-scheme" */
981,	/* "dhSinglePass-stdDH-sha224kdf-scheme" */
982,	/* "dhSinglePass-stdDH-sha256kdf-scheme" */
983,	/* "dhSinglePass-stdDH-sha384kdf-scheme" */
984,	/* "dhSinglePass-stdDH-sha512kdf-scheme" */
11,	/* "directory services (X.500)" */
378,	/* "directory services - algorithms" */
887,	/* "distinguishedName" */
892,	/* "dmdName" */
174,	/* "dnQualifier" */
447,	/* "document" */
471,	/* "documentAuthor" */
4826
4827
4828
4829
4830
4831
4832








4833
4834
4835
4836
4837
4838
4839
818,	/* OBJ_id_GostR3410_94DH            1 2 643 2 2 99 */
 1,	/* OBJ_rsadsi                       1 2 840 113549 */
185,	/* OBJ_X9cm                         1 2 840 10040 4 */
127,	/* OBJ_id_pkix                      1 3 6 1 5 5 7 */
505,	/* OBJ_mime_mhs_headings            1 3 6 1 7 1 1 */
506,	/* OBJ_mime_mhs_bodies              1 3 6 1 7 1 2 */
119,	/* OBJ_ripemd160WithRSA             1 3 36 3 3 1 2 */








631,	/* OBJ_setAttr_GenCryptgrm          2 23 42 3 3 3 1 */
632,	/* OBJ_setAttr_T2Enc                2 23 42 3 3 4 1 */
633,	/* OBJ_setAttr_T2cleartxt           2 23 42 3 3 4 2 */
634,	/* OBJ_setAttr_TokICCsig            2 23 42 3 3 5 1 */
635,	/* OBJ_setAttr_SecDevSig            2 23 42 3 3 5 2 */
436,	/* OBJ_ucl                          0 9 2342 19200300 */
820,	/* OBJ_id_Gost28147_89_None_KeyMeshing 1 2 643 2 2 14 0 */







>
>
>
>
>
>
>
>







4892
4893
4894
4895
4896
4897
4898
4899
4900
4901
4902
4903
4904
4905
4906
4907
4908
4909
4910
4911
4912
4913
818,	/* OBJ_id_GostR3410_94DH            1 2 643 2 2 99 */
 1,	/* OBJ_rsadsi                       1 2 840 113549 */
185,	/* OBJ_X9cm                         1 2 840 10040 4 */
127,	/* OBJ_id_pkix                      1 3 6 1 5 5 7 */
505,	/* OBJ_mime_mhs_headings            1 3 6 1 7 1 1 */
506,	/* OBJ_mime_mhs_bodies              1 3 6 1 7 1 2 */
119,	/* OBJ_ripemd160WithRSA             1 3 36 3 3 1 2 */
981,	/* OBJ_dhSinglePass_stdDH_sha224kdf_scheme 1 3 132 1 11 0 */
982,	/* OBJ_dhSinglePass_stdDH_sha256kdf_scheme 1 3 132 1 11 1 */
983,	/* OBJ_dhSinglePass_stdDH_sha384kdf_scheme 1 3 132 1 11 2 */
984,	/* OBJ_dhSinglePass_stdDH_sha512kdf_scheme 1 3 132 1 11 3 */
986,	/* OBJ_dhSinglePass_cofactorDH_sha224kdf_scheme 1 3 132 1 14 0 */
987,	/* OBJ_dhSinglePass_cofactorDH_sha256kdf_scheme 1 3 132 1 14 1 */
988,	/* OBJ_dhSinglePass_cofactorDH_sha384kdf_scheme 1 3 132 1 14 2 */
989,	/* OBJ_dhSinglePass_cofactorDH_sha512kdf_scheme 1 3 132 1 14 3 */
631,	/* OBJ_setAttr_GenCryptgrm          2 23 42 3 3 3 1 */
632,	/* OBJ_setAttr_T2Enc                2 23 42 3 3 4 1 */
633,	/* OBJ_setAttr_T2cleartxt           2 23 42 3 3 4 2 */
634,	/* OBJ_setAttr_TokICCsig            2 23 42 3 3 5 1 */
635,	/* OBJ_setAttr_SecDevSig            2 23 42 3 3 5 2 */
436,	/* OBJ_ucl                          0 9 2342 19200300 */
820,	/* OBJ_id_Gost28147_89_None_KeyMeshing 1 2 643 2 2 14 0 */
5185
5186
5187
5188
5189
5190
5191


5192
5193
5194
5195
5196
5197
5198
929,	/* OBJ_brainpoolP256t1              1 3 36 3 3 2 8 1 1 8 */
930,	/* OBJ_brainpoolP320r1              1 3 36 3 3 2 8 1 1 9 */
931,	/* OBJ_brainpoolP320t1              1 3 36 3 3 2 8 1 1 10 */
932,	/* OBJ_brainpoolP384r1              1 3 36 3 3 2 8 1 1 11 */
933,	/* OBJ_brainpoolP384t1              1 3 36 3 3 2 8 1 1 12 */
934,	/* OBJ_brainpoolP512r1              1 3 36 3 3 2 8 1 1 13 */
935,	/* OBJ_brainpoolP512t1              1 3 36 3 3 2 8 1 1 14 */


418,	/* OBJ_aes_128_ecb                  2 16 840 1 101 3 4 1 1 */
419,	/* OBJ_aes_128_cbc                  2 16 840 1 101 3 4 1 2 */
420,	/* OBJ_aes_128_ofb128               2 16 840 1 101 3 4 1 3 */
421,	/* OBJ_aes_128_cfb128               2 16 840 1 101 3 4 1 4 */
788,	/* OBJ_id_aes128_wrap               2 16 840 1 101 3 4 1 5 */
895,	/* OBJ_aes_128_gcm                  2 16 840 1 101 3 4 1 6 */
896,	/* OBJ_aes_128_ccm                  2 16 840 1 101 3 4 1 7 */







>
>







5259
5260
5261
5262
5263
5264
5265
5266
5267
5268
5269
5270
5271
5272
5273
5274
929,	/* OBJ_brainpoolP256t1              1 3 36 3 3 2 8 1 1 8 */
930,	/* OBJ_brainpoolP320r1              1 3 36 3 3 2 8 1 1 9 */
931,	/* OBJ_brainpoolP320t1              1 3 36 3 3 2 8 1 1 10 */
932,	/* OBJ_brainpoolP384r1              1 3 36 3 3 2 8 1 1 11 */
933,	/* OBJ_brainpoolP384t1              1 3 36 3 3 2 8 1 1 12 */
934,	/* OBJ_brainpoolP512r1              1 3 36 3 3 2 8 1 1 13 */
935,	/* OBJ_brainpoolP512t1              1 3 36 3 3 2 8 1 1 14 */
980,	/* OBJ_dhSinglePass_stdDH_sha1kdf_scheme 1 3 133 16 840 63 0 2 */
985,	/* OBJ_dhSinglePass_cofactorDH_sha1kdf_scheme 1 3 133 16 840 63 0 3 */
418,	/* OBJ_aes_128_ecb                  2 16 840 1 101 3 4 1 1 */
419,	/* OBJ_aes_128_cbc                  2 16 840 1 101 3 4 1 2 */
420,	/* OBJ_aes_128_ofb128               2 16 840 1 101 3 4 1 3 */
421,	/* OBJ_aes_128_cfb128               2 16 840 1 101 3 4 1 4 */
788,	/* OBJ_id_aes128_wrap               2 16 840 1 101 3 4 1 5 */
895,	/* OBJ_aes_128_gcm                  2 16 840 1 101 3 4 1 6 */
896,	/* OBJ_aes_128_ccm                  2 16 840 1 101 3 4 1 7 */
Changes to jni/libressl/crypto/pem/pem_lib.c.
1
2
3
4
5
6
7
8
/* $OpenBSD: pem_lib.c,v 1.48 2018/08/24 19:48:39 tb Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
 * All rights reserved.
 *
 * This package is an SSL implementation written
 * by Eric Young (eay@cryptsoft.com).
 * The implementation was written so as to conform with Netscapes SSL.
 *
|







1
2
3
4
5
6
7
8
/* $OpenBSD: pem_lib.c,v 1.49 2019/09/06 17:41:05 jsing Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
 * All rights reserved.
 *
 * This package is an SSL implementation written
 * by Eric Young (eay@cryptsoft.com).
 * The implementation was written so as to conform with Netscapes SSL.
 *
259
260
261
262
263
264
265










266
267
268
269
270
271
272
	    !strcmp(name, PEM_STRING_PKCS7))
		return 1;

	if (!strcmp(nm, PEM_STRING_PKCS7_SIGNED) &&
	    !strcmp(name, PEM_STRING_PKCS7))
		return 1;












	return 0;
}

int
PEM_bytes_read_bio(unsigned char **pdata, long *plen, char **pnm,
    const char *name, BIO *bp, pem_password_cb *cb, void *u)







>
>
>
>
>
>
>
>
>
>







259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
	    !strcmp(name, PEM_STRING_PKCS7))
		return 1;

	if (!strcmp(nm, PEM_STRING_PKCS7_SIGNED) &&
	    !strcmp(name, PEM_STRING_PKCS7))
		return 1;

#ifndef OPENSSL_NO_CMS
	if (strcmp(nm, PEM_STRING_X509) == 0 &&
	    strcmp(name, PEM_STRING_CMS) == 0)
		return 1;

	/* Allow CMS to be read from PKCS#7 headers */
	if (strcmp(nm, PEM_STRING_PKCS7) == 0 &&
	    strcmp(name, PEM_STRING_CMS) == 0)
		return 1;
#endif

	return 0;
}

int
PEM_bytes_read_bio(unsigned char **pdata, long *plen, char **pnm,
    const char *name, BIO *bp, pem_password_cb *cb, void *u)
Changes to jni/libressl/crypto/pem/pvkfmt.c.
1
2
3
4
5
6
7
8
/* $OpenBSD: pvkfmt.c,v 1.20 2018/08/05 11:19:25 bcook Exp $ */
/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
 * project 2005.
 */
/* ====================================================================
 * Copyright (c) 2005 The OpenSSL Project.  All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
|







1
2
3
4
5
6
7
8
/* $OpenBSD: pvkfmt.c,v 1.22 2019/07/08 11:56:18 inoguchi Exp $ */
/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
 * project 2005.
 */
/* ====================================================================
 * Copyright (c) 2005 The OpenSSL Project.  All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
	}

	if (isdss)
		ret = b2i_dss(&p, length, bitlen, ispub);
	else
		ret = b2i_rsa(&p, length, bitlen, ispub);

err:
	free(buf);
	return ret;
}

static EVP_PKEY *
b2i_dss(const unsigned char **in, unsigned int length, unsigned int bitlen,
    int ispub)
{
	const unsigned char *p = *in;
	EVP_PKEY *ret = NULL;
	DSA *dsa = NULL;
	BN_CTX *ctx = NULL;
	unsigned int nbyte;

	nbyte = (bitlen + 7) >> 3;

	dsa = DSA_new();
	ret = EVP_PKEY_new();
	if (!dsa || !ret)
		goto memerr;
	if (!read_lebn(&p, nbyte, &dsa->p))
		goto memerr;
	if (!read_lebn(&p, 20, &dsa->q))
		goto memerr;
	if (!read_lebn(&p, nbyte, &dsa->g))
		goto memerr;
	if (ispub) {
		if (!read_lebn(&p, nbyte, &dsa->pub_key))
			goto memerr;
	} else {
		if (!read_lebn(&p, 20, &dsa->priv_key))
			goto memerr;
		/* Calculate public key */
		if (!(dsa->pub_key = BN_new()))
			goto memerr;
		if (!(ctx = BN_CTX_new()))
			goto memerr;
		if (!BN_mod_exp_ct(dsa->pub_key, dsa->g,
		    dsa->priv_key, dsa->p, ctx))
			goto memerr;
		BN_CTX_free(ctx);
	}

	EVP_PKEY_set1_DSA(ret, dsa);
	DSA_free(dsa);
	*in = p;
	return ret;

memerr:
	PEMerror(ERR_R_MALLOC_FAILURE);
	DSA_free(dsa);
	EVP_PKEY_free(ret);
	BN_CTX_free(ctx);
	return NULL;
}








|



















|

|

|

|


|


|


|

|


|








|







296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
	}

	if (isdss)
		ret = b2i_dss(&p, length, bitlen, ispub);
	else
		ret = b2i_rsa(&p, length, bitlen, ispub);

 err:
	free(buf);
	return ret;
}

static EVP_PKEY *
b2i_dss(const unsigned char **in, unsigned int length, unsigned int bitlen,
    int ispub)
{
	const unsigned char *p = *in;
	EVP_PKEY *ret = NULL;
	DSA *dsa = NULL;
	BN_CTX *ctx = NULL;
	unsigned int nbyte;

	nbyte = (bitlen + 7) >> 3;

	dsa = DSA_new();
	ret = EVP_PKEY_new();
	if (!dsa || !ret)
		goto err;
	if (!read_lebn(&p, nbyte, &dsa->p))
		goto err;
	if (!read_lebn(&p, 20, &dsa->q))
		goto err;
	if (!read_lebn(&p, nbyte, &dsa->g))
		goto err;
	if (ispub) {
		if (!read_lebn(&p, nbyte, &dsa->pub_key))
			goto err;
	} else {
		if (!read_lebn(&p, 20, &dsa->priv_key))
			goto err;
		/* Calculate public key */
		if (!(dsa->pub_key = BN_new()))
			goto err;
		if (!(ctx = BN_CTX_new()))
			goto err;
		if (!BN_mod_exp_ct(dsa->pub_key, dsa->g,
		    dsa->priv_key, dsa->p, ctx))
			goto err;
		BN_CTX_free(ctx);
	}

	EVP_PKEY_set1_DSA(ret, dsa);
	DSA_free(dsa);
	*in = p;
	return ret;

 err:
	PEMerror(ERR_R_MALLOC_FAILURE);
	DSA_free(dsa);
	EVP_PKEY_free(ret);
	BN_CTX_free(ctx);
	return NULL;
}

367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
	unsigned int nbyte, hnbyte;

	nbyte = (bitlen + 7) >> 3;
	hnbyte = (bitlen + 15) >> 4;
	rsa = RSA_new();
	ret = EVP_PKEY_new();
	if (!rsa || !ret)
		goto memerr;
	rsa->e = BN_new();
	if (!rsa->e)
		goto memerr;
	if (!BN_set_word(rsa->e, read_ledword(&p)))
		goto memerr;
	if (!read_lebn(&p, nbyte, &rsa->n))
		goto memerr;
	if (!ispub) {
		if (!read_lebn(&p, hnbyte, &rsa->p))
			goto memerr;
		if (!read_lebn(&p, hnbyte, &rsa->q))
			goto memerr;
		if (!read_lebn(&p, hnbyte, &rsa->dmp1))
			goto memerr;
		if (!read_lebn(&p, hnbyte, &rsa->dmq1))
			goto memerr;
		if (!read_lebn(&p, hnbyte, &rsa->iqmp))
			goto memerr;
		if (!read_lebn(&p, nbyte, &rsa->d))
			goto memerr;
	}

	EVP_PKEY_set1_RSA(ret, rsa);
	RSA_free(rsa);
	*in = p;
	return ret;

memerr:
	PEMerror(ERR_R_MALLOC_FAILURE);
	RSA_free(rsa);
	EVP_PKEY_free(ret);
	return NULL;
}

EVP_PKEY *







|


|

|

|


|

|

|

|

|

|







|







367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
	unsigned int nbyte, hnbyte;

	nbyte = (bitlen + 7) >> 3;
	hnbyte = (bitlen + 15) >> 4;
	rsa = RSA_new();
	ret = EVP_PKEY_new();
	if (!rsa || !ret)
		goto err;
	rsa->e = BN_new();
	if (!rsa->e)
		goto err;
	if (!BN_set_word(rsa->e, read_ledword(&p)))
		goto err;
	if (!read_lebn(&p, nbyte, &rsa->n))
		goto err;
	if (!ispub) {
		if (!read_lebn(&p, hnbyte, &rsa->p))
			goto err;
		if (!read_lebn(&p, hnbyte, &rsa->q))
			goto err;
		if (!read_lebn(&p, hnbyte, &rsa->dmp1))
			goto err;
		if (!read_lebn(&p, hnbyte, &rsa->dmq1))
			goto err;
		if (!read_lebn(&p, hnbyte, &rsa->iqmp))
			goto err;
		if (!read_lebn(&p, nbyte, &rsa->d))
			goto err;
	}

	EVP_PKEY_set1_RSA(ret, rsa);
	RSA_free(rsa);
	*in = p;
	return ret;

 err:
	PEMerror(ERR_R_MALLOC_FAILURE);
	RSA_free(rsa);
	EVP_PKEY_free(ret);
	return NULL;
}

EVP_PKEY *
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
check_bitlen_dsa(DSA *dsa, int ispub, unsigned int *pmagic)
{
	int bitlen;

	bitlen = BN_num_bits(dsa->p);
	if ((bitlen & 7) || (BN_num_bits(dsa->q) != 160) ||
	    (BN_num_bits(dsa->g) > bitlen))
		goto badkey;
	if (ispub) {
		if (BN_num_bits(dsa->pub_key) > bitlen)
			goto badkey;
		*pmagic = MS_DSS1MAGIC;
	} else {
		if (BN_num_bits(dsa->priv_key) > 160)
			goto badkey;
		*pmagic = MS_DSS2MAGIC;
	}

	return bitlen;

badkey:
	PEMerror(PEM_R_UNSUPPORTED_KEY_COMPONENTS);
	return 0;
}

static int
check_bitlen_rsa(RSA *rsa, int ispub, unsigned int *pmagic)
{
	int nbyte, hnbyte, bitlen;

	if (BN_num_bits(rsa->e) > 32)
		goto badkey;
	bitlen = BN_num_bits(rsa->n);
	nbyte = BN_num_bytes(rsa->n);
	hnbyte = (BN_num_bits(rsa->n) + 15) >> 4;
	if (ispub) {
		*pmagic = MS_RSA1MAGIC;
		return bitlen;
	} else {
		*pmagic = MS_RSA2MAGIC;
		/* For private key each component must fit within nbyte or
		 * hnbyte.
		 */
		if (BN_num_bytes(rsa->d) > nbyte)
			goto badkey;
		if ((BN_num_bytes(rsa->iqmp) > hnbyte) ||
		    (BN_num_bytes(rsa->p) > hnbyte) ||
		    (BN_num_bytes(rsa->q) > hnbyte) ||
		    (BN_num_bytes(rsa->dmp1) > hnbyte) ||
		    (BN_num_bytes(rsa->dmq1) > hnbyte))
			goto badkey;
	}
	return bitlen;

badkey:
	PEMerror(PEM_R_UNSUPPORTED_KEY_COMPONENTS);
	return 0;
}

static void
write_rsa(unsigned char **out, RSA *rsa, int ispub)
{







|


|



|





|










|












|





|



|







544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
check_bitlen_dsa(DSA *dsa, int ispub, unsigned int *pmagic)
{
	int bitlen;

	bitlen = BN_num_bits(dsa->p);
	if ((bitlen & 7) || (BN_num_bits(dsa->q) != 160) ||
	    (BN_num_bits(dsa->g) > bitlen))
		goto err;
	if (ispub) {
		if (BN_num_bits(dsa->pub_key) > bitlen)
			goto err;
		*pmagic = MS_DSS1MAGIC;
	} else {
		if (BN_num_bits(dsa->priv_key) > 160)
			goto err;
		*pmagic = MS_DSS2MAGIC;
	}

	return bitlen;

 err:
	PEMerror(PEM_R_UNSUPPORTED_KEY_COMPONENTS);
	return 0;
}

static int
check_bitlen_rsa(RSA *rsa, int ispub, unsigned int *pmagic)
{
	int nbyte, hnbyte, bitlen;

	if (BN_num_bits(rsa->e) > 32)
		goto err;
	bitlen = BN_num_bits(rsa->n);
	nbyte = BN_num_bytes(rsa->n);
	hnbyte = (BN_num_bits(rsa->n) + 15) >> 4;
	if (ispub) {
		*pmagic = MS_RSA1MAGIC;
		return bitlen;
	} else {
		*pmagic = MS_RSA2MAGIC;
		/* For private key each component must fit within nbyte or
		 * hnbyte.
		 */
		if (BN_num_bytes(rsa->d) > nbyte)
			goto err;
		if ((BN_num_bytes(rsa->iqmp) > hnbyte) ||
		    (BN_num_bytes(rsa->p) > hnbyte) ||
		    (BN_num_bytes(rsa->q) > hnbyte) ||
		    (BN_num_bytes(rsa->dmp1) > hnbyte) ||
		    (BN_num_bytes(rsa->dmq1) > hnbyte))
			goto err;
	}
	return bitlen;

 err:
	PEMerror(PEM_R_UNSUPPORTED_KEY_COMPONENTS);
	return 0;
}

static void
write_rsa(unsigned char **out, RSA *rsa, int ispub)
{
719
720
721
722
723
724
725
726
727
728



729
730
731
732
733
734
735
do_PVK_body(const unsigned char **in, unsigned int saltlen,
    unsigned int keylen, pem_password_cb *cb, void *u)
{
	EVP_PKEY *ret = NULL;
	const unsigned char *p = *in;
	unsigned int magic;
	unsigned char *enctmp = NULL, *q;
	EVP_CIPHER_CTX cctx;

	EVP_CIPHER_CTX_init(&cctx);



	if (saltlen) {
		char psbuf[PEM_BUFSIZE];
		unsigned char keybuf[20];
		int enctmplen, inlen;

		if (cb)
			inlen = cb(psbuf, PEM_BUFSIZE, 0, u);







|

|
>
>
>







719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
do_PVK_body(const unsigned char **in, unsigned int saltlen,
    unsigned int keylen, pem_password_cb *cb, void *u)
{
	EVP_PKEY *ret = NULL;
	const unsigned char *p = *in;
	unsigned int magic;
	unsigned char *enctmp = NULL, *q;
	EVP_CIPHER_CTX *cctx = NULL;

	if ((cctx = EVP_CIPHER_CTX_new()) == NULL) {
		PEMerror(ERR_R_MALLOC_FAILURE);
		goto err;
	}
	if (saltlen) {
		char psbuf[PEM_BUFSIZE];
		unsigned char keybuf[20];
		int enctmplen, inlen;

		if (cb)
			inlen = cb(psbuf, PEM_BUFSIZE, 0, u);
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
		p += 8;
		if (keylen < 8) {
			PEMerror(PEM_R_PVK_TOO_SHORT);
			goto err;
		}
		inlen = keylen - 8;
		q = enctmp + 8;
		if (!EVP_DecryptInit_ex(&cctx, EVP_rc4(), NULL, keybuf, NULL))
			goto err;
		if (!EVP_DecryptUpdate(&cctx, q, &enctmplen, p, inlen))
			goto err;
		if (!EVP_DecryptFinal_ex(&cctx, q + enctmplen, &enctmplen))
			goto err;
		magic = read_ledword((const unsigned char **)&q);
		if (magic != MS_RSA2MAGIC && magic != MS_DSS2MAGIC) {
			q = enctmp + 8;
			memset(keybuf + 5, 0, 11);
			if (!EVP_DecryptInit_ex(&cctx, EVP_rc4(), NULL, keybuf,
			    NULL))
				goto err;
			explicit_bzero(keybuf, 20);
			if (!EVP_DecryptUpdate(&cctx, q, &enctmplen, p, inlen))
				goto err;
			if (!EVP_DecryptFinal_ex(&cctx, q + enctmplen,
			    &enctmplen))
				goto err;
			magic = read_ledword((const unsigned char **)&q);
			if (magic != MS_RSA2MAGIC && magic != MS_DSS2MAGIC) {
				PEMerror(PEM_R_BAD_DECRYPT);
				goto err;
			}
		} else
			explicit_bzero(keybuf, 20);
		p = enctmp;
	}

	ret = b2i_PrivateKey(&p, keylen);

err:
	EVP_CIPHER_CTX_cleanup(&cctx);
	if (enctmp && saltlen)
		free(enctmp);
	return ret;
}


EVP_PKEY *







|

|

|





|



|

|














|
|







757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
		p += 8;
		if (keylen < 8) {
			PEMerror(PEM_R_PVK_TOO_SHORT);
			goto err;
		}
		inlen = keylen - 8;
		q = enctmp + 8;
		if (!EVP_DecryptInit_ex(cctx, EVP_rc4(), NULL, keybuf, NULL))
			goto err;
		if (!EVP_DecryptUpdate(cctx, q, &enctmplen, p, inlen))
			goto err;
		if (!EVP_DecryptFinal_ex(cctx, q + enctmplen, &enctmplen))
			goto err;
		magic = read_ledword((const unsigned char **)&q);
		if (magic != MS_RSA2MAGIC && magic != MS_DSS2MAGIC) {
			q = enctmp + 8;
			memset(keybuf + 5, 0, 11);
			if (!EVP_DecryptInit_ex(cctx, EVP_rc4(), NULL, keybuf,
			    NULL))
				goto err;
			explicit_bzero(keybuf, 20);
			if (!EVP_DecryptUpdate(cctx, q, &enctmplen, p, inlen))
				goto err;
			if (!EVP_DecryptFinal_ex(cctx, q + enctmplen,
			    &enctmplen))
				goto err;
			magic = read_ledword((const unsigned char **)&q);
			if (magic != MS_RSA2MAGIC && magic != MS_DSS2MAGIC) {
				PEMerror(PEM_R_BAD_DECRYPT);
				goto err;
			}
		} else
			explicit_bzero(keybuf, 20);
		p = enctmp;
	}

	ret = b2i_PrivateKey(&p, keylen);

 err:
	EVP_CIPHER_CTX_free(cctx);
	if (enctmp && saltlen)
		free(enctmp);
	return ret;
}


EVP_PKEY *
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843



844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
	p = buf;
	if (BIO_read(in, buf, buflen) != buflen) {
		PEMerror(PEM_R_PVK_DATA_TOO_SHORT);
		goto err;
	}
	ret = do_PVK_body(&p, saltlen, keylen, cb, u);

err:
	freezero(buf, buflen);
	return ret;
}

static int
i2b_PVK(unsigned char **out, EVP_PKEY*pk, int enclevel, pem_password_cb *cb,
    void *u)
{
	int outlen = 24, pklen;
	unsigned char *p, *salt = NULL;
	EVP_CIPHER_CTX cctx;

	EVP_CIPHER_CTX_init(&cctx);



	if (enclevel)
		outlen += PVK_SALTLEN;
	pklen = do_i2b(NULL, pk, 0);
	if (pklen < 0)
		return -1;
	outlen += pklen;
	p = malloc(outlen);
	if (!p) {
		PEMerror(ERR_R_MALLOC_FAILURE);
		return -1;
	}

	write_ledword(&p, MS_PVKMAGIC);
	write_ledword(&p, 0);
	if (pk->type == EVP_PKEY_DSA)
		write_ledword(&p, MS_KEYTYPE_SIGN);
	else
		write_ledword(&p, MS_KEYTYPE_KEYX);
	write_ledword(&p, enclevel ? 1 : 0);
	write_ledword(&p, enclevel ? PVK_SALTLEN : 0);
	write_ledword(&p, pklen);
	if (enclevel) {
		arc4random_buf(p, PVK_SALTLEN);
		salt = p;
		p += PVK_SALTLEN;
	}
	do_i2b(&p, pk, 0);
	if (enclevel == 0) {
		*out = p;
		return outlen;
	} else {
		char psbuf[PEM_BUFSIZE];
		unsigned char keybuf[20];
		int enctmplen, inlen;
		if (cb)
			inlen = cb(psbuf, PEM_BUFSIZE, 1, u);
		else
			inlen = PEM_def_callback(psbuf, PEM_BUFSIZE, 1, u);
		if (inlen <= 0) {
			PEMerror(PEM_R_BAD_PASSWORD_READ);
			goto error;
		}
		if (!derive_pvk_key(keybuf, salt, PVK_SALTLEN,
		    (unsigned char *)psbuf, inlen))
			goto error;
		if (enclevel == 1)
			memset(keybuf + 5, 0, 11);
		p = salt + PVK_SALTLEN + 8;
		if (!EVP_EncryptInit_ex(&cctx, EVP_rc4(), NULL, keybuf, NULL))
			goto error;
		explicit_bzero(keybuf, 20);
		if (!EVP_DecryptUpdate(&cctx, p, &enctmplen, p, pklen - 8))
			goto error;
		if (!EVP_DecryptFinal_ex(&cctx, p + enctmplen, &enctmplen))
			goto error;
	}
	EVP_CIPHER_CTX_cleanup(&cctx);
	*out = p;
	return outlen;

error:
	EVP_CIPHER_CTX_cleanup(&cctx);
	free(p);
	return -1;
}

int
i2b_PVK_bio(BIO *out, EVP_PKEY *pk, int enclevel, pem_password_cb *cb, void *u)
{
	unsigned char *tmp = NULL;
	int outlen, wrlen;

	outlen = i2b_PVK(&tmp, pk, enclevel, cb, u);
	if (outlen < 0)
		return -1;
	wrlen = BIO_write(out, tmp, outlen);
	free(tmp);
	if (wrlen == outlen) {
		PEMerror(PEM_R_BIO_WRITE_FAILURE);
		return outlen;
	}
	return -1;
}

#endif

#endif







|









|
|

|
>
>
>
|



|

|


|











|





|
<
<
<









|



|



|
|

|
|
|
|

|
|


|
|
|














|

|

|





826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877



878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
	p = buf;
	if (BIO_read(in, buf, buflen) != buflen) {
		PEMerror(PEM_R_PVK_DATA_TOO_SHORT);
		goto err;
	}
	ret = do_PVK_body(&p, saltlen, keylen, cb, u);

 err:
	freezero(buf, buflen);
	return ret;
}

static int
i2b_PVK(unsigned char **out, EVP_PKEY*pk, int enclevel, pem_password_cb *cb,
    void *u)
{
	int outlen = 24, pklen;
	unsigned char *p = NULL, *start = NULL, *salt = NULL;
	EVP_CIPHER_CTX *cctx = NULL;

	if ((cctx = EVP_CIPHER_CTX_new()) == NULL) {
		PEMerror(ERR_R_MALLOC_FAILURE);
		goto err;
	}
	if (enclevel != 0)
		outlen += PVK_SALTLEN;
	pklen = do_i2b(NULL, pk, 0);
	if (pklen < 0)
		goto err;
	outlen += pklen;
	start = p = malloc(outlen);
	if (!p) {
		PEMerror(ERR_R_MALLOC_FAILURE);
		goto err;
	}

	write_ledword(&p, MS_PVKMAGIC);
	write_ledword(&p, 0);
	if (pk->type == EVP_PKEY_DSA)
		write_ledword(&p, MS_KEYTYPE_SIGN);
	else
		write_ledword(&p, MS_KEYTYPE_KEYX);
	write_ledword(&p, enclevel ? 1 : 0);
	write_ledword(&p, enclevel ? PVK_SALTLEN : 0);
	write_ledword(&p, pklen);
	if (enclevel != 0) {
		arc4random_buf(p, PVK_SALTLEN);
		salt = p;
		p += PVK_SALTLEN;
	}
	do_i2b(&p, pk, 0);
	if (enclevel != 0) {



		char psbuf[PEM_BUFSIZE];
		unsigned char keybuf[20];
		int enctmplen, inlen;
		if (cb)
			inlen = cb(psbuf, PEM_BUFSIZE, 1, u);
		else
			inlen = PEM_def_callback(psbuf, PEM_BUFSIZE, 1, u);
		if (inlen <= 0) {
			PEMerror(PEM_R_BAD_PASSWORD_READ);
			goto err;
		}
		if (!derive_pvk_key(keybuf, salt, PVK_SALTLEN,
		    (unsigned char *)psbuf, inlen))
			goto err;
		if (enclevel == 1)
			memset(keybuf + 5, 0, 11);
		p = salt + PVK_SALTLEN + 8;
		if (!EVP_EncryptInit_ex(cctx, EVP_rc4(), NULL, keybuf, NULL))
			goto err;
		explicit_bzero(keybuf, 20);
		if (!EVP_EncryptUpdate(cctx, p, &enctmplen, p, pklen - 8))
			goto err;
		if (!EVP_EncryptFinal_ex(cctx, p + enctmplen, &enctmplen))
			goto err;
	}
	EVP_CIPHER_CTX_free(cctx);
	*out = start;
	return outlen;

 err:
	EVP_CIPHER_CTX_free(cctx);
	free(start);
	return -1;
}

int
i2b_PVK_bio(BIO *out, EVP_PKEY *pk, int enclevel, pem_password_cb *cb, void *u)
{
	unsigned char *tmp = NULL;
	int outlen, wrlen;

	outlen = i2b_PVK(&tmp, pk, enclevel, cb, u);
	if (outlen < 0)
		return -1;
	wrlen = BIO_write(out, tmp, outlen);
	free(tmp);
	if (wrlen != outlen) {
		PEMerror(PEM_R_BIO_WRITE_FAILURE);
		return -1;
	}
	return outlen;
}

#endif

#endif
Changes to jni/libressl/crypto/pkcs7/pk7_doit.c.
1
2
3
4
5
6
7
8
/* $OpenBSD: pk7_doit.c,v 1.43 2019/03/13 20:34:00 tb Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
 * All rights reserved.
 *
 * This package is an SSL implementation written
 * by Eric Young (eay@cryptsoft.com).
 * The implementation was written so as to conform with Netscapes SSL.
 *
|







1
2
3
4
5
6
7
8
/* $OpenBSD: pk7_doit.c,v 1.44 2019/10/04 18:03:55 tb Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
 * All rights reserved.
 *
 * This package is an SSL implementation written
 * by Eric Young (eay@cryptsoft.com).
 * The implementation was written so as to conform with Netscapes SSL.
 *
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
	free(ek);
	return ret;
}


static int
pkcs7_decrypt_rinfo(unsigned char **pek, int *peklen, PKCS7_RECIP_INFO *ri,
    EVP_PKEY *pkey)
{
	EVP_PKEY_CTX *pctx = NULL;
	unsigned char *ek = NULL;
	size_t eklen;

	int ret = -1;








|







187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
	free(ek);
	return ret;
}


static int
pkcs7_decrypt_rinfo(unsigned char **pek, int *peklen, PKCS7_RECIP_INFO *ri,
    EVP_PKEY *pkey, size_t fixlen)
{
	EVP_PKEY_CTX *pctx = NULL;
	unsigned char *ek = NULL;
	size_t eklen;

	int ret = -1;

218
219
220
221
222
223
224
225
226

227
228
229
230
231
232
233

	ek = malloc(eklen);
	if (ek == NULL) {
		PKCS7error(ERR_R_MALLOC_FAILURE);
		goto err;
	}

	if (EVP_PKEY_decrypt(pctx, ek, &eklen,
	    ri->enc_key->data, ri->enc_key->length) <= 0) {

		ret = 0;
		PKCS7error(ERR_R_EVP_LIB);
		goto err;
	}

	ret = 1;








|
|
>







218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234

	ek = malloc(eklen);
	if (ek == NULL) {
		PKCS7error(ERR_R_MALLOC_FAILURE);
		goto err;
	}

	if (EVP_PKEY_decrypt(pctx, ek, &eklen, ri->enc_key->data,
	    ri->enc_key->length) <= 0 || eklen == 0 ||
	    (fixlen != 0 && eklen != fixlen)) {
		ret = 0;
		PKCS7error(ERR_R_EVP_LIB);
		goto err;
	}

	ret = 1;

531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
			/* Always attempt to decrypt all rinfo even
			 * after sucess as a defence against MMA timing
			 * attacks.
			 */
			for (i = 0; i < sk_PKCS7_RECIP_INFO_num(rsk); i++) {
				ri = sk_PKCS7_RECIP_INFO_value(rsk, i);

				if (pkcs7_decrypt_rinfo(&ek, &eklen,
				    ri, pkey) < 0)
					goto err;
				ERR_clear_error();
			}
		} else {
			/* Only exit on fatal errors, not decrypt failure */
			if (pkcs7_decrypt_rinfo(&ek, &eklen, ri, pkey) < 0)
				goto err;
			ERR_clear_error();
		}

		evp_ctx = NULL;
		BIO_get_cipher_ctx(etmp, &evp_ctx);
		if (EVP_CipherInit_ex(evp_ctx, evp_cipher, NULL, NULL,







|
|





|







532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
			/* Always attempt to decrypt all rinfo even
			 * after sucess as a defence against MMA timing
			 * attacks.
			 */
			for (i = 0; i < sk_PKCS7_RECIP_INFO_num(rsk); i++) {
				ri = sk_PKCS7_RECIP_INFO_value(rsk, i);

				if (pkcs7_decrypt_rinfo(&ek, &eklen, ri, pkey,
				    EVP_CIPHER_key_length(evp_cipher)) < 0)
					goto err;
				ERR_clear_error();
			}
		} else {
			/* Only exit on fatal errors, not decrypt failure */
			if (pkcs7_decrypt_rinfo(&ek, &eklen, ri, pkey, 0) < 0)
				goto err;
			ERR_clear_error();
		}

		evp_ctx = NULL;
		BIO_get_cipher_ctx(etmp, &evp_ctx);
		if (EVP_CipherInit_ex(evp_ctx, evp_cipher, NULL, NULL,
Changes to jni/libressl/crypto/rc4/rc4-masm-x86_64.S.







1




2
























































3
4
5
6
7
8
9







OPTION	DOTNAME




#include "x86_arch.h"
























































.text$	SEGMENT ALIGN(64) 'CODE'
EXTERN	OPENSSL_ia32cap_P:NEAR


PUBLIC	RC4

ALIGN	16
>
>
>
>
>
>
>

>
>
>
>
|
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
; 1 "crypto/rc4/rc4-masm-x86_64.S.tmp"
; 1 "<built-in>" 1
; 1 "<built-in>" 3
; 349 "<built-in>" 3
; 1 "<command line>" 1
; 1 "<built-in>" 2
; 1 "crypto/rc4/rc4-masm-x86_64.S.tmp" 2
OPTION	DOTNAME

; 1 "./crypto/x86_arch.h" 1


; 16 "./crypto/x86_arch.h"









; 40 "./crypto/x86_arch.h"













































; 3 "crypto/rc4/rc4-masm-x86_64.S.tmp" 2
.text$	SEGMENT ALIGN(64) 'CODE'
EXTERN	OPENSSL_ia32cap_P:NEAR


PUBLIC	RC4

ALIGN	16
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
	xor	rbx,rbx
	inc	r10b
	sub	rbx,r10
	sub	r13,r12
	mov	eax,DWORD PTR[r10*4+rdi]
	test	r11,-16
	jz	$L$loop1
	bt	r8d,IA32CAP_BIT0_INTEL
	jc	$L$intel
	and	rbx,7
	lea	rsi,QWORD PTR[1+r10]
	jz	$L$oop8
	sub	r11,rbx
$L$oop8_warmup::
	add	cl,al







|







109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
	xor	rbx,rbx
	inc	r10b
	sub	rbx,r10
	sub	r13,r12
	mov	eax,DWORD PTR[r10*4+rdi]
	test	r11,-16
	jz	$L$loop1
	bt	r8d,30
	jc	$L$intel
	and	rbx,7
	lea	rsi,QWORD PTR[1+r10]
	jz	$L$oop8
	sub	r11,rbx
$L$oop8_warmup::
	add	cl,al
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
	mov	rcx,rsi
	xor	eax,eax
	xor	r9,r9
	xor	r10,r10
	xor	r11,r11

	mov	r8d,DWORD PTR[OPENSSL_ia32cap_P]
	bt	r8d,IA32CAP_BIT0_INTELP4
	jc	$L$c1stloop
	jmp	$L$w1stloop

ALIGN	16
$L$w1stloop::
	mov	DWORD PTR[rax*4+rdi],eax
	add	al,1







|







621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
	mov	rcx,rsi
	xor	eax,eax
	xor	r9,r9
	xor	r10,r10
	xor	r11,r11

	mov	r8d,DWORD PTR[OPENSSL_ia32cap_P]
	bt	r8d,20
	jc	$L$c1stloop
	jmp	$L$w1stloop

ALIGN	16
$L$w1stloop::
	mov	DWORD PTR[rax*4+rdi],eax
	add	al,1
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637

PUBLIC	RC4_options

ALIGN	16
RC4_options	PROC PUBLIC
	lea	rax,QWORD PTR[$L$opts]
	mov	edx,DWORD PTR[OPENSSL_ia32cap_P]
	bt	edx,IA32CAP_BIT0_INTELP4
	jc	$L$8xchar
	bt	edx,IA32CAP_BIT0_INTEL
	jnc	$L$done
	add	rax,25
	DB	0F3h,0C3h		;repret
$L$8xchar::
	add	rax,12
$L$done::
	DB	0F3h,0C3h		;repret







|

|







688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704

PUBLIC	RC4_options

ALIGN	16
RC4_options	PROC PUBLIC
	lea	rax,QWORD PTR[$L$opts]
	mov	edx,DWORD PTR[OPENSSL_ia32cap_P]
	bt	edx,20
	jc	$L$8xchar
	bt	edx,30
	jnc	$L$done
	add	rax,25
	DB	0F3h,0C3h		;repret
$L$8xchar::
	add	rax,12
$L$done::
	DB	0F3h,0C3h		;repret
645
646
647
648
649
650
651

DB	112,112,114,111,64,111,112,101,110,115,115,108,46,111,114,103
DB	62,0
ALIGN	64
RC4_options	ENDP

.text$	ENDS
END








>
712
713
714
715
716
717
718
719
DB	112,112,114,111,64,111,112,101,110,115,115,108,46,111,114,103
DB	62,0
ALIGN	64
RC4_options	ENDP

.text$	ENDS
END

Changes to jni/libressl/crypto/rc4/rc4-md5-masm-x86_64.S.







1




2
























































3
4
5
6
7
8
9







OPTION	DOTNAME




#include "x86_arch.h"
























































.text$	SEGMENT ALIGN(64) 'CODE'
ALIGN	16

PUBLIC	rc4_md5_enc

rc4_md5_enc	PROC PUBLIC
	mov	QWORD PTR[8+rsp],rdi	;WIN64 prologue
>
>
>
>
>
>
>

>
>
>
>
|
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
; 1 "crypto/rc4/rc4-md5-masm-x86_64.S.tmp"
; 1 "<built-in>" 1
; 1 "<built-in>" 3
; 349 "<built-in>" 3
; 1 "<command line>" 1
; 1 "<built-in>" 2
; 1 "crypto/rc4/rc4-md5-masm-x86_64.S.tmp" 2
OPTION	DOTNAME

; 1 "./crypto/x86_arch.h" 1


; 16 "./crypto/x86_arch.h"









; 40 "./crypto/x86_arch.h"













































; 3 "crypto/rc4/rc4-md5-masm-x86_64.S.tmp" 2
.text$	SEGMENT ALIGN(64) 'CODE'
ALIGN	16

PUBLIC	rc4_md5_enc

rc4_md5_enc	PROC PUBLIC
	mov	QWORD PTR[8+rsp],rdi	;WIN64 prologue
1273
1274
1275
1276
1277
1278
1279

	mov	rsi,QWORD PTR[16+rsp]
	DB	0F3h,0C3h		;repret
$L$SEH_end_rc4_md5_enc::
rc4_md5_enc	ENDP

.text$	ENDS
END








>
1340
1341
1342
1343
1344
1345
1346
1347
	mov	rsi,QWORD PTR[16+rsp]
	DB	0F3h,0C3h		;repret
$L$SEH_end_rc4_md5_enc::
rc4_md5_enc	ENDP

.text$	ENDS
END

Changes to jni/libressl/crypto/rsa/rsa_locl.h.
1
2
3
4
5
6
7







8
9
/* $OpenBSD: rsa_locl.h,v 1.4 2016/12/21 15:49:29 jsing Exp $ */

__BEGIN_HIDDEN_DECLS

extern int int_rsa_verify(int dtype, const unsigned char *m,
    unsigned int m_len, unsigned char *rm, size_t *prm_len,
    const unsigned char *sigbuf, size_t siglen, RSA *rsa);








__END_HIDDEN_DECLS
|






>
>
>
>
>
>
>


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
/* $OpenBSD: rsa_locl.h,v 1.5 2019/10/04 16:51:31 jsing Exp $ */

__BEGIN_HIDDEN_DECLS

extern int int_rsa_verify(int dtype, const unsigned char *m,
    unsigned int m_len, unsigned char *rm, size_t *prm_len,
    const unsigned char *sigbuf, size_t siglen, RSA *rsa);

int RSA_padding_add_PKCS1_OAEP_mgf1(unsigned char *to, int tlen,
    const unsigned char *from, int flen, const unsigned char *param, int plen,
    const EVP_MD *md, const EVP_MD *mgf1md);
int RSA_padding_check_PKCS1_OAEP_mgf1(unsigned char *to, int tlen,
    const unsigned char *from, int flen, int num, const unsigned char *param,
    int plen, const EVP_MD *md, const EVP_MD *mgf1md);

__END_HIDDEN_DECLS
Changes to jni/libressl/crypto/rsa/rsa_meth.c.
1
2
3
4
5
6
7
8
/*	$OpenBSD: rsa_meth.c,v 1.2 2018/09/12 06:35:38 djm Exp $	*/
/*
 * Copyright (c) 2018 Theo Buehler <tb@openbsd.org>
 *
 * Permission to use, copy, modify, and distribute this software for any
 * purpose with or without fee is hereby granted, provided that the above
 * copyright notice and this permission notice appear in all copies.
 *
|







1
2
3
4
5
6
7
8
/*	$OpenBSD: rsa_meth.c,v 1.3 2019/06/05 15:41:33 gilles Exp $	*/
/*
 * Copyright (c) 2018 Theo Buehler <tb@openbsd.org>
 *
 * Permission to use, copy, modify, and distribute this software for any
 * purpose with or without fee is hereby granted, provided that the above
 * copyright notice and this permission notice appear in all copies.
 *
98
99
100
101
102
103
104












































































































































































int
RSA_meth_set_finish(RSA_METHOD *meth, int (*finish)(RSA *rsa))
{
	meth->finish = finish;
	return 1;
}


















































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275

int
RSA_meth_set_finish(RSA_METHOD *meth, int (*finish)(RSA *rsa))
{
	meth->finish = finish;
	return 1;
}

int
RSA_meth_set_pub_enc(RSA_METHOD *meth, int (*pub_enc)(int flen,
    const unsigned char *from, unsigned char *to, RSA *rsa, int padding))
{
	meth->rsa_pub_enc = pub_enc;
	return 1;
}

int
RSA_meth_set_pub_dec(RSA_METHOD *meth, int (*pub_dec)(int flen,
    const unsigned char *from, unsigned char *to, RSA *rsa, int padding))
{
	meth->rsa_pub_dec = pub_dec;
	return 1;
}

int
RSA_meth_set_mod_exp(RSA_METHOD *meth, int (*mod_exp)(BIGNUM *r0,
    const BIGNUM *i, RSA *rsa, BN_CTX *ctx))
{
	meth->rsa_mod_exp = mod_exp;
	return 1;
}

int
RSA_meth_set_bn_mod_exp(RSA_METHOD *meth, int (*bn_mod_exp)(BIGNUM *r,
    const BIGNUM *a, const BIGNUM *p, const BIGNUM *m, BN_CTX *ctx,
	BN_MONT_CTX *m_ctx))
{
	meth->bn_mod_exp = bn_mod_exp;
	return 1;
}

int
RSA_meth_set_init(RSA_METHOD *meth, int (*init)(RSA *rsa))
{
	meth->init = init;
	return 1;
}

int
RSA_meth_set_keygen(RSA_METHOD *meth, int (*keygen)(RSA *rsa, int bits,
    BIGNUM *e, BN_GENCB *cb))
{
	meth->rsa_keygen = keygen;
	return 1;
}

int
RSA_meth_set_flags(RSA_METHOD *meth, int flags)
{
	meth->flags = flags;
	return 1;
}

int
RSA_meth_set0_app_data(RSA_METHOD *meth, void *app_data)
{
	meth->app_data = app_data;
	return 1;
}

const char *
RSA_meth_get0_name(const RSA_METHOD *meth)
{
	return meth->name;
}

int
(*RSA_meth_get_pub_enc(const RSA_METHOD *meth))(int flen,
    const unsigned char *from, unsigned char *to, RSA *rsa, int padding)
{
	return meth->rsa_pub_enc;
}

int
(*RSA_meth_get_pub_dec(const RSA_METHOD *meth))(int flen,
    const unsigned char *from, unsigned char *to, RSA *rsa, int padding)
{
	return meth->rsa_pub_dec;
}

int
(*RSA_meth_get_priv_enc(const RSA_METHOD *meth))(int flen,
    const unsigned char *from, unsigned char *to, RSA *rsa, int padding)
{
	return meth->rsa_priv_enc;
}

int
(*RSA_meth_get_priv_dec(const RSA_METHOD *meth))(int flen,
    const unsigned char *from, unsigned char *to, RSA *rsa, int padding)
{
	return meth->rsa_priv_dec;
}

int
(*RSA_meth_get_mod_exp(const RSA_METHOD *meth))(BIGNUM *r0, const BIGNUM *i,
    RSA *rsa, BN_CTX *ctx)
{
	return meth->rsa_mod_exp;
}

int
(*RSA_meth_get_bn_mod_exp(const RSA_METHOD *meth))(BIGNUM *r,
    const BIGNUM *a, const BIGNUM *p, const BIGNUM *m, BN_CTX *ctx,
    BN_MONT_CTX *m_ctx)
{
	return meth->bn_mod_exp;
}

int
(*RSA_meth_get_init(const RSA_METHOD *meth))(RSA *rsa)
{
	return meth->init;
}

int
(*RSA_meth_get_keygen(const RSA_METHOD *meth))(RSA *rsa, int bits, BIGNUM *e,
    BN_GENCB *cb)
{
	return meth->rsa_keygen;
}

int
RSA_meth_get_flags(const RSA_METHOD *meth)
{
	return meth->flags;
}

void *
RSA_meth_get0_app_data(const RSA_METHOD *meth)
{
	return meth->app_data;
}

int
(*RSA_meth_get_sign(const RSA_METHOD *meth))(int type,
    const unsigned char *m, unsigned int m_length,
    unsigned char *sigret, unsigned int *siglen,
    const RSA *rsa)
{
	return meth->rsa_sign;
}

int
RSA_meth_set_sign(RSA_METHOD *meth, int (*sign)(int type,
    const unsigned char *m, unsigned int m_length, unsigned char *sigret,
    unsigned int *siglen, const RSA *rsa))
{
	meth->rsa_sign = sign;
	return 1;
}

int
(*RSA_meth_get_verify(const RSA_METHOD *meth))(int dtype,
    const unsigned char *m, unsigned int m_length, const unsigned char *sigbuf,
    unsigned int siglen, const RSA *rsa)
{
	return meth->rsa_verify;
}

int
RSA_meth_set_verify(RSA_METHOD *meth, int (*verify)(int dtype,
    const unsigned char *m, unsigned int m_length, const unsigned char *sigbuf,
    unsigned int siglen, const RSA *rsa))
{
	meth->rsa_verify = verify;
	return 1;
}
Changes to jni/libressl/crypto/rsa/rsa_oaep.c.
1













2





















3

















4
5
6
7
8
9
10
/* $OpenBSD: rsa_oaep.c,v 1.29 2018/08/19 20:17:20 tb Exp $ */













/* Written by Ulf Moeller. This software is distributed on an "AS IS"





















   basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. */


















/* EME-OAEP as defined in RFC 2437 (PKCS #1 v2.0) */

/* See Victor Shoup, "OAEP reconsidered," Nov. 2000,
 * <URL: http://www.shoup.net/papers/oaep.ps.Z>
 * for problems with the security proof for the
 * original OAEP scheme, which EME-OAEP is based on.
|
>
>
>
>
>
>
>
>
>
>
>
>
>
|
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
|
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
/* $OpenBSD: rsa_oaep.c,v 1.32 2019/10/09 16:17:59 jsing Exp $ */
/*
 * Copyright 1999-2018 The OpenSSL Project Authors. All Rights Reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 *
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer. 
 *
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in
 *    the documentation and/or other materials provided with the
 *    distribution.
 *
 * 3. All advertising materials mentioning features or use of this
 *    software must display the following acknowledgment:
 *    "This product includes software developed by the OpenSSL Project
 *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
 *
 * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
 *    endorse or promote products derived from this software without
 *    prior written permission. For written permission, please contact
 *    openssl-core@openssl.org.
 *
 * 5. Products derived from this software may not be called "OpenSSL"
 *    nor may "OpenSSL" appear in their names without prior written
 *    permission of the OpenSSL Project.
 *
 * 6. Redistributions of any form whatsoever must retain the following
 *    acknowledgment:
 *    "This product includes software developed by the OpenSSL Project
 *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
 *
 * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
 * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
 * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
 * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
 * OF THE POSSIBILITY OF SUCH DAMAGE.
 * ====================================================================
 *
 * This product includes cryptographic software written by Eric Young
 * (eay@cryptsoft.com).  This product includes software written by Tim
 * Hudson (tjh@cryptsoft.com).
 *
 */

/* EME-OAEP as defined in RFC 2437 (PKCS #1 v2.0) */

/* See Victor Shoup, "OAEP reconsidered," Nov. 2000,
 * <URL: http://www.shoup.net/papers/oaep.ps.Z>
 * for problems with the security proof for the
 * original OAEP scheme, which EME-OAEP is based on.
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41









42
43
44



45








46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89

90




91
92
93
94
95
96
97
98









99
100
101
102
103
104
105

106








107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
 * an equivalent notion.
 */

#include <stdio.h>
#include <stdlib.h>
#include <string.h>

#include <openssl/opensslconf.h>

#if !defined(OPENSSL_NO_SHA) && !defined(OPENSSL_NO_SHA1)

#include <openssl/bn.h>
#include <openssl/err.h>
#include <openssl/evp.h>
#include <openssl/rsa.h>
#include <openssl/sha.h>

static int MGF1(unsigned char *mask, long len, const unsigned char *seed,
    long seedlen);

int
RSA_padding_add_PKCS1_OAEP(unsigned char *to, int tlen,
    const unsigned char *from, int flen, const unsigned char *param, int plen)
{









	int i, emlen = tlen - 1;
	unsigned char *db, *seed;
	unsigned char *dbmask, seedmask[SHA_DIGEST_LENGTH];












	if (flen > emlen - 2 * SHA_DIGEST_LENGTH - 1) {
		RSAerror(RSA_R_DATA_TOO_LARGE_FOR_KEY_SIZE);
		return 0;
	}

	if (emlen < 2 * SHA_DIGEST_LENGTH + 1) {
		RSAerror(RSA_R_KEY_SIZE_TOO_SMALL);
		return 0;
	}

	to[0] = 0;
	seed = to + 1;
	db = to + SHA_DIGEST_LENGTH + 1;

	if (!EVP_Digest((void *)param, plen, db, NULL, EVP_sha1(), NULL))
		return 0;
	memset(db + SHA_DIGEST_LENGTH, 0,
	    emlen - flen - 2 * SHA_DIGEST_LENGTH - 1);
	db[emlen - flen - SHA_DIGEST_LENGTH - 1] = 0x01;
	memcpy(db + emlen - flen - SHA_DIGEST_LENGTH, from, flen);
	arc4random_buf(seed, SHA_DIGEST_LENGTH);

	dbmask = malloc(emlen - SHA_DIGEST_LENGTH);
	if (dbmask == NULL) {
		RSAerror(ERR_R_MALLOC_FAILURE);
		return 0;
	}

	if (MGF1(dbmask, emlen - SHA_DIGEST_LENGTH, seed,
	    SHA_DIGEST_LENGTH) < 0) {
		free(dbmask);
		return 0;
	}
	for (i = 0; i < emlen - SHA_DIGEST_LENGTH; i++)
		db[i] ^= dbmask[i];

	if (MGF1(seedmask, SHA_DIGEST_LENGTH, db,
	    emlen - SHA_DIGEST_LENGTH) < 0) {
		free(dbmask);
		return 0;
	}
	for (i = 0; i < SHA_DIGEST_LENGTH; i++)
		seed[i] ^= seedmask[i];


	free(dbmask);




	return 1;
}

int
RSA_padding_check_PKCS1_OAEP(unsigned char *to, int tlen,
    const unsigned char *from, int flen, int num, const unsigned char *param,
    int plen)
{









	int i, dblen, mlen = -1;
	const unsigned char *maskeddb;
	int lzero;
	unsigned char *db = NULL;
	unsigned char seed[SHA_DIGEST_LENGTH], phash[SHA_DIGEST_LENGTH];
	unsigned char *padded_from;
	int bad = 0;










	if (--num < 2 * SHA_DIGEST_LENGTH + 1)
		/*
		 * 'num' is the length of the modulus, i.e. does not depend
		 * on the particular ciphertext.
		 */
		goto decoding_err;

	lzero = num - flen;
	if (lzero < 0) {
		/*
		 * signalling this error immediately after detection might allow
		 * for side-channel attacks (e.g. timing if 'plen' is huge
		 * -- cf. James H. Manger, "A Chosen Ciphertext Attack on RSA
		 * Optimal Asymmetric Encryption Padding (OAEP) [...]",
		 * CRYPTO 2001), so we use a 'bad' flag
		 */
		bad = 1;
		lzero = 0;
		flen = num; /* don't overflow the memcpy to padded_from */
	}

	dblen = num - SHA_DIGEST_LENGTH;
	if ((db = malloc(dblen + num)) == NULL) {
		RSAerror(ERR_R_MALLOC_FAILURE);
		return -1;
	}

	/*
	 * Always do this zero-padding copy (even when lzero == 0)
	 * to avoid leaking timing info about the value of lzero.
	 */
	padded_from = db + dblen;
	memset(padded_from, 0, lzero);
	memcpy(padded_from + lzero, from, flen);

	maskeddb = padded_from + SHA_DIGEST_LENGTH;

	if (MGF1(seed, SHA_DIGEST_LENGTH, maskeddb, dblen))
		goto err;
	for (i = 0; i < SHA_DIGEST_LENGTH; i++)
		seed[i] ^= padded_from[i];

	if (MGF1(db, dblen, seed, SHA_DIGEST_LENGTH))
		goto err;
	for (i = 0; i < dblen; i++)
		db[i] ^= maskeddb[i];

	if (!EVP_Digest((void *)param, plen, phash, NULL, EVP_sha1(), NULL))
		goto err;

	if (timingsafe_memcmp(db, phash, SHA_DIGEST_LENGTH) != 0 || bad)
		goto decoding_err;
	else {
		for (i = SHA_DIGEST_LENGTH; i < dblen; i++)
			if (db[i] != 0x00)
				break;
		if (i == dblen || db[i] != 0x01)
			goto decoding_err;
		else {
			/* everything looks OK */








<
<
<
<






<
|





>
>
>
>
>
>
>
>
>


|
>
>
>

>
>
>
>
>
>
>
>
|

|


|

|




|

|
|
|
|
|
|
|

|
|

|


|
<
<
|
<
|

|
<
<
<
|
<
|


>
|
>
>
>
>
|







>
>
>
>
>
>
>
>
>




|


>

>
>
>
>
>
>
>
>
|




















|













|

|

|

<
|




|


|


|







69
70
71
72
73
74
75




76
77
78
79
80
81

82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140


141

142
143
144



145

146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229

230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
 * an equivalent notion.
 */

#include <stdio.h>
#include <stdlib.h>
#include <string.h>





#include <openssl/bn.h>
#include <openssl/err.h>
#include <openssl/evp.h>
#include <openssl/rsa.h>
#include <openssl/sha.h>


#include "rsa_locl.h"

int
RSA_padding_add_PKCS1_OAEP(unsigned char *to, int tlen,
    const unsigned char *from, int flen, const unsigned char *param, int plen)
{
	return RSA_padding_add_PKCS1_OAEP_mgf1(to, tlen, from, flen, param,
	    plen, NULL, NULL);
}

int
RSA_padding_add_PKCS1_OAEP_mgf1(unsigned char *to, int tlen,
    const unsigned char *from, int flen, const unsigned char *param, int plen,
    const EVP_MD *md, const EVP_MD *mgf1md)
{
	int i, emlen = tlen - 1;
	unsigned char *db, *seed;
	unsigned char *dbmask = NULL;
	unsigned char seedmask[EVP_MAX_MD_SIZE];
	int mdlen, dbmask_len = 0;
	int rv = 0;

	if (md == NULL)
		md = EVP_sha1();
	if (mgf1md == NULL)
		mgf1md = md;

	if ((mdlen = EVP_MD_size(md)) <= 0)
		goto err;

	if (flen > emlen - 2 * mdlen - 1) {
		RSAerror(RSA_R_DATA_TOO_LARGE_FOR_KEY_SIZE);
		goto err;
	}

	if (emlen < 2 * mdlen + 1) {
		RSAerror(RSA_R_KEY_SIZE_TOO_SMALL);
		goto err;
	}

	to[0] = 0;
	seed = to + 1;
	db = to + mdlen + 1;

	if (!EVP_Digest((void *)param, plen, db, NULL, md, NULL))
		goto err;

	memset(db + mdlen, 0, emlen - flen - 2 * mdlen - 1);
	db[emlen - flen - mdlen - 1] = 0x01;
	memcpy(db + emlen - flen - mdlen, from, flen);
	arc4random_buf(seed, mdlen);

	dbmask_len = emlen - mdlen;
	if ((dbmask = malloc(dbmask_len)) == NULL) {
		RSAerror(ERR_R_MALLOC_FAILURE);
		goto err;
	}

	if (PKCS1_MGF1(dbmask, dbmask_len, seed, mdlen, mgf1md) < 0)


		goto err;

	for (i = 0; i < dbmask_len; i++)
		db[i] ^= dbmask[i];
	if (PKCS1_MGF1(seedmask, mdlen, db, dbmask_len, mgf1md) < 0)



		goto err;

	for (i = 0; i < mdlen; i++)
		seed[i] ^= seedmask[i];

	rv = 1;

 err:
	explicit_bzero(seedmask, sizeof(seedmask));
	freezero(dbmask, dbmask_len);

	return rv;
}

int
RSA_padding_check_PKCS1_OAEP(unsigned char *to, int tlen,
    const unsigned char *from, int flen, int num, const unsigned char *param,
    int plen)
{
	return RSA_padding_check_PKCS1_OAEP_mgf1(to, tlen, from, flen, num,
	    param, plen, NULL, NULL);
}

int
RSA_padding_check_PKCS1_OAEP_mgf1(unsigned char *to, int tlen,
    const unsigned char *from, int flen, int num, const unsigned char *param,
    int plen, const EVP_MD *md, const EVP_MD *mgf1md)
{
	int i, dblen, mlen = -1;
	const unsigned char *maskeddb;
	int lzero;
	unsigned char *db = NULL;
	unsigned char seed[EVP_MAX_MD_SIZE], phash[EVP_MAX_MD_SIZE];
	unsigned char *padded_from;
	int bad = 0;
	int mdlen;

	if (md == NULL)
		md = EVP_sha1();
	if (mgf1md == NULL)
		mgf1md = md;

	if ((mdlen = EVP_MD_size(md)) <= 0)
		goto err;

	if (--num < 2 * mdlen + 1)
		/*
		 * 'num' is the length of the modulus, i.e. does not depend
		 * on the particular ciphertext.
		 */
		goto decoding_err;

	lzero = num - flen;
	if (lzero < 0) {
		/*
		 * signalling this error immediately after detection might allow
		 * for side-channel attacks (e.g. timing if 'plen' is huge
		 * -- cf. James H. Manger, "A Chosen Ciphertext Attack on RSA
		 * Optimal Asymmetric Encryption Padding (OAEP) [...]",
		 * CRYPTO 2001), so we use a 'bad' flag
		 */
		bad = 1;
		lzero = 0;
		flen = num; /* don't overflow the memcpy to padded_from */
	}

	dblen = num - mdlen;
	if ((db = malloc(dblen + num)) == NULL) {
		RSAerror(ERR_R_MALLOC_FAILURE);
		return -1;
	}

	/*
	 * Always do this zero-padding copy (even when lzero == 0)
	 * to avoid leaking timing info about the value of lzero.
	 */
	padded_from = db + dblen;
	memset(padded_from, 0, lzero);
	memcpy(padded_from + lzero, from, flen);

	maskeddb = padded_from + mdlen;

	if (PKCS1_MGF1(seed, mdlen, maskeddb, dblen, mgf1md))
		goto err;
	for (i = 0; i < mdlen; i++)
		seed[i] ^= padded_from[i];

	if (PKCS1_MGF1(db, dblen, seed, mdlen, mgf1md))
		goto err;
	for (i = 0; i < dblen; i++)
		db[i] ^= maskeddb[i];

	if (!EVP_Digest((void *)param, plen, phash, NULL, md, NULL))
		goto err;

	if (timingsafe_memcmp(db, phash, mdlen) != 0 || bad)
		goto decoding_err;
	else {
		for (i = mdlen; i < dblen; i++)
			if (db[i] != 0x00)
				break;
		if (i == dblen || db[i] != 0x01)
			goto decoding_err;
		else {
			/* everything looks OK */

223
224
225
226
227
228
229
230
231
232
233
234
235
236
		}
	}
	rv = 0;
 err:
	EVP_MD_CTX_cleanup(&c);
	return rv;
}

static int
MGF1(unsigned char *mask, long len, const unsigned char *seed, long seedlen)
{
	return PKCS1_MGF1(mask, len, seed, seedlen, EVP_sha1());
}
#endif







<
<
<
<
<
<
<
304
305
306
307
308
309
310







		}
	}
	rv = 0;
 err:
	EVP_MD_CTX_cleanup(&c);
	return rv;
}







Changes to jni/libressl/crypto/rsa/rsa_pmeth.c.
1
2
3
4
5
6
7
8
/* $OpenBSD: rsa_pmeth.c,v 1.21 2018/09/05 00:55:33 djm Exp $ */
/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
 * project 2006.
 */
/* ====================================================================
 * Copyright (c) 2006 The OpenSSL Project.  All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
|







1
2
3
4
5
6
7
8
/* $OpenBSD: rsa_pmeth.c,v 1.22 2019/09/09 18:06:26 jsing Exp $ */
/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
 * project 2006.
 */
/* ====================================================================
 * Copyright (c) 2006 The OpenSSL Project.  All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
418
419
420
421
422
423
424




425
426
427
428
429
430
431
		return 1;

	case EVP_PKEY_CTRL_MD:
		if (!check_padding_md(p2, rctx->pad_mode))
			return 0;
		rctx->md = p2;
		return 1;





	case EVP_PKEY_CTRL_RSA_MGF1_MD:
	case EVP_PKEY_CTRL_GET_RSA_MGF1_MD:
		if (rctx->pad_mode != RSA_PKCS1_PSS_PADDING) {
			RSAerror(RSA_R_INVALID_MGF1_MD);
			return -2;
		}







>
>
>
>







418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
		return 1;

	case EVP_PKEY_CTRL_MD:
		if (!check_padding_md(p2, rctx->pad_mode))
			return 0;
		rctx->md = p2;
		return 1;

	case EVP_PKEY_CTRL_GET_MD:
		*(const EVP_MD **)p2 = rctx->md;
		return 1;

	case EVP_PKEY_CTRL_RSA_MGF1_MD:
	case EVP_PKEY_CTRL_GET_RSA_MGF1_MD:
		if (rctx->pad_mode != RSA_PKCS1_PSS_PADDING) {
			RSAerror(RSA_R_INVALID_MGF1_MD);
			return -2;
		}
Changes to jni/libressl/crypto/sha/sha1-masm-x86_64.S.







1




2
























































3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29







OPTION	DOTNAME




#include "x86_arch.h"
























































.text$	SEGMENT ALIGN(64) 'CODE'
EXTERN	OPENSSL_ia32cap_P:NEAR


PUBLIC	sha1_block_data_order

ALIGN	16
sha1_block_data_order	PROC PUBLIC
	mov	QWORD PTR[8+rsp],rdi	;WIN64 prologue
	mov	QWORD PTR[16+rsp],rsi
	mov	rax,rsp
$L$SEH_begin_sha1_block_data_order::
	mov	rdi,rcx
	mov	rsi,rdx
	mov	rdx,r8


	mov	r9d,DWORD PTR[((OPENSSL_ia32cap_P+0))]
	mov	r8d,DWORD PTR[((OPENSSL_ia32cap_P+4))]
	test	r8d,IA32CAP_MASK1_SSSE3
	jz	$L$ialu
	jmp	_ssse3_shortcut

ALIGN	16
$L$ialu::
	push	rbx
	push	rbp
>
>
>
>
>
>
>

>
>
>
>
|
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>



















|







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
; 1 "crypto/sha/sha1-masm-x86_64.S.tmp"
; 1 "<built-in>" 1
; 1 "<built-in>" 3
; 349 "<built-in>" 3
; 1 "<command line>" 1
; 1 "<built-in>" 2
; 1 "crypto/sha/sha1-masm-x86_64.S.tmp" 2
OPTION	DOTNAME

; 1 "./crypto/x86_arch.h" 1


; 16 "./crypto/x86_arch.h"









; 40 "./crypto/x86_arch.h"













































; 3 "crypto/sha/sha1-masm-x86_64.S.tmp" 2
.text$	SEGMENT ALIGN(64) 'CODE'
EXTERN	OPENSSL_ia32cap_P:NEAR


PUBLIC	sha1_block_data_order

ALIGN	16
sha1_block_data_order	PROC PUBLIC
	mov	QWORD PTR[8+rsp],rdi	;WIN64 prologue
	mov	QWORD PTR[16+rsp],rsi
	mov	rax,rsp
$L$SEH_begin_sha1_block_data_order::
	mov	rdi,rcx
	mov	rsi,rdx
	mov	rdx,r8


	mov	r9d,DWORD PTR[((OPENSSL_ia32cap_P+0))]
	mov	r8d,DWORD PTR[((OPENSSL_ia32cap_P+4))]
	test	r8d,(1 SHL 9)
	jz	$L$ialu
	jmp	_ssse3_shortcut

ALIGN	16
$L$ialu::
	push	rbx
	push	rbp
2672
2673
2674
2675
2676
2677
2678

$L$SEH_info_sha1_block_data_order_ssse3::
DB	9,0,0,0
	DD	imagerel ssse3_handler
	DD	imagerel $L$prologue_ssse3,imagerel $L$epilogue_ssse3	

.xdata	ENDS
END








>
2739
2740
2741
2742
2743
2744
2745
2746
$L$SEH_info_sha1_block_data_order_ssse3::
DB	9,0,0,0
	DD	imagerel ssse3_handler
	DD	imagerel $L$prologue_ssse3,imagerel $L$epilogue_ssse3	

.xdata	ENDS
END

Changes to jni/libressl/crypto/sha/sha256-masm-x86_64.S.







1




2
























































3
4
5
6
7
8
9







OPTION	DOTNAME




#include "x86_arch.h"
























































.text$	SEGMENT ALIGN(64) 'CODE'

PUBLIC	sha256_block_data_order

ALIGN	16
sha256_block_data_order	PROC PUBLIC
	mov	QWORD PTR[8+rsp],rdi	;WIN64 prologue
>
>
>
>
>
>
>

>
>
>
>
|
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
; 1 "crypto/sha/sha256-masm-x86_64.S.tmp"
; 1 "<built-in>" 1
; 1 "<built-in>" 3
; 349 "<built-in>" 3
; 1 "<command line>" 1
; 1 "<built-in>" 2
; 1 "crypto/sha/sha256-masm-x86_64.S.tmp" 2
OPTION	DOTNAME

; 1 "./crypto/x86_arch.h" 1


; 16 "./crypto/x86_arch.h"









; 40 "./crypto/x86_arch.h"













































; 3 "crypto/sha/sha256-masm-x86_64.S.tmp" 2
.text$	SEGMENT ALIGN(64) 'CODE'

PUBLIC	sha256_block_data_order

ALIGN	16
sha256_block_data_order	PROC PUBLIC
	mov	QWORD PTR[8+rsp],rdi	;WIN64 prologue
1790
1791
1792
1793
1794
1795
1796

	DD	019a4c116h,01e376c08h,02748774ch,034b0bcb5h
	DD	0391c0cb3h,04ed8aa4ah,05b9cca4fh,0682e6ff3h
	DD	0748f82eeh,078a5636fh,084c87814h,08cc70208h
	DD	090befffah,0a4506cebh,0bef9a3f7h,0c67178f2h

.text$	ENDS
END








>
1857
1858
1859
1860
1861
1862
1863
1864
	DD	019a4c116h,01e376c08h,02748774ch,034b0bcb5h
	DD	0391c0cb3h,04ed8aa4ah,05b9cca4fh,0682e6ff3h
	DD	0748f82eeh,078a5636fh,084c87814h,08cc70208h
	DD	090befffah,0a4506cebh,0bef9a3f7h,0c67178f2h

.text$	ENDS
END

Changes to jni/libressl/crypto/sha/sha512-masm-x86_64.S.







1




2
























































3
4
5
6
7
8
9







OPTION	DOTNAME




#include "x86_arch.h"
























































.text$	SEGMENT ALIGN(64) 'CODE'

PUBLIC	sha512_block_data_order

ALIGN	16
sha512_block_data_order	PROC PUBLIC
	mov	QWORD PTR[8+rsp],rdi	;WIN64 prologue
>
>
>
>
>
>
>

>
>
>
>
|
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
; 1 "crypto/sha/sha512-masm-x86_64.S.tmp"
; 1 "<built-in>" 1
; 1 "<built-in>" 3
; 349 "<built-in>" 3
; 1 "<command line>" 1
; 1 "<built-in>" 2
; 1 "crypto/sha/sha512-masm-x86_64.S.tmp" 2
OPTION	DOTNAME

; 1 "./crypto/x86_arch.h" 1


; 16 "./crypto/x86_arch.h"









; 40 "./crypto/x86_arch.h"













































; 3 "crypto/sha/sha512-masm-x86_64.S.tmp" 2
.text$	SEGMENT ALIGN(64) 'CODE'

PUBLIC	sha512_block_data_order

ALIGN	16
sha512_block_data_order	PROC PUBLIC
	mov	QWORD PTR[8+rsp],rdi	;WIN64 prologue
1814
1815
1816
1817
1818
1819
1820

	DQ	028db77f523047d84h,032caab7b40c72493h
	DQ	03c9ebe0a15c9bebch,0431d67c49c100d4ch
	DQ	04cc5d4becb3e42b6h,0597f299cfc657e2ah
	DQ	05fcb6fab3ad6faech,06c44198c4a475817h

.text$	ENDS
END








>
1881
1882
1883
1884
1885
1886
1887
1888
	DQ	028db77f523047d84h,032caab7b40c72493h
	DQ	03c9ebe0a15c9bebch,0431d67c49c100d4ch
	DQ	04cc5d4becb3e42b6h,0597f299cfc657e2ah
	DQ	05fcb6fab3ad6faech,06c44198c4a475817h

.text$	ENDS
END

Changes to jni/libressl/crypto/ts/ts_rsp_sign.c.
1
2
3
4
5
6
7
8
/* $OpenBSD: ts_rsp_sign.c,v 1.22 2018/05/13 15:04:05 tb Exp $ */
/* Written by Zoltan Glozik (zglozik@stones.com) for the OpenSSL
 * project 2002.
 */
/* ====================================================================
 * Copyright (c) 2006 The OpenSSL Project.  All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
|







1
2
3
4
5
6
7
8
/* $OpenBSD: ts_rsp_sign.c,v 1.23 2019/07/03 03:24:04 deraadt Exp $ */
/* Written by Zoltan Glozik (zglozik@stones.com) for the OpenSSL
 * project 2002.
 */
/* ====================================================================
 * Copyright (c) 2006 The OpenSSL Project.  All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
		/* empty */
		usecstr[0] = '\0';
	}
	rv = snprintf(genTime_str, sizeof(genTime_str),
	    "%04d%02d%02d%02d%02d%02d%sZ",
	    tm->tm_year + 1900, tm->tm_mon + 1, tm->tm_mday,
	    tm->tm_hour, tm->tm_min, tm->tm_sec, usecstr);
	if (rv == -1 || rv >= sizeof(genTime_str))
		goto err;

	/* Now call OpenSSL to check and set our genTime value */
	if (!asn1_time && !(asn1_time = ASN1_GENERALIZEDTIME_new()))
		goto err;
	if (!ASN1_GENERALIZEDTIME_set_string(asn1_time, genTime_str)) {
		ASN1_GENERALIZEDTIME_free(asn1_time);







|







997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
		/* empty */
		usecstr[0] = '\0';
	}
	rv = snprintf(genTime_str, sizeof(genTime_str),
	    "%04d%02d%02d%02d%02d%02d%sZ",
	    tm->tm_year + 1900, tm->tm_mon + 1, tm->tm_mday,
	    tm->tm_hour, tm->tm_min, tm->tm_sec, usecstr);
	if (rv < 0 || rv >= sizeof(genTime_str))
		goto err;

	/* Now call OpenSSL to check and set our genTime value */
	if (!asn1_time && !(asn1_time = ASN1_GENERALIZEDTIME_new()))
		goto err;
	if (!ASN1_GENERALIZEDTIME_set_string(asn1_time, genTime_str)) {
		ASN1_GENERALIZEDTIME_free(asn1_time);
Changes to jni/libressl/crypto/whrlpool/wp-masm-x86_64.S.







1




2
























































3
4
5
6
7
8
9







OPTION	DOTNAME




#include "x86_arch.h"
























































.text$	SEGMENT ALIGN(64) 'CODE'

PUBLIC	whirlpool_block

ALIGN	16
whirlpool_block	PROC PUBLIC
	mov	QWORD PTR[8+rsp],rdi	;WIN64 prologue
>
>
>
>
>
>
>

>
>
>
>
|
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
; 1 "crypto/whrlpool/wp-masm-x86_64.S.tmp"
; 1 "<built-in>" 1
; 1 "<built-in>" 3
; 349 "<built-in>" 3
; 1 "<command line>" 1
; 1 "<built-in>" 2
; 1 "crypto/whrlpool/wp-masm-x86_64.S.tmp" 2
OPTION	DOTNAME

; 1 "./crypto/x86_arch.h" 1


; 16 "./crypto/x86_arch.h"









; 40 "./crypto/x86_arch.h"













































; 3 "crypto/whrlpool/wp-masm-x86_64.S.tmp" 2
.text$	SEGMENT ALIGN(64) 'CODE'

PUBLIC	whirlpool_block

ALIGN	16
whirlpool_block	PROC PUBLIC
	mov	QWORD PTR[8+rsp],rdi	;WIN64 prologue
869
870
871
872
873
874
875

DB	189,93,16,244,203,62,5,103
DB	228,39,65,139,167,125,149,216
DB	251,238,124,102,221,23,71,158
DB	202,45,191,7,173,90,131,51

.text$	ENDS
END








>
936
937
938
939
940
941
942
943
DB	189,93,16,244,203,62,5,103
DB	228,39,65,139,167,125,149,216
DB	251,238,124,102,221,23,71,158
DB	202,45,191,7,173,90,131,51

.text$	ENDS
END

Changes to jni/libressl/crypto/x509/x509spki.c.
1
2
3
4
5
6
7
8
/* $OpenBSD: x509spki.c,v 1.13 2017/01/29 17:49:23 beck Exp $ */
/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
 * project 1999.
 */
/* ====================================================================
 * Copyright (c) 1999 The OpenSSL Project.  All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
|







1
2
3
4
5
6
7
8
/* $OpenBSD: x509spki.c,v 1.14 2019/05/23 02:08:34 bcook Exp $ */
/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
 * project 1999.
 */
/* ====================================================================
 * Copyright (c) 1999 The OpenSSL Project.  All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
53
54
55
56
57
58
59

60
61
62
63
64
65
66
 * This product includes cryptographic software written by Eric Young
 * (eay@cryptsoft.com).  This product includes software written by Tim
 * Hudson (tjh@cryptsoft.com).
 *
 */

#include <stdio.h>

#include <string.h>

#include <openssl/err.h>
#include <openssl/x509.h>

int
NETSCAPE_SPKI_set_pubkey(NETSCAPE_SPKI *x, EVP_PKEY *pkey)







>







53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
 * This product includes cryptographic software written by Eric Young
 * (eay@cryptsoft.com).  This product includes software written by Tim
 * Hudson (tjh@cryptsoft.com).
 *
 */

#include <stdio.h>
#include <stdlib.h>
#include <string.h>

#include <openssl/err.h>
#include <openssl/x509.h>

int
NETSCAPE_SPKI_set_pubkey(NETSCAPE_SPKI *x, EVP_PKEY *pkey)
Changes to jni/libressl/crypto/x509v3/pcy_node.c.
1
2
3
4
5
6
7
8
/* $OpenBSD: pcy_node.c,v 1.6 2015/07/18 00:01:05 beck Exp $ */
/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
 * project 2004.
 */
/* ====================================================================
 * Copyright (c) 2004 The OpenSSL Project.  All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
|







1
2
3
4
5
6
7
8
/* $OpenBSD: pcy_node.c,v 1.7 2019/04/21 16:25:40 tb Exp $ */
/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
 * project 2004.
 */
/* ====================================================================
 * Copyright (c) 2004 The OpenSSL Project.  All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
64
65
66
67
68
69
70
71

72
73
74
75
76
77
78

static int
node_cmp(const X509_POLICY_NODE * const *a, const X509_POLICY_NODE * const *b)
{
	return OBJ_cmp((*a)->data->valid_policy, (*b)->data->valid_policy);
}

STACK_OF(X509_POLICY_NODE) *policy_node_cmp_new(void)

{
	return sk_X509_POLICY_NODE_new(node_cmp);
}

X509_POLICY_NODE *
tree_find_sk(STACK_OF(X509_POLICY_NODE) *nodes, const ASN1_OBJECT *id)
{







|
>







64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79

static int
node_cmp(const X509_POLICY_NODE * const *a, const X509_POLICY_NODE * const *b)
{
	return OBJ_cmp((*a)->data->valid_policy, (*b)->data->valid_policy);
}

STACK_OF(X509_POLICY_NODE) *
policy_node_cmp_new(void)
{
	return sk_X509_POLICY_NODE_new(node_cmp);
}

X509_POLICY_NODE *
tree_find_sk(STACK_OF(X509_POLICY_NODE) *nodes, const ASN1_OBJECT *id)
{
Changes to jni/libressl/crypto/x509v3/v3_akey.c.
1
2
3
4
5
6
7
8
/* $OpenBSD: v3_akey.c,v 1.19 2017/01/29 17:49:23 beck Exp $ */
/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
 * project 1999.
 */
/* ====================================================================
 * Copyright (c) 1999 The OpenSSL Project.  All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
|







1
2
3
4
5
6
7
8
/* $OpenBSD: v3_akey.c,v 1.22 2019/04/22 17:10:01 tb Exp $ */
/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
 * project 1999.
 */
/* ====================================================================
 * Copyright (c) 1999 The OpenSSL Project.  All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
83
84
85
86
87
88
89
90
91
92
93

94
95





96
97


98

99

100

101
102




103
104
105

106

107

108




109
110



111




112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
	.i2v = (X509V3_EXT_I2V)i2v_AUTHORITY_KEYID,
	.v2i = (X509V3_EXT_V2I)v2i_AUTHORITY_KEYID,
	.i2r = NULL,
	.r2i = NULL,
	.usr_data = NULL,
};

static
STACK_OF(CONF_VALUE) *i2v_AUTHORITY_KEYID(X509V3_EXT_METHOD *method,
    AUTHORITY_KEYID *akeyid, STACK_OF(CONF_VALUE) *extlist)
{

	char *tmp;






	if (akeyid->keyid) {
		tmp = hex_to_string(akeyid->keyid->data, akeyid->keyid->length);


		X509V3_add_value("keyid", tmp, &extlist);

		free(tmp);

	}

	if (akeyid->issuer)
		extlist = i2v_GENERAL_NAMES(NULL, akeyid->issuer, extlist);




	if (akeyid->serial) {
		tmp = hex_to_string(akeyid->serial->data,
		    akeyid->serial->length);

		X509V3_add_value("serial", tmp, &extlist);

		free(tmp);

	}




	return extlist;
}








/* Currently two options:
 * keyid: use the issuers subject keyid, the value 'always' means its is
 * an error if the issuer certificate doesn't have a key id.
 * issuer: use the issuers cert issuer and serial number. The default is
 * to only use this if keyid is not present. With the option 'always'
 * this is always included.
 */

static AUTHORITY_KEYID *
v2i_AUTHORITY_KEYID(X509V3_EXT_METHOD *method, X509V3_CTX *ctx,
    STACK_OF(CONF_VALUE) *values)
{
	char keyid = 0, issuer = 0;
	int i;
	CONF_VALUE *cnf;







|
|
|

>
|

>
>
>
>
>
|
|
>
>
|
>
|
>

>
|
|
>
>
>
>
|
|
|
>
|
>
|
>

>
>
>
>

|
>
>
>

>
>
>
>
|






<







83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147

148
149
150
151
152
153
154
	.i2v = (X509V3_EXT_I2V)i2v_AUTHORITY_KEYID,
	.v2i = (X509V3_EXT_V2I)v2i_AUTHORITY_KEYID,
	.i2r = NULL,
	.r2i = NULL,
	.usr_data = NULL,
};

static STACK_OF(CONF_VALUE) *
i2v_AUTHORITY_KEYID(X509V3_EXT_METHOD *method, AUTHORITY_KEYID *akeyid,
    STACK_OF(CONF_VALUE) *extlist)
{
	STACK_OF(CONF_VALUE) *free_extlist = NULL;
	char *tmpstr = NULL;

	if (extlist == NULL) {
		if ((free_extlist = extlist = sk_CONF_VALUE_new_null()) == NULL)
			return NULL;
	}

	if (akeyid->keyid != NULL) {
		if ((tmpstr = hex_to_string(akeyid->keyid->data,
		    akeyid->keyid->length)) == NULL)
			goto err;
		if (!X509V3_add_value("keyid", tmpstr, &extlist))
			goto err;
		free(tmpstr);
		tmpstr = NULL;
	}

	if (akeyid->issuer != NULL) {
		if ((extlist = i2v_GENERAL_NAMES(NULL, akeyid->issuer,
		    extlist)) == NULL)
			goto err;
	}

	if (akeyid->serial != NULL) {
		if ((tmpstr = hex_to_string(akeyid->serial->data,
		    akeyid->serial->length)) == NULL)
			goto err;
		if (!X509V3_add_value("serial", tmpstr, &extlist))
			goto err;
		free(tmpstr);
		tmpstr = NULL;
	}

	if (sk_CONF_VALUE_num(extlist) <= 0)
		goto err;

	return extlist;

 err:
	free(tmpstr);
	sk_CONF_VALUE_pop_free(free_extlist, X509V3_conf_free);

	return NULL;
}

/*
 * Currently two options:
 * keyid: use the issuers subject keyid, the value 'always' means its is
 * an error if the issuer certificate doesn't have a key id.
 * issuer: use the issuers cert issuer and serial number. The default is
 * to only use this if keyid is not present. With the option 'always'
 * this is always included.
 */

static AUTHORITY_KEYID *
v2i_AUTHORITY_KEYID(X509V3_EXT_METHOD *method, X509V3_CTX *ctx,
    STACK_OF(CONF_VALUE) *values)
{
	char keyid = 0, issuer = 0;
	int i;
	CONF_VALUE *cnf;
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150

	for (i = 0; i < sk_CONF_VALUE_num(values); i++) {
		cnf = sk_CONF_VALUE_value(values, i);
		if (!strcmp(cnf->name, "keyid")) {
			keyid = 1;
			if (cnf->value && !strcmp(cnf->value, "always"))
				keyid = 2;
		}
		else if (!strcmp(cnf->name, "issuer")) {
			issuer = 1;
			if (cnf->value && !strcmp(cnf->value, "always"))
				issuer = 2;
		} else {
			X509V3error(X509V3_R_UNKNOWN_OPTION);
			ERR_asprintf_error_data("name=%s", cnf->name);
			return NULL;







<
|







163
164
165
166
167
168
169

170
171
172
173
174
175
176
177

	for (i = 0; i < sk_CONF_VALUE_num(values); i++) {
		cnf = sk_CONF_VALUE_value(values, i);
		if (!strcmp(cnf->name, "keyid")) {
			keyid = 1;
			if (cnf->value && !strcmp(cnf->value, "always"))
				keyid = 2;

		} else if (!strcmp(cnf->name, "issuer")) {
			issuer = 1;
			if (cnf->value && !strcmp(cnf->value, "always"))
				issuer = 2;
		} else {
			X509V3error(X509V3_R_UNKNOWN_OPTION);
			ERR_asprintf_error_data("name=%s", cnf->name);
			return NULL;
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210

	akeyid->issuer = gens;
	akeyid->serial = serial;
	akeyid->keyid = ikeyid;

	return akeyid;

err:
	AUTHORITY_KEYID_free(akeyid);
	GENERAL_NAME_free(gen);
	sk_GENERAL_NAME_free(gens);
	X509_NAME_free(isname);
	ASN1_INTEGER_free(serial);
	ASN1_OCTET_STRING_free(ikeyid);
	return NULL;
}







|








222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237

	akeyid->issuer = gens;
	akeyid->serial = serial;
	akeyid->keyid = ikeyid;

	return akeyid;

 err:
	AUTHORITY_KEYID_free(akeyid);
	GENERAL_NAME_free(gen);
	sk_GENERAL_NAME_free(gens);
	X509_NAME_free(isname);
	ASN1_INTEGER_free(serial);
	ASN1_OCTET_STRING_free(ikeyid);
	return NULL;
}
Changes to jni/libressl/crypto/x509v3/v3_alt.c.
1
2
3
4
5
6
7
8
/* $OpenBSD: v3_alt.c,v 1.28 2018/05/18 19:34:37 tb Exp $ */
/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
 * project.
 */
/* ====================================================================
 * Copyright (c) 1999-2003 The OpenSSL Project.  All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
|







1
2
3
4
5
6
7
8
/* $OpenBSD: v3_alt.c,v 1.30 2019/04/22 17:10:01 tb Exp $ */
/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
 * project.
 */
/* ====================================================================
 * Copyright (c) 1999-2003 The OpenSSL Project.  All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
123
124
125
126
127
128
129


130
131



132

133
134

135

136
137
138




139
140
141
142
143
144
145

146
147
148





149
150
151
152

153
154
155
156

157
158
159
160

161
162
163
164

165
166
167
168

169
170
171
172

173
174
175
176

177

178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196

197
198
199

200
201
202
203

204

205
206

207





208
209
210
211
212
213
214
	},
};

STACK_OF(CONF_VALUE) *
i2v_GENERAL_NAMES(X509V3_EXT_METHOD *method, GENERAL_NAMES *gens,
    STACK_OF(CONF_VALUE) *ret)
{


	int i;
	GENERAL_NAME *gen;





	for (i = 0; i < sk_GENERAL_NAME_num(gens); i++) {
		gen = sk_GENERAL_NAME_value(gens, i);

		ret = i2v_GENERAL_NAME(method, gen, ret);

	}
	if (!ret)
		return sk_CONF_VALUE_new_null();




	return ret;
}

STACK_OF(CONF_VALUE) *
i2v_GENERAL_NAME(X509V3_EXT_METHOD *method, GENERAL_NAME *gen,
    STACK_OF(CONF_VALUE) *ret)
{

	unsigned char *p;
	char oline[256], htmp[5];
	int i;






	switch (gen->type) {
	case GEN_OTHERNAME:
		X509V3_add_value("othername", "<unsupported>", &ret);

		break;

	case GEN_X400:
		X509V3_add_value("X400Name", "<unsupported>", &ret);

		break;

	case GEN_EDIPARTY:
		X509V3_add_value("EdiPartyName", "<unsupported>", &ret);

		break;

	case GEN_EMAIL:
		X509V3_add_value_uchar("email", gen->d.ia5->data, &ret);

		break;

	case GEN_DNS:
		X509V3_add_value_uchar("DNS", gen->d.ia5->data, &ret);

		break;

	case GEN_URI:
		X509V3_add_value_uchar("URI", gen->d.ia5->data, &ret);

		break;

	case GEN_DIRNAME:
		X509_NAME_oneline(gen->d.dirn, oline, 256);

		X509V3_add_value("DirName", oline, &ret);

		break;

	case GEN_IPADD:
		p = gen->d.ip->data;
		if (gen->d.ip->length == 4)
			(void) snprintf(oline, sizeof oline,
			    "%d.%d.%d.%d", p[0], p[1], p[2], p[3]);
		else if (gen->d.ip->length == 16) {
			oline[0] = 0;
			for (i = 0; i < 8; i++) {
				(void) snprintf(htmp, sizeof htmp,
				    "%X", p[0] << 8 | p[1]);
				p += 2;
				strlcat(oline, htmp, sizeof(oline));
				if (i != 7)
					strlcat(oline, ":", sizeof(oline));
			}
		} else {
			X509V3_add_value("IP Address", "<invalid>", &ret);

			break;
		}
		X509V3_add_value("IP Address", oline, &ret);

		break;

	case GEN_RID:
		i2t_ASN1_OBJECT(oline, 256, gen->d.rid);

		X509V3_add_value("Registered ID", oline, &ret);

		break;
	}

	return ret;





}

int
GENERAL_NAME_print(BIO *out, GENERAL_NAME *gen)
{
	unsigned char *p;
	int i;







>
>

|
>
>
>
|
>

|
>
|
>

|
|
>
>
>
>
|






>



>
>
>
>
>



|
>



|
>



|
>



|
>



|
>



|
>



|
>
|
>


|















|
>


|
>



|
>
|
>


>

>
>
>
>
>







123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
	},
};

STACK_OF(CONF_VALUE) *
i2v_GENERAL_NAMES(X509V3_EXT_METHOD *method, GENERAL_NAMES *gens,
    STACK_OF(CONF_VALUE) *ret)
{
	STACK_OF(CONF_VALUE) *free_ret = NULL;
	GENERAL_NAME *gen;
	int i;

	if (ret == NULL) {
		if ((free_ret = ret = sk_CONF_VALUE_new_null()) == NULL)
			return NULL;
	}

	for (i = 0; i < sk_GENERAL_NAME_num(gens); i++) {
		if ((gen = sk_GENERAL_NAME_value(gens, i)) == NULL)
			goto err;
		if ((ret = i2v_GENERAL_NAME(method, gen, ret)) == NULL)
			goto err;
	}

	return ret;

 err:
	sk_CONF_VALUE_pop_free(free_ret, X509V3_conf_free);

	return NULL;
}

STACK_OF(CONF_VALUE) *
i2v_GENERAL_NAME(X509V3_EXT_METHOD *method, GENERAL_NAME *gen,
    STACK_OF(CONF_VALUE) *ret)
{
	STACK_OF(CONF_VALUE) *free_ret = NULL;
	unsigned char *p;
	char oline[256], htmp[5];
	int i;

	if (ret == NULL) {
		if ((free_ret = ret = sk_CONF_VALUE_new_null()) == NULL)
			return NULL;
	}

	switch (gen->type) {
	case GEN_OTHERNAME:
		if (!X509V3_add_value("othername", "<unsupported>", &ret))
			goto err;
		break;

	case GEN_X400:
		if (!X509V3_add_value("X400Name", "<unsupported>", &ret))
			goto err;
		break;

	case GEN_EDIPARTY:
		if (!X509V3_add_value("EdiPartyName", "<unsupported>", &ret))
			goto err;
		break;

	case GEN_EMAIL:
		if (!X509V3_add_value_uchar("email", gen->d.ia5->data, &ret))
			goto err;
		break;

	case GEN_DNS:
		if (!X509V3_add_value_uchar("DNS", gen->d.ia5->data, &ret))
			goto err;
		break;

	case GEN_URI:
		if (!X509V3_add_value_uchar("URI", gen->d.ia5->data, &ret))
			goto err;
		break;

	case GEN_DIRNAME:
		if (X509_NAME_oneline(gen->d.dirn, oline, 256) == NULL)
			goto err;
		if (!X509V3_add_value("DirName", oline, &ret))
			goto err;
		break;

	case GEN_IPADD: /* XXX */
		p = gen->d.ip->data;
		if (gen->d.ip->length == 4)
			(void) snprintf(oline, sizeof oline,
			    "%d.%d.%d.%d", p[0], p[1], p[2], p[3]);
		else if (gen->d.ip->length == 16) {
			oline[0] = 0;
			for (i = 0; i < 8; i++) {
				(void) snprintf(htmp, sizeof htmp,
				    "%X", p[0] << 8 | p[1]);
				p += 2;
				strlcat(oline, htmp, sizeof(oline));
				if (i != 7)
					strlcat(oline, ":", sizeof(oline));
			}
		} else {
			if (!X509V3_add_value("IP Address", "<invalid>", &ret))
				goto err;
			break;
		}
		if (!X509V3_add_value("IP Address", oline, &ret))
			goto err;
		break;

	case GEN_RID:
		if (!i2t_ASN1_OBJECT(oline, 256, gen->d.rid))
			goto err;
		if (!X509V3_add_value("Registered ID", oline, &ret))
			goto err;
		break;
	}

	return ret;

 err:
	sk_CONF_VALUE_pop_free(free_ret, X509V3_conf_free);

	return NULL;
}

int
GENERAL_NAME_print(BIO *out, GENERAL_NAME *gen)
{
	unsigned char *p;
	int i;
Changes to jni/libressl/crypto/x509v3/v3_bcons.c.
1
2
3
4
5
6
7
8
/* $OpenBSD: v3_bcons.c,v 1.15 2017/01/29 17:49:23 beck Exp $ */
/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
 * project 1999.
 */
/* ====================================================================
 * Copyright (c) 1999 The OpenSSL Project.  All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
|







1
2
3
4
5
6
7
8
/* $OpenBSD: v3_bcons.c,v 1.17 2019/05/08 21:53:10 bcook Exp $ */
/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
 * project 1999.
 */
/* ====================================================================
 * Copyright (c) 1999 The OpenSSL Project.  All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
141
142
143
144
145
146
147







148

149


150





151
152
153
154
155
156
157
}


static STACK_OF(CONF_VALUE) *
i2v_BASIC_CONSTRAINTS(X509V3_EXT_METHOD *method, BASIC_CONSTRAINTS *bcons,
    STACK_OF(CONF_VALUE) *extlist)
{







	X509V3_add_value_bool("CA", bcons->ca, &extlist);

	X509V3_add_value_int("pathlen", bcons->pathlen, &extlist);


	return extlist;





}

static BASIC_CONSTRAINTS *
v2i_BASIC_CONSTRAINTS(X509V3_EXT_METHOD *method, X509V3_CTX *ctx,
    STACK_OF(CONF_VALUE) *values)
{
	BASIC_CONSTRAINTS *bcons = NULL;







>
>
>
>
>
>
>
|
>
|
>
>

>
>
>
>
>







141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
}


static STACK_OF(CONF_VALUE) *
i2v_BASIC_CONSTRAINTS(X509V3_EXT_METHOD *method, BASIC_CONSTRAINTS *bcons,
    STACK_OF(CONF_VALUE) *extlist)
{
	STACK_OF(CONF_VALUE) *free_extlist = NULL;

	if (extlist == NULL) {
		if ((free_extlist = extlist = sk_CONF_VALUE_new_null()) == NULL)
			return NULL;
	}

	if (!X509V3_add_value_bool("CA", bcons->ca, &extlist))
		goto err;
	if (!X509V3_add_value_int("pathlen", bcons->pathlen, &extlist))
		goto err;

	return extlist;

 err:
	sk_CONF_VALUE_pop_free(free_extlist, X509V3_conf_free);

	return NULL;
}

static BASIC_CONSTRAINTS *
v2i_BASIC_CONSTRAINTS(X509V3_EXT_METHOD *method, X509V3_CTX *ctx,
    STACK_OF(CONF_VALUE) *values)
{
	BASIC_CONSTRAINTS *bcons = NULL;
Changes to jni/libressl/crypto/x509v3/v3_bitst.c.
1
2
3
4
5
6
7
8
/* $OpenBSD: v3_bitst.c,v 1.14 2017/01/29 17:49:23 beck Exp $ */
/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
 * project 1999.
 */
/* ====================================================================
 * Copyright (c) 1999 The OpenSSL Project.  All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
|







1
2
3
4
5
6
7
8
/* $OpenBSD: v3_bitst.c,v 1.16 2019/05/08 21:53:10 bcook Exp $ */
/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
 * project 1999.
 */
/* ====================================================================
 * Copyright (c) 1999 The OpenSSL Project.  All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
123
124
125
126
127
128
129

130





131
132

133

134

135





136
137
138
139
140
141
142
};

STACK_OF(CONF_VALUE) *
i2v_ASN1_BIT_STRING(X509V3_EXT_METHOD *method, ASN1_BIT_STRING *bits,
    STACK_OF(CONF_VALUE) *ret)
{
	BIT_STRING_BITNAME *bnam;







	for (bnam = method->usr_data; bnam->lname; bnam++) {
		if (ASN1_BIT_STRING_get_bit(bits, bnam->bitnum))

			X509V3_add_value(bnam->lname, NULL, &ret);

	}

	return ret;





}

ASN1_BIT_STRING *
v2i_ASN1_BIT_STRING(X509V3_EXT_METHOD *method, X509V3_CTX *ctx,
    STACK_OF(CONF_VALUE) *nval)
{
	CONF_VALUE *val;







>

>
>
>
>
>
|
|
>
|
>

>

>
>
>
>
>







123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
};

STACK_OF(CONF_VALUE) *
i2v_ASN1_BIT_STRING(X509V3_EXT_METHOD *method, ASN1_BIT_STRING *bits,
    STACK_OF(CONF_VALUE) *ret)
{
	BIT_STRING_BITNAME *bnam;
	STACK_OF(CONF_VALUE) *free_ret = NULL;

	if (ret == NULL) {
		if ((free_ret = ret = sk_CONF_VALUE_new_null()) == NULL)
			return NULL;
	}

	for (bnam = method->usr_data; bnam->lname != NULL; bnam++) {
		if (!ASN1_BIT_STRING_get_bit(bits, bnam->bitnum))
			continue;
		if (!X509V3_add_value(bnam->lname, NULL, &ret))
			goto err;
	}

	return ret;

 err:
	sk_CONF_VALUE_pop_free(free_ret, X509V3_conf_free);

	return NULL;
}

ASN1_BIT_STRING *
v2i_ASN1_BIT_STRING(X509V3_EXT_METHOD *method, X509V3_CTX *ctx,
    STACK_OF(CONF_VALUE) *nval)
{
	CONF_VALUE *val;
Changes to jni/libressl/crypto/x509v3/v3_cpols.c.
1
2
3
4
5
6
7
8
/* $OpenBSD: v3_cpols.c,v 1.25 2017/01/29 17:49:23 beck Exp $ */
/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
 * project 1999.
 */
/* ====================================================================
 * Copyright (c) 1999-2004 The OpenSSL Project.  All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
|







1
2
3
4
5
6
7
8
/* $OpenBSD: v3_cpols.c,v 1.26 2019/04/21 16:25:40 tb Exp $ */
/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
 * project 1999.
 */
/* ====================================================================
 * Copyright (c) 1999-2004 The OpenSSL Project.  All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410

void
NOTICEREF_free(NOTICEREF *a)
{
	ASN1_item_free((ASN1_VALUE *)a, &NOTICEREF_it);
}

static
STACK_OF(POLICYINFO) *r2i_certpol(X509V3_EXT_METHOD *method, X509V3_CTX *ctx,
    char *value)
{
	STACK_OF(POLICYINFO) *pols = NULL;
	char *pstr;
	POLICYINFO *pol;
	ASN1_OBJECT *pobj;
	STACK_OF(CONF_VALUE) *vals;
	CONF_VALUE *cnf;







|
|
<







394
395
396
397
398
399
400
401
402

403
404
405
406
407
408
409

void
NOTICEREF_free(NOTICEREF *a)
{
	ASN1_item_free((ASN1_VALUE *)a, &NOTICEREF_it);
}

static STACK_OF(POLICYINFO) *
r2i_certpol(X509V3_EXT_METHOD *method, X509V3_CTX *ctx, char *value)

{
	STACK_OF(POLICYINFO) *pols = NULL;
	char *pstr;
	POLICYINFO *pol;
	ASN1_OBJECT *pobj;
	STACK_OF(CONF_VALUE) *vals;
	CONF_VALUE *cnf;
Changes to jni/libressl/crypto/x509v3/v3_crld.c.
1
2
3
4
5
6
7
8
/* $OpenBSD: v3_crld.c,v 1.22 2017/05/02 04:11:08 deraadt Exp $ */
/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
 * project 1999.
 */
/* ====================================================================
 * Copyright (c) 1999-2008 The OpenSSL Project.  All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
|







1
2
3
4
5
6
7
8
/* $OpenBSD: v3_crld.c,v 1.23 2019/04/21 16:25:40 tb Exp $ */
/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
 * project 1999.
 */
/* ====================================================================
 * Copyright (c) 1999-2008 The OpenSSL Project.  All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
	.i2v = NULL,
	.v2i = v2i_crld,
	.i2r = i2r_crldp,
	.r2i = NULL,
	.usr_data = NULL,
};

static
STACK_OF(GENERAL_NAME) *gnames_from_sectname(X509V3_CTX *ctx, char *sect)
{
	STACK_OF(CONF_VALUE) *gnsect;
	STACK_OF(GENERAL_NAME) *gens;

	if (*sect == '@')
		gnsect = X509V3_get_section(ctx, sect + 1);
	else







|
|







100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
	.i2v = NULL,
	.v2i = v2i_crld,
	.i2r = i2r_crldp,
	.r2i = NULL,
	.usr_data = NULL,
};

static STACK_OF(GENERAL_NAME) *
gnames_from_sectname(X509V3_CTX *ctx, char *sect)
{
	STACK_OF(CONF_VALUE) *gnsect;
	STACK_OF(GENERAL_NAME) *gens;

	if (*sect == '@')
		gnsect = X509V3_get_section(ctx, sect + 1);
	else
Changes to jni/libressl/crypto/x509v3/v3_extku.c.
1
2
3
4
5
6
7
8
/* $OpenBSD: v3_extku.c,v 1.15 2017/01/29 17:49:23 beck Exp $ */
/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
 * project 1999.
 */
/* ====================================================================
 * Copyright (c) 1999 The OpenSSL Project.  All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
|







1
2
3
4
5
6
7
8
/* $OpenBSD: v3_extku.c,v 1.16 2019/04/22 17:26:34 tb Exp $ */
/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
 * project 1999.
 */
/* ====================================================================
 * Copyright (c) 1999 The OpenSSL Project.  All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
145
146
147
148
149
150
151
152
153

154


155
156
157



158

159
160

161

162

163

164





165
166
167
168
169
170
171
EXTENDED_KEY_USAGE_free(EXTENDED_KEY_USAGE *a)
{
	ASN1_item_free((ASN1_VALUE *)a, &EXTENDED_KEY_USAGE_it);
}

static STACK_OF(CONF_VALUE) *
i2v_EXTENDED_KEY_USAGE(const X509V3_EXT_METHOD *method, void *a,
    STACK_OF(CONF_VALUE) *ext_list)
{

	EXTENDED_KEY_USAGE *eku = a;


	int i;
	ASN1_OBJECT *obj;
	char obj_tmp[80];





	for (i = 0; i < sk_ASN1_OBJECT_num(eku); i++) {
		obj = sk_ASN1_OBJECT_value(eku, i);

		i2t_ASN1_OBJECT(obj_tmp, 80, obj);

		X509V3_add_value(NULL, obj_tmp, &ext_list);

	}

	return ext_list;





}

static void *
v2i_EXTENDED_KEY_USAGE(const X509V3_EXT_METHOD *method, X509V3_CTX *ctx,
    STACK_OF(CONF_VALUE) *nval)
{
	EXTENDED_KEY_USAGE *extku;







|

>

>
>

|
<
>
>
>
|
>

|
>
|
>
|
>

>
|
>
>
>
>
>







145
146
147
148
149
150
151
152
153
154
155
156
157
158
159

160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
EXTENDED_KEY_USAGE_free(EXTENDED_KEY_USAGE *a)
{
	ASN1_item_free((ASN1_VALUE *)a, &EXTENDED_KEY_USAGE_it);
}

static STACK_OF(CONF_VALUE) *
i2v_EXTENDED_KEY_USAGE(const X509V3_EXT_METHOD *method, void *a,
    STACK_OF(CONF_VALUE) *extlist)
{
	ASN1_OBJECT *obj;
	EXTENDED_KEY_USAGE *eku = a;
	STACK_OF(CONF_VALUE) *free_extlist = NULL;
	char obj_tmp[80];
	int i;


	if (extlist == NULL) {
		if ((free_extlist = extlist = sk_CONF_VALUE_new_null()) == NULL)
			return NULL;
	}

	for (i = 0; i < sk_ASN1_OBJECT_num(eku); i++) {
		if ((obj = sk_ASN1_OBJECT_value(eku, i)) == NULL)
			goto err;
		if (!i2t_ASN1_OBJECT(obj_tmp, sizeof obj_tmp, obj))
			goto err;
		if (!X509V3_add_value(NULL, obj_tmp, &extlist))
			goto err;
	}

	return extlist;

 err:
	sk_CONF_VALUE_pop_free(free_extlist, X509V3_conf_free);

	return NULL;
}

static void *
v2i_EXTENDED_KEY_USAGE(const X509V3_EXT_METHOD *method, X509V3_CTX *ctx,
    STACK_OF(CONF_VALUE) *nval)
{
	EXTENDED_KEY_USAGE *extku;
Changes to jni/libressl/crypto/x509v3/v3_info.c.
1
2
3
4
5
6
7
8
/* $OpenBSD: v3_info.c,v 1.26 2018/05/19 10:37:02 tb Exp $ */
/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
 * project 1999.
 */
/* ====================================================================
 * Copyright (c) 1999 The OpenSSL Project.  All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
|







1
2
3
4
5
6
7
8
/* $OpenBSD: v3_info.c,v 1.27 2019/04/22 17:18:30 tb Exp $ */
/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
 * project 1999.
 */
/* ====================================================================
 * Copyright (c) 1999 The OpenSSL Project.  All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
203
204
205
206
207
208
209
210

211

212



213

214
215

216
217
218
219

220

221
222
223
224
225
226
227
228
229
230
231
232
233

234

235

236
237
238
239
240
241
242
243
}

static STACK_OF(CONF_VALUE) *
i2v_AUTHORITY_INFO_ACCESS(X509V3_EXT_METHOD *method,
    AUTHORITY_INFO_ACCESS *ainfo, STACK_OF(CONF_VALUE) *ret)
{
	ACCESS_DESCRIPTION *desc;
	int i, nlen;

	char objtmp[80], *ntmp;

	CONF_VALUE *vtmp;





	for (i = 0; i < sk_ACCESS_DESCRIPTION_num(ainfo); i++) {
		desc = sk_ACCESS_DESCRIPTION_value(ainfo, i);

		ret = i2v_GENERAL_NAME(method, desc->location, ret);
		if (!ret)
			break;
		vtmp = sk_CONF_VALUE_value(ret, i);

		i2t_ASN1_OBJECT(objtmp, sizeof objtmp, desc->method);

		nlen = strlen(objtmp) + strlen(vtmp->name) + 5;
		ntmp = malloc(nlen);
		if (!ntmp) {
			X509V3error(ERR_R_MALLOC_FAILURE);
			return NULL;
		}
		strlcpy(ntmp, objtmp, nlen);
		strlcat(ntmp, " - ", nlen);
		strlcat(ntmp, vtmp->name, nlen);
		free(vtmp->name);
		vtmp->name = ntmp;

	}

	if (!ret)

		return sk_CONF_VALUE_new_null();

	return ret;
}

static AUTHORITY_INFO_ACCESS *
v2i_AUTHORITY_INFO_ACCESS(X509V3_EXT_METHOD *method, X509V3_CTX *ctx,
    STACK_OF(CONF_VALUE) *nval)
{
	AUTHORITY_INFO_ACCESS *ainfo = NULL;







|
>

>
|
>
>
>
|
>

|
>
|
|
|
|
>
|
>
|
|
<

|

<
<
<


|
|
>
|
>
|
>
|







203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231

232
233
234



235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
}

static STACK_OF(CONF_VALUE) *
i2v_AUTHORITY_INFO_ACCESS(X509V3_EXT_METHOD *method,
    AUTHORITY_INFO_ACCESS *ainfo, STACK_OF(CONF_VALUE) *ret)
{
	ACCESS_DESCRIPTION *desc;
	CONF_VALUE *vtmp;
	STACK_OF(CONF_VALUE) *free_ret = NULL;
	char objtmp[80], *ntmp;
	int i;

	if (ret == NULL) {
		if ((free_ret = ret = sk_CONF_VALUE_new_null()) == NULL)
			return NULL;
	}

	for (i = 0; i < sk_ACCESS_DESCRIPTION_num(ainfo); i++) {
		if ((desc = sk_ACCESS_DESCRIPTION_value(ainfo, i)) == NULL)
			goto err;
		if ((ret = i2v_GENERAL_NAME(method, desc->location,
		    ret)) == NULL)
			goto err;
		if ((vtmp = sk_CONF_VALUE_value(ret, i)) == NULL)
			goto err;
		if (!i2t_ASN1_OBJECT(objtmp, sizeof objtmp, desc->method))
			goto err;
		if (asprintf(&ntmp, "%s - %s", objtmp, vtmp->name) == -1) {
			ntmp = NULL;

			X509V3error(ERR_R_MALLOC_FAILURE);
			goto err;
		}



		free(vtmp->name);
		vtmp->name = ntmp;
	}

	return ret;

 err:
	sk_CONF_VALUE_pop_free(free_ret, X509V3_conf_free);

	return NULL;
}

static AUTHORITY_INFO_ACCESS *
v2i_AUTHORITY_INFO_ACCESS(X509V3_EXT_METHOD *method, X509V3_CTX *ctx,
    STACK_OF(CONF_VALUE) *nval)
{
	AUTHORITY_INFO_ACCESS *ainfo = NULL;
Changes to jni/libressl/crypto/x509v3/v3_lib.c.
1
2
3
4
5
6
7
8
/* $OpenBSD: v3_lib.c,v 1.18 2018/05/19 10:41:53 tb Exp $ */
/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
 * project 1999.
 */
/* ====================================================================
 * Copyright (c) 1999 The OpenSSL Project.  All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
|







1
2
3
4
5
6
7
8
/* $OpenBSD: v3_lib.c,v 1.19 2019/04/21 16:29:57 tb Exp $ */
/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
 * project 1999.
 */
/* ====================================================================
 * Copyright (c) 1999 The OpenSSL Project.  All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
99
100
101
102
103
104
105
106
107

108
109
110
111
112
113
114
115
116
117
ext_cmp_BSEARCH_CMP_FN(const void *a_, const void *b_)
{
	const X509V3_EXT_METHOD * const *a = a_;
	const X509V3_EXT_METHOD * const *b = b_;
	return ext_cmp(a, b);
}

static const X509V3_EXT_METHOD * *
OBJ_bsearch_ext(const X509V3_EXT_METHOD * *key, const X509V3_EXT_METHOD * const *base, int num)

{
	return (const X509V3_EXT_METHOD * *)OBJ_bsearch_(key, base, num, sizeof(const X509V3_EXT_METHOD *),
	    ext_cmp_BSEARCH_CMP_FN);
}

const X509V3_EXT_METHOD *
X509V3_EXT_get_nid(int nid)
{
	X509V3_EXT_METHOD tmp;
	const X509V3_EXT_METHOD *t = &tmp, * const *ret;







|
|
>

|
|







99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
ext_cmp_BSEARCH_CMP_FN(const void *a_, const void *b_)
{
	const X509V3_EXT_METHOD * const *a = a_;
	const X509V3_EXT_METHOD * const *b = b_;
	return ext_cmp(a, b);
}

static const X509V3_EXT_METHOD **
OBJ_bsearch_ext(const X509V3_EXT_METHOD **key,
    const X509V3_EXT_METHOD *const *base, int num)
{
	return (const X509V3_EXT_METHOD **)OBJ_bsearch_(key, base, num,
	    sizeof(const X509V3_EXT_METHOD *), ext_cmp_BSEARCH_CMP_FN);
}

const X509V3_EXT_METHOD *
X509V3_EXT_get_nid(int nid)
{
	X509V3_EXT_METHOD tmp;
	const X509V3_EXT_METHOD *t = &tmp, * const *ret;
Changes to jni/libressl/crypto/x509v3/v3_pcons.c.
1
2
3
4
5
6
7
8
/* $OpenBSD: v3_pcons.c,v 1.11 2017/01/29 17:49:23 beck Exp $ */
/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
 * project.
 */
/* ====================================================================
 * Copyright (c) 2003 The OpenSSL Project.  All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
|







1
2
3
4
5
6
7
8
/* $OpenBSD: v3_pcons.c,v 1.12 2019/04/22 17:29:13 tb Exp $ */
/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
 * project.
 */
/* ====================================================================
 * Copyright (c) 2003 The OpenSSL Project.  All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
129
130
131
132
133
134
135

136





137
138

139
140


141





142
143
144
145
146
147
148
}

static STACK_OF(CONF_VALUE) *
i2v_POLICY_CONSTRAINTS(const X509V3_EXT_METHOD *method, void *a,
    STACK_OF(CONF_VALUE) *extlist)
{
	POLICY_CONSTRAINTS *pcons = a;







	X509V3_add_value_int("Require Explicit Policy",
	    pcons->requireExplicitPolicy, &extlist);

	X509V3_add_value_int("Inhibit Policy Mapping",
	    pcons->inhibitPolicyMapping, &extlist);


	return extlist;





}

static void *
v2i_POLICY_CONSTRAINTS(const X509V3_EXT_METHOD *method, X509V3_CTX *ctx,
    STACK_OF(CONF_VALUE) *values)
{
	POLICY_CONSTRAINTS *pcons = NULL;







>

>
>
>
>
>
|
|
>
|
|
>
>

>
>
>
>
>







129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
}

static STACK_OF(CONF_VALUE) *
i2v_POLICY_CONSTRAINTS(const X509V3_EXT_METHOD *method, void *a,
    STACK_OF(CONF_VALUE) *extlist)
{
	POLICY_CONSTRAINTS *pcons = a;
	STACK_OF(CONF_VALUE) *free_extlist = NULL;

	if (extlist == NULL) {
		if ((free_extlist = extlist = sk_CONF_VALUE_new_null()) == NULL)
			return NULL;
	}

	if (!X509V3_add_value_int("Require Explicit Policy",
	    pcons->requireExplicitPolicy, &extlist))
		goto err;
	if (!X509V3_add_value_int("Inhibit Policy Mapping",
	    pcons->inhibitPolicyMapping, &extlist))
		goto err;

	return extlist;

 err:
	sk_CONF_VALUE_pop_free(free_extlist, X509V3_conf_free);

	return NULL;
}

static void *
v2i_POLICY_CONSTRAINTS(const X509V3_EXT_METHOD *method, X509V3_CTX *ctx,
    STACK_OF(CONF_VALUE) *values)
{
	POLICY_CONSTRAINTS *pcons = NULL;
Changes to jni/libressl/crypto/x509v3/v3_pku.c.
1
2
3
4
5
6
7
8
/* $OpenBSD: v3_pku.c,v 1.13 2016/12/30 15:54:49 jsing Exp $ */
/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
 * project 1999.
 */
/* ====================================================================
 * Copyright (c) 1999 The OpenSSL Project.  All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
|







1
2
3
4
5
6
7
8
/* $OpenBSD: v3_pku.c,v 1.14 2019/04/21 16:38:01 tb Exp $ */
/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
 * project 1999.
 */
/* ====================================================================
 * Copyright (c) 1999 The OpenSSL Project.  All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76

#include <openssl/asn1.h>
#include <openssl/asn1t.h>
#include <openssl/x509v3.h>

static int i2r_PKEY_USAGE_PERIOD(X509V3_EXT_METHOD *method,
    PKEY_USAGE_PERIOD *usage, BIO *out, int indent);
/*
static PKEY_USAGE_PERIOD *v2i_PKEY_USAGE_PERIOD(X509V3_EXT_METHOD *method, X509V3_CTX *ctx, STACK_OF(CONF_VALUE) *values);
*/
const X509V3_EXT_METHOD v3_pkey_usage_period = {
	.ext_nid = NID_private_key_usage_period,
	.ext_flags = 0,
	.it = &PKEY_USAGE_PERIOD_it,
	.ext_new = NULL,
	.ext_free = NULL,
	.d2i = NULL,







|
<
<







60
61
62
63
64
65
66
67


68
69
70
71
72
73
74

#include <openssl/asn1.h>
#include <openssl/asn1t.h>
#include <openssl/x509v3.h>

static int i2r_PKEY_USAGE_PERIOD(X509V3_EXT_METHOD *method,
    PKEY_USAGE_PERIOD *usage, BIO *out, int indent);



const X509V3_EXT_METHOD v3_pkey_usage_period = {
	.ext_nid = NID_private_key_usage_period,
	.ext_flags = 0,
	.it = &PKEY_USAGE_PERIOD_it,
	.ext_new = NULL,
	.ext_free = NULL,
	.d2i = NULL,
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
	}
	if (usage->notAfter) {
		BIO_write(out, "Not After: ", 11);
		ASN1_GENERALIZEDTIME_print(out, usage->notAfter);
	}
	return 1;
}

/*
static PKEY_USAGE_PERIOD *v2i_PKEY_USAGE_PERIOD(method, ctx, values)
X509V3_EXT_METHOD *method;
X509V3_CTX *ctx;
STACK_OF(CONF_VALUE) *values;
{
return NULL;
}
*/







<
<
<
<
<
<
<
<
<
<
148
149
150
151
152
153
154










	}
	if (usage->notAfter) {
		BIO_write(out, "Not After: ", 11);
		ASN1_GENERALIZEDTIME_print(out, usage->notAfter);
	}
	return 1;
}










Changes to jni/libressl/crypto/x509v3/v3_pmaps.c.
1
2
3
4
5
6
7
8
/* $OpenBSD: v3_pmaps.c,v 1.11 2017/01/29 17:49:23 beck Exp $ */
/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
 * project.
 */
/* ====================================================================
 * Copyright (c) 2003 The OpenSSL Project.  All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
|







1
2
3
4
5
6
7
8
/* $OpenBSD: v3_pmaps.c,v 1.13 2019/05/08 21:53:10 bcook Exp $ */
/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
 * project.
 */
/* ====================================================================
 * Copyright (c) 2003 The OpenSSL Project.  All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
142
143
144
145
146
147
148
149
150

151
152

153
154
155



156

157
158


159


160

161

162

163





164
165
166
167
168
169
170
POLICY_MAPPING_free(POLICY_MAPPING *a)
{
	ASN1_item_free((ASN1_VALUE *)a, &POLICY_MAPPING_it);
}

static STACK_OF(CONF_VALUE) *
i2v_POLICY_MAPPINGS(const X509V3_EXT_METHOD *method, void *a,
    STACK_OF(CONF_VALUE) *ext_list)
{

	POLICY_MAPPINGS *pmaps = a;
	POLICY_MAPPING *pmap;

	int i;
	char obj_tmp1[80];
	char obj_tmp2[80];





	for (i = 0; i < sk_POLICY_MAPPING_num(pmaps); i++) {
		pmap = sk_POLICY_MAPPING_value(pmaps, i);


		i2t_ASN1_OBJECT(obj_tmp1, 80, pmap->issuerDomainPolicy);


		i2t_ASN1_OBJECT(obj_tmp2, 80, pmap->subjectDomainPolicy);

		X509V3_add_value(obj_tmp1, obj_tmp2, &ext_list);

	}

	return ext_list;





}

static void *
v2i_POLICY_MAPPINGS(const X509V3_EXT_METHOD *method, X509V3_CTX *ctx,
    STACK_OF(CONF_VALUE) *nval)
{
	POLICY_MAPPINGS *pmaps = NULL;







|

>


>

|
<
>
>
>
|
>

|
>
>
|
>
>
|
>
|
>

>
|
>
>
>
>
>







142
143
144
145
146
147
148
149
150
151
152
153
154
155
156

157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
POLICY_MAPPING_free(POLICY_MAPPING *a)
{
	ASN1_item_free((ASN1_VALUE *)a, &POLICY_MAPPING_it);
}

static STACK_OF(CONF_VALUE) *
i2v_POLICY_MAPPINGS(const X509V3_EXT_METHOD *method, void *a,
    STACK_OF(CONF_VALUE) *extlist)
{
	STACK_OF(CONF_VALUE) *free_extlist = NULL;
	POLICY_MAPPINGS *pmaps = a;
	POLICY_MAPPING *pmap;
	char issuer[80], subject[80];
	int i;


	if (extlist == NULL) {
		if ((free_extlist = extlist = sk_CONF_VALUE_new_null()) == NULL)
			return NULL;
	}

	for (i = 0; i < sk_POLICY_MAPPING_num(pmaps); i++) {
		if ((pmap = sk_POLICY_MAPPING_value(pmaps, i)) == NULL)
			goto err;
		if (!i2t_ASN1_OBJECT(issuer, sizeof issuer,
		    pmap->issuerDomainPolicy))
			goto err;
		if (!i2t_ASN1_OBJECT(subject, sizeof subject,
		    pmap->subjectDomainPolicy))
			goto err;
		if (!X509V3_add_value(issuer, subject, &extlist))
			goto err;
	}

	return extlist;

 err:
	sk_CONF_VALUE_pop_free(free_extlist, X509V3_conf_free);

	return NULL;
}

static void *
v2i_POLICY_MAPPINGS(const X509V3_EXT_METHOD *method, X509V3_CTX *ctx,
    STACK_OF(CONF_VALUE) *nval)
{
	POLICY_MAPPINGS *pmaps = NULL;
Changes to jni/libressl/crypto/x509v3/v3_utl.c.
1
2
3
4
5
6
7
8
/* $OpenBSD: v3_utl.c,v 1.31 2018/05/19 10:50:08 tb Exp $ */
/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
 * project.
 */
/* ====================================================================
 * Copyright (c) 1999-2003 The OpenSSL Project.  All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
|







1
2
3
4
5
6
7
8
/* $OpenBSD: v3_utl.c,v 1.37 2019/04/16 19:42:20 tb Exp $ */
/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
 * project.
 */
/* ====================================================================
 * Copyright (c) 1999-2003 The OpenSSL Project.  All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
62
63
64
65
66
67
68

69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91

92
93

94

95



96
97

98
99
100
101
102

103
104
105
106
107
108
109


110
111
112
113
114
115
116
#include <string.h>

#include <openssl/bn.h>
#include <openssl/conf.h>
#include <openssl/err.h>
#include <openssl/x509v3.h>


static char *strip_spaces(char *name);
static int sk_strcmp(const char * const *a, const char * const *b);
static STACK_OF(OPENSSL_STRING) *get_email(X509_NAME *name,
    GENERAL_NAMES *gens);
static void str_free(OPENSSL_STRING str);
static int append_ia5(STACK_OF(OPENSSL_STRING) **sk, ASN1_IA5STRING *email);

static int ipv4_from_asc(unsigned char *v4, const char *in);
static int ipv6_from_asc(unsigned char *v6, const char *in);
static int ipv6_cb(const char *elem, int len, void *usr);
static int ipv6_hex(unsigned char *out, const char *in, int inlen);

/* Add a CONF_VALUE name value pair to stack */

int
X509V3_add_value(const char *name, const char *value,
    STACK_OF(CONF_VALUE) **extlist)
{
	CONF_VALUE *vtmp = NULL;
	char *tname = NULL, *tvalue = NULL;

	if (name && !(tname = strdup(name)))
		goto err;

	if (value && !(tvalue = strdup(value)))
		goto err;

	if (!(vtmp = malloc(sizeof(CONF_VALUE))))

		goto err;



	if (!*extlist && !(*extlist = sk_CONF_VALUE_new_null()))
		goto err;

	vtmp->section = NULL;
	vtmp->name = tname;
	vtmp->value = tvalue;
	if (!sk_CONF_VALUE_push(*extlist, vtmp))
		goto err;

	return 1;

err:
	X509V3error(ERR_R_MALLOC_FAILURE);
	free(vtmp);
	free(tname);
	free(tvalue);


	return 0;
}

int
X509V3_add_value_uchar(const char *name, const unsigned char *value,
    STACK_OF(CONF_VALUE) **extlist)
{







>












|
<





|

|

>
|
|
>
|
>
|
>
>
>
|
|
>
|
<
<


>


|

|
|
|
>
>







62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82

83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105


106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
#include <string.h>

#include <openssl/bn.h>
#include <openssl/conf.h>
#include <openssl/err.h>
#include <openssl/x509v3.h>

char *bn_to_string(const BIGNUM *bn);
static char *strip_spaces(char *name);
static int sk_strcmp(const char * const *a, const char * const *b);
static STACK_OF(OPENSSL_STRING) *get_email(X509_NAME *name,
    GENERAL_NAMES *gens);
static void str_free(OPENSSL_STRING str);
static int append_ia5(STACK_OF(OPENSSL_STRING) **sk, ASN1_IA5STRING *email);

static int ipv4_from_asc(unsigned char *v4, const char *in);
static int ipv6_from_asc(unsigned char *v6, const char *in);
static int ipv6_cb(const char *elem, int len, void *usr);
static int ipv6_hex(unsigned char *out, const char *in, int inlen);

/* Add a CONF_VALUE name-value pair to stack. */

int
X509V3_add_value(const char *name, const char *value,
    STACK_OF(CONF_VALUE) **extlist)
{
	CONF_VALUE *vtmp = NULL;
	STACK_OF(CONF_VALUE) *free_exts = NULL;

	if ((vtmp = calloc(1, sizeof(CONF_VALUE))) == NULL)
		goto err;
	if (name != NULL) {
		if ((vtmp->name = strdup(name)) == NULL)
			goto err;
	}
	if (value != NULL) {
		if ((vtmp->value = strdup(value)) == NULL)
			goto err;
	}

	if (*extlist == NULL) {
		if ((free_exts = *extlist = sk_CONF_VALUE_new_null()) == NULL)
			goto err;
	}



	if (!sk_CONF_VALUE_push(*extlist, vtmp))
		goto err;

	return 1;

 err:
	X509V3error(ERR_R_MALLOC_FAILURE);
	X509V3_conf_free(vtmp);
	if (free_exts != NULL) {
		sk_CONF_VALUE_free(*extlist);
		*extlist = NULL;
	}
	return 0;
}

int
X509V3_add_value_uchar(const char *name, const unsigned char *value,
    STACK_OF(CONF_VALUE) **extlist)
{
144
145
146
147
148
149
150


























151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
    STACK_OF(CONF_VALUE) **extlist)
{
	if (asn1_bool)
		return X509V3_add_value(name, "TRUE", extlist);
	return 1;
}




























char *
i2s_ASN1_ENUMERATED(X509V3_EXT_METHOD *method, const ASN1_ENUMERATED *a)
{
	BIGNUM *bntmp = NULL;
	char *strtmp = NULL;

	if (!a)
		return NULL;
	if (!(bntmp = ASN1_ENUMERATED_to_BN(a, NULL)) ||
	    !(strtmp = BN_bn2dec(bntmp)))
		X509V3error(ERR_R_MALLOC_FAILURE);
	BN_free(bntmp);
	return strtmp;
}

char *
i2s_ASN1_INTEGER(X509V3_EXT_METHOD *method, const ASN1_INTEGER *a)
{
	BIGNUM *bntmp = NULL;
	char *strtmp = NULL;

	if (!a)
		return NULL;
	if (!(bntmp = ASN1_INTEGER_to_BN(a, NULL)) ||
	    !(strtmp = BN_bn2dec(bntmp)))
		X509V3error(ERR_R_MALLOC_FAILURE);
	BN_free(bntmp);
	return strtmp;
}

ASN1_INTEGER *
s2i_ASN1_INTEGER(X509V3_EXT_METHOD *method, const char *value)







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>




|


|

|
|








|


|

|
|







152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
    STACK_OF(CONF_VALUE) **extlist)
{
	if (asn1_bool)
		return X509V3_add_value(name, "TRUE", extlist);
	return 1;
}

char *
bn_to_string(const BIGNUM *bn)
{
	const char *sign = "";
	char *bnstr, *hex;
	char *ret = NULL;

	/* Only display small numbers in decimal, as conversion is quadratic. */
	if (BN_num_bits(bn) < 128)
		return BN_bn2dec(bn);

	if ((hex = bnstr = BN_bn2hex(bn)) == NULL)
		goto err;

	if (BN_is_negative(bn)) {
		sign = "-";
		hex++;
	}

	if (asprintf(&ret, "%s0x%s", sign, hex) == -1)
		ret = NULL;

 err:
	free(bnstr);
	return ret;
}

char *
i2s_ASN1_ENUMERATED(X509V3_EXT_METHOD *method, const ASN1_ENUMERATED *a)
{
	BIGNUM *bntmp;
	char *strtmp = NULL;

	if (a == NULL)
		return NULL;
	if ((bntmp = ASN1_ENUMERATED_to_BN(a, NULL)) == NULL ||
	    (strtmp = bn_to_string(bntmp)) == NULL)
		X509V3error(ERR_R_MALLOC_FAILURE);
	BN_free(bntmp);
	return strtmp;
}

char *
i2s_ASN1_INTEGER(X509V3_EXT_METHOD *method, const ASN1_INTEGER *a)
{
	BIGNUM *bntmp;
	char *strtmp = NULL;

	if (a == NULL)
		return NULL;
	if ((bntmp = ASN1_INTEGER_to_BN(a, NULL)) == NULL ||
	    (strtmp = bn_to_string(bntmp)) == NULL)
		X509V3error(ERR_R_MALLOC_FAILURE);
	BN_free(bntmp);
	return strtmp;
}

ASN1_INTEGER *
s2i_ASN1_INTEGER(X509V3_EXT_METHOD *method, const char *value)
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
	} else if (!strcmp(btmp, "FALSE") || !strcmp(btmp, "false") ||
	    !strcmp(btmp, "N") || !strcmp(btmp, "n") ||
	    !strcmp(btmp, "NO") || !strcmp(btmp, "no")) {
		*asn1_bool = 0;
		return 1;
	}

err:
	X509V3error(X509V3_R_INVALID_BOOLEAN_STRING);
	X509V3_conf_err(value);
	return 0;
}

int
X509V3_get_value_int(const CONF_VALUE *value, ASN1_INTEGER **aint)







|







294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
	} else if (!strcmp(btmp, "FALSE") || !strcmp(btmp, "false") ||
	    !strcmp(btmp, "N") || !strcmp(btmp, "n") ||
	    !strcmp(btmp, "NO") || !strcmp(btmp, "no")) {
		*asn1_bool = 0;
		return 1;
	}

 err:
	X509V3error(X509V3_R_INVALID_BOOLEAN_STRING);
	X509V3_conf_err(value);
	return 0;
}

int
X509V3_get_value_int(const CONF_VALUE *value, ASN1_INTEGER **aint)
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
			goto err;
		}
		X509V3_add_value(ntmp, NULL, &values);
	}
	free(linebuf);
	return values;

err:
	free(linebuf);
	sk_CONF_VALUE_pop_free(values, X509V3_conf_free);
	return NULL;

}

/* Delete leading and trailing spaces from a string */







|







397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
			goto err;
		}
		X509V3_add_value(ntmp, NULL, &values);
	}
	free(linebuf);
	return values;

 err:
	free(linebuf);
	sk_CONF_VALUE_pop_free(values, X509V3_conf_free);
	return NULL;

}

/* Delete leading and trailing spaces from a string */
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
	}

	if (len)
		*len = q - hexbuf;

	return hexbuf;

err:
	free(hexbuf);
	X509V3error(ERR_R_MALLOC_FAILURE);
	return NULL;

badhex:
	free(hexbuf);
	X509V3error(X509V3_R_ILLEGAL_HEX_DIGIT);
	return NULL;
}

/* V2I name comparison function: returns zero if 'name' matches
 * cmp or cmp.*







|




|







505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
	}

	if (len)
		*len = q - hexbuf;

	return hexbuf;

 err:
	free(hexbuf);
	X509V3error(ERR_R_MALLOC_FAILURE);
	return NULL;

 badhex:
	free(hexbuf);
	X509V3error(X509V3_R_ILLEGAL_HEX_DIGIT);
	return NULL;
}

/* V2I name comparison function: returns zero if 'name' matches
 * cmp or cmp.*
507
508
509
510
511
512
513
514

515
516
517
518
519
520
521
522
523
524
525

526
527
528
529
530
531
532

static int
sk_strcmp(const char * const *a, const char * const *b)
{
	return strcmp(*a, *b);
}

STACK_OF(OPENSSL_STRING) *X509_get1_email(X509 *x)

{
	GENERAL_NAMES *gens;
	STACK_OF(OPENSSL_STRING) *ret;

	gens = X509_get_ext_d2i(x, NID_subject_alt_name, NULL, NULL);
	ret = get_email(X509_get_subject_name(x), gens);
	sk_GENERAL_NAME_pop_free(gens, GENERAL_NAME_free);
	return ret;
}

STACK_OF(OPENSSL_STRING) *X509_get1_ocsp(X509 *x)

{
	AUTHORITY_INFO_ACCESS *info;
	STACK_OF(OPENSSL_STRING) *ret = NULL;
	int i;

	info = X509_get_ext_d2i(x, NID_info_access, NULL, NULL);
	if (!info)







|
>










|
>







541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568

static int
sk_strcmp(const char * const *a, const char * const *b)
{
	return strcmp(*a, *b);
}

STACK_OF(OPENSSL_STRING) *
X509_get1_email(X509 *x)
{
	GENERAL_NAMES *gens;
	STACK_OF(OPENSSL_STRING) *ret;

	gens = X509_get_ext_d2i(x, NID_subject_alt_name, NULL, NULL);
	ret = get_email(X509_get_subject_name(x), gens);
	sk_GENERAL_NAME_pop_free(gens, GENERAL_NAME_free);
	return ret;
}

STACK_OF(OPENSSL_STRING) *
X509_get1_ocsp(X509 *x)
{
	AUTHORITY_INFO_ACCESS *info;
	STACK_OF(OPENSSL_STRING) *ret = NULL;
	int i;

	info = X509_get_ext_d2i(x, NID_info_access, NULL, NULL);
	if (!info)
541
542
543
544
545
546
547
548

549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
			}
		}
	}
	AUTHORITY_INFO_ACCESS_free(info);
	return ret;
}

STACK_OF(OPENSSL_STRING) *X509_REQ_get1_email(X509_REQ *x)

{
	GENERAL_NAMES *gens;
	STACK_OF(X509_EXTENSION) *exts;
	STACK_OF(OPENSSL_STRING) *ret;

	exts = X509_REQ_get_extensions(x);
	gens = X509V3_get_d2i(exts, NID_subject_alt_name, NULL, NULL);
	ret = get_email(X509_REQ_get_subject_name(x), gens);
	sk_GENERAL_NAME_pop_free(gens, GENERAL_NAME_free);
	sk_X509_EXTENSION_pop_free(exts, X509_EXTENSION_free);
	return ret;
}


static
STACK_OF(OPENSSL_STRING) *get_email(X509_NAME *name, GENERAL_NAMES *gens)
{
	STACK_OF(OPENSSL_STRING) *ret = NULL;
	X509_NAME_ENTRY *ne;
	ASN1_IA5STRING *email;
	GENERAL_NAME *gen;
	int i;








|
>














|
|







577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
			}
		}
	}
	AUTHORITY_INFO_ACCESS_free(info);
	return ret;
}

STACK_OF(OPENSSL_STRING) *
X509_REQ_get1_email(X509_REQ *x)
{
	GENERAL_NAMES *gens;
	STACK_OF(X509_EXTENSION) *exts;
	STACK_OF(OPENSSL_STRING) *ret;

	exts = X509_REQ_get_extensions(x);
	gens = X509V3_get_d2i(exts, NID_subject_alt_name, NULL, NULL);
	ret = get_email(X509_REQ_get_subject_name(x), gens);
	sk_GENERAL_NAME_pop_free(gens, GENERAL_NAME_free);
	sk_X509_EXTENSION_pop_free(exts, X509_EXTENSION_free);
	return ret;
}


static STACK_OF(OPENSSL_STRING) *
get_email(X509_NAME *name, GENERAL_NAMES *gens)
{
	STACK_OF(OPENSSL_STRING) *ret = NULL;
	X509_NAME_ENTRY *ne;
	ASN1_IA5STRING *email;
	GENERAL_NAME *gen;
	int i;

624
625
626
627
628
629
630
631
632
633
634

635
636
637
638
639
640
641
642
643

void
X509_email_free(STACK_OF(OPENSSL_STRING) *sk)
{
	sk_OPENSSL_STRING_pop_free(sk, str_free);
}

typedef int (*equal_fn) (const unsigned char *pattern, size_t pattern_len,
    const unsigned char *subject, size_t subject_len, unsigned int flags);

/* Skip pattern prefix to match "wildcard" subject */

static void skip_prefix(const unsigned char **p, size_t *plen,
    const unsigned char *subject, size_t subject_len, unsigned int flags)
{
	const unsigned char *pattern = *p;
	size_t pattern_len = *plen;

	/*
	 * If subject starts with a leading '.' followed by more octets, and
	 * pattern is longer, compare just an equal-length suffix with the







|



>
|
|







661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681

void
X509_email_free(STACK_OF(OPENSSL_STRING) *sk)
{
	sk_OPENSSL_STRING_pop_free(sk, str_free);
}

typedef int (*equal_fn)(const unsigned char *pattern, size_t pattern_len,
    const unsigned char *subject, size_t subject_len, unsigned int flags);

/* Skip pattern prefix to match "wildcard" subject */
static void
skip_prefix(const unsigned char **p, size_t *plen, const unsigned char *subject,
    size_t subject_len, unsigned int flags)
{
	const unsigned char *pattern = *p;
	size_t pattern_len = *plen;

	/*
	 * If subject starts with a leading '.' followed by more octets, and
	 * pattern is longer, compare just an equal-length suffix with the
667
668
669
670
671
672
673

674
675
676
677
678
679
680
681
682
683
684
685
686
687
688

689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722

723
724
725
726
727
728
729
730
731
732
733
734
735

736
737
738
739
740
741
742
743
 * "equal_nocase" function is a hand-rolled strncasecmp that does not
 * allow \0 in the pattern. Since an embedded \0 is likely a sign of
 * problems, we simply don't allow it in either case, and then we use
 * standard libc funcitons.
 */

/* Compare using strncasecmp */

static int equal_nocase(const unsigned char *pattern, size_t pattern_len,
    const unsigned char *subject, size_t subject_len,
    unsigned int flags)
{
	if (memchr(pattern, '\0', pattern_len) != NULL)
		return 0;
	if (memchr(subject, '\0', subject_len) != NULL)
		return 0;
	skip_prefix(&pattern, &pattern_len, subject, subject_len, flags);
	if (pattern_len != subject_len)
		return 0;
	return (strncasecmp(pattern, subject, pattern_len) == 0);
}

/* Compare using strncmp. */

static int equal_case(const unsigned char *pattern, size_t pattern_len,
    const unsigned char *subject, size_t subject_len,
    unsigned int flags)
{
	if (memchr(pattern, 0, pattern_len) != NULL)
		return 0;
	if (memchr(subject, 0, subject_len) != NULL)
		return 0;
	skip_prefix(&pattern, &pattern_len, subject, subject_len, flags);
	if (pattern_len != subject_len)
		return 0;
	return (strncmp(pattern, subject, pattern_len) == 0);
}

/*
 * RFC 5280, section 7.5, requires that only the domain is compared in a
 * case-insensitive manner.
 */
static int equal_email(const unsigned char *a, size_t a_len,
    const unsigned char *b, size_t b_len,
    unsigned int unused_flags)
{
	size_t pos = a_len;
	if (a_len != b_len)
		return 0;
	/*
	 * We search backwards for the '@' character, so that we do not have to
	 * deal with quoted local-parts.  The domain part is compared in a
	 * case-insensitive manner.
	 */
	while (pos > 0) {
		pos--;
		if (a[pos] == '@' || b[pos] == '@') {
			if (!equal_nocase(a + pos, a_len - pos, b + pos, a_len - pos, 0))

				return 0;
			break;
		}
	}
	if (pos == 0)
		pos = a_len;
	return equal_case(a, pos, b, pos, 0);
}

/*
 * Compare the prefix and suffix with the subject, and check that the
 * characters in-between are valid.
 */

static int wildcard_match(const unsigned char *prefix, size_t prefix_len,
    const unsigned char *suffix, size_t suffix_len,
    const unsigned char *subject, size_t subject_len, unsigned int flags)
{
	const unsigned char *wildcard_start;
	const unsigned char *wildcard_end;
	const unsigned char *p;
	int allow_multi = 0;







>
|
|
<












>
|
|
<















|
|
|












|
>













>
|







705
706
707
708
709
710
711
712
713
714

715
716
717
718
719
720
721
722
723
724
725
726
727
728
729

730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
 * "equal_nocase" function is a hand-rolled strncasecmp that does not
 * allow \0 in the pattern. Since an embedded \0 is likely a sign of
 * problems, we simply don't allow it in either case, and then we use
 * standard libc funcitons.
 */

/* Compare using strncasecmp */
static int
equal_nocase(const unsigned char *pattern, size_t pattern_len,
    const unsigned char *subject, size_t subject_len, unsigned int flags)

{
	if (memchr(pattern, '\0', pattern_len) != NULL)
		return 0;
	if (memchr(subject, '\0', subject_len) != NULL)
		return 0;
	skip_prefix(&pattern, &pattern_len, subject, subject_len, flags);
	if (pattern_len != subject_len)
		return 0;
	return (strncasecmp(pattern, subject, pattern_len) == 0);
}

/* Compare using strncmp. */
static int
equal_case(const unsigned char *pattern, size_t pattern_len,
    const unsigned char *subject, size_t subject_len, unsigned int flags)

{
	if (memchr(pattern, 0, pattern_len) != NULL)
		return 0;
	if (memchr(subject, 0, subject_len) != NULL)
		return 0;
	skip_prefix(&pattern, &pattern_len, subject, subject_len, flags);
	if (pattern_len != subject_len)
		return 0;
	return (strncmp(pattern, subject, pattern_len) == 0);
}

/*
 * RFC 5280, section 7.5, requires that only the domain is compared in a
 * case-insensitive manner.
 */
static int
equal_email(const unsigned char *a, size_t a_len, const unsigned char *b,
    size_t b_len, unsigned int unused_flags)
{
	size_t pos = a_len;
	if (a_len != b_len)
		return 0;
	/*
	 * We search backwards for the '@' character, so that we do not have to
	 * deal with quoted local-parts.  The domain part is compared in a
	 * case-insensitive manner.
	 */
	while (pos > 0) {
		pos--;
		if (a[pos] == '@' || b[pos] == '@') {
			if (!equal_nocase(a + pos, a_len - pos, b + pos,
			    a_len - pos, 0))
				return 0;
			break;
		}
	}
	if (pos == 0)
		pos = a_len;
	return equal_case(a, pos, b, pos, 0);
}

/*
 * Compare the prefix and suffix with the subject, and check that the
 * characters in-between are valid.
 */
static int
wildcard_match(const unsigned char *prefix, size_t prefix_len,
    const unsigned char *suffix, size_t suffix_len,
    const unsigned char *subject, size_t subject_len, unsigned int flags)
{
	const unsigned char *wildcard_start;
	const unsigned char *wildcard_end;
	const unsigned char *p;
	int allow_multi = 0;
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
}

#define LABEL_START     (1 << 0)
#define LABEL_END       (1 << 1)
#define LABEL_HYPHEN    (1 << 2)
#define LABEL_IDNA      (1 << 3)

static const unsigned char *valid_star(const unsigned char *p, size_t len,
    unsigned int flags)
{
	const unsigned char *star = 0;
	size_t i;
	int state = LABEL_START;
	int dots = 0;
	for (i = 0; i < len; ++i) {
		/*







|
|







824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
}

#define LABEL_START     (1 << 0)
#define LABEL_END       (1 << 1)
#define LABEL_HYPHEN    (1 << 2)
#define LABEL_IDNA      (1 << 3)

static const unsigned char *
valid_star(const unsigned char *p, size_t len, unsigned int flags)
{
	const unsigned char *star = 0;
	size_t i;
	int state = LABEL_START;
	int dots = 0;
	for (i = 0; i < len; ++i) {
		/*
863
864
865
866
867
868
869

870
871
872
873
874
875
876
877
	 */
	if ((state & (LABEL_START | LABEL_HYPHEN)) != 0 || dots < 2)
		return NULL;
	return star;
}

/* Compare using wildcards. */

static int equal_wildcard(const unsigned char *pattern, size_t pattern_len,
    const unsigned char *subject, size_t subject_len, unsigned int flags)
{
	const unsigned char *star = NULL;

	/*
	 * Subject names starting with '.' can only match a wildcard pattern
	 * via a subject sub-domain pattern suffix match.







>
|







903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
	 */
	if ((state & (LABEL_START | LABEL_HYPHEN)) != 0 || dots < 2)
		return NULL;
	return star;
}

/* Compare using wildcards. */
static int
equal_wildcard(const unsigned char *pattern, size_t pattern_len,
    const unsigned char *subject, size_t subject_len, unsigned int flags)
{
	const unsigned char *star = NULL;

	/*
	 * Subject names starting with '.' can only match a wildcard pattern
	 * via a subject sub-domain pattern suffix match.
922
923
924
925
926
927
928

929
930
931
932
933
934
935
936
937
		    (*peername = strndup((char *)astr, astrlen)) == NULL)
			rv = -1;
		free(astr);
	}
	return rv;
}


static int do_x509_check(X509 *x, const char *chk, size_t chklen,
    unsigned int flags, int check_type, char **peername)
{
	GENERAL_NAMES *gens = NULL;
	X509_NAME *name = NULL;
	size_t i;
	int j;
	int cnid = NID_undef;
	int alt_type;







>
|
|







963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
		    (*peername = strndup((char *)astr, astrlen)) == NULL)
			rv = -1;
		free(astr);
	}
	return rv;
}

static int
do_x509_check(X509 *x, const char *chk, size_t chklen, unsigned int flags,
    int check_type, char **peername)
{
	GENERAL_NAMES *gens = NULL;
	X509_NAME *name = NULL;
	size_t i;
	int j;
	int cnid = NID_undef;
	int alt_type;
1006
1007
1008
1009
1010
1011
1012

1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024

1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036

1037
1038
1039
1040
1041
1042
1043
1044

1045
1046
1047
1048
1049
1050
1051
1052
		if ((rv = do_check_string(str, -1, equal, flags,
			 chk, chklen, peername)) != 0)
			return rv;
	}
	return 0;
}


int X509_check_host(X509 *x, const char *chk, size_t chklen,
    unsigned int flags, char **peername)
{
	if (chk == NULL)
		return -2;
	if (chklen == 0)
		chklen = strlen(chk);
	else if (memchr(chk, '\0', chklen))
		return -2;
	return do_x509_check(x, chk, chklen, flags, GEN_DNS, peername);
}


int X509_check_email(X509 *x, const char *chk, size_t chklen,
    unsigned int flags)
{
	if (chk == NULL)
		return -2;
	if (chklen == 0)
		chklen = strlen(chk);
	else if (memchr(chk, '\0', chklen))
		return -2;
	return do_x509_check(x, chk, chklen, flags, GEN_EMAIL, NULL);
}


int X509_check_ip(X509 *x, const unsigned char *chk, size_t chklen,
    unsigned int flags)
{
	if (chk == NULL)
		return -2;
	return do_x509_check(x, (char *)chk, chklen, flags, GEN_IPADD, NULL);
}


int X509_check_ip_asc(X509 *x, const char *ipasc, unsigned int flags)
{
	unsigned char ipout[16];
	size_t iplen;

	if (ipasc == NULL)
		return -2;
	iplen = (size_t)a2i_ipadd(ipout, ipasc);







>
|
|










>
|
<










>
|







>
|







1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069

1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
		if ((rv = do_check_string(str, -1, equal, flags,
			 chk, chklen, peername)) != 0)
			return rv;
	}
	return 0;
}

int
X509_check_host(X509 *x, const char *chk, size_t chklen, unsigned int flags,
    char **peername)
{
	if (chk == NULL)
		return -2;
	if (chklen == 0)
		chklen = strlen(chk);
	else if (memchr(chk, '\0', chklen))
		return -2;
	return do_x509_check(x, chk, chklen, flags, GEN_DNS, peername);
}

int
X509_check_email(X509 *x, const char *chk, size_t chklen, unsigned int flags)

{
	if (chk == NULL)
		return -2;
	if (chklen == 0)
		chklen = strlen(chk);
	else if (memchr(chk, '\0', chklen))
		return -2;
	return do_x509_check(x, chk, chklen, flags, GEN_EMAIL, NULL);
}

int
X509_check_ip(X509 *x, const unsigned char *chk, size_t chklen,
    unsigned int flags)
{
	if (chk == NULL)
		return -2;
	return do_x509_check(x, (char *)chk, chklen, flags, GEN_IPADD, NULL);
}

int
X509_check_ip_asc(X509 *x, const char *ipasc, unsigned int flags)
{
	unsigned char ipout[16];
	size_t iplen;

	if (ipasc == NULL)
		return -2;
	iplen = (size_t)a2i_ipadd(ipout, ipasc);
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
	if (!ret)
		goto err;
	if (!ASN1_OCTET_STRING_set(ret, ipout, iplen1 + iplen2))
		goto err;

	return ret;

err:
	free(iptmp);
	if (ret)
		ASN1_OCTET_STRING_free(ret);
	return NULL;
}









|







1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
	if (!ret)
		goto err;
	if (!ASN1_OCTET_STRING_set(ret, ipout, iplen1 + iplen2))
		goto err;

	return ret;

 err:
	free(iptmp);
	if (ret)
		ASN1_OCTET_STRING_free(ret);
	return NULL;
}


1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194

	v6stat.total = 0;
	v6stat.zero_pos = -1;
	v6stat.zero_cnt = 0;

	/* Treat the IPv6 representation as a list of values
	 * separated by ':'. The presence of a '::' will parse
 	 * as one, two or three zero length elements.
	 */
	if (!CONF_parse_list(in, ':', 0, ipv6_cb, &v6stat))
		return 0;

	/* Now for some sanity checks */

	if (v6stat.zero_pos == -1) {







|







1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239

	v6stat.total = 0;
	v6stat.zero_pos = -1;
	v6stat.zero_cnt = 0;

	/* Treat the IPv6 representation as a list of values
	 * separated by ':'. The presence of a '::' will parse
	 * as one, two or three zero length elements.
	 */
	if (!CONF_parse_list(in, ':', 0, ipv6_cb, &v6stat))
		return 0;

	/* Now for some sanity checks */

	if (v6stat.zero_pos == -1) {
Changes to jni/libressl/include/openssl/Makefile.am.
10
11
12
13
14
15
16

17
18
19
20
21
22
23
opensslinclude_HEADERS += blowfish.h
opensslinclude_HEADERS += bn.h
opensslinclude_HEADERS += buffer.h
opensslinclude_HEADERS += camellia.h
opensslinclude_HEADERS += cast.h
opensslinclude_HEADERS += chacha.h
opensslinclude_HEADERS += cmac.h

opensslinclude_HEADERS += comp.h
opensslinclude_HEADERS += conf.h
opensslinclude_HEADERS += conf_api.h
opensslinclude_HEADERS += crypto.h
opensslinclude_HEADERS += curve25519.h
opensslinclude_HEADERS += des.h
opensslinclude_HEADERS += dh.h







>







10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
opensslinclude_HEADERS += blowfish.h
opensslinclude_HEADERS += bn.h
opensslinclude_HEADERS += buffer.h
opensslinclude_HEADERS += camellia.h
opensslinclude_HEADERS += cast.h
opensslinclude_HEADERS += chacha.h
opensslinclude_HEADERS += cmac.h
opensslinclude_HEADERS += cms.h
opensslinclude_HEADERS += comp.h
opensslinclude_HEADERS += conf.h
opensslinclude_HEADERS += conf_api.h
opensslinclude_HEADERS += crypto.h
opensslinclude_HEADERS += curve25519.h
opensslinclude_HEADERS += des.h
opensslinclude_HEADERS += dh.h
Changes to jni/libressl/include/openssl/Makefile.in.
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
top_srcdir = @top_srcdir@
AM_CFLAGS = 
AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_srcdir)/include/compat \
	-DLIBRESSL_INTERNAL -D__BEGIN_HIDDEN_DECLS= \
	-D__END_HIDDEN_DECLS=
opensslincludedir = $(includedir)/openssl
opensslinclude_HEADERS = aes.h asn1.h asn1t.h bio.h blowfish.h bn.h \
	buffer.h camellia.h cast.h chacha.h cmac.h comp.h conf.h \
	conf_api.h crypto.h curve25519.h des.h dh.h dsa.h dso.h \
	dtls1.h ec.h ecdh.h ecdsa.h engine.h err.h evp.h gost.h hkdf.h \
	hmac.h idea.h lhash.h md4.h md5.h modes.h obj_mac.h objects.h \
	ocsp.h opensslconf.h opensslfeatures.h opensslv.h ossl_typ.h \
	pem.h pem2.h pkcs12.h pkcs7.h poly1305.h rand.h rc2.h rc4.h \
	ripemd.h rsa.h safestack.h sha.h sm3.h sm4.h srtp.h ssl.h \
	ssl2.h ssl23.h ssl3.h stack.h tls1.h ts.h txt_db.h ui.h \







|







299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
top_srcdir = @top_srcdir@
AM_CFLAGS = 
AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_srcdir)/include/compat \
	-DLIBRESSL_INTERNAL -D__BEGIN_HIDDEN_DECLS= \
	-D__END_HIDDEN_DECLS=
opensslincludedir = $(includedir)/openssl
opensslinclude_HEADERS = aes.h asn1.h asn1t.h bio.h blowfish.h bn.h \
	buffer.h camellia.h cast.h chacha.h cmac.h cms.h comp.h conf.h \
	conf_api.h crypto.h curve25519.h des.h dh.h dsa.h dso.h \
	dtls1.h ec.h ecdh.h ecdsa.h engine.h err.h evp.h gost.h hkdf.h \
	hmac.h idea.h lhash.h md4.h md5.h modes.h obj_mac.h objects.h \
	ocsp.h opensslconf.h opensslfeatures.h opensslv.h ossl_typ.h \
	pem.h pem2.h pkcs12.h pkcs7.h poly1305.h rand.h rc2.h rc4.h \
	ripemd.h rsa.h safestack.h sha.h sm3.h sm4.h srtp.h ssl.h \
	ssl2.h ssl23.h ssl3.h stack.h tls1.h ts.h txt_db.h ui.h \
Changes to jni/libressl/include/openssl/asn1t.h.
1
2
3
4
5
6
7
8
/* $OpenBSD: asn1t.h,v 1.14 2016/12/27 15:12:51 jsing Exp $ */
/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
 * project 2000.
 */
/* ====================================================================
 * Copyright (c) 2000-2005 The OpenSSL Project.  All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
|







1
2
3
4
5
6
7
8
/* $OpenBSD: asn1t.h,v 1.15 2019/08/20 13:10:09 inoguchi Exp $ */
/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
 * project 2000.
 */
/* ====================================================================
 * Copyright (c) 2000-2005 The OpenSSL Project.  All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
77
78
79
80
81
82
83



84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100












101
102
103
104
105
106
107


/* Macros for start and end of ASN1_ITEM definition */

#define ASN1_ITEM_start(itname) \
	const ASN1_ITEM itname##_it = {




#define ASN1_ITEM_end(itname) \
		};



/* Macros to aid ASN1 template writing */

#define ASN1_ITEM_TEMPLATE(tname) \
	static const ASN1_TEMPLATE tname##_item_tt 

#define ASN1_ITEM_TEMPLATE_END(tname) \
	;\
	ASN1_ITEM_start(tname) \
		ASN1_ITYPE_PRIMITIVE,\
		-1,\
		&tname##_item_tt,\
		0,\












		NULL,\
		0,\
		#tname \
	ASN1_ITEM_end(tname)


/* This is a ASN1 type which just embeds a template */







>
>
>

















>
>
>
>
>
>
>
>
>
>
>
>







77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122


/* Macros for start and end of ASN1_ITEM definition */

#define ASN1_ITEM_start(itname) \
	const ASN1_ITEM itname##_it = {

#define static_ASN1_ITEM_start(itname) \
	static const ASN1_ITEM itname##_it = {

#define ASN1_ITEM_end(itname) \
		};



/* Macros to aid ASN1 template writing */

#define ASN1_ITEM_TEMPLATE(tname) \
	static const ASN1_TEMPLATE tname##_item_tt 

#define ASN1_ITEM_TEMPLATE_END(tname) \
	;\
	ASN1_ITEM_start(tname) \
		ASN1_ITYPE_PRIMITIVE,\
		-1,\
		&tname##_item_tt,\
		0,\
		NULL,\
		0,\
		#tname \
	ASN1_ITEM_end(tname)

#define static_ASN1_ITEM_TEMPLATE_END(tname) \
	;\
	static_ASN1_ITEM_start(tname) \
		ASN1_ITYPE_PRIMITIVE,\
		-1,\
		&tname##_item_tt,\
		0,\
		NULL,\
		0,\
		#tname \
	ASN1_ITEM_end(tname)


/* This is a ASN1 type which just embeds a template */
127
128
129
130
131
132
133


134
135
136
137
138












139
140
141
142
143
144
145
 */

#define ASN1_SEQUENCE(tname) \
	static const ASN1_TEMPLATE tname##_seq_tt[] 

#define ASN1_SEQUENCE_END(stname) ASN1_SEQUENCE_END_name(stname, stname)



#define ASN1_SEQUENCE_END_name(stname, tname) \
	;\
	ASN1_ITEM_start(tname) \
		ASN1_ITYPE_SEQUENCE,\
		V_ASN1_SEQUENCE,\












		tname##_seq_tt,\
		sizeof(tname##_seq_tt) / sizeof(ASN1_TEMPLATE),\
		NULL,\
		sizeof(stname),\
		#stname \
	ASN1_ITEM_end(tname)








>
>





>
>
>
>
>
>
>
>
>
>
>
>







142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
 */

#define ASN1_SEQUENCE(tname) \
	static const ASN1_TEMPLATE tname##_seq_tt[] 

#define ASN1_SEQUENCE_END(stname) ASN1_SEQUENCE_END_name(stname, stname)

#define static_ASN1_SEQUENCE_END(stname) static_ASN1_SEQUENCE_END_name(stname, stname)

#define ASN1_SEQUENCE_END_name(stname, tname) \
	;\
	ASN1_ITEM_start(tname) \
		ASN1_ITYPE_SEQUENCE,\
		V_ASN1_SEQUENCE,\
		tname##_seq_tt,\
		sizeof(tname##_seq_tt) / sizeof(ASN1_TEMPLATE),\
		NULL,\
		sizeof(stname),\
		#stname \
	ASN1_ITEM_end(tname)

#define static_ASN1_SEQUENCE_END_name(stname, tname) \
	;\
	static_ASN1_ITEM_start(tname) \
		ASN1_ITYPE_SEQUENCE,\
		V_ASN1_SEQUENCE,\
		tname##_seq_tt,\
		sizeof(tname##_seq_tt) / sizeof(ASN1_TEMPLATE),\
		NULL,\
		sizeof(stname),\
		#stname \
	ASN1_ITEM_end(tname)

172
173
174
175
176
177
178












179
180
181
182
183
184
185


186
187
188
189
190












191
192
193
194
195
196
197
		V_ASN1_SEQUENCE,\
		tname##_seq_tt,\
		sizeof(tname##_seq_tt) / sizeof(ASN1_TEMPLATE),\
		NULL,\
		sizeof(tname),\
		#tname \
	ASN1_ITEM_end(tname)













#define ASN1_BROKEN_SEQUENCE_END(stname) ASN1_SEQUENCE_END_ref(stname, stname)

#define ASN1_SEQUENCE_END_enc(stname, tname) ASN1_SEQUENCE_END_ref(stname, tname)

#define ASN1_SEQUENCE_END_cb(stname, tname) ASN1_SEQUENCE_END_ref(stname, tname)



#define ASN1_SEQUENCE_END_ref(stname, tname) \
	;\
	ASN1_ITEM_start(tname) \
		ASN1_ITYPE_SEQUENCE,\
		V_ASN1_SEQUENCE,\












		tname##_seq_tt,\
		sizeof(tname##_seq_tt) / sizeof(ASN1_TEMPLATE),\
		&tname##_aux,\
		sizeof(stname),\
		#stname \
	ASN1_ITEM_end(tname)








>
>
>
>
>
>
>
>
>
>
>
>







>
>





>
>
>
>
>
>
>
>
>
>
>
>







201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
		V_ASN1_SEQUENCE,\
		tname##_seq_tt,\
		sizeof(tname##_seq_tt) / sizeof(ASN1_TEMPLATE),\
		NULL,\
		sizeof(tname),\
		#tname \
	ASN1_ITEM_end(tname)

#define static_ASN1_NDEF_SEQUENCE_END(tname) \
	;\
	static_ASN1_ITEM_start(tname) \
		ASN1_ITYPE_NDEF_SEQUENCE,\
		V_ASN1_SEQUENCE,\
		tname##_seq_tt,\
		sizeof(tname##_seq_tt) / sizeof(ASN1_TEMPLATE),\
		NULL,\
		sizeof(tname),\
		#tname \
	ASN1_ITEM_end(tname)

#define ASN1_BROKEN_SEQUENCE_END(stname) ASN1_SEQUENCE_END_ref(stname, stname)

#define ASN1_SEQUENCE_END_enc(stname, tname) ASN1_SEQUENCE_END_ref(stname, tname)

#define ASN1_SEQUENCE_END_cb(stname, tname) ASN1_SEQUENCE_END_ref(stname, tname)

#define static_ASN1_SEQUENCE_END_cb(stname, tname) static_ASN1_SEQUENCE_END_ref(stname, tname)

#define ASN1_SEQUENCE_END_ref(stname, tname) \
	;\
	ASN1_ITEM_start(tname) \
		ASN1_ITYPE_SEQUENCE,\
		V_ASN1_SEQUENCE,\
		tname##_seq_tt,\
		sizeof(tname##_seq_tt) / sizeof(ASN1_TEMPLATE),\
		&tname##_aux,\
		sizeof(stname),\
		#stname \
	ASN1_ITEM_end(tname)

#define static_ASN1_SEQUENCE_END_ref(stname, tname) \
	;\
	static_ASN1_ITEM_start(tname) \
		ASN1_ITYPE_SEQUENCE,\
		V_ASN1_SEQUENCE,\
		tname##_seq_tt,\
		sizeof(tname##_seq_tt) / sizeof(ASN1_TEMPLATE),\
		&tname##_aux,\
		sizeof(stname),\
		#stname \
	ASN1_ITEM_end(tname)

234
235
236
237
238
239
240
241


242


243
244
245
246
247
248












249
250
251
252
253
254
255
	static const ASN1_TEMPLATE tname##_ch_tt[] 

#define ASN1_CHOICE_cb(tname, cb) \
	static const ASN1_AUX tname##_aux = {NULL, 0, 0, 0, cb, 0}; \
	ASN1_CHOICE(tname)

#define ASN1_CHOICE_END(stname) ASN1_CHOICE_END_name(stname, stname)



#define ASN1_CHOICE_END_name(stname, tname) ASN1_CHOICE_END_selector(stname, tname, type)



#define ASN1_CHOICE_END_selector(stname, tname, selname) \
	;\
	ASN1_ITEM_start(tname) \
		ASN1_ITYPE_CHOICE,\
		offsetof(stname,selname) ,\












		tname##_ch_tt,\
		sizeof(tname##_ch_tt) / sizeof(ASN1_TEMPLATE),\
		NULL,\
		sizeof(stname),\
		#stname \
	ASN1_ITEM_end(tname)









>
>

>
>






>
>
>
>
>
>
>
>
>
>
>
>







289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
	static const ASN1_TEMPLATE tname##_ch_tt[] 

#define ASN1_CHOICE_cb(tname, cb) \
	static const ASN1_AUX tname##_aux = {NULL, 0, 0, 0, cb, 0}; \
	ASN1_CHOICE(tname)

#define ASN1_CHOICE_END(stname) ASN1_CHOICE_END_name(stname, stname)

#define static_ASN1_CHOICE_END(stname) static_ASN1_CHOICE_END_name(stname, stname)

#define ASN1_CHOICE_END_name(stname, tname) ASN1_CHOICE_END_selector(stname, tname, type)

#define static_ASN1_CHOICE_END_name(stname, tname) static_ASN1_CHOICE_END_selector(stname, tname, type)

#define ASN1_CHOICE_END_selector(stname, tname, selname) \
	;\
	ASN1_ITEM_start(tname) \
		ASN1_ITYPE_CHOICE,\
		offsetof(stname,selname) ,\
		tname##_ch_tt,\
		sizeof(tname##_ch_tt) / sizeof(ASN1_TEMPLATE),\
		NULL,\
		sizeof(stname),\
		#stname \
	ASN1_ITEM_end(tname)

#define static_ASN1_CHOICE_END_selector(stname, tname, selname) \
	;\
	static_ASN1_ITEM_start(tname) \
		ASN1_ITYPE_CHOICE,\
		offsetof(stname,selname) ,\
		tname##_ch_tt,\
		sizeof(tname##_ch_tt) / sizeof(ASN1_TEMPLATE),\
		NULL,\
		sizeof(stname),\
		#stname \
	ASN1_ITEM_end(tname)

Changes to jni/libressl/include/openssl/bn.h.
1
2
3
4
5
6
7
8
/* $OpenBSD: bn.h,v 1.38 2018/02/20 17:13:14 jsing Exp $ */
/* Copyright (C) 1995-1997 Eric Young (eay@cryptsoft.com)
 * All rights reserved.
 *
 * This package is an SSL implementation written
 * by Eric Young (eay@cryptsoft.com).
 * The implementation was written so as to conform with Netscapes SSL.
 *
|







1
2
3
4
5
6
7
8
/* $OpenBSD: bn.h,v 1.39 2019/08/25 19:23:59 schwarze Exp $ */
/* Copyright (C) 1995-1997 Eric Young (eay@cryptsoft.com)
 * All rights reserved.
 *
 * This package is an SSL implementation written
 * by Eric Young (eay@cryptsoft.com).
 * The implementation was written so as to conform with Netscapes SSL.
 *
304
305
306
307
308
309
310

311
312
313
314
315


316
317








318

319
320
321
322
323


324

325






326
327



328

































329
330
331
332
333
334
335
		tmp_gencb->ver = 2; \
		tmp_gencb->arg = (cb_arg); \
		tmp_gencb->cb.cb_2 = (callback); }

#define BN_prime_checks 0 /* default: select number of iterations
			     based on the size of the number */


/* number of Miller-Rabin iterations for an error rate  of less than 2^-80
 * for random 'b'-bit input, b >= 100 (taken from table 4.4 in the Handbook
 * of Applied Cryptography [Menezes, van Oorschot, Vanstone; CRC Press 1996];
 * original paper: Damgaard, Landrock, Pomerance: Average case error estimates
 * for the strong probable prime test. -- Math. Comp. 61 (1993) 177-194) */


#define BN_prime_checks_for_size(b) ((b) >= 1300 ?  2 : \
                                (b) >=  850 ?  3 : \








                                (b) >=  650 ?  4 : \

                                (b) >=  550 ?  5 : \
                                (b) >=  450 ?  6 : \
                                (b) >=  400 ?  7 : \
                                (b) >=  350 ?  8 : \
                                (b) >=  300 ?  9 : \


                                (b) >=  250 ? 12 : \

                                (b) >=  200 ? 15 : \






                                (b) >=  150 ? 18 : \
                                /* b >= 100 */ 27)





































#define BN_num_bytes(a)	((BN_num_bits(a)+7)/8)

/* Note that BN_abs_is_word didn't work reliably for w == 0 until 0.9.8 */
#define BN_abs_is_word(a,w) ((((a)->top == 1) && ((a)->d[0] == (BN_ULONG)(w))) || \
				(((w) == 0) && ((a)->top == 0)))
#define BN_is_zero(a)       ((a)->top == 0)
#define BN_is_one(a)        (BN_abs_is_word((a),1) && !(a)->neg)







>
|
<
|
|
|
>
>
|
<
>
>
>
>
>
>
>
>
|
>
|
|
|
|
|
>
>
|
>
|
>
>
>
>
>
>
|
|
>
>
>
|
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







304
305
306
307
308
309
310
311
312

313
314
315
316
317
318

319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
		tmp_gencb->ver = 2; \
		tmp_gencb->arg = (cb_arg); \
		tmp_gencb->cb.cb_2 = (callback); }

#define BN_prime_checks 0 /* default: select number of iterations
			     based on the size of the number */

/*
 * BN_prime_checks_for_size() returns the number of Miller-Rabin

 * iterations that will be done for checking that a random number
 * is probably prime.  The error rate for accepting a composite
 * number as prime depends on the size of the prime |b|.  The error
 * rates used are for calculating an RSA key with 2 primes, and so
 * the level is what you would expect for a key of double the size
 * of the prime.

 *
 * This table is generated using the algorithm of FIPS PUB 186-4
 * Digital Signature Standard (DSS), section F.1, page 117.
 * (https://dx.doi.org/10.6028/NIST.FIPS.186-4)
 *
 * The following magma script was used to generate the output:
 * securitybits:=125;
 * k:=1024;
 * for t:=1 to 65 do
 *   for M:=3 to Floor(2*Sqrt(k-1)-1) do
 *     S:=0;
 *     // Sum over m
 *     for m:=3 to M do
 *       s:=0;
 *       // Sum over j
 *       for j:=2 to m do
 *         s+:=(RealField(32)!2)^-(j+(k-1)/j);
 *       end for;
 *       S+:=2^(m-(m-1)*t)*s;
 *     end for;
 *     A:=2^(k-2-M*t);
 *     B:=8*(Pi(RealField(32))^2-6)/3*2^(k-2)*S;
 *     pkt:=2.00743*Log(2)*k*2^-k*(A+B);
 *     seclevel:=Floor(-Log(2,pkt));
 *     if seclevel ge securitybits then
 *       printf "k: %5o, security: %o bits  (t: %o, M: %o)\n",k,seclevel,t,M;
 *       break;
 *     end if;
 *   end for;
 *   if seclevel ge securitybits then break; end if;
 * end for;
 *
 * It can be run online at:
 * http://magma.maths.usyd.edu.au/calc
 *
 * And will output:
 * k:  1024, security: 129 bits  (t: 6, M: 23)
 *
 * k is the number of bits of the prime, securitybits is the level
 * we want to reach.
 *
 * prime length | RSA key size | # MR tests | security level
 * -------------+--------------|------------+---------------
 *  (b) >= 6394 |     >= 12788 |          3 |        256 bit
 *  (b) >= 3747 |     >=  7494 |          3 |        192 bit
 *  (b) >= 1345 |     >=  2690 |          4 |        128 bit
 *  (b) >= 1080 |     >=  2160 |          5 |        128 bit
 *  (b) >=  852 |     >=  1704 |          5 |        112 bit
 *  (b) >=  476 |     >=   952 |          5 |         80 bit
 *  (b) >=  400 |     >=   800 |          6 |         80 bit
 *  (b) >=  347 |     >=   694 |          7 |         80 bit
 *  (b) >=  308 |     >=   616 |          8 |         80 bit
 *  (b) >=   55 |     >=   110 |         27 |         64 bit
 *  (b) >=    6 |     >=    12 |         34 |         64 bit
 */

#define BN_prime_checks_for_size(b) ((b) >= 3747 ?  3 : \
				(b) >=  1345 ?  4 : \
				(b) >=  476 ?  5 : \
				(b) >=  400 ?  6 : \
				(b) >=  347 ?  7 : \
				(b) >=  308 ?  8 : \
				(b) >=  55  ? 27 : \
				/* b >= 6 */ 34)
 
#define BN_num_bytes(a)	((BN_num_bits(a)+7)/8)

/* Note that BN_abs_is_word didn't work reliably for w == 0 until 0.9.8 */
#define BN_abs_is_word(a,w) ((((a)->top == 1) && ((a)->d[0] == (BN_ULONG)(w))) || \
				(((w) == 0) && ((a)->top == 0)))
#define BN_is_zero(a)       ((a)->top == 0)
#define BN_is_one(a)        (BN_abs_is_word((a),1) && !(a)->neg)
Added jni/libressl/include/openssl/cms.h.








































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
/* $OpenBSD: cms.h,v 1.15 2019/08/11 10:15:30 jsing Exp $ */
/*
 * Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
 * project.
 */
/* ====================================================================
 * Copyright (c) 2008 The OpenSSL Project.  All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 *
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 *
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in
 *    the documentation and/or other materials provided with the
 *    distribution.
 *
 * 3. All advertising materials mentioning features or use of this
 *    software must display the following acknowledgment:
 *    "This product includes software developed by the OpenSSL Project
 *    for use in the OpenSSL Toolkit. (http://www.OpenSSL.org/)"
 *
 * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
 *    endorse or promote products derived from this software without
 *    prior written permission. For written permission, please contact
 *    licensing@OpenSSL.org.
 *
 * 5. Products derived from this software may not be called "OpenSSL"
 *    nor may "OpenSSL" appear in their names without prior written
 *    permission of the OpenSSL Project.
 *
 * 6. Redistributions of any form whatsoever must retain the following
 *    acknowledgment:
 *    "This product includes software developed by the OpenSSL Project
 *    for use in the OpenSSL Toolkit (http://www.OpenSSL.org/)"
 *
 * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
 * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
 * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
 * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
 * OF THE POSSIBILITY OF SUCH DAMAGE.
 * ====================================================================
 */

#ifndef HEADER_CMS_H
#define HEADER_CMS_H

#include <openssl/opensslconf.h>

#ifndef OPENSSL_NO_CMS
#include <openssl/x509.h>
#include <openssl/x509v3.h>
#ifdef __cplusplus
extern "C" {
#endif

typedef struct CMS_ContentInfo_st CMS_ContentInfo;
typedef struct CMS_SignerInfo_st CMS_SignerInfo;
typedef struct CMS_CertificateChoices CMS_CertificateChoices;
typedef struct CMS_RevocationInfoChoice_st CMS_RevocationInfoChoice;
typedef struct CMS_RecipientInfo_st CMS_RecipientInfo;
typedef struct CMS_ReceiptRequest_st CMS_ReceiptRequest;
typedef struct CMS_Receipt_st CMS_Receipt;
typedef struct CMS_RecipientEncryptedKey_st CMS_RecipientEncryptedKey;
typedef struct CMS_OtherKeyAttribute_st CMS_OtherKeyAttribute;

DECLARE_STACK_OF(CMS_SignerInfo)
DECLARE_STACK_OF(CMS_RecipientEncryptedKey)
DECLARE_STACK_OF(CMS_RecipientInfo)
DECLARE_STACK_OF(CMS_RevocationInfoChoice)
CMS_ContentInfo *CMS_ContentInfo_new(void);
void CMS_ContentInfo_free(CMS_ContentInfo *a);
CMS_ContentInfo *d2i_CMS_ContentInfo(CMS_ContentInfo **a, const unsigned char **in, long len);
int i2d_CMS_ContentInfo(CMS_ContentInfo *a, unsigned char **out);
extern const ASN1_ITEM CMS_ContentInfo_it;
CMS_ReceiptRequest *CMS_ReceiptRequest_new(void);
void CMS_ReceiptRequest_free(CMS_ReceiptRequest *a);
CMS_ReceiptRequest *d2i_CMS_ReceiptRequest(CMS_ReceiptRequest **a, const unsigned char **in, long len);
int i2d_CMS_ReceiptRequest(CMS_ReceiptRequest *a, unsigned char **out);
extern const ASN1_ITEM CMS_ReceiptRequest_it;
int CMS_ContentInfo_print_ctx(BIO *out, CMS_ContentInfo *x, int indent, const ASN1_PCTX *pctx);

#define CMS_SIGNERINFO_ISSUER_SERIAL    0
#define CMS_SIGNERINFO_KEYIDENTIFIER    1

#define CMS_RECIPINFO_NONE              -1
#define CMS_RECIPINFO_TRANS             0
#define CMS_RECIPINFO_AGREE             1
#define CMS_RECIPINFO_KEK               2
#define CMS_RECIPINFO_PASS              3
#define CMS_RECIPINFO_OTHER             4

/* S/MIME related flags */

#define CMS_TEXT                        0x1
#define CMS_NOCERTS                     0x2
#define CMS_NO_CONTENT_VERIFY           0x4
#define CMS_NO_ATTR_VERIFY              0x8
#define CMS_NOSIGS                      \
                        (CMS_NO_CONTENT_VERIFY|CMS_NO_ATTR_VERIFY)
#define CMS_NOINTERN                    0x10
#define CMS_NO_SIGNER_CERT_VERIFY       0x20
#define CMS_NOVERIFY                    0x20
#define CMS_DETACHED                    0x40
#define CMS_BINARY                      0x80
#define CMS_NOATTR                      0x100
#define CMS_NOSMIMECAP                  0x200
#define CMS_NOOLDMIMETYPE               0x400
#define CMS_CRLFEOL                     0x800
#define CMS_STREAM                      0x1000
#define CMS_NOCRL                       0x2000
#define CMS_PARTIAL                     0x4000
#define CMS_REUSE_DIGEST                0x8000
#define CMS_USE_KEYID                   0x10000
#define CMS_DEBUG_DECRYPT               0x20000
#define CMS_KEY_PARAM                   0x40000
#define CMS_ASCIICRLF                   0x80000

const ASN1_OBJECT *CMS_get0_type(const CMS_ContentInfo *cms);

BIO *CMS_dataInit(CMS_ContentInfo *cms, BIO *icont);
int CMS_dataFinal(CMS_ContentInfo *cms, BIO *bio);

ASN1_OCTET_STRING **CMS_get0_content(CMS_ContentInfo *cms);
int CMS_is_detached(CMS_ContentInfo *cms);
int CMS_set_detached(CMS_ContentInfo *cms, int detached);

#ifdef HEADER_PEM_H
CMS_ContentInfo *PEM_read_bio_CMS(BIO *bp, CMS_ContentInfo **x,
    pem_password_cb *cb, void *u);
CMS_ContentInfo *PEM_read_CMS(FILE *fp, CMS_ContentInfo **x,
    pem_password_cb *cb, void *u);
int PEM_write_bio_CMS(BIO *bp, const CMS_ContentInfo *x);
int PEM_write_CMS(FILE *fp, const CMS_ContentInfo *x);
#endif
int CMS_stream(unsigned char ***boundary, CMS_ContentInfo *cms);
CMS_ContentInfo *d2i_CMS_bio(BIO *bp, CMS_ContentInfo **cms);
int i2d_CMS_bio(BIO *bp, CMS_ContentInfo *cms);

BIO *BIO_new_CMS(BIO *out, CMS_ContentInfo *cms);
int i2d_CMS_bio_stream(BIO *out, CMS_ContentInfo *cms, BIO *in, int flags);
int PEM_write_bio_CMS_stream(BIO *out, CMS_ContentInfo *cms, BIO *in,
    int flags);
CMS_ContentInfo *SMIME_read_CMS(BIO *bio, BIO **bcont);
int SMIME_write_CMS(BIO *bio, CMS_ContentInfo *cms, BIO *data, int flags);

int CMS_final(CMS_ContentInfo *cms, BIO *data, BIO *dcont, unsigned int flags);

CMS_ContentInfo *CMS_sign(X509 *signcert, EVP_PKEY *pkey, STACK_OF(X509) *certs,
    BIO *data, unsigned int flags);

CMS_ContentInfo *CMS_sign_receipt(CMS_SignerInfo *si, X509 *signcert,
    EVP_PKEY *pkey, STACK_OF(X509) *certs, unsigned int flags);

int CMS_data(CMS_ContentInfo *cms, BIO *out, unsigned int flags);
CMS_ContentInfo *CMS_data_create(BIO *in, unsigned int flags);

int CMS_digest_verify(CMS_ContentInfo *cms, BIO *dcont, BIO *out,
    unsigned int flags);
CMS_ContentInfo *CMS_digest_create(BIO *in, const EVP_MD *md,
    unsigned int flags);

int CMS_EncryptedData_decrypt(CMS_ContentInfo *cms, const unsigned char *key,
    size_t keylen, BIO *dcont, BIO *out, unsigned int flags);

CMS_ContentInfo *CMS_EncryptedData_encrypt(BIO *in, const EVP_CIPHER *cipher,
    const unsigned char *key, size_t keylen, unsigned int flags);

int CMS_EncryptedData_set1_key(CMS_ContentInfo *cms, const EVP_CIPHER *ciph,
    const unsigned char *key, size_t keylen);

int CMS_verify(CMS_ContentInfo *cms, STACK_OF(X509) *certs,
    X509_STORE *store, BIO *dcont, BIO *out, unsigned int flags);

int CMS_verify_receipt(CMS_ContentInfo *rcms, CMS_ContentInfo *ocms,
    STACK_OF(X509) *certs, X509_STORE *store, unsigned int flags);

STACK_OF(X509) *CMS_get0_signers(CMS_ContentInfo *cms);

CMS_ContentInfo *CMS_encrypt(STACK_OF(X509) *certs, BIO *in,
    const EVP_CIPHER *cipher, unsigned int flags);

int CMS_decrypt(CMS_ContentInfo *cms, EVP_PKEY *pkey, X509 *cert,
    BIO *dcont, BIO *out, unsigned int flags);

int CMS_decrypt_set1_pkey(CMS_ContentInfo *cms, EVP_PKEY *pk, X509 *cert);
int CMS_decrypt_set1_key(CMS_ContentInfo *cms, unsigned char *key,
    size_t keylen, const unsigned char *id, size_t idlen);
int CMS_decrypt_set1_password(CMS_ContentInfo *cms, unsigned char *pass,
    ssize_t passlen);

STACK_OF(CMS_RecipientInfo) *CMS_get0_RecipientInfos(CMS_ContentInfo *cms);
int CMS_RecipientInfo_type(CMS_RecipientInfo *ri);
EVP_PKEY_CTX *CMS_RecipientInfo_get0_pkey_ctx(CMS_RecipientInfo *ri);
CMS_ContentInfo *CMS_EnvelopedData_create(const EVP_CIPHER *cipher);
CMS_RecipientInfo *CMS_add1_recipient_cert(CMS_ContentInfo *cms, X509 *recip,
    unsigned int flags);
int CMS_RecipientInfo_set0_pkey(CMS_RecipientInfo *ri, EVP_PKEY *pkey);
int CMS_RecipientInfo_ktri_cert_cmp(CMS_RecipientInfo *ri, X509 *cert);
int CMS_RecipientInfo_ktri_get0_algs(CMS_RecipientInfo *ri, EVP_PKEY **pk,
    X509 **recip, X509_ALGOR **palg);
int CMS_RecipientInfo_ktri_get0_signer_id(CMS_RecipientInfo *ri,
    ASN1_OCTET_STRING **keyid, X509_NAME **issuer, ASN1_INTEGER **sno);

CMS_RecipientInfo *CMS_add0_recipient_key(CMS_ContentInfo *cms, int nid,
    unsigned char *key, size_t keylen, unsigned char *id, size_t idlen,
    ASN1_GENERALIZEDTIME *date, ASN1_OBJECT *otherTypeId, ASN1_TYPE *otherType);

int CMS_RecipientInfo_kekri_get0_id(CMS_RecipientInfo *ri, X509_ALGOR **palg,
    ASN1_OCTET_STRING **pid, ASN1_GENERALIZEDTIME **pdate,
    ASN1_OBJECT **potherid, ASN1_TYPE **pothertype);

int CMS_RecipientInfo_set0_key(CMS_RecipientInfo *ri, unsigned char *key,
    size_t keylen);

int CMS_RecipientInfo_kekri_id_cmp(CMS_RecipientInfo *ri,
    const unsigned char *id, size_t idlen);

int CMS_RecipientInfo_set0_password(CMS_RecipientInfo *ri, unsigned char *pass,
    ssize_t passlen);

CMS_RecipientInfo *CMS_add0_recipient_password(CMS_ContentInfo *cms, int iter,
    int wrap_nid, int pbe_nid, unsigned char *pass, ssize_t passlen,
    const EVP_CIPHER *kekciph);

int CMS_RecipientInfo_decrypt(CMS_ContentInfo *cms, CMS_RecipientInfo *ri);
int CMS_RecipientInfo_encrypt(CMS_ContentInfo *cms, CMS_RecipientInfo *ri);

int CMS_uncompress(CMS_ContentInfo *cms, BIO *dcont, BIO *out,
    unsigned int flags);
CMS_ContentInfo *CMS_compress(BIO *in, int comp_nid, unsigned int flags);

int CMS_set1_eContentType(CMS_ContentInfo *cms, const ASN1_OBJECT *oid);
const ASN1_OBJECT *CMS_get0_eContentType(CMS_ContentInfo *cms);

CMS_CertificateChoices *CMS_add0_CertificateChoices(CMS_ContentInfo *cms);
int CMS_add0_cert(CMS_ContentInfo *cms, X509 *cert);
int CMS_add1_cert(CMS_ContentInfo *cms, X509 *cert);
STACK_OF(X509) *CMS_get1_certs(CMS_ContentInfo *cms);

CMS_RevocationInfoChoice *CMS_add0_RevocationInfoChoice(CMS_ContentInfo *cms);
int CMS_add0_crl(CMS_ContentInfo *cms, X509_CRL *crl);
int CMS_add1_crl(CMS_ContentInfo *cms, X509_CRL *crl);
STACK_OF(X509_CRL) *CMS_get1_crls(CMS_ContentInfo *cms);

int CMS_SignedData_init(CMS_ContentInfo *cms);
CMS_SignerInfo *CMS_add1_signer(CMS_ContentInfo *cms, X509 *signer,
    EVP_PKEY *pk, const EVP_MD *md, unsigned int flags);
EVP_PKEY_CTX *CMS_SignerInfo_get0_pkey_ctx(CMS_SignerInfo *si);
EVP_MD_CTX *CMS_SignerInfo_get0_md_ctx(CMS_SignerInfo *si);
STACK_OF(CMS_SignerInfo) *CMS_get0_SignerInfos(CMS_ContentInfo *cms);

void CMS_SignerInfo_set1_signer_cert(CMS_SignerInfo *si, X509 *signer);
int CMS_SignerInfo_get0_signer_id(CMS_SignerInfo *si, ASN1_OCTET_STRING **keyid,
    X509_NAME **issuer, ASN1_INTEGER **sno);
int CMS_SignerInfo_cert_cmp(CMS_SignerInfo *si, X509 *cert);
int CMS_set1_signers_certs(CMS_ContentInfo *cms, STACK_OF(X509) *certs,
    unsigned int flags);
void CMS_SignerInfo_get0_algs(CMS_SignerInfo *si, EVP_PKEY **pk, X509 **signer,
    X509_ALGOR **pdig, X509_ALGOR **psig);
ASN1_OCTET_STRING *CMS_SignerInfo_get0_signature(CMS_SignerInfo *si);
int CMS_SignerInfo_sign(CMS_SignerInfo *si);
int CMS_SignerInfo_verify(CMS_SignerInfo *si);
int CMS_SignerInfo_verify_content(CMS_SignerInfo *si, BIO *chain);

int CMS_add_smimecap(CMS_SignerInfo *si, STACK_OF(X509_ALGOR) *algs);
int CMS_add_simple_smimecap(STACK_OF(X509_ALGOR) **algs, int algnid,
    int keysize);
int CMS_add_standard_smimecap(STACK_OF(X509_ALGOR) **smcap);

int CMS_signed_get_attr_count(const CMS_SignerInfo *si);
int CMS_signed_get_attr_by_NID(const CMS_SignerInfo *si, int nid, int lastpos);
int CMS_signed_get_attr_by_OBJ(const CMS_SignerInfo *si, const ASN1_OBJECT *obj,
    int lastpos);
X509_ATTRIBUTE *CMS_signed_get_attr(const CMS_SignerInfo *si, int loc);
X509_ATTRIBUTE *CMS_signed_delete_attr(CMS_SignerInfo *si, int loc);
int CMS_signed_add1_attr(CMS_SignerInfo *si, X509_ATTRIBUTE *attr);
int CMS_signed_add1_attr_by_OBJ(CMS_SignerInfo *si, const ASN1_OBJECT *obj,
    int type, const void *bytes, int len);
int CMS_signed_add1_attr_by_NID(CMS_SignerInfo *si, int nid, int type,
    const void *bytes, int len);
int CMS_signed_add1_attr_by_txt(CMS_SignerInfo *si,
    const char *attrname, int type, const void *bytes, int len);
void *CMS_signed_get0_data_by_OBJ(CMS_SignerInfo *si, const ASN1_OBJECT *oid,
    int lastpos, int type);

int CMS_unsigned_get_attr_count(const CMS_SignerInfo *si);
int CMS_unsigned_get_attr_by_NID(const CMS_SignerInfo *si, int nid,
    int lastpos);
int CMS_unsigned_get_attr_by_OBJ(const CMS_SignerInfo *si,
    const ASN1_OBJECT *obj, int lastpos);
X509_ATTRIBUTE *CMS_unsigned_get_attr(const CMS_SignerInfo *si, int loc);
X509_ATTRIBUTE *CMS_unsigned_delete_attr(CMS_SignerInfo *si, int loc);
int CMS_unsigned_add1_attr(CMS_SignerInfo *si, X509_ATTRIBUTE *attr);
int CMS_unsigned_add1_attr_by_OBJ(CMS_SignerInfo *si,
    const ASN1_OBJECT *obj, int type, const void *bytes, int len);
int CMS_unsigned_add1_attr_by_NID(CMS_SignerInfo *si, int nid, int type,
    const void *bytes, int len);
int CMS_unsigned_add1_attr_by_txt(CMS_SignerInfo *si, const char *attrname,
    int type, const void *bytes, int len);
void *CMS_unsigned_get0_data_by_OBJ(CMS_SignerInfo *si, ASN1_OBJECT *oid,
    int lastpos, int type);

#ifdef HEADER_X509V3_H

int CMS_get1_ReceiptRequest(CMS_SignerInfo *si, CMS_ReceiptRequest **prr);
CMS_ReceiptRequest *CMS_ReceiptRequest_create0(unsigned char *id, int idlen,
    int allorfirst, STACK_OF(GENERAL_NAMES) *receiptList,
    STACK_OF(GENERAL_NAMES) *receiptsTo);
int CMS_add1_ReceiptRequest(CMS_SignerInfo *si, CMS_ReceiptRequest *rr);
void CMS_ReceiptRequest_get0_values(CMS_ReceiptRequest *rr, ASN1_STRING **pcid,
    int *pallorfirst, STACK_OF(GENERAL_NAMES) **plist,
    STACK_OF(GENERAL_NAMES) **prto);
#endif
int CMS_RecipientInfo_kari_get0_alg(CMS_RecipientInfo *ri, X509_ALGOR **palg,
    ASN1_OCTET_STRING **pukm);
STACK_OF(CMS_RecipientEncryptedKey) *
    CMS_RecipientInfo_kari_get0_reks(CMS_RecipientInfo *ri);

int CMS_RecipientInfo_kari_get0_orig_id(CMS_RecipientInfo *ri,
    X509_ALGOR **pubalg, ASN1_BIT_STRING **pubkey, ASN1_OCTET_STRING **keyid,
    X509_NAME **issuer, ASN1_INTEGER **sno);

int CMS_RecipientInfo_kari_orig_id_cmp(CMS_RecipientInfo *ri, X509 *cert);

int CMS_RecipientEncryptedKey_get0_id(CMS_RecipientEncryptedKey *rek,
    ASN1_OCTET_STRING **keyid, ASN1_GENERALIZEDTIME **tm,
    CMS_OtherKeyAttribute **other, X509_NAME **issuer, ASN1_INTEGER **sno);
int CMS_RecipientEncryptedKey_cert_cmp(CMS_RecipientEncryptedKey *rek,
    X509 *cert);
int CMS_RecipientInfo_kari_set0_pkey(CMS_RecipientInfo *ri, EVP_PKEY *pk);
EVP_CIPHER_CTX *CMS_RecipientInfo_kari_get0_ctx(CMS_RecipientInfo *ri);
int CMS_RecipientInfo_kari_decrypt(CMS_ContentInfo *cms,
    CMS_RecipientInfo *ri, CMS_RecipientEncryptedKey *rek);

int CMS_SharedInfo_encode(unsigned char **pder, X509_ALGOR *kekalg,
    ASN1_OCTET_STRING *ukm, int keylen);

/* Backward compatibility for spelling errors. */
#define CMS_R_UNKNOWN_DIGEST_ALGORITM CMS_R_UNKNOWN_DIGEST_ALGORITHM
#define CMS_R_UNSUPPORTED_RECPIENTINFO_TYPE \
    CMS_R_UNSUPPORTED_RECIPIENTINFO_TYPE

int ERR_load_CMS_strings(void);

/*
 * CMS function codes.
 */
#define CMS_F_CHECK_CONTENT                              99
#define CMS_F_CMS_ADD0_CERT                              164
#define CMS_F_CMS_ADD0_RECIPIENT_KEY                     100
#define CMS_F_CMS_ADD0_RECIPIENT_PASSWORD                165
#define CMS_F_CMS_ADD1_RECEIPTREQUEST                    158
#define CMS_F_CMS_ADD1_RECIPIENT_CERT                    101
#define CMS_F_CMS_ADD1_SIGNER                            102
#define CMS_F_CMS_ADD1_SIGNINGTIME                       103
#define CMS_F_CMS_COMPRESS                               104
#define CMS_F_CMS_COMPRESSEDDATA_CREATE                  105
#define CMS_F_CMS_COMPRESSEDDATA_INIT_BIO                106
#define CMS_F_CMS_COPY_CONTENT                           107
#define CMS_F_CMS_COPY_MESSAGEDIGEST                     108
#define CMS_F_CMS_DATA                                   109
#define CMS_F_CMS_DATAFINAL                              110
#define CMS_F_CMS_DATAINIT                               111
#define CMS_F_CMS_DECRYPT                                112
#define CMS_F_CMS_DECRYPT_SET1_KEY                       113
#define CMS_F_CMS_DECRYPT_SET1_PASSWORD                  166
#define CMS_F_CMS_DECRYPT_SET1_PKEY                      114
#define CMS_F_CMS_DIGESTALGORITHM_FIND_CTX               115
#define CMS_F_CMS_DIGESTALGORITHM_INIT_BIO               116
#define CMS_F_CMS_DIGESTEDDATA_DO_FINAL                  117
#define CMS_F_CMS_DIGEST_VERIFY                          118
#define CMS_F_CMS_ENCODE_RECEIPT                         161
#define CMS_F_CMS_ENCRYPT                                119
#define CMS_F_CMS_ENCRYPTEDCONTENT_INIT                  179
#define CMS_F_CMS_ENCRYPTEDCONTENT_INIT_BIO              120
#define CMS_F_CMS_ENCRYPTEDDATA_DECRYPT                  121
#define CMS_F_CMS_ENCRYPTEDDATA_ENCRYPT                  122
#define CMS_F_CMS_ENCRYPTEDDATA_SET1_KEY                 123
#define CMS_F_CMS_ENVELOPEDDATA_CREATE                   124
#define CMS_F_CMS_ENVELOPEDDATA_INIT_BIO                 125
#define CMS_F_CMS_ENVELOPED_DATA_INIT                    126
#define CMS_F_CMS_ENV_ASN1_CTRL                          171
#define CMS_F_CMS_FINAL                                  127
#define CMS_F_CMS_GET0_CERTIFICATE_CHOICES               128
#define CMS_F_CMS_GET0_CONTENT                           129
#define CMS_F_CMS_GET0_ECONTENT_TYPE                     130
#define CMS_F_CMS_GET0_ENVELOPED                         131
#define CMS_F_CMS_GET0_REVOCATION_CHOICES                132
#define CMS_F_CMS_GET0_SIGNED                            133
#define CMS_F_CMS_MSGSIGDIGEST_ADD1                      162
#define CMS_F_CMS_RECEIPTREQUEST_CREATE0                 159
#define CMS_F_CMS_RECEIPT_VERIFY                         160
#define CMS_F_CMS_RECIPIENTINFO_DECRYPT                  134
#define CMS_F_CMS_RECIPIENTINFO_ENCRYPT                  169
#define CMS_F_CMS_RECIPIENTINFO_KARI_ENCRYPT             178
#define CMS_F_CMS_RECIPIENTINFO_KARI_GET0_ALG            175
#define CMS_F_CMS_RECIPIENTINFO_KARI_GET0_ORIG_ID        173
#define CMS_F_CMS_RECIPIENTINFO_KARI_GET0_REKS           172
#define CMS_F_CMS_RECIPIENTINFO_KARI_ORIG_ID_CMP         174
#define CMS_F_CMS_RECIPIENTINFO_KEKRI_DECRYPT            135
#define CMS_F_CMS_RECIPIENTINFO_KEKRI_ENCRYPT            136
#define CMS_F_CMS_RECIPIENTINFO_KEKRI_GET0_ID            137
#define CMS_F_CMS_RECIPIENTINFO_KEKRI_ID_CMP             138
#define CMS_F_CMS_RECIPIENTINFO_KTRI_CERT_CMP            139
#define CMS_F_CMS_RECIPIENTINFO_KTRI_DECRYPT             140
#define CMS_F_CMS_RECIPIENTINFO_KTRI_ENCRYPT             141
#define CMS_F_CMS_RECIPIENTINFO_KTRI_GET0_ALGS           142
#define CMS_F_CMS_RECIPIENTINFO_KTRI_GET0_SIGNER_ID      143
#define CMS_F_CMS_RECIPIENTINFO_PWRI_CRYPT               167
#define CMS_F_CMS_RECIPIENTINFO_SET0_KEY                 144
#define CMS_F_CMS_RECIPIENTINFO_SET0_PASSWORD            168
#define CMS_F_CMS_RECIPIENTINFO_SET0_PKEY                145
#define CMS_F_CMS_SD_ASN1_CTRL                           170
#define CMS_F_CMS_SET1_IAS                               176
#define CMS_F_CMS_SET1_KEYID                             177
#define CMS_F_CMS_SET1_SIGNERIDENTIFIER                  146
#define CMS_F_CMS_SET_DETACHED                           147
#define CMS_F_CMS_SIGN                                   148
#define CMS_F_CMS_SIGNED_DATA_INIT                       149
#define CMS_F_CMS_SIGNERINFO_CONTENT_SIGN                150
#define CMS_F_CMS_SIGNERINFO_SIGN                        151
#define CMS_F_CMS_SIGNERINFO_VERIFY                      152
#define CMS_F_CMS_SIGNERINFO_VERIFY_CERT                 153
#define CMS_F_CMS_SIGNERINFO_VERIFY_CONTENT              154
#define CMS_F_CMS_SIGN_RECEIPT                           163
#define CMS_F_CMS_STREAM                                 155
#define CMS_F_CMS_UNCOMPRESS                             156
#define CMS_F_CMS_VERIFY                                 157
#define CMS_F_KEK_UNWRAP_KEY                             180

/*
 * CMS reason codes.
 */
#define CMS_R_ADD_SIGNER_ERROR                           99
#define CMS_R_CERTIFICATE_ALREADY_PRESENT                175
#define CMS_R_CERTIFICATE_HAS_NO_KEYID                   160
#define CMS_R_CERTIFICATE_VERIFY_ERROR                   100
#define CMS_R_CIPHER_INITIALISATION_ERROR                101
#define CMS_R_CIPHER_PARAMETER_INITIALISATION_ERROR      102
#define CMS_R_CMS_DATAFINAL_ERROR                        103
#define CMS_R_CMS_LIB                                    104
#define CMS_R_CONTENTIDENTIFIER_MISMATCH                 170
#define CMS_R_CONTENT_NOT_FOUND                          105
#define CMS_R_CONTENT_TYPE_MISMATCH                      171
#define CMS_R_CONTENT_TYPE_NOT_COMPRESSED_DATA           106
#define CMS_R_CONTENT_TYPE_NOT_ENVELOPED_DATA            107
#define CMS_R_CONTENT_TYPE_NOT_SIGNED_DATA               108
#define CMS_R_CONTENT_VERIFY_ERROR                       109
#define CMS_R_CTRL_ERROR                                 110
#define CMS_R_CTRL_FAILURE                               111
#define CMS_R_DECRYPT_ERROR                              112
#define CMS_R_ERROR_GETTING_PUBLIC_KEY                   113
#define CMS_R_ERROR_READING_MESSAGEDIGEST_ATTRIBUTE      114
#define CMS_R_ERROR_SETTING_KEY                          115
#define CMS_R_ERROR_SETTING_RECIPIENTINFO                116
#define CMS_R_INVALID_ENCRYPTED_KEY_LENGTH               117
#define CMS_R_INVALID_KEY_ENCRYPTION_PARAMETER           176
#define CMS_R_INVALID_KEY_LENGTH                         118
#define CMS_R_MD_BIO_INIT_ERROR                          119
#define CMS_R_MESSAGEDIGEST_ATTRIBUTE_WRONG_LENGTH       120
#define CMS_R_MESSAGEDIGEST_WRONG_LENGTH                 121
#define CMS_R_MSGSIGDIGEST_ERROR                         172
#define CMS_R_MSGSIGDIGEST_VERIFICATION_FAILURE          162
#define CMS_R_MSGSIGDIGEST_WRONG_LENGTH                  163
#define CMS_R_NEED_ONE_SIGNER                            164
#define CMS_R_NOT_A_SIGNED_RECEIPT                       165
#define CMS_R_NOT_ENCRYPTED_DATA                         122
#define CMS_R_NOT_KEK                                    123
#define CMS_R_NOT_KEY_AGREEMENT                          181
#define CMS_R_NOT_KEY_TRANSPORT                          124
#define CMS_R_NOT_PWRI                                   177
#define CMS_R_NOT_SUPPORTED_FOR_THIS_KEY_TYPE            125
#define CMS_R_NO_CIPHER                                  126
#define CMS_R_NO_CONTENT                                 127
#define CMS_R_NO_CONTENT_TYPE                            173
#define CMS_R_NO_DEFAULT_DIGEST                          128
#define CMS_R_NO_DIGEST_SET                              129
#define CMS_R_NO_KEY                                     130
#define CMS_R_NO_KEY_OR_CERT                             174
#define CMS_R_NO_MATCHING_DIGEST                         131
#define CMS_R_NO_MATCHING_RECIPIENT                      132
#define CMS_R_NO_MATCHING_SIGNATURE                      166
#define CMS_R_NO_MSGSIGDIGEST                            167
#define CMS_R_NO_PASSWORD                                178
#define CMS_R_NO_PRIVATE_KEY                             133
#define CMS_R_NO_PUBLIC_KEY                              134
#define CMS_R_NO_RECEIPT_REQUEST                         168
#define CMS_R_NO_SIGNERS                                 135
#define CMS_R_PRIVATE_KEY_DOES_NOT_MATCH_CERTIFICATE     136
#define CMS_R_RECEIPT_DECODE_ERROR                       169
#define CMS_R_RECIPIENT_ERROR                            137
#define CMS_R_SIGNER_CERTIFICATE_NOT_FOUND               138
#define CMS_R_SIGNFINAL_ERROR                            139
#define CMS_R_SMIME_TEXT_ERROR                           140
#define CMS_R_STORE_INIT_ERROR                           141
#define CMS_R_TYPE_NOT_COMPRESSED_DATA                   142
#define CMS_R_TYPE_NOT_DATA                              143
#define CMS_R_TYPE_NOT_DIGESTED_DATA                     144
#define CMS_R_TYPE_NOT_ENCRYPTED_DATA                    145
#define CMS_R_TYPE_NOT_ENVELOPED_DATA                    146
#define CMS_R_UNABLE_TO_FINALIZE_CONTEXT                 147
#define CMS_R_UNKNOWN_CIPHER                             148
#define CMS_R_UNKNOWN_DIGEST_ALGORITHM                   149
#define CMS_R_UNKNOWN_ID                                 150
#define CMS_R_UNSUPPORTED_COMPRESSION_ALGORITHM          151
#define CMS_R_UNSUPPORTED_CONTENT_TYPE                   152
#define CMS_R_UNSUPPORTED_KEK_ALGORITHM                  153
#define CMS_R_UNSUPPORTED_KEY_ENCRYPTION_ALGORITHM       179
#define CMS_R_UNSUPPORTED_RECIPIENTINFO_TYPE             155
#define CMS_R_UNSUPPORTED_RECIPIENT_TYPE                 154
#define CMS_R_UNSUPPORTED_TYPE                           156
#define CMS_R_UNWRAP_ERROR                               157
#define CMS_R_UNWRAP_FAILURE                             180
#define CMS_R_VERIFICATION_FAILURE                       158
#define CMS_R_WRAP_ERROR                                 159

#ifdef  __cplusplus
}
#endif
#endif
#endif
Changes to jni/libressl/include/openssl/curve25519.h.

1
2
3
4
5
6
7

/*
 * Copyright (c) 2015, Google Inc.
 *
 * Permission to use, copy, modify, and/or distribute this software for any
 * purpose with or without fee is hereby granted, provided that the above
 * copyright notice and this permission notice appear in all copies.
 *
>







1
2
3
4
5
6
7
8
/*	$OpenBSD: curve25519.h,v 1.3 2019/05/11 15:55:52 tb Exp $ */
/*
 * Copyright (c) 2015, Google Inc.
 *
 * Permission to use, copy, modify, and/or distribute this software for any
 * purpose with or without fee is hereby granted, provided that the above
 * copyright notice and this permission notice appear in all copies.
 *
Changes to jni/libressl/include/openssl/ec.h.
1
2
3
4
5
6
7
8
/* $OpenBSD: ec.h,v 1.16 2019/01/19 01:17:41 tb Exp $ */
/*
 * Originally written by Bodo Moeller for the OpenSSL project.
 */
/**
 * \file crypto/ec/ec.h Include file for the OpenSSL EC functions
 * \author Originally written by Bodo Moeller for the OpenSSL project
 */
|







1
2
3
4
5
6
7
8
/* $OpenBSD: ec.h,v 1.18 2019/09/29 10:09:09 tb Exp $ */
/*
 * Originally written by Bodo Moeller for the OpenSSL project.
 */
/**
 * \file crypto/ec/ec.h Include file for the OpenSSL EC functions
 * \author Originally written by Bodo Moeller for the OpenSSL project
 */
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
# if __SUNPRO_C >= 0x520
# pragma error_messages (off,E_ARRAY_OF_INCOMPLETE_NONAME,E_ARRAY_OF_INCOMPLETE)
# endif
#endif

  
#ifndef OPENSSL_ECC_MAX_FIELD_BITS
# define OPENSSL_ECC_MAX_FIELD_BITS 661
#endif

/** Enum for the point conversion form as defined in X9.62 (ECDSA)
 *  for the encoding of a elliptic curve point (x,y) */
typedef enum {
	/** the point is encoded as z||x, where the octet z specifies 
	 *  which solution of the quadratic equation y is  */







|







93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
# if __SUNPRO_C >= 0x520
# pragma error_messages (off,E_ARRAY_OF_INCOMPLETE_NONAME,E_ARRAY_OF_INCOMPLETE)
# endif
#endif

  
#ifndef OPENSSL_ECC_MAX_FIELD_BITS
#define OPENSSL_ECC_MAX_FIELD_BITS 661
#endif

/** Enum for the point conversion form as defined in X9.62 (ECDSA)
 *  for the encoding of a elliptic curve point (x,y) */
typedef enum {
	/** the point is encoded as z||x, where the octet z specifies 
	 *  which solution of the quadratic equation y is  */
710
711
712
713
714
715
716

717
718
719
720
721
722
723
/* some values for the encoding_flag */
#define EC_PKEY_NO_PARAMETERS	0x001
#define EC_PKEY_NO_PUBKEY	0x002

/* some values for the flags field */
#define EC_FLAG_NON_FIPS_ALLOW	0x1
#define EC_FLAG_FIPS_CHECKED	0x2


/** Creates a new EC_KEY object.
 *  \return EC_KEY object or NULL if an error occurred.
 */
EC_KEY *EC_KEY_new(void);

int EC_KEY_get_flags(const EC_KEY *key);







>







710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
/* some values for the encoding_flag */
#define EC_PKEY_NO_PARAMETERS	0x001
#define EC_PKEY_NO_PUBKEY	0x002

/* some values for the flags field */
#define EC_FLAG_NON_FIPS_ALLOW	0x1
#define EC_FLAG_FIPS_CHECKED	0x2
#define EC_FLAG_COFACTOR_ECDH	0x1000

/** Creates a new EC_KEY object.
 *  \return EC_KEY object or NULL if an error occurred.
 */
EC_KEY *EC_KEY_new(void);

int EC_KEY_get_flags(const EC_KEY *key);
991
992
993
994
995
996
997
998

999
1000




1001
































































1002
















1003
1004
1005
1006
1007
1008
1009
#  if __SUNPRO_C >= 0x520
# pragma error_messages (default,E_ARRAY_OF_INCOMPLETE_NONAME,E_ARRAY_OF_INCOMPLETE)
#  endif
# endif
#endif

#define EVP_PKEY_CTX_set_ec_paramgen_curve_nid(ctx, nid) \
	EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_EC, EVP_PKEY_OP_PARAMGEN, \

				EVP_PKEY_CTRL_EC_PARAMGEN_CURVE_NID, nid, NULL)






































































#define EVP_PKEY_CTRL_EC_PARAMGEN_CURVE_NID		(EVP_PKEY_ALG_CTRL + 1)

















/* BEGIN ERROR CODES */
/* The following lines are auto generated by the script mkerr.pl. Any changes
 * made after this point may be overwritten when the script is next run.
 */
void ERR_load_EC_strings(void);








|
>
|

>
>
>
>

>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>

>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
#  if __SUNPRO_C >= 0x520
# pragma error_messages (default,E_ARRAY_OF_INCOMPLETE_NONAME,E_ARRAY_OF_INCOMPLETE)
#  endif
# endif
#endif

#define EVP_PKEY_CTX_set_ec_paramgen_curve_nid(ctx, nid) \
	EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_EC, \
	    EVP_PKEY_OP_PARAMGEN|EVP_PKEY_OP_KEYGEN, \
	    EVP_PKEY_CTRL_EC_PARAMGEN_CURVE_NID, nid, NULL)

#define EVP_PKEY_CTX_set_ec_param_enc(ctx, flag) \
	EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_EC, \
	    EVP_PKEY_OP_PARAMGEN|EVP_PKEY_OP_KEYGEN, \
	    EVP_PKEY_CTRL_EC_PARAM_ENC, flag, NULL)

#define EVP_PKEY_CTX_set_ecdh_cofactor_mode(ctx, flag) \
	EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_EC, \
	    EVP_PKEY_OP_DERIVE, \
	    EVP_PKEY_CTRL_EC_ECDH_COFACTOR, flag, NULL)

#define EVP_PKEY_CTX_get_ecdh_cofactor_mode(ctx) \
	EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_EC, \
	    EVP_PKEY_OP_DERIVE, \
	    EVP_PKEY_CTRL_EC_ECDH_COFACTOR, -2, NULL)

#define EVP_PKEY_CTX_set_ecdh_kdf_type(ctx, kdf) \
	EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_EC, \
	    EVP_PKEY_OP_DERIVE, \
	    EVP_PKEY_CTRL_EC_KDF_TYPE, kdf, NULL)

#define EVP_PKEY_CTX_get_ecdh_kdf_type(ctx) \
	EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_EC, \
	    EVP_PKEY_OP_DERIVE, \
	    EVP_PKEY_CTRL_EC_KDF_TYPE, -2, NULL)

#define EVP_PKEY_CTX_set_ecdh_kdf_md(ctx, md) \
	EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_EC, \
	    EVP_PKEY_OP_DERIVE, \
	    EVP_PKEY_CTRL_EC_KDF_MD, 0, (void *)(md))

#define EVP_PKEY_CTX_get_ecdh_kdf_md(ctx, pmd) \
	EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_EC, \
	    EVP_PKEY_OP_DERIVE, \
	    EVP_PKEY_CTRL_GET_EC_KDF_MD, 0, (void *)(pmd))

#define EVP_PKEY_CTX_set_ecdh_kdf_outlen(ctx, len) \
	EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_EC, \
	    EVP_PKEY_OP_DERIVE, \
	    EVP_PKEY_CTRL_EC_KDF_OUTLEN, len, NULL)

#define EVP_PKEY_CTX_get_ecdh_kdf_outlen(ctx, plen) \
	EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_EC, \
	    EVP_PKEY_OP_DERIVE, \
	    EVP_PKEY_CTRL_GET_EC_KDF_OUTLEN, 0, \
	    (void *)(plen))

#define EVP_PKEY_CTX_set0_ecdh_kdf_ukm(ctx, p, plen) \
	EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_EC, \
	    EVP_PKEY_OP_DERIVE, \
	    EVP_PKEY_CTRL_EC_KDF_UKM, plen, (void *)(p))

#define EVP_PKEY_CTX_get0_ecdh_kdf_ukm(ctx, p) \
	EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_EC, \
	    EVP_PKEY_OP_DERIVE, \
	    EVP_PKEY_CTRL_GET_EC_KDF_UKM, 0, (void *)(p))

/* SM2 will skip the operation check so no need to pass operation here */
#define EVP_PKEY_CTX_set1_id(ctx, id, id_len) \
	EVP_PKEY_CTX_ctrl(ctx, -1, -1, \
	    EVP_PKEY_CTRL_SET1_ID, (int)id_len, (void*)(id))

#define EVP_PKEY_CTX_get1_id(ctx, id) \
	EVP_PKEY_CTX_ctrl(ctx, -1, -1, \
	    EVP_PKEY_CTRL_GET1_ID, 0, (void*)(id))

#define EVP_PKEY_CTX_get1_id_len(ctx, id_len) \
	EVP_PKEY_CTX_ctrl(ctx, -1, -1, \
	    EVP_PKEY_CTRL_GET1_ID_LEN, 0, (void*)(id_len))

#define EVP_PKEY_CTRL_EC_PARAMGEN_CURVE_NID		(EVP_PKEY_ALG_CTRL + 1)
#define EVP_PKEY_CTRL_EC_PARAM_ENC			(EVP_PKEY_ALG_CTRL + 2)
#define EVP_PKEY_CTRL_EC_ECDH_COFACTOR			(EVP_PKEY_ALG_CTRL + 3)
#define EVP_PKEY_CTRL_EC_KDF_TYPE			(EVP_PKEY_ALG_CTRL + 4)
#define EVP_PKEY_CTRL_EC_KDF_MD				(EVP_PKEY_ALG_CTRL + 5)
#define EVP_PKEY_CTRL_GET_EC_KDF_MD			(EVP_PKEY_ALG_CTRL + 6)
#define EVP_PKEY_CTRL_EC_KDF_OUTLEN			(EVP_PKEY_ALG_CTRL + 7)
#define EVP_PKEY_CTRL_GET_EC_KDF_OUTLEN			(EVP_PKEY_ALG_CTRL + 8)
#define EVP_PKEY_CTRL_EC_KDF_UKM			(EVP_PKEY_ALG_CTRL + 9)
#define EVP_PKEY_CTRL_GET_EC_KDF_UKM			(EVP_PKEY_ALG_CTRL + 10)
#define EVP_PKEY_CTRL_SET1_ID				(EVP_PKEY_ALG_CTRL + 11)
#define EVP_PKEY_CTRL_GET1_ID				(EVP_PKEY_ALG_CTRL + 12)
#define EVP_PKEY_CTRL_GET1_ID_LEN			(EVP_PKEY_ALG_CTRL + 13)

/* KDF types */
#define EVP_PKEY_ECDH_KDF_NONE				1
#define EVP_PKEY_ECDH_KDF_X9_63				2

/* BEGIN ERROR CODES */
/* The following lines are auto generated by the script mkerr.pl. Any changes
 * made after this point may be overwritten when the script is next run.
 */
void ERR_load_EC_strings(void);

1168
1169
1170
1171
1172
1173
1174

1175
1176
1177
1178
1179
1180
1181
1182

1183
1184
1185
1186
1187
1188
1189
1190
1191
1192

1193
1194
1195

1196
1197
1198

1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
#define EC_R_GROUP2PKPARAMETERS_FAILURE			 120
#define EC_R_I2D_ECPKPARAMETERS_FAILURE			 121
#define EC_R_INCOMPATIBLE_OBJECTS			 101
#define EC_R_INVALID_ARGUMENT				 112
#define EC_R_INVALID_COMPRESSED_POINT			 110
#define EC_R_INVALID_COMPRESSION_BIT			 109
#define EC_R_INVALID_CURVE				 141

#define EC_R_INVALID_DIGEST_TYPE			 138
#define EC_R_INVALID_ENCODING				 102
#define EC_R_INVALID_FIELD				 103
#define EC_R_INVALID_FORM				 104
#define EC_R_INVALID_GROUP_ORDER			 122
#define EC_R_INVALID_PENTANOMIAL_BASIS			 132
#define EC_R_INVALID_PRIVATE_KEY			 123
#define EC_R_INVALID_TRINOMIAL_BASIS			 137

#define EC_R_KEYS_NOT_SET				 140
#define EC_R_MISSING_PARAMETERS				 124
#define EC_R_MISSING_PRIVATE_KEY			 125
#define EC_R_NOT_A_NIST_PRIME				 135
#define EC_R_NOT_A_SUPPORTED_NIST_PRIME			 136
#define EC_R_NOT_IMPLEMENTED				 126
#define EC_R_NOT_INITIALIZED				 111
#define EC_R_NO_FIELD_MOD				 133
#define EC_R_NO_PARAMETERS_SET				 139
#define EC_R_PASSED_NULL_PARAMETER			 134

#define EC_R_PKPARAMETERS2GROUP_FAILURE			 127
#define EC_R_POINT_AT_INFINITY				 106
#define EC_R_POINT_IS_NOT_ON_CURVE			 107

#define EC_R_SLOT_FULL					 108
#define EC_R_UNDEFINED_GENERATOR			 113
#define EC_R_UNDEFINED_ORDER				 128

#define EC_R_UNKNOWN_GROUP				 129
#define EC_R_UNKNOWN_ORDER				 114
#define EC_R_UNSUPPORTED_FIELD				 131
#define EC_R_WRONG_CURVE_PARAMETERS			 145
#define EC_R_WRONG_ORDER				 130

#ifdef  __cplusplus
}
#endif
#endif







>








>










>



>



>










1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
#define EC_R_GROUP2PKPARAMETERS_FAILURE			 120
#define EC_R_I2D_ECPKPARAMETERS_FAILURE			 121
#define EC_R_INCOMPATIBLE_OBJECTS			 101
#define EC_R_INVALID_ARGUMENT				 112
#define EC_R_INVALID_COMPRESSED_POINT			 110
#define EC_R_INVALID_COMPRESSION_BIT			 109
#define EC_R_INVALID_CURVE				 141
#define EC_R_INVALID_DIGEST				 151
#define EC_R_INVALID_DIGEST_TYPE			 138
#define EC_R_INVALID_ENCODING				 102
#define EC_R_INVALID_FIELD				 103
#define EC_R_INVALID_FORM				 104
#define EC_R_INVALID_GROUP_ORDER			 122
#define EC_R_INVALID_PENTANOMIAL_BASIS			 132
#define EC_R_INVALID_PRIVATE_KEY			 123
#define EC_R_INVALID_TRINOMIAL_BASIS			 137
#define EC_R_KDF_PARAMETER_ERROR			 148
#define EC_R_KEYS_NOT_SET				 140
#define EC_R_MISSING_PARAMETERS				 124
#define EC_R_MISSING_PRIVATE_KEY			 125
#define EC_R_NOT_A_NIST_PRIME				 135
#define EC_R_NOT_A_SUPPORTED_NIST_PRIME			 136
#define EC_R_NOT_IMPLEMENTED				 126
#define EC_R_NOT_INITIALIZED				 111
#define EC_R_NO_FIELD_MOD				 133
#define EC_R_NO_PARAMETERS_SET				 139
#define EC_R_PASSED_NULL_PARAMETER			 134
#define EC_R_PEER_KEY_ERROR				 149
#define EC_R_PKPARAMETERS2GROUP_FAILURE			 127
#define EC_R_POINT_AT_INFINITY				 106
#define EC_R_POINT_IS_NOT_ON_CURVE			 107
#define EC_R_SHARED_INFO_ERROR				 150
#define EC_R_SLOT_FULL					 108
#define EC_R_UNDEFINED_GENERATOR			 113
#define EC_R_UNDEFINED_ORDER				 128
#define EC_R_UNKNOWN_COFACTOR				 164
#define EC_R_UNKNOWN_GROUP				 129
#define EC_R_UNKNOWN_ORDER				 114
#define EC_R_UNSUPPORTED_FIELD				 131
#define EC_R_WRONG_CURVE_PARAMETERS			 145
#define EC_R_WRONG_ORDER				 130

#ifdef  __cplusplus
}
#endif
#endif
Changes to jni/libressl/include/openssl/evp.h.
1
2
3
4
5
6
7
8
/* $OpenBSD: evp.h,v 1.75 2019/03/17 18:17:44 tb Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
 * All rights reserved.
 *
 * This package is an SSL implementation written
 * by Eric Young (eay@cryptsoft.com).
 * The implementation was written so as to conform with Netscapes SSL.
 *
|







1
2
3
4
5
6
7
8
/* $OpenBSD: evp.h,v 1.77 2019/09/09 18:06:25 jsing Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
 * All rights reserved.
 *
 * This package is an SSL implementation written
 * by Eric Young (eay@cryptsoft.com).
 * The implementation was written so as to conform with Netscapes SSL.
 *
1010
1011
1012
1013
1014
1015
1016

1017
1018
1019
1020
1021
1022
1023
#define ASN1_PKEY_SIGPARAM_NULL	0x4

#define ASN1_PKEY_CTRL_PKCS7_SIGN	0x1
#define ASN1_PKEY_CTRL_PKCS7_ENCRYPT	0x2
#define ASN1_PKEY_CTRL_DEFAULT_MD_NID	0x3
#define ASN1_PKEY_CTRL_CMS_SIGN		0x5
#define ASN1_PKEY_CTRL_CMS_ENVELOPE	0x7


int EVP_PKEY_asn1_get_count(void);
const EVP_PKEY_ASN1_METHOD *EVP_PKEY_asn1_get0(int idx);
const EVP_PKEY_ASN1_METHOD *EVP_PKEY_asn1_find(ENGINE **pe, int type);
const EVP_PKEY_ASN1_METHOD *EVP_PKEY_asn1_find_str(ENGINE **pe,
    const char *str, int len);
int EVP_PKEY_asn1_add0(const EVP_PKEY_ASN1_METHOD *ameth);







>







1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
#define ASN1_PKEY_SIGPARAM_NULL	0x4

#define ASN1_PKEY_CTRL_PKCS7_SIGN	0x1
#define ASN1_PKEY_CTRL_PKCS7_ENCRYPT	0x2
#define ASN1_PKEY_CTRL_DEFAULT_MD_NID	0x3
#define ASN1_PKEY_CTRL_CMS_SIGN		0x5
#define ASN1_PKEY_CTRL_CMS_ENVELOPE	0x7
#define ASN1_PKEY_CTRL_CMS_RI_TYPE	0x8

int EVP_PKEY_asn1_get_count(void);
const EVP_PKEY_ASN1_METHOD *EVP_PKEY_asn1_get0(int idx);
const EVP_PKEY_ASN1_METHOD *EVP_PKEY_asn1_find(ENGINE **pe, int type);
const EVP_PKEY_ASN1_METHOD *EVP_PKEY_asn1_find_str(ENGINE **pe,
    const char *str, int len);
int EVP_PKEY_asn1_add0(const EVP_PKEY_ASN1_METHOD *ameth);
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089




1090
1091
1092
1093
1094
1095
1096

#define EVP_PKEY_OP_TYPE_NOGEN \
	(EVP_PKEY_OP_SIG | EVP_PKEY_OP_CRYPT | EVP_PKEY_OP_DERIVE)

#define EVP_PKEY_OP_TYPE_GEN \
		(EVP_PKEY_OP_PARAMGEN | EVP_PKEY_OP_KEYGEN)

#define	 EVP_PKEY_CTX_set_signature_md(ctx, md)	\
		EVP_PKEY_CTX_ctrl(ctx, -1, EVP_PKEY_OP_TYPE_SIG,  \
					EVP_PKEY_CTRL_MD, 0, (void *)md)





#define EVP_PKEY_CTRL_MD		1
#define EVP_PKEY_CTRL_PEER_KEY		2

#define EVP_PKEY_CTRL_PKCS7_ENCRYPT	3
#define EVP_PKEY_CTRL_PKCS7_DECRYPT	4








|
|
|
>
>
>
>







1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101

#define EVP_PKEY_OP_TYPE_NOGEN \
	(EVP_PKEY_OP_SIG | EVP_PKEY_OP_CRYPT | EVP_PKEY_OP_DERIVE)

#define EVP_PKEY_OP_TYPE_GEN \
		(EVP_PKEY_OP_PARAMGEN | EVP_PKEY_OP_KEYGEN)

#define EVP_PKEY_CTX_set_signature_md(ctx, md) \
		EVP_PKEY_CTX_ctrl(ctx, -1, EVP_PKEY_OP_TYPE_SIG, \
		    EVP_PKEY_CTRL_MD, 0, (void *)md)

#define EVP_PKEY_CTX_get_signature_md(ctx, pmd) \
		EVP_PKEY_CTX_ctrl(ctx, -1, EVP_PKEY_OP_TYPE_SIG, \
		    EVP_PKEY_CTRL_GET_MD, 0, (void *)(pmd))

#define EVP_PKEY_CTRL_MD		1
#define EVP_PKEY_CTRL_PEER_KEY		2

#define EVP_PKEY_CTRL_PKCS7_ENCRYPT	3
#define EVP_PKEY_CTRL_PKCS7_DECRYPT	4

1104
1105
1106
1107
1108
1109
1110


1111
1112
1113
1114
1115
1116
1117
#define EVP_PKEY_CTRL_SET_IV 		8

#define EVP_PKEY_CTRL_CMS_ENCRYPT	9
#define EVP_PKEY_CTRL_CMS_DECRYPT	10
#define EVP_PKEY_CTRL_CMS_SIGN		11

#define EVP_PKEY_CTRL_CIPHER		12



#define EVP_PKEY_ALG_CTRL		0x1000


#define EVP_PKEY_FLAG_AUTOARGLEN	2
/* Method handles all operations: don't assume any digest related
 * defaults.







>
>







1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
#define EVP_PKEY_CTRL_SET_IV 		8

#define EVP_PKEY_CTRL_CMS_ENCRYPT	9
#define EVP_PKEY_CTRL_CMS_DECRYPT	10
#define EVP_PKEY_CTRL_CMS_SIGN		11

#define EVP_PKEY_CTRL_CIPHER		12

#define EVP_PKEY_CTRL_GET_MD		13

#define EVP_PKEY_ALG_CTRL		0x1000


#define EVP_PKEY_FLAG_AUTOARGLEN	2
/* Method handles all operations: don't assume any digest related
 * defaults.
Changes to jni/libressl/include/openssl/obj_mac.h.
4097
4098
4099
4100
4101
4102
4103


















































4104
4105
4106
4107
4108
4109
4110
#define SN_aes_192_cbc_hmac_sha1		"AES-192-CBC-HMAC-SHA1"
#define LN_aes_192_cbc_hmac_sha1		"aes-192-cbc-hmac-sha1"
#define NID_aes_192_cbc_hmac_sha1		917

#define SN_aes_256_cbc_hmac_sha1		"AES-256-CBC-HMAC-SHA1"
#define LN_aes_256_cbc_hmac_sha1		"aes-256-cbc-hmac-sha1"
#define NID_aes_256_cbc_hmac_sha1		918



















































#define SN_teletrust		"teletrust"
#define NID_teletrust		920
#define OBJ_teletrust		OBJ_identified_organization,36L

#define SN_brainpool		"brainpool"
#define NID_brainpool		921







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







4097
4098
4099
4100
4101
4102
4103
4104
4105
4106
4107
4108
4109
4110
4111
4112
4113
4114
4115
4116
4117
4118
4119
4120
4121
4122
4123
4124
4125
4126
4127
4128
4129
4130
4131
4132
4133
4134
4135
4136
4137
4138
4139
4140
4141
4142
4143
4144
4145
4146
4147
4148
4149
4150
4151
4152
4153
4154
4155
4156
4157
4158
4159
4160
#define SN_aes_192_cbc_hmac_sha1		"AES-192-CBC-HMAC-SHA1"
#define LN_aes_192_cbc_hmac_sha1		"aes-192-cbc-hmac-sha1"
#define NID_aes_192_cbc_hmac_sha1		917

#define SN_aes_256_cbc_hmac_sha1		"AES-256-CBC-HMAC-SHA1"
#define LN_aes_256_cbc_hmac_sha1		"aes-256-cbc-hmac-sha1"
#define NID_aes_256_cbc_hmac_sha1		918

#define OBJ_x9_63_scheme		1L,3L,133L,16L,840L,63L,0L

#define OBJ_secg_scheme		OBJ_certicom_arc,1L

#define SN_dhSinglePass_stdDH_sha1kdf_scheme		"dhSinglePass-stdDH-sha1kdf-scheme"
#define NID_dhSinglePass_stdDH_sha1kdf_scheme		980
#define OBJ_dhSinglePass_stdDH_sha1kdf_scheme		OBJ_x9_63_scheme,2L

#define SN_dhSinglePass_stdDH_sha224kdf_scheme		"dhSinglePass-stdDH-sha224kdf-scheme"
#define NID_dhSinglePass_stdDH_sha224kdf_scheme		981
#define OBJ_dhSinglePass_stdDH_sha224kdf_scheme		OBJ_secg_scheme,11L,0L

#define SN_dhSinglePass_stdDH_sha256kdf_scheme		"dhSinglePass-stdDH-sha256kdf-scheme"
#define NID_dhSinglePass_stdDH_sha256kdf_scheme		982
#define OBJ_dhSinglePass_stdDH_sha256kdf_scheme		OBJ_secg_scheme,11L,1L

#define SN_dhSinglePass_stdDH_sha384kdf_scheme		"dhSinglePass-stdDH-sha384kdf-scheme"
#define NID_dhSinglePass_stdDH_sha384kdf_scheme		983
#define OBJ_dhSinglePass_stdDH_sha384kdf_scheme		OBJ_secg_scheme,11L,2L

#define SN_dhSinglePass_stdDH_sha512kdf_scheme		"dhSinglePass-stdDH-sha512kdf-scheme"
#define NID_dhSinglePass_stdDH_sha512kdf_scheme		984
#define OBJ_dhSinglePass_stdDH_sha512kdf_scheme		OBJ_secg_scheme,11L,3L

#define SN_dhSinglePass_cofactorDH_sha1kdf_scheme		"dhSinglePass-cofactorDH-sha1kdf-scheme"
#define NID_dhSinglePass_cofactorDH_sha1kdf_scheme		985
#define OBJ_dhSinglePass_cofactorDH_sha1kdf_scheme		OBJ_x9_63_scheme,3L

#define SN_dhSinglePass_cofactorDH_sha224kdf_scheme		"dhSinglePass-cofactorDH-sha224kdf-scheme"
#define NID_dhSinglePass_cofactorDH_sha224kdf_scheme		986
#define OBJ_dhSinglePass_cofactorDH_sha224kdf_scheme		OBJ_secg_scheme,14L,0L

#define SN_dhSinglePass_cofactorDH_sha256kdf_scheme		"dhSinglePass-cofactorDH-sha256kdf-scheme"
#define NID_dhSinglePass_cofactorDH_sha256kdf_scheme		987
#define OBJ_dhSinglePass_cofactorDH_sha256kdf_scheme		OBJ_secg_scheme,14L,1L

#define SN_dhSinglePass_cofactorDH_sha384kdf_scheme		"dhSinglePass-cofactorDH-sha384kdf-scheme"
#define NID_dhSinglePass_cofactorDH_sha384kdf_scheme		988
#define OBJ_dhSinglePass_cofactorDH_sha384kdf_scheme		OBJ_secg_scheme,14L,2L

#define SN_dhSinglePass_cofactorDH_sha512kdf_scheme		"dhSinglePass-cofactorDH-sha512kdf-scheme"
#define NID_dhSinglePass_cofactorDH_sha512kdf_scheme		989
#define OBJ_dhSinglePass_cofactorDH_sha512kdf_scheme		OBJ_secg_scheme,14L,3L

#define SN_dh_std_kdf		"dh-std-kdf"
#define NID_dh_std_kdf		990

#define SN_dh_cofactor_kdf		"dh-cofactor-kdf"
#define NID_dh_cofactor_kdf		991

#define SN_teletrust		"teletrust"
#define NID_teletrust		920
#define OBJ_teletrust		OBJ_identified_organization,36L

#define SN_brainpool		"brainpool"
#define NID_brainpool		921
Changes to jni/libressl/include/openssl/opensslv.h.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
/* $OpenBSD: opensslv.h,v 1.51.2.1 2019/05/13 12:05:04 bcook Exp $ */
#ifndef HEADER_OPENSSLV_H
#define HEADER_OPENSSLV_H

/* These will change with each release of LibreSSL-portable */
#define LIBRESSL_VERSION_NUMBER 0x2090200fL
/*                                    ^ Patch starts here   */
#define LIBRESSL_VERSION_TEXT   "LibreSSL 2.9.2"

/* These will never change */
#define OPENSSL_VERSION_NUMBER	0x20000000L
#define OPENSSL_VERSION_TEXT	LIBRESSL_VERSION_TEXT
#define OPENSSL_VERSION_PTEXT	" part of " OPENSSL_VERSION_TEXT

#define SHLIB_VERSION_HISTORY ""
|




|

|







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
/* $OpenBSD: opensslv.h,v 1.55 2019/10/10 14:29:20 bcook Exp $ */
#ifndef HEADER_OPENSSLV_H
#define HEADER_OPENSSLV_H

/* These will change with each release of LibreSSL-portable */
#define LIBRESSL_VERSION_NUMBER 0x3000200fL
/*                                    ^ Patch starts here   */
#define LIBRESSL_VERSION_TEXT   "LibreSSL 3.0.2"

/* These will never change */
#define OPENSSL_VERSION_NUMBER	0x20000000L
#define OPENSSL_VERSION_TEXT	LIBRESSL_VERSION_TEXT
#define OPENSSL_VERSION_PTEXT	" part of " OPENSSL_VERSION_TEXT

#define SHLIB_VERSION_HISTORY ""
Changes to jni/libressl/include/openssl/rsa.h.
1
2
3
4
5
6
7
8
/* $OpenBSD: rsa.h,v 1.39 2018/09/12 06:35:38 djm Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
 * All rights reserved.
 *
 * This package is an SSL implementation written
 * by Eric Young (eay@cryptsoft.com).
 * The implementation was written so as to conform with Netscapes SSL.
 *
|







1
2
3
4
5
6
7
8
/* $OpenBSD: rsa.h,v 1.40 2019/06/05 15:41:33 gilles Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
 * All rights reserved.
 *
 * This package is an SSL implementation written
 * by Eric Young (eay@cryptsoft.com).
 * The implementation was written so as to conform with Netscapes SSL.
 *
436
437
438
439
440
441
442















































443
444
445
446
447
448
449
int RSA_meth_set1_name(RSA_METHOD *meth, const char *name);
int RSA_meth_set_priv_enc(RSA_METHOD *meth, int (*priv_enc)(int flen,
    const unsigned char *from, unsigned char *to, RSA *rsa, int padding));
int RSA_meth_set_priv_dec(RSA_METHOD *meth, int (*priv_dec)(int flen,
    const unsigned char *from, unsigned char *to, RSA *rsa, int padding));
int (*RSA_meth_get_finish(const RSA_METHOD *meth))(RSA *rsa);
int RSA_meth_set_finish(RSA_METHOD *meth, int (*finish)(RSA *rsa));
















































/* BEGIN ERROR CODES */
/* The following lines are auto generated by the script mkerr.pl. Any changes
 * made after this point may be overwritten when the script is next run.
 */
void ERR_load_RSA_strings(void);








>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
int RSA_meth_set1_name(RSA_METHOD *meth, const char *name);
int RSA_meth_set_priv_enc(RSA_METHOD *meth, int (*priv_enc)(int flen,
    const unsigned char *from, unsigned char *to, RSA *rsa, int padding));
int RSA_meth_set_priv_dec(RSA_METHOD *meth, int (*priv_dec)(int flen,
    const unsigned char *from, unsigned char *to, RSA *rsa, int padding));
int (*RSA_meth_get_finish(const RSA_METHOD *meth))(RSA *rsa);
int RSA_meth_set_finish(RSA_METHOD *meth, int (*finish)(RSA *rsa));
int RSA_meth_set_pub_enc(RSA_METHOD *meth, int (*pub_enc)(int flen,
    const unsigned char *from, unsigned char *to, RSA *rsa, int padding));
int RSA_meth_set_pub_dec(RSA_METHOD *meth, int (*pub_dec)(int flen,
    const unsigned char *from, unsigned char *to, RSA *rsa, int padding));
int RSA_meth_set_mod_exp(RSA_METHOD *meth, int (*mod_exp)(BIGNUM *r0,
    const BIGNUM *i, RSA *rsa, BN_CTX *ctx));
int RSA_meth_set_bn_mod_exp(RSA_METHOD *meth, int (*bn_mod_exp)(BIGNUM *r,
    const BIGNUM *a, const BIGNUM *p, const BIGNUM *m, BN_CTX *ctx,
    BN_MONT_CTX *m_ctx));
int RSA_meth_set_init(RSA_METHOD *meth, int (*init)(RSA *rsa));
int RSA_meth_set_keygen(RSA_METHOD *meth, int (*keygen)(RSA *rsa, int bits,
    BIGNUM *e, BN_GENCB *cb));
int RSA_meth_set_flags(RSA_METHOD *meth, int flags);
int RSA_meth_set0_app_data(RSA_METHOD *meth, void *app_data);
const char *RSA_meth_get0_name(const RSA_METHOD *);
int (*RSA_meth_get_pub_enc(const RSA_METHOD *meth))(int flen,
    const unsigned char *from, unsigned char *to, RSA *rsa, int padding);
int (*RSA_meth_get_pub_dec(const RSA_METHOD *meth))(int flen,
    const unsigned char *from, unsigned char *to, RSA *rsa, int padding);
int (*RSA_meth_get_priv_enc(const RSA_METHOD *meth))(int flen,
    const unsigned char *from, unsigned char *to, RSA *rsa, int padding);
int (*RSA_meth_get_priv_dec(const RSA_METHOD *meth))(int flen,
    const unsigned char *from, unsigned char *to, RSA *rsa, int padding);
int (*RSA_meth_get_mod_exp(const RSA_METHOD *meth))(BIGNUM *r0, const BIGNUM *i,
    RSA *rsa, BN_CTX *ctx);
int (*RSA_meth_get_bn_mod_exp(const RSA_METHOD *meth))(BIGNUM *r,
    const BIGNUM *a, const BIGNUM *p, const BIGNUM *m, BN_CTX *ctx,
    BN_MONT_CTX *m_ctx);
int (*RSA_meth_get_init(const RSA_METHOD *meth))(RSA *rsa);
int (*RSA_meth_get_keygen(const RSA_METHOD *meth))(RSA *rsa, int bits, BIGNUM *e,
    BN_GENCB *cb);
int RSA_meth_get_flags(const RSA_METHOD *meth);
void *RSA_meth_get0_app_data(const RSA_METHOD *meth);
int (*RSA_meth_get_sign(const RSA_METHOD *meth))(int type,
    const unsigned char *m, unsigned int m_length,
    unsigned char *sigret, unsigned int *siglen,
    const RSA *rsa);
int RSA_meth_set_sign(RSA_METHOD *rsa, int (*sign)(int type,
    const unsigned char *m, unsigned int m_length, unsigned char *sigret,
    unsigned int *siglen, const RSA *rsa));
int (*RSA_meth_get_verify(const RSA_METHOD *meth))(int dtype,
    const unsigned char *m, unsigned int m_length, const unsigned char *sigbuf,
    unsigned int siglen, const RSA *rsa);
int RSA_meth_set_verify(RSA_METHOD *rsa, int (*verify)(int dtype,
    const unsigned char *m, unsigned int m_length, const unsigned char *sigbuf,
    unsigned int siglen, const RSA *rsa));


/* BEGIN ERROR CODES */
/* The following lines are auto generated by the script mkerr.pl. Any changes
 * made after this point may be overwritten when the script is next run.
 */
void ERR_load_RSA_strings(void);

Changes to jni/libressl/include/openssl/safestack.h.
1
2
3
4
5
6
7
8
/* $OpenBSD: safestack.h,v 1.17 2018/10/24 17:57:22 jsing Exp $ */
/* ====================================================================
 * Copyright (c) 1999 The OpenSSL Project.  All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 *
|







1
2
3
4
5
6
7
8
/* $OpenBSD: safestack.h,v 1.18 2019/08/11 14:14:14 jsing Exp $ */
/* ====================================================================
 * Copyright (c) 1999 The OpenSSL Project.  All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 *
438
439
440
441
442
443
444














































































































445
446
447
448
449
450
451
#define sk_BY_DIR_HASH_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(BY_DIR_HASH, (st), (cmp))
#define sk_BY_DIR_HASH_dup(st) SKM_sk_dup(BY_DIR_HASH, st)
#define sk_BY_DIR_HASH_pop_free(st, free_func) SKM_sk_pop_free(BY_DIR_HASH, (st), (free_func))
#define sk_BY_DIR_HASH_shift(st) SKM_sk_shift(BY_DIR_HASH, (st))
#define sk_BY_DIR_HASH_pop(st) SKM_sk_pop(BY_DIR_HASH, (st))
#define sk_BY_DIR_HASH_sort(st) SKM_sk_sort(BY_DIR_HASH, (st))
#define sk_BY_DIR_HASH_is_sorted(st) SKM_sk_is_sorted(BY_DIR_HASH, (st))















































































































#define sk_CONF_IMODULE_new(cmp) SKM_sk_new(CONF_IMODULE, (cmp))
#define sk_CONF_IMODULE_new_null() SKM_sk_new_null(CONF_IMODULE)
#define sk_CONF_IMODULE_free(st) SKM_sk_free(CONF_IMODULE, (st))
#define sk_CONF_IMODULE_num(st) SKM_sk_num(CONF_IMODULE, (st))
#define sk_CONF_IMODULE_value(st, i) SKM_sk_value(CONF_IMODULE, (st), (i))
#define sk_CONF_IMODULE_set(st, i, val) SKM_sk_set(CONF_IMODULE, (st), (i), (val))







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
#define sk_BY_DIR_HASH_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(BY_DIR_HASH, (st), (cmp))
#define sk_BY_DIR_HASH_dup(st) SKM_sk_dup(BY_DIR_HASH, st)
#define sk_BY_DIR_HASH_pop_free(st, free_func) SKM_sk_pop_free(BY_DIR_HASH, (st), (free_func))
#define sk_BY_DIR_HASH_shift(st) SKM_sk_shift(BY_DIR_HASH, (st))
#define sk_BY_DIR_HASH_pop(st) SKM_sk_pop(BY_DIR_HASH, (st))
#define sk_BY_DIR_HASH_sort(st) SKM_sk_sort(BY_DIR_HASH, (st))
#define sk_BY_DIR_HASH_is_sorted(st) SKM_sk_is_sorted(BY_DIR_HASH, (st))

#define sk_CMS_CertificateChoices_new(cmp) SKM_sk_new(CMS_CertificateChoices, (cmp))
#define sk_CMS_CertificateChoices_new_null() SKM_sk_new_null(CMS_CertificateChoices)
#define sk_CMS_CertificateChoices_free(st) SKM_sk_free(CMS_CertificateChoices, (st))
#define sk_CMS_CertificateChoices_num(st) SKM_sk_num(CMS_CertificateChoices, (st))
#define sk_CMS_CertificateChoices_value(st, i) SKM_sk_value(CMS_CertificateChoices, (st), (i))
#define sk_CMS_CertificateChoices_set(st, i, val) SKM_sk_set(CMS_CertificateChoices, (st), (i), (val))
#define sk_CMS_CertificateChoices_zero(st) SKM_sk_zero(CMS_CertificateChoices, (st))
#define sk_CMS_CertificateChoices_push(st, val) SKM_sk_push(CMS_CertificateChoices, (st), (val))
#define sk_CMS_CertificateChoices_unshift(st, val) SKM_sk_unshift(CMS_CertificateChoices, (st), (val))
#define sk_CMS_CertificateChoices_find(st, val) SKM_sk_find(CMS_CertificateChoices, (st), (val))
#define sk_CMS_CertificateChoices_find_ex(st, val) SKM_sk_find_ex(CMS_CertificateChoices, (st), (val))
#define sk_CMS_CertificateChoices_delete(st, i) SKM_sk_delete(CMS_CertificateChoices, (st), (i))
#define sk_CMS_CertificateChoices_delete_ptr(st, ptr) SKM_sk_delete_ptr(CMS_CertificateChoices, (st), (ptr))
#define sk_CMS_CertificateChoices_insert(st, val, i) SKM_sk_insert(CMS_CertificateChoices, (st), (val), (i))
#define sk_CMS_CertificateChoices_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(CMS_CertificateChoices, (st), (cmp))
#define sk_CMS_CertificateChoices_dup(st) SKM_sk_dup(CMS_CertificateChoices, st)
#define sk_CMS_CertificateChoices_pop_free(st, free_func) SKM_sk_pop_free(CMS_CertificateChoices, (st), (free_func))
#define sk_CMS_CertificateChoices_shift(st) SKM_sk_shift(CMS_CertificateChoices, (st))
#define sk_CMS_CertificateChoices_pop(st) SKM_sk_pop(CMS_CertificateChoices, (st))
#define sk_CMS_CertificateChoices_sort(st) SKM_sk_sort(CMS_CertificateChoices, (st))
#define sk_CMS_CertificateChoices_is_sorted(st) SKM_sk_is_sorted(CMS_CertificateChoices, (st))

#define sk_CMS_RecipientEncryptedKey_new(cmp) SKM_sk_new(CMS_RecipientEncryptedKey, (cmp))
#define sk_CMS_RecipientEncryptedKey_new_null() SKM_sk_new_null(CMS_RecipientEncryptedKey)
#define sk_CMS_RecipientEncryptedKey_free(st) SKM_sk_free(CMS_RecipientEncryptedKey, (st))
#define sk_CMS_RecipientEncryptedKey_num(st) SKM_sk_num(CMS_RecipientEncryptedKey, (st))
#define sk_CMS_RecipientEncryptedKey_value(st, i) SKM_sk_value(CMS_RecipientEncryptedKey, (st), (i))
#define sk_CMS_RecipientEncryptedKey_set(st, i, val) SKM_sk_set(CMS_RecipientEncryptedKey, (st), (i), (val))
#define sk_CMS_RecipientEncryptedKey_zero(st) SKM_sk_zero(CMS_RecipientEncryptedKey, (st))
#define sk_CMS_RecipientEncryptedKey_push(st, val) SKM_sk_push(CMS_RecipientEncryptedKey, (st), (val))
#define sk_CMS_RecipientEncryptedKey_unshift(st, val) SKM_sk_unshift(CMS_RecipientEncryptedKey, (st), (val))
#define sk_CMS_RecipientEncryptedKey_find(st, val) SKM_sk_find(CMS_RecipientEncryptedKey, (st), (val))
#define sk_CMS_RecipientEncryptedKey_find_ex(st, val) SKM_sk_find_ex(CMS_RecipientEncryptedKey, (st), (val))
#define sk_CMS_RecipientEncryptedKey_delete(st, i) SKM_sk_delete(CMS_RecipientEncryptedKey, (st), (i))
#define sk_CMS_RecipientEncryptedKey_delete_ptr(st, ptr) SKM_sk_delete_ptr(CMS_RecipientEncryptedKey, (st), (ptr))
#define sk_CMS_RecipientEncryptedKey_insert(st, val, i) SKM_sk_insert(CMS_RecipientEncryptedKey, (st), (val), (i))
#define sk_CMS_RecipientEncryptedKey_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(CMS_RecipientEncryptedKey, (st), (cmp))
#define sk_CMS_RecipientEncryptedKey_dup(st) SKM_sk_dup(CMS_RecipientEncryptedKey, st)
#define sk_CMS_RecipientEncryptedKey_pop_free(st, free_func) SKM_sk_pop_free(CMS_RecipientEncryptedKey, (st), (free_func))
#define sk_CMS_RecipientEncryptedKey_shift(st) SKM_sk_shift(CMS_RecipientEncryptedKey, (st))
#define sk_CMS_RecipientEncryptedKey_pop(st) SKM_sk_pop(CMS_RecipientEncryptedKey, (st))
#define sk_CMS_RecipientEncryptedKey_sort(st) SKM_sk_sort(CMS_RecipientEncryptedKey, (st))
#define sk_CMS_RecipientEncryptedKey_is_sorted(st) SKM_sk_is_sorted(CMS_RecipientEncryptedKey, (st))

#define sk_CMS_RecipientInfo_new(cmp) SKM_sk_new(CMS_RecipientInfo, (cmp))
#define sk_CMS_RecipientInfo_new_null() SKM_sk_new_null(CMS_RecipientInfo)
#define sk_CMS_RecipientInfo_free(st) SKM_sk_free(CMS_RecipientInfo, (st))
#define sk_CMS_RecipientInfo_num(st) SKM_sk_num(CMS_RecipientInfo, (st))
#define sk_CMS_RecipientInfo_value(st, i) SKM_sk_value(CMS_RecipientInfo, (st), (i))
#define sk_CMS_RecipientInfo_set(st, i, val) SKM_sk_set(CMS_RecipientInfo, (st), (i), (val))
#define sk_CMS_RecipientInfo_zero(st) SKM_sk_zero(CMS_RecipientInfo, (st))
#define sk_CMS_RecipientInfo_push(st, val) SKM_sk_push(CMS_RecipientInfo, (st), (val))
#define sk_CMS_RecipientInfo_unshift(st, val) SKM_sk_unshift(CMS_RecipientInfo, (st), (val))
#define sk_CMS_RecipientInfo_find(st, val) SKM_sk_find(CMS_RecipientInfo, (st), (val))
#define sk_CMS_RecipientInfo_find_ex(st, val) SKM_sk_find_ex(CMS_RecipientInfo, (st), (val))
#define sk_CMS_RecipientInfo_delete(st, i) SKM_sk_delete(CMS_RecipientInfo, (st), (i))
#define sk_CMS_RecipientInfo_delete_ptr(st, ptr) SKM_sk_delete_ptr(CMS_RecipientInfo, (st), (ptr))
#define sk_CMS_RecipientInfo_insert(st, val, i) SKM_sk_insert(CMS_RecipientInfo, (st), (val), (i))
#define sk_CMS_RecipientInfo_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(CMS_RecipientInfo, (st), (cmp))
#define sk_CMS_RecipientInfo_dup(st) SKM_sk_dup(CMS_RecipientInfo, st)
#define sk_CMS_RecipientInfo_pop_free(st, free_func) SKM_sk_pop_free(CMS_RecipientInfo, (st), (free_func))
#define sk_CMS_RecipientInfo_shift(st) SKM_sk_shift(CMS_RecipientInfo, (st))
#define sk_CMS_RecipientInfo_pop(st) SKM_sk_pop(CMS_RecipientInfo, (st))
#define sk_CMS_RecipientInfo_sort(st) SKM_sk_sort(CMS_RecipientInfo, (st))
#define sk_CMS_RecipientInfo_is_sorted(st) SKM_sk_is_sorted(CMS_RecipientInfo, (st))

#define sk_CMS_RevocationInfoChoice_new(cmp) SKM_sk_new(CMS_RevocationInfoChoice, (cmp))
#define sk_CMS_RevocationInfoChoice_new_null() SKM_sk_new_null(CMS_RevocationInfoChoice)
#define sk_CMS_RevocationInfoChoice_free(st) SKM_sk_free(CMS_RevocationInfoChoice, (st))
#define sk_CMS_RevocationInfoChoice_num(st) SKM_sk_num(CMS_RevocationInfoChoice, (st))
#define sk_CMS_RevocationInfoChoice_value(st, i) SKM_sk_value(CMS_RevocationInfoChoice, (st), (i))
#define sk_CMS_RevocationInfoChoice_set(st, i, val) SKM_sk_set(CMS_RevocationInfoChoice, (st), (i), (val))
#define sk_CMS_RevocationInfoChoice_zero(st) SKM_sk_zero(CMS_RevocationInfoChoice, (st))
#define sk_CMS_RevocationInfoChoice_push(st, val) SKM_sk_push(CMS_RevocationInfoChoice, (st), (val))
#define sk_CMS_RevocationInfoChoice_unshift(st, val) SKM_sk_unshift(CMS_RevocationInfoChoice, (st), (val))
#define sk_CMS_RevocationInfoChoice_find(st, val) SKM_sk_find(CMS_RevocationInfoChoice, (st), (val))
#define sk_CMS_RevocationInfoChoice_find_ex(st, val) SKM_sk_find_ex(CMS_RevocationInfoChoice, (st), (val))
#define sk_CMS_RevocationInfoChoice_delete(st, i) SKM_sk_delete(CMS_RevocationInfoChoice, (st), (i))
#define sk_CMS_RevocationInfoChoice_delete_ptr(st, ptr) SKM_sk_delete_ptr(CMS_RevocationInfoChoice, (st), (ptr))
#define sk_CMS_RevocationInfoChoice_insert(st, val, i) SKM_sk_insert(CMS_RevocationInfoChoice, (st), (val), (i))
#define sk_CMS_RevocationInfoChoice_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(CMS_RevocationInfoChoice, (st), (cmp))
#define sk_CMS_RevocationInfoChoice_dup(st) SKM_sk_dup(CMS_RevocationInfoChoice, st)
#define sk_CMS_RevocationInfoChoice_pop_free(st, free_func) SKM_sk_pop_free(CMS_RevocationInfoChoice, (st), (free_func))
#define sk_CMS_RevocationInfoChoice_shift(st) SKM_sk_shift(CMS_RevocationInfoChoice, (st))
#define sk_CMS_RevocationInfoChoice_pop(st) SKM_sk_pop(CMS_RevocationInfoChoice, (st))
#define sk_CMS_RevocationInfoChoice_sort(st) SKM_sk_sort(CMS_RevocationInfoChoice, (st))
#define sk_CMS_RevocationInfoChoice_is_sorted(st) SKM_sk_is_sorted(CMS_RevocationInfoChoice, (st))

#define sk_CMS_SignerInfo_new(cmp) SKM_sk_new(CMS_SignerInfo, (cmp))
#define sk_CMS_SignerInfo_new_null() SKM_sk_new_null(CMS_SignerInfo)
#define sk_CMS_SignerInfo_free(st) SKM_sk_free(CMS_SignerInfo, (st))
#define sk_CMS_SignerInfo_num(st) SKM_sk_num(CMS_SignerInfo, (st))
#define sk_CMS_SignerInfo_value(st, i) SKM_sk_value(CMS_SignerInfo, (st), (i))
#define sk_CMS_SignerInfo_set(st, i, val) SKM_sk_set(CMS_SignerInfo, (st), (i), (val))
#define sk_CMS_SignerInfo_zero(st) SKM_sk_zero(CMS_SignerInfo, (st))
#define sk_CMS_SignerInfo_push(st, val) SKM_sk_push(CMS_SignerInfo, (st), (val))
#define sk_CMS_SignerInfo_unshift(st, val) SKM_sk_unshift(CMS_SignerInfo, (st), (val))
#define sk_CMS_SignerInfo_find(st, val) SKM_sk_find(CMS_SignerInfo, (st), (val))
#define sk_CMS_SignerInfo_find_ex(st, val) SKM_sk_find_ex(CMS_SignerInfo, (st), (val))
#define sk_CMS_SignerInfo_delete(st, i) SKM_sk_delete(CMS_SignerInfo, (st), (i))
#define sk_CMS_SignerInfo_delete_ptr(st, ptr) SKM_sk_delete_ptr(CMS_SignerInfo, (st), (ptr))
#define sk_CMS_SignerInfo_insert(st, val, i) SKM_sk_insert(CMS_SignerInfo, (st), (val), (i))
#define sk_CMS_SignerInfo_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(CMS_SignerInfo, (st), (cmp))
#define sk_CMS_SignerInfo_dup(st) SKM_sk_dup(CMS_SignerInfo, st)
#define sk_CMS_SignerInfo_pop_free(st, free_func) SKM_sk_pop_free(CMS_SignerInfo, (st), (free_func))
#define sk_CMS_SignerInfo_shift(st) SKM_sk_shift(CMS_SignerInfo, (st))
#define sk_CMS_SignerInfo_pop(st) SKM_sk_pop(CMS_SignerInfo, (st))
#define sk_CMS_SignerInfo_sort(st) SKM_sk_sort(CMS_SignerInfo, (st))
#define sk_CMS_SignerInfo_is_sorted(st) SKM_sk_is_sorted(CMS_SignerInfo, (st))

#define sk_CONF_IMODULE_new(cmp) SKM_sk_new(CONF_IMODULE, (cmp))
#define sk_CONF_IMODULE_new_null() SKM_sk_new_null(CONF_IMODULE)
#define sk_CONF_IMODULE_free(st) SKM_sk_free(CONF_IMODULE, (st))
#define sk_CONF_IMODULE_num(st) SKM_sk_num(CONF_IMODULE, (st))
#define sk_CONF_IMODULE_value(st, i) SKM_sk_value(CONF_IMODULE, (st), (i))
#define sk_CONF_IMODULE_set(st, i, val) SKM_sk_set(CONF_IMODULE, (st), (i), (val))
Changes to jni/libressl/m4/check-os-options.m4.
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
		;;
	*mingw*)
		HOST_OS=win
		HOST_ABI=mingw64
		BUILD_NC=no
		CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE -D_POSIX -D_POSIX_SOURCE -D__USE_MINGW_ANSI_STDIO"
		CPPFLAGS="$CPPFLAGS -D_REENTRANT -D_POSIX_THREAD_SAFE_FUNCTIONS"
		CPPFLAGS="$CPPFLAGS -DWIN32_LEAN_AND_MEAN"
		CPPFLAGS="$CPPFLAGS -DOPENSSL_NO_SPEED"
		AC_SUBST([PLATFORM_LDADD], ['-lws2_32'])
		;;
	*solaris*)
		HOST_OS=solaris
		HOST_ABI=elf
		CPPFLAGS="$CPPFLAGS -D__EXTENSIONS__ -D_XOPEN_SOURCE=600 -DBSD_COMP"
		AC_SUBST([PLATFORM_LDADD], ['-ldl -lnsl -lsocket'])







|
|







102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
		;;
	*mingw*)
		HOST_OS=win
		HOST_ABI=mingw64
		BUILD_NC=no
		CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE -D_POSIX -D_POSIX_SOURCE -D__USE_MINGW_ANSI_STDIO"
		CPPFLAGS="$CPPFLAGS -D_REENTRANT -D_POSIX_THREAD_SAFE_FUNCTIONS"
		CPPFLAGS="$CPPFLAGS -DWIN32_LEAN_AND_MEAN -D_WIN32_WINNT=0x0600"
		CPPFLAGS="$CPPFLAGS"
		AC_SUBST([PLATFORM_LDADD], ['-lws2_32'])
		;;
	*solaris*)
		HOST_OS=solaris
		HOST_ABI=elf
		CPPFLAGS="$CPPFLAGS -D__EXTENSIONS__ -D_XOPEN_SOURCE=600 -DBSD_COMP"
		AC_SUBST([PLATFORM_LDADD], ['-ldl -lnsl -lsocket'])
Changes to jni/libressl/man/ACCESS_DESCRIPTION_new.3.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
.\"	$OpenBSD: ACCESS_DESCRIPTION_new.3,v 1.4 2018/03/22 16:06:33 schwarze Exp $
.\"
.\" Copyright (c) 2016 Ingo Schwarze <schwarze@openbsd.org>
.\"
.\" Permission to use, copy, modify, and distribute this software for any
.\" purpose with or without fee is hereby granted, provided that the above
.\" copyright notice and this permission notice appear in all copies.
.\"
.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
.Dd $Mdocdate: March 22 2018 $
.Dt ACCESS_DESCRIPTION_NEW 3
.Os
.Sh NAME
.Nm ACCESS_DESCRIPTION_new ,
.Nm ACCESS_DESCRIPTION_free ,
.Nm AUTHORITY_INFO_ACCESS_new ,
.Nm AUTHORITY_INFO_ACCESS_free
|















|







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
.\"	$OpenBSD: ACCESS_DESCRIPTION_new.3,v 1.5 2019/06/06 01:06:58 schwarze Exp $
.\"
.\" Copyright (c) 2016 Ingo Schwarze <schwarze@openbsd.org>
.\"
.\" Permission to use, copy, modify, and distribute this software for any
.\" purpose with or without fee is hereby granted, provided that the above
.\" copyright notice and this permission notice appear in all copies.
.\"
.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
.Dd $Mdocdate: June 6 2019 $
.Dt ACCESS_DESCRIPTION_NEW 3
.Os
.Sh NAME
.Nm ACCESS_DESCRIPTION_new ,
.Nm ACCESS_DESCRIPTION_free ,
.Nm AUTHORITY_INFO_ACCESS_new ,
.Nm AUTHORITY_INFO_ACCESS_free
108
109
110
111
112
113
114

115
116
117
118
119
120
121
.Vt ACCESS_DESCRIPTION
or
.Vt AUTHORITY_INFO_ACCESS
object, respectively, or
.Dv NULL
if an error occurs.
.Sh SEE ALSO

.Xr DIST_POINT_new 3 ,
.Xr GENERAL_NAME_new 3 ,
.Xr OCSP_REQUEST_new 3 ,
.Xr TS_REQ_new 3 ,
.Xr X509_CRL_new 3 ,
.Xr X509_EXTENSION_new 3 ,
.Xr X509_new 3







>







108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
.Vt ACCESS_DESCRIPTION
or
.Vt AUTHORITY_INFO_ACCESS
object, respectively, or
.Dv NULL
if an error occurs.
.Sh SEE ALSO
.Xr d2i_ACCESS_DESCRIPTION 3 ,
.Xr DIST_POINT_new 3 ,
.Xr GENERAL_NAME_new 3 ,
.Xr OCSP_REQUEST_new 3 ,
.Xr TS_REQ_new 3 ,
.Xr X509_CRL_new 3 ,
.Xr X509_EXTENSION_new 3 ,
.Xr X509_new 3
Added jni/libressl/man/AES_encrypt.3.


























































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
.\" $OpenBSD: AES_encrypt.3,v 1.1 2019/08/28 10:37:42 schwarze Exp $
.\"
.\" Copyright (c) 2019 Ingo Schwarze <schwarze@openbsd.org>
.\"
.\" Permission to use, copy, modify, and distribute this software for any
.\" purpose with or without fee is hereby granted, provided that the above
.\" copyright notice and this permission notice appear in all copies.
.\"
.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
.Dd $Mdocdate: August 28 2019 $
.Dt AES_ENCRYPT 3
.Os
.Sh NAME
.Nm AES_set_encrypt_key ,
.Nm AES_set_decrypt_key ,
.Nm AES_encrypt ,
.Nm AES_decrypt ,
.Nm AES_cbc_encrypt
.Nd low-level interface to the AES symmetric cipher
.Sh SYNOPSIS
.In openssl/aes.h
.Ft int
.Fo AES_set_encrypt_key
.Fa "const unsigned char *userKey"
.Fa "const int bits"
.Fa "AES_KEY *key"
.Fc
.Ft int
.Fo AES_set_decrypt_key
.Fa "const unsigned char *userKey"
.Fa "const int bits"
.Fa "AES_KEY *key"
.Fc
.Ft void
.Fo AES_encrypt
.Fa "const unsigned char *in"
.Fa "unsigned char *out"
.Fa "const AES_KEY *key"
.Fc
.Ft void
.Fo AES_decrypt
.Fa "const unsigned char *in"
.Fa "unsigned char *out"
.Fa "const AES_KEY *key"
.Fc
.Ft void
.Fo AES_cbc_encrypt
.Fa "const unsigned char *in"
.Fa "unsigned char *out"
.Fa "size_t length"
.Fa "const AES_KEY *key"
.Fa "unsigned char *ivec"
.Fa "const int enc"
.Fc
.Sh DESCRIPTION
These function provide a low-level interface to the AES symmetric
cipher algorithm, also called Rijndael.
For reasons of flexibility, it is recommended that application
programs use the high-level interface described in
.Xr EVP_EncryptInit 3
and
.Xr EVP_aes_128_cbc 3
instead whenever possible.
.Pp
.Vt AES_KEY
is a structure that can hold up to 60
.Vt int
values and a number of rounds.
.Pp
.Fn AES_set_encrypt_key
expands the
.Fa userKey ,
which is
.Fa bits
long, into the
.Fa key
structure to prepare for encryption.
The number of bits and bytes read from
.Fa userKey ,
the number of
.Vt int
values stored into
.Fa key ,
and the number of rounds are as follows:
.Pp
.Bl -column bits bytes ints rounds -offset indent -compact
.It bits Ta bytes Ta ints Ta rounds
.It 128  Ta 16    Ta 44   Ta 10
.It 192  Ta 24    Ta 52   Ta 12
.It 256  Ta 32    Ta 60   Ta 14
.El
.Pp
.Fn AES_set_decrypt_key
does the same, but in preparation for decryption.
.Pp
.Fn AES_encrypt
reads a single 16 byte block from
.Pf * Fa in ,
encrypts it with the
.Fa key ,
and writes the 16 resulting bytes to
.Pf * Fa out .
The 16 byte buffers starting at
.Fa in
and
.Fa out
can overlap, and
.Fa in
and
.Fa out
can even point to the same memory location.
.Pp
.Fn AES_decrypt
decrypts a single block and is otherwise identical to
.Fn AES_encrypt .
.Pp
If
.Fa enc
is non-zero,
.Fn AES_cbc_encrypt
encrypts
.Fa len
bytes at
.Fa in
to
.Fa out
using the 128 bit
.Fa key
and the 128 bit
initialization vector
.Fa ivec
in CBC mode.
If
.Fa enc
is 0,
.Fn AES_cbc_encrypt
performs the corresponding decryption.
.Sh RETURN VALUES
.Fn AES_set_encrypt_key
and
.Fn AES_set_decrypt_key
return 0 for success, -1 if
.Fa userKey
or
.Fa key
is
.Dv NULL ,
or -2 if the number of
.Fa bits
is unsupported.
.Sh SEE ALSO
.Xr crypto 3 ,
.Xr EVP_aes_128_cbc 3 ,
.Xr EVP_EncryptInit 3
.Sh STANDARDS
ISO/IEC 18033-3:2010
Information technology \(em Security techniques \(em
Encryption algorithms \(em Part 3: Block ciphers
.Sh HISTORY
These functions first appeared in OpenSSL 0.9.7
and have been available since
.Ox 3.2 .
.Sh AUTHORS
.An Vincent Rijmen
.An Antoon Bosselaers
.An Paulo Barreto
Changes to jni/libressl/man/ASN1_INTEGER_get.3.
1
2
3
4

















5
6
7
8
9
10
11
12
.\" $OpenBSD: ASN1_INTEGER_get.3,v 1.1 2018/07/08 23:00:17 schwarze Exp $
.\" selective merge up to:
.\" OpenSSL man3/ASN1_INTEGER_get_int64 eaf39a9f Jun 23 10:24:00 2018 +0200
.\"

















.\" This file was written by Dr. Stephen Henson <steve@openssl.org>.
.\" Copyright (c) 2015 The OpenSSL Project.  All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\"
.\" 1. Redistributions of source code must retain the above copyright
|

|

>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
|







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
.\" $OpenBSD: ASN1_INTEGER_get.3,v 1.3 2019/08/26 12:45:27 schwarze Exp $
.\" selective merge up to:
.\" OpenSSL man3/ASN1_INTEGER_get_int64 df75c2bf Dec 9 01:02:36 2018 +0100
.\"
.\" This file is a derived work.
.\" The changes are covered by the following Copyright and license:
.\"
.\" Copyright (c) 2018, 2019 Ingo Schwarze <schwarze@openbsd.org>
.\"
.\" Permission to use, copy, modify, and distribute this software for any
.\" purpose with or without fee is hereby granted, provided that the above
.\" copyright notice and this permission notice appear in all copies.
.\"
.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
.\" The original file was written by Dr. Stephen Henson <steve@openssl.org>.
.\" Copyright (c) 2015 The OpenSSL Project.  All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\"
.\" 1. Redistributions of source code must retain the above copyright
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59

60
61
62
63
64
65
66
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: July 8 2018 $
.Dt ASN1_INTEGER_GET 3
.Os
.Sh NAME
.Nm ASN1_INTEGER_get ,
.Nm ASN1_INTEGER_set ,
.Nm BN_to_ASN1_INTEGER ,
.Nm ASN1_INTEGER_to_BN ,

.Nm ASN1_ENUMERATED_get ,
.Nm ASN1_ENUMERATED_set ,
.Nm BN_to_ASN1_ENUMERATED ,
.Nm ASN1_ENUMERATED_to_BN
.Nd ASN.1 INTEGER and ENUMERATED utilities
.Sh SYNOPSIS
.In openssl/asn1.h







|







>







62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: August 26 2019 $
.Dt ASN1_INTEGER_GET 3
.Os
.Sh NAME
.Nm ASN1_INTEGER_get ,
.Nm ASN1_INTEGER_set ,
.Nm BN_to_ASN1_INTEGER ,
.Nm ASN1_INTEGER_to_BN ,
.Nm i2a_ASN1_INTEGER ,
.Nm ASN1_ENUMERATED_get ,
.Nm ASN1_ENUMERATED_set ,
.Nm BN_to_ASN1_ENUMERATED ,
.Nm ASN1_ENUMERATED_to_BN
.Nd ASN.1 INTEGER and ENUMERATED utilities
.Sh SYNOPSIS
.In openssl/asn1.h
79
80
81
82
83
84
85





86
87
88
89
90
91
92
.Fa "ASN1_INTEGER *ai"
.Fc
.Ft BIGNUM *
.Fo ASN1_INTEGER_to_BN
.Fa "const ASN1_INTEGER *ai"
.Fa "BIGNUM *bn"
.Fc





.Ft long
.Fo ASN1_ENUMERATED_get
.Fa "const ASN1_ENUMERATED *a"
.Fc
.Ft int
.Fo ASN1_ENUMERATED_set
.Fa "ASN1_ENUMERATED *a"







>
>
>
>
>







97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
.Fa "ASN1_INTEGER *ai"
.Fc
.Ft BIGNUM *
.Fo ASN1_INTEGER_to_BN
.Fa "const ASN1_INTEGER *ai"
.Fa "BIGNUM *bn"
.Fc
.Ft int
.Fo i2a_ASN1_INTEGER
.Fa "BIO *out_bio"
.Fa "const ASN1_INTEGER *a"
.Fc
.Ft long
.Fo ASN1_ENUMERATED_get
.Fa "const ASN1_ENUMERATED *a"
.Fc
.Ft int
.Fo ASN1_ENUMERATED_set
.Fa "ASN1_ENUMERATED *a"
150
151
152
153
154
155
156










157
158
159
160
161
162
163
a new
.Vt BIGNUM
object is returned.
Otherwise, the existing object
.Fa bn
is used instead.
.Pp










.Fn ASN1_ENUMERATED_get ,
.Fn ASN1_ENUMERATED_set ,
.Fn BN_to_ASN1_ENUMERATED ,
and
.Fn ASN1_ENUMERATED_to_BN
behave like their
.Vt ASN1_INTEGER







>
>
>
>
>
>
>
>
>
>







173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
a new
.Vt BIGNUM
object is returned.
Otherwise, the existing object
.Fa bn
is used instead.
.Pp
.Fn i2a_ASN1_INTEGER
writes a hexadecimal representation of
.Fa a
to
.Fa out_bio .
The output optionally starts with a minus sign,
followed by an even number of upper case ASCII hexadecimal digits.
After each group of 70 digits, a backslash and a linefeed
are inserted before the next digit.
.Pp
.Fn ASN1_ENUMERATED_get ,
.Fn ASN1_ENUMERATED_set ,
.Fn BN_to_ASN1_ENUMERATED ,
and
.Fn ASN1_ENUMERATED_to_BN
behave like their
.Vt ASN1_INTEGER
200
201
202
203
204
205
206













207
208
209
210
211

212
213
214
215
216
217
218
219
220
return a
.Vt BIGNUM
object of
.Dv NULL
if an error occurs.
They can fail if the passed type is incorrect (due to a programming error)
or due to memory allocation failures.













.Sh HISTORY
.Fn ASN1_INTEGER_set
first appeared in SSLeay 0.5.1.
.Fn ASN1_INTEGER_get ,
.Fn BN_to_ASN1_INTEGER ,

and
.Fn ASN1_INTEGER_to_BN
first appeared in SSLeay 0.6.0.
These functions have been available since
.Ox 2.3 .
.Pp
.Fn ASN1_ENUMERATED_get ,
.Fn ASN1_ENUMERATED_set ,
.Fn BN_to_ASN1_ENUMERATED ,







>
>
>
>
>
>
>
>
>
>
>
>
>





>

|







233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
return a
.Vt BIGNUM
object of
.Dv NULL
if an error occurs.
They can fail if the passed type is incorrect (due to a programming error)
or due to memory allocation failures.
.Pp
In case of success,
.Fn i2a_ASN1_INTEGER
returns the total number of bytes written, which is at least 2.
It returns 0 if
.Fa a
is
.Dv NULL
or -1 if
.Xr BIO_write 3
fails.
.Sh SEE ALSO
.Xr ASN1_INTEGER_new 3
.Sh HISTORY
.Fn ASN1_INTEGER_set
first appeared in SSLeay 0.5.1.
.Fn ASN1_INTEGER_get ,
.Fn BN_to_ASN1_INTEGER ,
.Fn ASN1_INTEGER_to_BN ,
and
.Fn i2a_ASN1_INTEGER
first appeared in SSLeay 0.6.0.
These functions have been available since
.Ox 2.3 .
.Pp
.Fn ASN1_ENUMERATED_get ,
.Fn ASN1_ENUMERATED_set ,
.Fn BN_to_ASN1_ENUMERATED ,
Changes to jni/libressl/man/ASN1_OBJECT_new.3.
1
2
3
4
5
6
7
8
.\"	$OpenBSD: ASN1_OBJECT_new.3,v 1.10 2018/03/27 17:35:50 schwarze Exp $
.\"	OpenSSL 99d63d4 Mar 19 12:28:58 2016 -0400
.\"
.\" This file is a derived work.
.\" The changes are covered by the following Copyright and license:
.\"
.\" Copyright (c) 2017 Ingo Schwarze <schwarze@openbsd.org>
.\"
|







1
2
3
4
5
6
7
8
.\"	$OpenBSD: ASN1_OBJECT_new.3,v 1.11 2019/06/06 01:06:58 schwarze Exp $
.\"	OpenSSL 99d63d4 Mar 19 12:28:58 2016 -0400
.\"
.\" This file is a derived work.
.\" The changes are covered by the following Copyright and license:
.\"
.\" Copyright (c) 2017 Ingo Schwarze <schwarze@openbsd.org>
.\"
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: March 27 2018 $
.Dt ASN1_OBJECT_NEW 3
.Os
.Sh NAME
.Nm ASN1_OBJECT_new ,
.Nm ASN1_OBJECT_free
.Nd ASN.1 object identifiers
.Sh SYNOPSIS







|







61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: June 6 2019 $
.Dt ASN1_OBJECT_NEW 3
.Os
.Sh NAME
.Nm ASN1_OBJECT_new ,
.Nm ASN1_OBJECT_free
.Nd ASN.1 object identifiers
.Sh SYNOPSIS
127
128
129
130
131
132
133

134
135
136
137
138
139
140
141
.Fn ASN1_OBJECT_new
returns
.Dv NULL
and sets an error code that can be obtained by
.Xr ERR_get_error 3 .
Otherwise it returns a pointer to the new object.
.Sh SEE ALSO

.Xr d2i_ASN1_OBJECT 3 ,
.Xr OBJ_nid2obj 3
.Sh HISTORY
.Fn ASN1_OBJECT_new
and
.Fn ASN1_OBJECT_free
first appeared in SSLeay 0.5.1 and have been available since
.Ox 2.4 .







>








127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
.Fn ASN1_OBJECT_new
returns
.Dv NULL
and sets an error code that can be obtained by
.Xr ERR_get_error 3 .
Otherwise it returns a pointer to the new object.
.Sh SEE ALSO
.Xr ASN1_TYPE_get 3 ,
.Xr d2i_ASN1_OBJECT 3 ,
.Xr OBJ_nid2obj 3
.Sh HISTORY
.Fn ASN1_OBJECT_new
and
.Fn ASN1_OBJECT_free
first appeared in SSLeay 0.5.1 and have been available since
.Ox 2.4 .
Changes to jni/libressl/man/ASN1_STRING_TABLE_add.3.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
.\"	$OpenBSD: ASN1_STRING_TABLE_add.3,v 1.3 2018/03/22 16:06:33 schwarze Exp $
.\"	OpenSSL ASN1_STRING_TABLE_add.pod 7b608d08 Jul 27 01:18:50 2017 +0800
.\"
.\" Copyright (c) 2017 Ingo Schwarze <schwarze@openbsd.org>
.\"
.\" Permission to use, copy, modify, and distribute this software for any
.\" purpose with or without fee is hereby granted, provided that the above
.\" copyright notice and this permission notice appear in all copies.
.\"
.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
.Dd $Mdocdate: March 22 2018 $
.Dt ASN1_STRING_TABLE_ADD 3
.Os
.Sh NAME
.Nm ASN1_STRING_TABLE_add ,
.Nm ASN1_STRING_TABLE_get ,
.Nm ASN1_STRING_TABLE_cleanup
.Nd maintain the global ASN.1 string table
|
















|







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
.\"	$OpenBSD: ASN1_STRING_TABLE_add.3,v 1.4 2019/06/14 13:59:32 schwarze Exp $
.\"	OpenSSL ASN1_STRING_TABLE_add.pod 7b608d08 Jul 27 01:18:50 2017 +0800
.\"
.\" Copyright (c) 2017 Ingo Schwarze <schwarze@openbsd.org>
.\"
.\" Permission to use, copy, modify, and distribute this software for any
.\" purpose with or without fee is hereby granted, provided that the above
.\" copyright notice and this permission notice appear in all copies.
.\"
.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
.Dd $Mdocdate: June 14 2019 $
.Dt ASN1_STRING_TABLE_ADD 3
.Os
.Sh NAME
.Nm ASN1_STRING_TABLE_add ,
.Nm ASN1_STRING_TABLE_get ,
.Nm ASN1_STRING_TABLE_cleanup
.Nd maintain the global ASN.1 string table
71
72
73
74
75
76
77

78

79

80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
retrieves the entry for
.Fa nid .
.Pp
The function
.Fn ASN1_STRING_TABLE_cleanup
removes and frees all entries except the predefined ones.
.Sh RETURN VALUES

.Fn ASN1_STRING_TABLE_add

returns 1 on success or 0 if an error occurred.

.Pp
.Fn ASN1_STRING_TABLE_get
returns a valid
.Vt ASN1_STRING_TABLE
structure or
.Dv NULL
if nothing is found.
.Sh SEE ALSO
.Xr ASN1_OBJECT_new 3 ,
.Xr ERR_get_error 3 ,
.Xr OBJ_nid2obj 3
.Sh HISTORY
.Fn ASN1_STRING_TABLE_add ,
.Fn ASN1_STRING_TABLE_get ,
and
.Fn ASN1_STRING_TABLE_cleanup
first appeared in OpenSSL 0.9.5 and have been available since
.Ox 2.7 .
.Sh BUGS
Most aspects of the semantics considerably differ from OpenSSL.







>

>
|
>









<










71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91

92
93
94
95
96
97
98
99
100
101
retrieves the entry for
.Fa nid .
.Pp
The function
.Fn ASN1_STRING_TABLE_cleanup
removes and frees all entries except the predefined ones.
.Sh RETURN VALUES
The
.Fn ASN1_STRING_TABLE_add
function returns 1 if successful; otherwise 0 is returned
and an error code can be retrieved with
.Xr ERR_get_error 3 .
.Pp
.Fn ASN1_STRING_TABLE_get
returns a valid
.Vt ASN1_STRING_TABLE
structure or
.Dv NULL
if nothing is found.
.Sh SEE ALSO
.Xr ASN1_OBJECT_new 3 ,

.Xr OBJ_nid2obj 3
.Sh HISTORY
.Fn ASN1_STRING_TABLE_add ,
.Fn ASN1_STRING_TABLE_get ,
and
.Fn ASN1_STRING_TABLE_cleanup
first appeared in OpenSSL 0.9.5 and have been available since
.Ox 2.7 .
.Sh BUGS
Most aspects of the semantics considerably differ from OpenSSL.
Changes to jni/libressl/man/ASN1_STRING_length.3.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
.\" $OpenBSD: ASN1_STRING_length.3,v 1.17 2018/05/19 22:55:17 schwarze Exp $
.\" full merge up to: OpenSSL 4a56d2a3 Feb 25 16:49:27 2018 +0300
.\"
.\" This file is a derived work.
.\" The changes are covered by the following Copyright and license:
.\"
.\" Copyright (c) 2018 Ingo Schwarze <schwarze@openbsd.org>
.\"
.\" Permission to use, copy, modify, and distribute this software for any
.\" purpose with or without fee is hereby granted, provided that the above
.\" copyright notice and this permission notice appear in all copies.
.\"
.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|





|







1
2
3
4
5
6
7
8
9
10
11
12
13
14
.\" $OpenBSD: ASN1_STRING_length.3,v 1.20 2019/08/26 07:59:02 schwarze Exp $
.\" full merge up to: OpenSSL 4a56d2a3 Feb 25 16:49:27 2018 +0300
.\"
.\" This file is a derived work.
.\" The changes are covered by the following Copyright and license:
.\"
.\" Copyright (c) 2018, 2019 Ingo Schwarze <schwarze@openbsd.org>
.\"
.\" Permission to use, copy, modify, and distribute this software for any
.\" purpose with or without fee is hereby granted, provided that the above
.\" copyright notice and this permission notice appear in all copies.
.\"
.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
62
63
64
65
66
67
68
69
70
71
72
73

74
75

76
77
78
79

80
81
82
83
84
85
86
87
88
89





90
91
92
93
94
95
96
97




98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116






117
118
119
120
121
122
123
124
125
126
127
128
129
130
131


132
133
134
135
136
137
138
139
140
141
142
143
144
145
146


147
148
149
150
151
152
153
154
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: May 19 2018 $
.Dt ASN1_STRING_LENGTH 3
.Os
.Sh NAME
.Nm ASN1_STRING_cmp ,

.Nm ASN1_STRING_data ,
.Nm ASN1_STRING_dup ,

.Nm ASN1_STRING_get0_data ,
.Nm ASN1_STRING_length ,
.Nm ASN1_STRING_length_set ,
.Nm ASN1_STRING_set ,

.Nm ASN1_STRING_to_UTF8 ,
.Nm ASN1_STRING_type
.Nd ASN1_STRING utility functions
.Sh SYNOPSIS
.In openssl/asn1.h
.Ft int
.Fo ASN1_STRING_cmp
.Fa "const ASN1_STRING *a"
.Fa "const ASN1_STRING *b"
.Fc





.Ft unsigned char *
.Fo ASN1_STRING_data
.Fa "ASN1_STRING *x"
.Fc
.Ft ASN1_STRING *
.Fo ASN1_STRING_dup
.Fa "const ASN1_STRING *a"
.Fc




.Ft const unsigned char *
.Fo ASN1_STRING_get0_data
.Fa "const ASN1_STRING *x"
.Fc
.Ft int
.Fo ASN1_STRING_length
.Fa "const ASN1_STRING *x"
.Fc
.Ft void
.Fo ASN1_STRING_length_set
.Fa "ASN1_STRING *x"
.Fa "int len"
.Fc
.Ft int
.Fo ASN1_STRING_set
.Fa "ASN1_STRING *str"
.Fa "const void *data"
.Fa "int len"
.Fc






.Ft int
.Fo ASN1_STRING_to_UTF8
.Fa "unsigned char **out"
.Fa "const ASN1_STRING *in"
.Fc
.Ft int
.Fo ASN1_STRING_type
.Fa "const ASN1_STRING *x"
.Fc
.Sh DESCRIPTION
These functions manipulate
.Vt ASN1_STRING
structures.
.Pp
.Fn ASN1_STRING_cmp


compares the type, the length, and the content of
.Fa a
and
.Fa b .
.Pp
.Fn ASN1_STRING_data
is similar to
.Fn ASN1_STRING_get0_data
except that the returned value is not constant.
This function is deprecated.
Applications should use
.Fn ASN1_STRING_get0_data
instead.
.Pp
.Fn ASN1_STRING_dup


copies
.Fa a .
.Pp
.Fn ASN1_STRING_get0_data
returns an internal pointer to the data of
.Fa x .
It should not be freed or modified in any way.
.Pp







|




>


>




>










>
>
>
>
>








>
>
>
>



















>
>
>
>
>
>















>
>
|














>
>
|







62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: August 26 2019 $
.Dt ASN1_STRING_LENGTH 3
.Os
.Sh NAME
.Nm ASN1_STRING_cmp ,
.Nm ASN1_OCTET_STRING_cmp ,
.Nm ASN1_STRING_data ,
.Nm ASN1_STRING_dup ,
.Nm ASN1_OCTET_STRING_dup ,
.Nm ASN1_STRING_get0_data ,
.Nm ASN1_STRING_length ,
.Nm ASN1_STRING_length_set ,
.Nm ASN1_STRING_set ,
.Nm ASN1_OCTET_STRING_set ,
.Nm ASN1_STRING_to_UTF8 ,
.Nm ASN1_STRING_type
.Nd ASN1_STRING utility functions
.Sh SYNOPSIS
.In openssl/asn1.h
.Ft int
.Fo ASN1_STRING_cmp
.Fa "const ASN1_STRING *a"
.Fa "const ASN1_STRING *b"
.Fc
.Ft int
.Fo ASN1_OCTET_STRING_cmp
.Fa "const ASN1_OCTET_STRING *a"
.Fa "const ASN1_OCTET_STRING *b"
.Fc
.Ft unsigned char *
.Fo ASN1_STRING_data
.Fa "ASN1_STRING *x"
.Fc
.Ft ASN1_STRING *
.Fo ASN1_STRING_dup
.Fa "const ASN1_STRING *a"
.Fc
.Ft ASN1_OCTET_STRING *
.Fo ASN1_OCTET_STRING_dup
.Fa "const ASN1_OCTET_STRING *a"
.Fc
.Ft const unsigned char *
.Fo ASN1_STRING_get0_data
.Fa "const ASN1_STRING *x"
.Fc
.Ft int
.Fo ASN1_STRING_length
.Fa "const ASN1_STRING *x"
.Fc
.Ft void
.Fo ASN1_STRING_length_set
.Fa "ASN1_STRING *x"
.Fa "int len"
.Fc
.Ft int
.Fo ASN1_STRING_set
.Fa "ASN1_STRING *str"
.Fa "const void *data"
.Fa "int len"
.Fc
.Ft int
.Fo ASN1_OCTET_STRING_set
.Fa "ASN1_OCTET_STRING *str"
.Fa "const unsigned char *data"
.Fa "int len"
.Fc
.Ft int
.Fo ASN1_STRING_to_UTF8
.Fa "unsigned char **out"
.Fa "const ASN1_STRING *in"
.Fc
.Ft int
.Fo ASN1_STRING_type
.Fa "const ASN1_STRING *x"
.Fc
.Sh DESCRIPTION
These functions manipulate
.Vt ASN1_STRING
structures.
.Pp
.Fn ASN1_STRING_cmp
and
.Fn ASN1_OCTET_STRING_cmp
compare the type, the length, and the content of
.Fa a
and
.Fa b .
.Pp
.Fn ASN1_STRING_data
is similar to
.Fn ASN1_STRING_get0_data
except that the returned value is not constant.
This function is deprecated.
Applications should use
.Fn ASN1_STRING_get0_data
instead.
.Pp
.Fn ASN1_STRING_dup
and
.Fn ASN1_OCTET_STRING_dup
copy
.Fa a .
.Pp
.Fn ASN1_STRING_get0_data
returns an internal pointer to the data of
.Fa x .
It should not be freed or modified in any way.
.Pp
163
164
165
166
167
168
169


170
171
172
173
174
175
176
177
178
179
180
181
to
.Fa len .
It may put
.Fa x
into an inconsistent internal state.
.Pp
.Fn ASN1_STRING_set


sets the length attribute of
.Fa str
to
.Fa len
and copies that number of bytes from
.Fa data
into
.Fa str .
If
.Fa len
is -1, then
.Fn strlen data







>
>
|



|







185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
to
.Fa len .
It may put
.Fa x
into an inconsistent internal state.
.Pp
.Fn ASN1_STRING_set
and
.Fn ASN1_OCTET_STRING_set
set the length attribute of
.Fa str
to
.Fa len
and copy that number of bytes from
.Fa data
into
.Fa str .
If
.Fa len
is -1, then
.Fn strlen data
247
248
249
250
251
252
253


254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269


270
271
272
273
274
275
276
277
278
279


280
281
282
283
284
285
286
287
288
289








290
291
292
293
294

295
296
297

298

299
300
301
302
303
304
305
UTF-8 characters.
.Pp
Similar care should be taken to ensure the data is in the correct format
when calling
.Fn ASN1_STRING_set .
.Sh RETURN VALUES
.Fn ASN1_STRING_cmp


returns 0 if the type, the length, and the content of
.Fa a
and
.Fa b
agree, or a non-zero value otherwise.
In contrast to
.Xr strcmp 3 ,
the sign of the return value does not indicate lexicographical ordering.
.Pp
.Fn ASN1_STRING_data
and
.Fn ASN1_STRING_get0_data
return an internal pointer to the data of
.Fa x .
.Pp
.Fn ASN1_STRING_dup


returns a pointer to a newly allocated
.Vt ASN1_STRING
structure or
.Dv NULL
if an error occurred.
.Pp
.Fn ASN1_STRING_length
returns a number of bytes.
.Pp
.Fn ASN1_STRING_set


returns 1 on success or 0 on failure.
.Pp
.Fn ASN1_STRING_to_UTF8
returns the number of bytes in the output buffer
.Pf * Fa out ,
or a negative number if an error occurred.
.Pp
.Fn ASN1_STRING_type
returns an integer constant, for example
.Dv V_ASN1_OCTET_STRING .








.Sh SEE ALSO
.Xr ERR_get_error 3
.Sh HISTORY
.Fn ASN1_STRING_cmp ,
.Fn ASN1_STRING_dup ,

and
.Fn ASN1_STRING_set
first appeared in SSLeay 0.6.5.

.Fn ASN1_STRING_data

and
.Fn ASN1_STRING_type
first appeared in SSLeay 0.8.0.
.Fn ASN1_STRING_length
first appeared in SSLeay 0.9.0.
All these functions have been available since
.Ox 2.4 .







>
>
|















>
>
|









>
>
|









>
>
>
>
>
>
>
>

|



>

|

>
|
>







271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
UTF-8 characters.
.Pp
Similar care should be taken to ensure the data is in the correct format
when calling
.Fn ASN1_STRING_set .
.Sh RETURN VALUES
.Fn ASN1_STRING_cmp
and
.Fn ASN1_OCTET_STRING_cmp
return 0 if the type, the length, and the content of
.Fa a
and
.Fa b
agree, or a non-zero value otherwise.
In contrast to
.Xr strcmp 3 ,
the sign of the return value does not indicate lexicographical ordering.
.Pp
.Fn ASN1_STRING_data
and
.Fn ASN1_STRING_get0_data
return an internal pointer to the data of
.Fa x .
.Pp
.Fn ASN1_STRING_dup
and
.Fn ASN1_OCTET_STRING_dup
return a pointer to a newly allocated
.Vt ASN1_STRING
structure or
.Dv NULL
if an error occurred.
.Pp
.Fn ASN1_STRING_length
returns a number of bytes.
.Pp
.Fn ASN1_STRING_set
and
.Fn ASN1_OCTET_STRING_set
return 1 on success or 0 on failure.
.Pp
.Fn ASN1_STRING_to_UTF8
returns the number of bytes in the output buffer
.Pf * Fa out ,
or a negative number if an error occurred.
.Pp
.Fn ASN1_STRING_type
returns an integer constant, for example
.Dv V_ASN1_OCTET_STRING .
.Pp
In some cases of failure of
.Fn ASN1_STRING_dup ,
.Fn ASN1_STRING_set ,
and
.Fn ASN1_STRING_to_UTF8 ,
the reason can be determined with
.Xr ERR_get_error 3 .
.Sh SEE ALSO
.Xr ASN1_STRING_new 3
.Sh HISTORY
.Fn ASN1_STRING_cmp ,
.Fn ASN1_STRING_dup ,
.Fn ASN1_STRING_set ,
and
.Fn ASN1_OCTET_STRING_set
first appeared in SSLeay 0.6.5.
.Fn ASN1_OCTET_STRING_cmp ,
.Fn ASN1_STRING_data ,
.Fn ASN1_OCTET_STRING_dup ,
and
.Fn ASN1_STRING_type
first appeared in SSLeay 0.8.0.
.Fn ASN1_STRING_length
first appeared in SSLeay 0.9.0.
All these functions have been available since
.Ox 2.4 .
Changes to jni/libressl/man/ASN1_STRING_new.3.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
.\"	$OpenBSD: ASN1_STRING_new.3,v 1.15 2018/03/27 17:35:50 schwarze Exp $
.\"	OpenSSL 99d63d46 Tue Mar 24 07:52:24 2015 -0400
.\"
.\" Copyright (c) 2017 Ingo Schwarze <schwarze@openbsd.org>
.\"
.\" Permission to use, copy, modify, and distribute this software for any
.\" purpose with or without fee is hereby granted, provided that the above
.\" copyright notice and this permission notice appear in all copies.
.\"
.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
.Dd $Mdocdate: March 27 2018 $
.Dt ASN1_STRING_NEW 3
.Os
.Sh NAME
.Nm ASN1_STRING_new ,
.Nm ASN1_STRING_type_new ,
.Nm ASN1_STRING_free ,
.Nm ASN1_OCTET_STRING_new ,
|
















|







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
.\"	$OpenBSD: ASN1_STRING_new.3,v 1.17 2019/06/14 13:59:32 schwarze Exp $
.\"	OpenSSL 99d63d46 Tue Mar 24 07:52:24 2015 -0400
.\"
.\" Copyright (c) 2017 Ingo Schwarze <schwarze@openbsd.org>
.\"
.\" Permission to use, copy, modify, and distribute this software for any
.\" purpose with or without fee is hereby granted, provided that the above
.\" copyright notice and this permission notice appear in all copies.
.\"
.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
.Dd $Mdocdate: June 14 2019 $
.Dt ASN1_STRING_NEW 3
.Os
.Sh NAME
.Nm ASN1_STRING_new ,
.Nm ASN1_STRING_type_new ,
.Nm ASN1_STRING_free ,
.Nm ASN1_OCTET_STRING_new ,
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202

203
204



205
206


207


208

209
210
211
212
213
214
215
.It Ta
.It Fn ASN1_GENERALIZEDTIME_new Ta Dv V_ASN1_GENERALIZEDTIME Ta GeneralizedTime
.It Fn ASN1_UTCTIME_new         Ta Dv V_ASN1_UTCTIME         Ta UTCTime
.It Fn ASN1_TIME_new            Ta Dv V_ASN1_UNDEF           Ta TIME
.El
.Pp
All the
.Fa *_free
functions free
.Fa a
including any data contained in it.
If
.Fa a
is a
.Dv NULL
pointer, no action occurs.
.Sh RETURN VALUES
All the
.Fa *_new
functions return the new
.Vt ASN1_STRING
object or
.Dv NULL

if an error occurs.
.Sh SEE ALSO



.Xr ASN1_time_parse 3 ,
.Xr ASN1_TIME_set 3 ,


.Xr d2i_ASN1_OCTET_STRING 3 ,


.Xr ERR_get_error 3

.Sh HISTORY
.Fn ASN1_OCTET_STRING_new ,
.Fn ASN1_OCTET_STRING_free ,
.Fn ASN1_BIT_STRING_new ,
.Fn ASN1_BIT_STRING_free ,
.Fn ASN1_INTEGER_new ,
.Fn ASN1_INTEGER_free ,







|










|


|

>
|

>
>
>


>
>

>
>
|
>







180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
.It Ta
.It Fn ASN1_GENERALIZEDTIME_new Ta Dv V_ASN1_GENERALIZEDTIME Ta GeneralizedTime
.It Fn ASN1_UTCTIME_new         Ta Dv V_ASN1_UTCTIME         Ta UTCTime
.It Fn ASN1_TIME_new            Ta Dv V_ASN1_UNDEF           Ta TIME
.El
.Pp
All the
.Fn *_free
functions free
.Fa a
including any data contained in it.
If
.Fa a
is a
.Dv NULL
pointer, no action occurs.
.Sh RETURN VALUES
All the
.Fn *_new
functions return the new
.Vt ASN1_STRING
object if successful; otherwise
.Dv NULL
is returned and an error code can be retrieved with
.Xr ERR_get_error 3 .
.Sh SEE ALSO
.Xr ASN1_INTEGER_get 3 ,
.Xr ASN1_STRING_length 3 ,
.Xr ASN1_STRING_print_ex 3 ,
.Xr ASN1_time_parse 3 ,
.Xr ASN1_TIME_set 3 ,
.Xr ASN1_TYPE_get 3 ,
.Xr d2i_ASN1_OBJECT 3 ,
.Xr d2i_ASN1_OCTET_STRING 3 ,
.Xr X509_cmp_time 3 ,
.Xr X509_EXTENSION_get_object 3 ,
.Xr X509_get_ext_by_OBJ 3 ,
.Xr X509_NAME_ENTRY_get_object 3
.Sh HISTORY
.Fn ASN1_OCTET_STRING_new ,
.Fn ASN1_OCTET_STRING_free ,
.Fn ASN1_BIT_STRING_new ,
.Fn ASN1_BIT_STRING_free ,
.Fn ASN1_INTEGER_new ,
.Fn ASN1_INTEGER_free ,
Changes to jni/libressl/man/ASN1_STRING_print_ex.3.
1
2
3
4
5
6
7
8
.\" $OpenBSD: ASN1_STRING_print_ex.3,v 1.14 2018/04/25 15:17:52 schwarze Exp $
.\" full merge up to: OpenSSL bb9ad09e Jun 6 00:43:05 2016 -0400
.\" selective merge up to: OpenSSL 61f805c1 Jan 16 01:01:46 2018 +0800
.\"
.\" This file was written by Dr. Stephen Henson.
.\" Copyright (c) 2002, 2004, 2007, 2013, 2016, 2017 The OpenSSL Project.
.\" All rights reserved.
.\"
|







1
2
3
4
5
6
7
8
.\" $OpenBSD: ASN1_STRING_print_ex.3,v 1.15 2019/06/06 01:06:58 schwarze Exp $
.\" full merge up to: OpenSSL bb9ad09e Jun 6 00:43:05 2016 -0400
.\" selective merge up to: OpenSSL 61f805c1 Jan 16 01:01:46 2018 +0800
.\"
.\" This file was written by Dr. Stephen Henson.
.\" Copyright (c) 2002, 2004, 2007, 2013, 2016, 2017 The OpenSSL Project.
.\" All rights reserved.
.\"
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: April 25 2018 $
.Dt ASN1_STRING_PRINT_EX 3
.Os
.Sh NAME
.Nm ASN1_STRING_print_ex ,
.Nm ASN1_STRING_print_ex_fp ,
.Nm ASN1_STRING_print ,
.Nm ASN1_tag2str







|







46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: June 6 2019 $
.Dt ASN1_STRING_PRINT_EX 3
.Os
.Sh NAME
.Nm ASN1_STRING_print_ex ,
.Nm ASN1_STRING_print_ex_fp ,
.Nm ASN1_STRING_print ,
.Nm ASN1_tag2str
216
217
218
219
220
221
222

223
224
225
226
227
228
229
.Pp
.Fn ASN1_STRING_print
returns 1 on success or 0 on error.
.Pp
.Fn ASN1_tag2str
returns a static string.
.Sh SEE ALSO

.Xr X509_NAME_print_ex 3
.Sh HISTORY
.Fn ASN1_STRING_print
first appeared in SSLeay 0.6.5 and has been available since
.Ox 2.4 .
.Pp
.Fn ASN1_tag2str







>







216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
.Pp
.Fn ASN1_STRING_print
returns 1 on success or 0 on error.
.Pp
.Fn ASN1_tag2str
returns a static string.
.Sh SEE ALSO
.Xr ASN1_STRING_new 3 ,
.Xr X509_NAME_print_ex 3
.Sh HISTORY
.Fn ASN1_STRING_print
first appeared in SSLeay 0.6.5 and has been available since
.Ox 2.4 .
.Pp
.Fn ASN1_tag2str
Changes to jni/libressl/man/ASN1_TIME_set.3.
1
2
3
4
5
6
7
8
.\" $OpenBSD: ASN1_TIME_set.3,v 1.13 2018/04/25 15:17:52 schwarze Exp $
.\" full merge up to: OpenSSL e9b77246 Jan 20 19:58:49 2017 +0100
.\" selective merge up to: OpenSSL b0edda11 Mar 20 13:00:17 2018 +0000
.\"
.\" This file was written by Dr. Stephen Henson <steve@openssl.org>
.\" and Todd Short <tshort@akamai.com>.
.\" Copyright (c) 2015, 2017 The OpenSSL Project.  All rights reserved.
.\"
|







1
2
3
4
5
6
7
8
.\" $OpenBSD: ASN1_TIME_set.3,v 1.15 2019/06/06 01:06:58 schwarze Exp $
.\" full merge up to: OpenSSL e9b77246 Jan 20 19:58:49 2017 +0100
.\" selective merge up to: OpenSSL b0edda11 Mar 20 13:00:17 2018 +0000
.\"
.\" This file was written by Dr. Stephen Henson <steve@openssl.org>
.\" and Todd Short <tshort@akamai.com>.
.\" Copyright (c) 2015, 2017 The OpenSSL Project.  All rights reserved.
.\"
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: April 25 2018 $
.Dt ASN1_TIME_SET 3
.Os
.Sh NAME
.Nm ASN1_TIME_set ,
.Nm ASN1_UTCTIME_set ,
.Nm ASN1_GENERALIZEDTIME_set ,
.Nm ASN1_TIME_adj ,







|







46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: June 6 2019 $
.Dt ASN1_TIME_SET 3
.Os
.Sh NAME
.Nm ASN1_TIME_set ,
.Nm ASN1_UTCTIME_set ,
.Nm ASN1_GENERALIZEDTIME_set ,
.Nm ASN1_TIME_adj ,
69
70
71
72
73
74
75

76
77
78
79
80
81
82
.Nm ASN1_TIME_print ,
.Nm ASN1_UTCTIME_print ,
.Nm ASN1_GENERALIZEDTIME_print ,
.Nm ASN1_UTCTIME_cmp_time_t ,
.Nm ASN1_TIME_to_generalizedtime
.Nd ASN.1 Time functions
.Sh SYNOPSIS

.Ft ASN1_TIME *
.Fo ASN1_TIME_set
.Fa "ASN1_TIME *s"
.Fa "time_t t"
.Fc
.Ft ASN1_UTCTIME *
.Fo ASN1_UTCTIME_set







>







69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
.Nm ASN1_TIME_print ,
.Nm ASN1_UTCTIME_print ,
.Nm ASN1_GENERALIZEDTIME_print ,
.Nm ASN1_UTCTIME_cmp_time_t ,
.Nm ASN1_TIME_to_generalizedtime
.Nd ASN.1 Time functions
.Sh SYNOPSIS
.In openssl/asn1.h
.Ft ASN1_TIME *
.Fo ASN1_TIME_set
.Fa "ASN1_TIME *s"
.Fa "time_t t"
.Fc
.Ft ASN1_UTCTIME *
.Fo ASN1_UTCTIME_set
391
392
393
394
395
396
397




398
399
400
401
402
403
404
t = time(NULL);
tm = ASN1_TIME_adj(NULL, t, 0, 60 * 60);
b = BIO_new_fp(stdout, BIO_NOCLOSE);
ASN1_TIME_print(b, tm);
ASN1_STRING_free(tm);
BIO_free(b);
.Ed




.Sh HISTORY
.Fn ASN1_UTCTIME_check
and
.Fn ASN1_UTCTIME_print
first appeared in SSLeay 0.5.1.
.Fn ASN1_UTCTIME_set
first appeared in SSLeay 0.6.0.







>
>
>
>







392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
t = time(NULL);
tm = ASN1_TIME_adj(NULL, t, 0, 60 * 60);
b = BIO_new_fp(stdout, BIO_NOCLOSE);
ASN1_TIME_print(b, tm);
ASN1_STRING_free(tm);
BIO_free(b);
.Ed
.Sh SEE ALSO
.Xr ASN1_TIME_new 3 ,
.Xr ASN1_time_parse 3 ,
.Xr X509_cmp_time 3
.Sh HISTORY
.Fn ASN1_UTCTIME_check
and
.Fn ASN1_UTCTIME_print
first appeared in SSLeay 0.5.1.
.Fn ASN1_UTCTIME_set
first appeared in SSLeay 0.6.0.
Changes to jni/libressl/man/ASN1_TYPE_get.3.
1
2
3
4
5
6
7
8
.\"	$OpenBSD: ASN1_TYPE_get.3,v 1.8 2018/04/25 15:17:52 schwarze Exp $
.\"	OpenSSL 99d63d46 Mon Jun 6 00:43:05 2016 -0400
.\"
.\" This file is a derived work.
.\" The changes are covered by the following Copyright and license:
.\"
.\" Copyright (c) 2017 Ingo Schwarze <schwarze@openbsd.org>
.\"
|







1
2
3
4
5
6
7
8
.\"	$OpenBSD: ASN1_TYPE_get.3,v 1.11 2019/08/26 11:41:31 schwarze Exp $
.\"	OpenSSL 99d63d46 Mon Jun 6 00:43:05 2016 -0400
.\"
.\" This file is a derived work.
.\" The changes are covered by the following Copyright and license:
.\"
.\" Copyright (c) 2017 Ingo Schwarze <schwarze@openbsd.org>
.\"
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: April 25 2018 $
.Dt ASN1_TYPE_GET 3
.Os
.Sh NAME
.Nm ASN1_TYPE_new ,
.Nm ASN1_TYPE_free ,
.Nm ASN1_TYPE_get ,
.Nm ASN1_TYPE_set ,







|







61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: August 26 2019 $
.Dt ASN1_TYPE_GET 3
.Os
.Sh NAME
.Nm ASN1_TYPE_new ,
.Nm ASN1_TYPE_free ,
.Nm ASN1_TYPE_get ,
.Nm ASN1_TYPE_set ,
270
271
272
273
274
275
276

277


278




279
280
281
282
283
284
285
.Pp
.Fn ASN1_TYPE_set1
returns 1 if the copying succeeds or 0 if it fails.
.Pp
.Fn ASN1_TYPE_cmp
returns 0 for a match or non-zero for a mismatch.
.Sh SEE ALSO

.Xr ASN1_item_free 3 ,


.Xr ASN1_STRING_dup 3 ,




.Xr d2i_ASN1_TYPE 3 ,
.Xr OBJ_dup 3
.Sh HISTORY
.Fn ASN1_TYPE_new
and
.Fn ASN1_TYPE_free
first appeared in SSLeay 0.5.1.







>

>
>

>
>
>
>







270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
.Pp
.Fn ASN1_TYPE_set1
returns 1 if the copying succeeds or 0 if it fails.
.Pp
.Fn ASN1_TYPE_cmp
returns 0 for a match or non-zero for a mismatch.
.Sh SEE ALSO
.Xr ASN1_generate_nconf 3 ,
.Xr ASN1_item_free 3 ,
.Xr ASN1_OBJECT_new 3 ,
.Xr ASN1_put_object 3 ,
.Xr ASN1_STRING_dup 3 ,
.Xr ASN1_STRING_new 3 ,
.Xr crypto 3 ,
.Xr d2i_ASN1_NULL 3 ,
.Xr d2i_ASN1_SEQUENCE_ANY 3 ,
.Xr d2i_ASN1_TYPE 3 ,
.Xr OBJ_dup 3
.Sh HISTORY
.Fn ASN1_TYPE_new
and
.Fn ASN1_TYPE_free
first appeared in SSLeay 0.5.1.
Changes to jni/libressl/man/ASN1_generate_nconf.3.
1
2
3
4
5
6
7
8
.\"	$OpenBSD: ASN1_generate_nconf.3,v 1.11 2018/04/25 15:17:52 schwarze Exp $
.\"	OpenSSL 05ea606a Fri May 20 20:52:46 2016 -0400
.\"
.\" This file was written by Dr. Stephen Henson.
.\" Copyright (c) 2002, 2003, 2006-2009, 2013-2015 The OpenSSL Project.
.\" All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
|







1
2
3
4
5
6
7
8
.\"	$OpenBSD: ASN1_generate_nconf.3,v 1.13 2019/06/10 14:58:48 schwarze Exp $
.\"	OpenSSL 05ea606a Fri May 20 20:52:46 2016 -0400
.\"
.\" This file was written by Dr. Stephen Henson.
.\" Copyright (c) 2002, 2003, 2006-2009, 2013-2015 The OpenSSL Project.
.\" All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: April 25 2018 $
.Dt ASN1_GENERATE_NCONF 3
.Os
.Sh NAME
.Nm ASN1_generate_nconf ,
.Nm ASN1_generate_v3
.Nd ASN.1 generation functions
.Sh SYNOPSIS







|







45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: June 10 2019 $
.Dt ASN1_GENERATE_NCONF 3
.Os
.Sh NAME
.Nm ASN1_generate_nconf ,
.Nm ASN1_generate_v3
.Nd ASN.1 generation functions
.Sh SYNOPSIS
379
380
381
382
383
384
385
386

387
388
389
390
391
392
393
[rsapubkey]
n=INTEGER:0xBB6FE79432CC6EA2D8F970675A5A87BFBE1AFF0BE63E879F2AFFB93644\e
D4D2C6D000430DEC66ABF47829E74B8C5108623A1C0EE8BE217B3AD8D36D5EB4FCA1D9

e=INTEGER:0x010001
.Ed
.Sh SEE ALSO
.Xr ERR_get_error 3 ,

.Xr x509v3.cnf 5
.Sh HISTORY
.Fn ASN1_generate_nconf
and
.Fn ASN1_generate_v3
first appeared in OpenSSL 0.9.8 and have been available since
.Ox 4.5 .







|
>







379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
[rsapubkey]
n=INTEGER:0xBB6FE79432CC6EA2D8F970675A5A87BFBE1AFF0BE63E879F2AFFB93644\e
D4D2C6D000430DEC66ABF47829E74B8C5108623A1C0EE8BE217B3AD8D36D5EB4FCA1D9

e=INTEGER:0x010001
.Ed
.Sh SEE ALSO
.Xr ASN1_TYPE_get 3 ,
.Xr d2i_ASN1_TYPE 3 ,
.Xr x509v3.cnf 5
.Sh HISTORY
.Fn ASN1_generate_nconf
and
.Fn ASN1_generate_v3
first appeared in OpenSSL 0.9.8 and have been available since
.Ox 4.5 .
Changes to jni/libressl/man/ASN1_item_new.3.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
.\"     $OpenBSD: ASN1_item_new.3,v 1.4 2018/03/22 21:08:22 schwarze Exp $
.\"
.\" Copyright (c) 2016, 2018 Ingo Schwarze <schwarze@openbsd.org>
.\"
.\" Permission to use, copy, modify, and distribute this software for any
.\" purpose with or without fee is hereby granted, provided that the above
.\" copyright notice and this permission notice appear in all copies.
.\"
.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
.Dd $Mdocdate: March 22 2018 $
.Dt ASN1_ITEM_NEW 3
.Os
.Sh NAME
.Nm ASN1_item_new ,
.Nm ASN1_item_free
.Nd generic ASN.1 value constructor and destructor
.Sh SYNOPSIS
|















|







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
.\"     $OpenBSD: ASN1_item_new.3,v 1.5 2019/06/14 13:59:32 schwarze Exp $
.\"
.\" Copyright (c) 2016, 2018 Ingo Schwarze <schwarze@openbsd.org>
.\"
.\" Permission to use, copy, modify, and distribute this software for any
.\" purpose with or without fee is hereby granted, provided that the above
.\" copyright notice and this permission notice appear in all copies.
.\"
.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
.Dd $Mdocdate: June 14 2019 $
.Dt ASN1_ITEM_NEW 3
.Os
.Sh NAME
.Nm ASN1_item_new ,
.Nm ASN1_item_free
.Nd generic ASN.1 value constructor and destructor
.Sh SYNOPSIS
92
93
94
95
96
97
98

99
100
101
102
103

104
105
106
107
108
109
110
111
.Dv LONG_it ,
.Fn ASN1_item_new
does not return a pointer at all, but a
.Vt long
value cast to
.Vt ASN1_VALUE * .
.Sh RETURN VALUES

.Fn ASN1_item_new
returns the new
.Vt ASN1_VALUE
object or
.Dv NULL

if an error occurs.
.Sh SEE ALSO
.Xr ASN1_item_d2i 3 ,
.Xr ASN1_TYPE_new 3 ,
.Xr d2i_ASN1_NULL 3 ,
.Xr OBJ_nid2obj 3
.Sh HISTORY
.Fn ASN1_item_new







>

|

|

>
|







92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
.Dv LONG_it ,
.Fn ASN1_item_new
does not return a pointer at all, but a
.Vt long
value cast to
.Vt ASN1_VALUE * .
.Sh RETURN VALUES
The
.Fn ASN1_item_new
function returns the new
.Vt ASN1_VALUE
object if successful; otherwise
.Dv NULL
is returned and an error code can be retrieved with
.Xr ERR_get_error 3 .
.Sh SEE ALSO
.Xr ASN1_item_d2i 3 ,
.Xr ASN1_TYPE_new 3 ,
.Xr d2i_ASN1_NULL 3 ,
.Xr OBJ_nid2obj 3
.Sh HISTORY
.Fn ASN1_item_new
Added jni/libressl/man/ASN1_put_object.3.










































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
.\" $OpenBSD: ASN1_put_object.3,v 1.1 2019/08/26 11:41:31 schwarze Exp $
.\"
.\" Copyright (c) 2019 Ingo Schwarze <schwarze@openbsd.org>
.\"
.\" Permission to use, copy, modify, and distribute this software for any
.\" purpose with or without fee is hereby granted, provided that the above
.\" copyright notice and this permission notice appear in all copies.
.\"
.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
.Dd $Mdocdate: August 26 2019 $
.Dt ASN1_PUT_OBJECT 3
.Os
.Sh NAME
.Nm ASN1_put_object ,
.Nm ASN1_put_eoc
.Nd start and end the BER encoding of an arbitrary ASN.1 data element
.Sh SYNOPSIS
.In openssl/asn1.h
.Ft void
.Fo ASN1_put_object
.Fa "unsigned char **ber_out"
.Fa "int constructed"
.Fa "int length"
.Fa "int tag"
.Fa "int class"
.Fc
.Ft int
.Fo ASN1_put_eoc
.Fa "unsigned char **ber_out"
.Fc
.Sh DESCRIPTION
.Fn ASN1_put_object
begins writing the BER encoding of an arbitrary ASN.1 data element
to the buffer
.Pf * ber_out
by writing the identifier and the length bytes.
Making sure that there is sufficient space in the buffer
is the responsibility of the caller.
This function does not write any content bytes
nor any end-of-content bytes.
.Pp
The tag
.Fa class
can be
.Dv V_ASN1_UNIVERSAL ,
.Dv V_ASN1_APPLICATION ,
.Dv V_ASN1_CONTEXT_SPECIFIC ,
or
.Dv V_ASN1_PRIVATE
and is written to the two most significant bits of the first byte written.
.Pp
The
.Fa constructed
argument can have the following values:
.Bl -tag -width 1n -offset 2n -compact
.It 0
Start a primitive value by setting the third most significant bit
of the first byte written to 0.
Always use the definite form.
.It 1
Start a constructed value by setting the third most significant bit
of the first byte written to 1, and use the definite form.
.It 2
Start a constructed value and use the indefinite form,
.El
.Pp
If the
.Fa tag
is less than 0x1f, it is written to the five least significant bits
of the only identifier byte written.
Otherwise, these five bits are all set to 1, and the
.Fa tag
is encoded in one or more following identifier bytes as needed.
.Pp
After completing the identifier byte(s),
when using the definite form, the given
.Fa length
is encoded in one or more bytes as needed.
Otherwise, the special byte 0x80 is written instead and the
.Ar length
argument is ignored.
.Pp
At the end,
.Pf * Fa ber_out
is set to the byte following the last byte written.
The calling code can then start writing content bytes.
.Pp
If the indefinite form was selected,
the calling code is also responsible for calling
.Fn ASN1_put_eoc
which writes an end-of-content marker to
.Pf * Fa ber_out ,
consisting of two NUL bytes, and advances
.Pf * Fa ber_out
by two bytes.
.Sh RETURN VALUES
.Fn ASN1_put_eoc
returns the number of bytes written, which is always 2.
.Sh SEE ALSO
.Xr ASN1_item_i2d 3 ,
.Xr ASN1_TYPE_get 3 ,
.Xr i2d_ASN1_NULL 3 ,
.Xr i2d_ASN1_OBJECT 3 ,
.Xr i2d_ASN1_OCTET_STRING 3 ,
.Xr i2d_ASN1_SEQUENCE_ANY 3
.Sh HISTORY
.Fn ASN1_put_object
first appeared in SSLeay 0.5.1 and has been available since
.Ox 2.4 .
.Pp
.Fn ASN1_put_eoc
first appeared in OpenSSL 0.9.8 and has been available since
.Ox 4.5 .
.Sh CAVEATS
Neither
.Fn ASN1_put_object
nor
.Fn ASN1_put_eoc
do any sanity checking.
When called in inconsistent ways, invalid content may result in
.Pf * Fa ber_out ,
for example
.Bl -dash -compact
.It
a
.Fa tag
number less than 0x1f with a non-universal
.Fa class
.It
a
.Fa tag
number equal to 0x00 or 0x1f
.It
a
.Vt BOOLEAN ,
.Vt INTEGER ,
.Vt NULL
etc. with the
.Fa constructed
bit set
.It
a
.Vt SEQUENCE
or
.Vt SET
etc. without the
.Fa constructed
bit set
.It
a
.Fa length
that makes no sense for the given
.Fa tag
.It
a
.Fa length
that disagrees with the following data
.It
a
.Vt BOOLEAN ,
.Vt INTEGER ,
.Vt NULL
etc. in indefinite form
.It
an end-of-content marker even though no indefinite form was started
.It
\&...
.El
.Pp
If the calling code wants to find out how many bytes were written,
it needs to save a copy of the pointer
.Pf * Fa ber_out
before calling
.Fn ASN1_put_object .
Changes to jni/libressl/man/ASN1_time_parse.3.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
.\" $OpenBSD: ASN1_time_parse.3,v 1.7 2018/03/23 23:18:17 schwarze Exp $
.\"
.\" Copyright (c) 2016 Bob Beck <beck@openbsd.org>
.\"
.\" Permission to use, copy, modify, and distribute this software for any
.\" purpose with or without fee is hereby granted, provided that the above
.\" copyright notice and this permission notice appear in all copies.
.\"
.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
.Dd $Mdocdate: March 23 2018 $
.Dt ASN1_TIME_PARSE 3
.Os
.Sh NAME
.Nm ASN1_time_parse ,
.Nm ASN1_time_tm_cmp ,
.Nm ASN1_TIME_set_tm
.Nd LibreSSL utilities for ASN.1 time types
|















|







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
.\" $OpenBSD: ASN1_time_parse.3,v 1.8 2019/06/06 01:06:58 schwarze Exp $
.\"
.\" Copyright (c) 2016 Bob Beck <beck@openbsd.org>
.\"
.\" Permission to use, copy, modify, and distribute this software for any
.\" purpose with or without fee is hereby granted, provided that the above
.\" copyright notice and this permission notice appear in all copies.
.\"
.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
.Dd $Mdocdate: June 6 2019 $
.Dt ASN1_TIME_PARSE 3
.Os
.Sh NAME
.Nm ASN1_time_parse ,
.Nm ASN1_time_tm_cmp ,
.Nm ASN1_TIME_set_tm
.Nd LibreSSL utilities for ASN.1 time types
121
122
123
124
125
126
127




128
129
130
131
132
133
134
135
136
137
.Pp
.Fn ASN1_TIME_set_tm
returns a pointer to an
.Vt ASN1_TIME
structure or
.Dv NULL
if an error occurred.




.Sh HISTORY
.Fn ASN1_time_parse
and
.Fn ASN1_time_tm_cmp
first appeared in
.Ox 6.1
and
.Fn ASN1_TIME_set_tm
in
.Ox 6.2 .







>
>
>
>










121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
.Pp
.Fn ASN1_TIME_set_tm
returns a pointer to an
.Vt ASN1_TIME
structure or
.Dv NULL
if an error occurred.
.Sh SEE ALSO
.Xr ASN1_TIME_new 3 ,
.Xr ASN1_TIME_set 3 ,
.Xr X509_cmp_time 3
.Sh HISTORY
.Fn ASN1_time_parse
and
.Fn ASN1_time_tm_cmp
first appeared in
.Ox 6.1
and
.Fn ASN1_TIME_set_tm
in
.Ox 6.2 .
Changes to jni/libressl/man/AUTHORITY_KEYID_new.3.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
.\"	$OpenBSD: AUTHORITY_KEYID_new.3,v 1.3 2018/03/21 16:09:51 schwarze Exp $
.\"
.\" Copyright (c) 2016 Ingo Schwarze <schwarze@openbsd.org>
.\"
.\" Permission to use, copy, modify, and distribute this software for any
.\" purpose with or without fee is hereby granted, provided that the above
.\" copyright notice and this permission notice appear in all copies.
.\"
.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
.Dd $Mdocdate: March 21 2018 $
.Dt AUTHORITY_KEYID_NEW 3
.Os
.Sh NAME
.Nm AUTHORITY_KEYID_new ,
.Nm AUTHORITY_KEYID_free
.Nd X.509 authority key identifier extension
.Sh SYNOPSIS
|















|







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
.\"	$OpenBSD: AUTHORITY_KEYID_new.3,v 1.4 2019/06/06 01:06:58 schwarze Exp $
.\"
.\" Copyright (c) 2016 Ingo Schwarze <schwarze@openbsd.org>
.\"
.\" Permission to use, copy, modify, and distribute this software for any
.\" purpose with or without fee is hereby granted, provided that the above
.\" copyright notice and this permission notice appear in all copies.
.\"
.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
.Dd $Mdocdate: June 6 2019 $
.Dt AUTHORITY_KEYID_NEW 3
.Os
.Sh NAME
.Nm AUTHORITY_KEYID_new ,
.Nm AUTHORITY_KEYID_free
.Nd X.509 authority key identifier extension
.Sh SYNOPSIS
47
48
49
50
51
52
53

54
55
56
57
58
59
60
.Fn AUTHORITY_KEYID_new
returns the new
.Vt AUTHORITY_KEYID
object or
.Dv NULL
if an error occurs.
.Sh SEE ALSO

.Xr GENERAL_NAMES_new 3 ,
.Xr X509_CRL_new 3 ,
.Xr X509_EXTENSION_new 3 ,
.Xr X509_new 3
.Sh STANDARDS
RFC 5280: Internet X.509 Public Key Infrastructure Certificate and
Certificate Revocation List (CRL) Profile:







>







47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
.Fn AUTHORITY_KEYID_new
returns the new
.Vt AUTHORITY_KEYID
object or
.Dv NULL
if an error occurs.
.Sh SEE ALSO
.Xr d2i_AUTHORITY_KEYID 3 ,
.Xr GENERAL_NAMES_new 3 ,
.Xr X509_CRL_new 3 ,
.Xr X509_EXTENSION_new 3 ,
.Xr X509_new 3
.Sh STANDARDS
RFC 5280: Internet X.509 Public Key Infrastructure Certificate and
Certificate Revocation List (CRL) Profile:
Changes to jni/libressl/man/BASIC_CONSTRAINTS_new.3.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
.\"	$OpenBSD: BASIC_CONSTRAINTS_new.3,v 1.3 2018/03/21 16:09:51 schwarze Exp $
.\"
.\" Copyright (c) 2016 Ingo Schwarze <schwarze@openbsd.org>
.\"
.\" Permission to use, copy, modify, and distribute this software for any
.\" purpose with or without fee is hereby granted, provided that the above
.\" copyright notice and this permission notice appear in all copies.
.\"
.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
.Dd $Mdocdate: March 21 2018 $
.Dt BASIC_CONSTRAINTS_NEW 3
.Os
.Sh NAME
.Nm BASIC_CONSTRAINTS_new ,
.Nm BASIC_CONSTRAINTS_free
.Nd X.509 extension to mark CA certificates
.Sh SYNOPSIS
|















|







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
.\" $OpenBSD: BASIC_CONSTRAINTS_new.3,v 1.5 2019/08/22 15:15:35 schwarze Exp $
.\"
.\" Copyright (c) 2016 Ingo Schwarze <schwarze@openbsd.org>
.\"
.\" Permission to use, copy, modify, and distribute this software for any
.\" purpose with or without fee is hereby granted, provided that the above
.\" copyright notice and this permission notice appear in all copies.
.\"
.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
.Dd $Mdocdate: August 22 2019 $
.Dt BASIC_CONSTRAINTS_NEW 3
.Os
.Sh NAME
.Nm BASIC_CONSTRAINTS_new ,
.Nm BASIC_CONSTRAINTS_free
.Nd X.509 extension to mark CA certificates
.Sh SYNOPSIS
63
64
65
66
67
68
69


70
71
72
73
74
75
76
.Fn BASIC_CONSTRAINTS_new
returns the new
.Vt BASIC_CONSTRAINTS
object or
.Dv NULL
if an error occurs.
.Sh SEE ALSO


.Xr X509_EXTENSION_new 3 ,
.Xr X509_new 3
.Sh STANDARDS
RFC 5280: Internet X.509 Public Key Infrastructure Certificate and
Certificate Revocation List (CRL) Profile:
.Bl -dash -compact
.It







>
>







63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
.Fn BASIC_CONSTRAINTS_new
returns the new
.Vt BASIC_CONSTRAINTS
object or
.Dv NULL
if an error occurs.
.Sh SEE ALSO
.Xr d2i_BASIC_CONSTRAINTS 3 ,
.Xr X509_check_purpose 3 ,
.Xr X509_EXTENSION_new 3 ,
.Xr X509_new 3
.Sh STANDARDS
RFC 5280: Internet X.509 Public Key Infrastructure Certificate and
Certificate Revocation List (CRL) Profile:
.Bl -dash -compact
.It
Changes to jni/libressl/man/BF_set_key.3.
1
2
3
4
5
6
7
8
.\"	$OpenBSD: BF_set_key.3,v 1.9 2019/01/02 07:42:21 jmc Exp $
.\"	OpenSSL 99d63d46 Jul 19 09:27:53 2016 -0400
.\"
.\" This file was written by Richard Levitte <levitte@openssl.org>.
.\" Copyright (c) 2000, 2002, 2005, 2014, 2016 The OpenSSL Project.
.\" All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
|







1
2
3
4
5
6
7
8
.\"	$OpenBSD: BF_set_key.3,v 1.10 2019/06/06 01:06:58 schwarze Exp $
.\"	OpenSSL 99d63d46 Jul 19 09:27:53 2016 -0400
.\"
.\" This file was written by Richard Levitte <levitte@openssl.org>.
.\" Copyright (c) 2000, 2002, 2005, 2014, 2016 The OpenSSL Project.
.\" All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: January 2 2019 $
.Dt BF_SET_KEY 3
.Os
.Sh NAME
.Nm BF_set_key ,
.Nm BF_encrypt ,
.Nm BF_decrypt ,
.Nm BF_ecb_encrypt ,







|







45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: June 6 2019 $
.Dt BF_SET_KEY 3
.Os
.Sh NAME
.Nm BF_set_key ,
.Nm BF_encrypt ,
.Nm BF_decrypt ,
.Nm BF_ecb_encrypt ,
253
254
255
256
257
258
259


260
261
262
263
264
265
266
.Fa key .
These functions should not be used unless implementing `modes' of Blowfish.
The alternative is to use
.Fn BF_ecb_encrypt .
Be aware that these functions take each 32-bit chunk in host-byte order,
which is little-endian on little-endian platforms
and big-endian on big-endian ones.


.Sh HISTORY
.Fn BF_set_key ,
.Fn BF_encrypt ,
.Fn BF_ecb_encrypt ,
.Fn BF_cbc_encrypt ,
.Fn BF_cfb64_encrypt ,
.Fn BF_ofb64_encrypt ,







>
>







253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
.Fa key .
These functions should not be used unless implementing `modes' of Blowfish.
The alternative is to use
.Fn BF_ecb_encrypt .
Be aware that these functions take each 32-bit chunk in host-byte order,
which is little-endian on little-endian platforms
and big-endian on big-endian ones.
.Sh SEE ALSO
.Xr EVP_EncryptInit 3
.Sh HISTORY
.Fn BF_set_key ,
.Fn BF_encrypt ,
.Fn BF_ecb_encrypt ,
.Fn BF_cbc_encrypt ,
.Fn BF_cfb64_encrypt ,
.Fn BF_ofb64_encrypt ,
Changes to jni/libressl/man/BIO_f_base64.3.
1
2
3
4
5
6
7
8
.\"	$OpenBSD: BIO_f_base64.3,v 1.10 2018/05/02 16:04:35 schwarze Exp $
.\"	OpenSSL fc1d88f0 Wed Jul 2 22:42:40 2014 -0400
.\"
.\" This file was written by Dr. Stephen Henson <steve@openssl.org>.
.\" Copyright (c) 2000, 2003, 2005, 2014 The OpenSSL Project.
.\" All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
|







1
2
3
4
5
6
7
8
.\"	$OpenBSD: BIO_f_base64.3,v 1.11 2019/06/06 01:06:58 schwarze Exp $
.\"	OpenSSL fc1d88f0 Wed Jul 2 22:42:40 2014 -0400
.\"
.\" This file was written by Dr. Stephen Henson <steve@openssl.org>.
.\" Copyright (c) 2000, 2003, 2005, 2014 The OpenSSL Project.
.\" All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: May 2 2018 $
.Dt BIO_F_BASE64 3
.Os
.Sh NAME
.Nm BIO_f_base64
.Nd base64 BIO filter
.Sh SYNOPSIS
.In openssl/bio.h







|







45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: June 6 2019 $
.Dt BIO_F_BASE64 3
.Os
.Sh NAME
.Nm BIO_f_base64
.Nd base64 BIO filter
.Sh SYNOPSIS
.In openssl/bio.h
117
118
119
120
121
122
123
124

125
126
127
128
129
130
131
132
133
134
while((inlen = BIO_read(b64, inbuf, 512)) > 0)
	BIO_write(bio_out, inbuf, inlen);

BIO_flush(bio_out);
BIO_free_all(b64);
.Ed
.Sh SEE ALSO
.Xr BIO_new 3

.Sh HISTORY
.Fn BIO_f_base64
first appeared in SSLeay 0.6.5 and has been available since
.Ox 2.4 .
.Sh BUGS
The ambiguity of EOF in base64-encoded data can cause additional
data following the base64-encoded block to be misinterpreted.
.Pp
There should be some way of specifying a test that the BIO can perform
to reliably determine EOF (for example a MIME boundary).







|
>










117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
while((inlen = BIO_read(b64, inbuf, 512)) > 0)
	BIO_write(bio_out, inbuf, inlen);

BIO_flush(bio_out);
BIO_free_all(b64);
.Ed
.Sh SEE ALSO
.Xr BIO_new 3 ,
.Xr EVP_EncodeInit 3
.Sh HISTORY
.Fn BIO_f_base64
first appeared in SSLeay 0.6.5 and has been available since
.Ox 2.4 .
.Sh BUGS
The ambiguity of EOF in base64-encoded data can cause additional
data following the base64-encoded block to be misinterpreted.
.Pp
There should be some way of specifying a test that the BIO can perform
to reliably determine EOF (for example a MIME boundary).
Changes to jni/libressl/man/BIO_f_cipher.3.
1
2
3
4
5
6
7
8
.\"	$OpenBSD: BIO_f_cipher.3,v 1.11 2018/08/24 19:32:26 tb Exp $
.\"	OpenSSL 186bb907 Apr 13 11:05:13 2015 -0700
.\"
.\" This file was written by Dr. Stephen Henson <steve@openssl.org>.
.\" Copyright (c) 2000, 2003, 2015, 2016 The OpenSSL Project.
.\" All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
|







1
2
3
4
5
6
7
8
.\"	$OpenBSD: BIO_f_cipher.3,v 1.12 2019/06/06 01:06:58 schwarze Exp $
.\"	OpenSSL 186bb907 Apr 13 11:05:13 2015 -0700
.\"
.\" This file was written by Dr. Stephen Henson <steve@openssl.org>.
.\" Copyright (c) 2000, 2003, 2015, 2016 The OpenSSL Project.
.\" All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: August 24 2018 $
.Dt BIO_F_CIPHER 3
.Os
.Sh NAME
.Nm BIO_f_cipher ,
.Nm BIO_set_cipher ,
.Nm BIO_get_cipher_status ,
.Nm BIO_get_cipher_ctx







|







45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: June 6 2019 $
.Dt BIO_F_CIPHER 3
.Os
.Sh NAME
.Nm BIO_f_cipher ,
.Nm BIO_set_cipher ,
.Nm BIO_get_cipher_status ,
.Nm BIO_get_cipher_ctx
159
160
161
162
163
164
165
166

167
168
169
170
171
172
173
174
175
176
177
.Pp
.Fn BIO_get_cipher_status
returns 1 for a successful decrypt and 0 for failure.
.Pp
.Fn BIO_get_cipher_ctx
currently always returns 1.
.Sh SEE ALSO
.Xr BIO_new 3

.Sh HISTORY
.Fn BIO_f_cipher ,
.Fn BIO_set_cipher ,
and
.Fn BIO_get_cipher_status
first appeared in SSLeay 0.6.5 and have been available since
.Ox 2.4 .
.Pp
.Fn BIO_get_cipher_ctx
first appeared in SSLeay 0.9.1 and has been available since
.Ox 2.6 .







|
>











159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
.Pp
.Fn BIO_get_cipher_status
returns 1 for a successful decrypt and 0 for failure.
.Pp
.Fn BIO_get_cipher_ctx
currently always returns 1.
.Sh SEE ALSO
.Xr BIO_new 3 ,
.Xr EVP_EncryptInit 3
.Sh HISTORY
.Fn BIO_f_cipher ,
.Fn BIO_set_cipher ,
and
.Fn BIO_get_cipher_status
first appeared in SSLeay 0.6.5 and have been available since
.Ox 2.4 .
.Pp
.Fn BIO_get_cipher_ctx
first appeared in SSLeay 0.9.1 and has been available since
.Ox 2.6 .
Changes to jni/libressl/man/BIO_f_md.3.
1
2
3
4
5
6
7
8
.\"	$OpenBSD: BIO_f_md.3,v 1.10 2018/05/02 16:04:35 schwarze Exp $
.\"	OpenSSL a528d4f0 Oct 27 13:40:11 2015 -0400
.\"
.\" This file was written by Dr. Stephen Henson <steve@openssl.org>.
.\" Copyright (c) 2000, 2006, 2009, 2016 The OpenSSL Project.
.\" All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
|







1
2
3
4
5
6
7
8
.\"	$OpenBSD: BIO_f_md.3,v 1.11 2019/06/06 01:06:58 schwarze Exp $
.\"	OpenSSL a528d4f0 Oct 27 13:40:11 2015 -0400
.\"
.\" This file was written by Dr. Stephen Henson <steve@openssl.org>.
.\" Copyright (c) 2000, 2006, 2009, 2016 The OpenSSL Project.
.\" All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: May 2 2018 $
.Dt BIO_F_MD 3
.Os
.Sh NAME
.Nm BIO_f_md ,
.Nm BIO_set_md ,
.Nm BIO_get_md ,
.Nm BIO_get_md_ctx







|







45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: June 6 2019 $
.Dt BIO_F_MD 3
.Os
.Sh NAME
.Nm BIO_f_md ,
.Nm BIO_set_md ,
.Nm BIO_get_md ,
.Nm BIO_get_md_ctx
240
241
242
243
244
245
246
247

248
249
250
251
252
253
254
		printf(":%02X", mdbuf[i]);
	printf("\en");
	mdtmp = BIO_next(mdtmp);
} while(mdtmp);
BIO_free_all(bio);
.Ed
.Sh SEE ALSO
.Xr BIO_new 3

.Sh HISTORY
.Fn BIO_f_md ,
.Fn BIO_set_md ,
and
.Fn BIO_get_md
first appeared in SSLeay 0.6.0.
.Fn BIO_get_md_ctx







|
>







240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
		printf(":%02X", mdbuf[i]);
	printf("\en");
	mdtmp = BIO_next(mdtmp);
} while(mdtmp);
BIO_free_all(bio);
.Ed
.Sh SEE ALSO
.Xr BIO_new 3 ,
.Xr EVP_DigestInit 3
.Sh HISTORY
.Fn BIO_f_md ,
.Fn BIO_set_md ,
and
.Fn BIO_get_md
first appeared in SSLeay 0.6.0.
.Fn BIO_get_md_ctx
Changes to jni/libressl/man/BIO_f_ssl.3.
1
2
3
4
5
6
7
8
.\" $OpenBSD: BIO_f_ssl.3,v 1.10 2018/05/01 16:45:38 schwarze Exp $
.\" full merge up to: OpenSSL f672aee4 Feb 9 11:52:40 2016 -0500
.\" selective merge up to: OpenSSL 61f805c1 Jan 16 01:01:46 2018 +0800
.\"
.\" This file was written by Dr. Stephen Henson <steve@openssl.org>.
.\" Copyright (c) 2000, 2003, 2009, 2014-2016 The OpenSSL Project.
.\" All rights reserved.
.\"
|







1
2
3
4
5
6
7
8
.\" $OpenBSD: BIO_f_ssl.3,v 1.11 2019/06/12 09:36:30 schwarze Exp $
.\" full merge up to: OpenSSL f672aee4 Feb 9 11:52:40 2016 -0500
.\" selective merge up to: OpenSSL 61f805c1 Jan 16 01:01:46 2018 +0800
.\"
.\" This file was written by Dr. Stephen Henson <steve@openssl.org>.
.\" Copyright (c) 2000, 2003, 2009, 2014-2016 The OpenSSL Project.
.\" All rights reserved.
.\"
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: May 1 2018 $
.Dt BIO_F_SSL 3
.Os
.Sh NAME
.Nm BIO_f_ssl ,
.Nm BIO_set_ssl ,
.Nm BIO_get_ssl ,
.Nm BIO_set_ssl_mode ,







|







46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: June 12 2019 $
.Dt BIO_F_SSL 3
.Os
.Sh NAME
.Nm BIO_f_ssl ,
.Nm BIO_set_ssl ,
.Nm BIO_get_ssl ,
.Nm BIO_set_ssl_mode ,
561
562
563
564
565
566
567



568
569
570
571
572
573
574
BIO_puts(sbio, "\er\en");

/* Since there is a buffering BIO present we had better flush it */
BIO_flush(sbio);

BIO_free_all(sbio);
.Ed



.Sh HISTORY
.Fn BIO_f_ssl ,
.Fn BIO_set_ssl ,
and
.Fn BIO_get_ssl
first appeared in SSLeay 0.6.0.
.Fn BIO_set_ssl_mode ,







>
>
>







561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
BIO_puts(sbio, "\er\en");

/* Since there is a buffering BIO present we had better flush it */
BIO_flush(sbio);

BIO_free_all(sbio);
.Ed
.Sh SEE ALSO
.Xr BIO_new 3 ,
.Xr ssl 3
.Sh HISTORY
.Fn BIO_f_ssl ,
.Fn BIO_set_ssl ,
and
.Fn BIO_get_ssl
first appeared in SSLeay 0.6.0.
.Fn BIO_set_ssl_mode ,
Changes to jni/libressl/man/BIO_get_ex_new_index.3.
1
2
3
4
5
6
7
8
9
10
.\" $OpenBSD: BIO_get_ex_new_index.3,v 1.9 2018/04/18 03:39:22 schwarze Exp $
.\" full merge up to: OpenSSL a970b14f Jul 31 18:58:40 2017 -0400
.\" selective merge up to: OpenSSL 61f805c1 Jan 16 01:01:46 2018 +0800
.\"
.\" This file was written by Rich Salz <rsalz@akamai.com>.
.\" Copyright (c) 2015, 2016 The OpenSSL Project.  All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
|
<
|







1

2
3
4
5
6
7
8
9
.\" $OpenBSD: BIO_get_ex_new_index.3,v 1.12 2019/08/16 12:16:22 schwarze Exp $

.\" full merge up to: OpenSSL 61f805c1 Jan 16 01:01:46 2018 +0800
.\"
.\" This file was written by Rich Salz <rsalz@akamai.com>.
.\" Copyright (c) 2015, 2016 The OpenSSL Project.  All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67



68
69
70
71
72
73
74
75



76



77
78
79
80
81
82
83
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: April 18 2018 $
.Dt BIO_GET_EX_NEW_INDEX 3
.Os
.Sh NAME
.Nm BIO_get_ex_new_index ,
.Nm BIO_set_ex_data ,
.Nm BIO_get_ex_data ,
.Nm ENGINE_get_ex_new_index ,
.Nm ENGINE_set_ex_data ,
.Nm ENGINE_get_ex_data ,
.Nm UI_get_ex_new_index ,
.Nm UI_set_ex_data ,
.Nm UI_get_ex_data ,
.Nm X509_get_ex_new_index ,
.Nm X509_set_ex_data ,
.Nm X509_get_ex_data ,



.Nm ECDH_get_ex_new_index ,
.Nm ECDH_set_ex_data ,
.Nm ECDH_get_ex_data ,
.Nm ECDSA_get_ex_new_index ,
.Nm ECDSA_set_ex_data ,
.Nm ECDSA_get_ex_data
.Nd application-specific data
.Sh SYNOPSIS



.In openssl/x509.h



.Ft int
.Fo TYPE_get_ex_new_index
.Fa "long argl"
.Fa "void *argp"
.Fa "CRYPTO_EX_new *new_func"
.Fa "CRYPTO_EX_dup *dup_func"
.Fa "CRYPTO_EX_free *free_func"







|















>
>
>








>
>
>

>
>
>







44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: August 16 2019 $
.Dt BIO_GET_EX_NEW_INDEX 3
.Os
.Sh NAME
.Nm BIO_get_ex_new_index ,
.Nm BIO_set_ex_data ,
.Nm BIO_get_ex_data ,
.Nm ENGINE_get_ex_new_index ,
.Nm ENGINE_set_ex_data ,
.Nm ENGINE_get_ex_data ,
.Nm UI_get_ex_new_index ,
.Nm UI_set_ex_data ,
.Nm UI_get_ex_data ,
.Nm X509_get_ex_new_index ,
.Nm X509_set_ex_data ,
.Nm X509_get_ex_data ,
.Nm EC_KEY_get_ex_new_index ,
.Nm EC_KEY_get_ex_data ,
.Nm EC_KEY_set_ex_data ,
.Nm ECDH_get_ex_new_index ,
.Nm ECDH_set_ex_data ,
.Nm ECDH_get_ex_data ,
.Nm ECDSA_get_ex_new_index ,
.Nm ECDSA_set_ex_data ,
.Nm ECDSA_get_ex_data
.Nd application-specific data
.Sh SYNOPSIS
.In openssl/bio.h
.In openssl/engine.h
.In openssl/ui.h
.In openssl/x509.h
.In openssl/ec.h
.In openssl/ecdh.h
.In openssl/ecdsa.h
.Ft int
.Fo TYPE_get_ex_new_index
.Fa "long argl"
.Fa "void *argp"
.Fa "CRYPTO_EX_new *new_func"
.Fa "CRYPTO_EX_dup *dup_func"
.Fa "CRYPTO_EX_free *free_func"
95
96
97
98
99
100
101
102
103





104
105
106
107
108
109
110
.Fc
.Sh DESCRIPTION
In the description here,
.Vt TYPE
is used a placeholder for any of the OpenSSL datatypes listed in
.Xr CRYPTO_get_ex_new_index 3 .
.Pp
These functions handle application-specific data for OpenSSL data
structures.





.Pp
.Fn TYPE_get_ex_new_index
is a macro that calls
.Xr CRYPTO_get_ex_new_index 3
with the correct index value.
.Pp
.Fn TYPE_set_ex_data







|

>
>
>
>
>







103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
.Fc
.Sh DESCRIPTION
In the description here,
.Vt TYPE
is used a placeholder for any of the OpenSSL datatypes listed in
.Xr CRYPTO_get_ex_new_index 3 .
.Pp
These functions handle application-specific data in OpenSSL data
structures.
Their usage is identical to that of
.Xr RSA_get_ex_new_index 3 ,
.Xr RSA_set_ex_data 3 ,
and
.Xr RSA_get_ex_data 3 .
.Pp
.Fn TYPE_get_ex_new_index
is a macro that calls
.Xr CRYPTO_get_ex_new_index 3
with the correct index value.
.Pp
.Fn TYPE_set_ex_data
128
129
130
131
132
133
134

135
136

137
138
139
140
141
142
143
returns 1 on success or 0 on error.
.Pp
.Fn TYPE_get_ex_data
returns the application data or
.Dv NULL
if an error occurred.
.Sh SEE ALSO

.Xr CRYPTO_get_ex_new_index 3 ,
.Xr RSA_get_ex_new_index 3

.Sh HISTORY
.Fn BIO_get_ex_new_index ,
.Fn BIO_set_ex_data ,
and
.Fn BIO_get_ex_data
first appeared in SSLeay 0.9.0 and have been available since
.Ox 2.4 .







>

|
>







141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
returns 1 on success or 0 on error.
.Pp
.Fn TYPE_get_ex_data
returns the application data or
.Dv NULL
if an error occurred.
.Sh SEE ALSO
.Xr BIO_new 3 ,
.Xr CRYPTO_get_ex_new_index 3 ,
.Xr RSA_get_ex_new_index 3 ,
.Xr X509_new 3
.Sh HISTORY
.Fn BIO_get_ex_new_index ,
.Fn BIO_set_ex_data ,
and
.Fn BIO_get_ex_data
first appeared in SSLeay 0.9.0 and have been available since
.Ox 2.4 .
164
165
166
167
168
169
170







.Fn ECDH_get_ex_data ,
.Fn ECDSA_get_ex_new_index ,
.Fn ECDSA_set_ex_data ,
and
.Fn ECDSA_get_ex_data
first appeared in OpenSSL 0.9.8 and have been available since
.Ox 4.5 .














>
>
>
>
>
>
>
179
180
181
182
183
184
185
186
187
188
189
190
191
192
.Fn ECDH_get_ex_data ,
.Fn ECDSA_get_ex_new_index ,
.Fn ECDSA_set_ex_data ,
and
.Fn ECDSA_get_ex_data
first appeared in OpenSSL 0.9.8 and have been available since
.Ox 4.5 .
.Pp
.Fn EC_KEY_get_ex_new_index ,
.Fn EC_KEY_set_ex_data ,
and
.Fn EC_KEY_get_ex_data
first appeared in OpenSSL 1.1.0 and have been available since
.Ox 6.5 .
Changes to jni/libressl/man/BIO_new.3.
1
2
3
4
5
6
7
8
.\" $OpenBSD: BIO_new.3,v 1.16 2018/05/01 17:05:05 schwarze Exp $
.\" full merge up to:
.\" OpenSSL man3/BIO_new.pod fb46be03 Feb 26 11:51:31 2016 +0000
.\" OpenSSL man7/bio.pod 631c37be Dec 12 16:56:50 2017 +0100
.\" partial merge up to:
.\" OpenSSL man3/BIO_new.pod e9b77246 Jan 20 19:58:49 2017 +0100
.\"
.\" This file was written by Dr. Stephen Henson <steve@openssl.org>.
|







1
2
3
4
5
6
7
8
.\" $OpenBSD: BIO_new.3,v 1.18 2019/06/10 09:49:48 schwarze Exp $
.\" full merge up to:
.\" OpenSSL man3/BIO_new.pod fb46be03 Feb 26 11:51:31 2016 +0000
.\" OpenSSL man7/bio.pod 631c37be Dec 12 16:56:50 2017 +0100
.\" partial merge up to:
.\" OpenSSL man3/BIO_new.pod e9b77246 Jan 20 19:58:49 2017 +0100
.\"
.\" This file was written by Dr. Stephen Henson <steve@openssl.org>.
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: May 1 2018 $
.Dt BIO_NEW 3
.Os
.Sh NAME
.Nm BIO_new ,
.Nm BIO_up_ref ,
.Nm BIO_set ,
.Nm BIO_free ,







|







48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: June 10 2019 $
.Dt BIO_NEW 3
.Os
.Sh NAME
.Nm BIO_new ,
.Nm BIO_up_ref ,
.Nm BIO_set ,
.Nm BIO_free ,
246
247
248
249
250
251
252

253


254
255
256
257
258
259
260
.Xr BIO_s_connect 3 ,
.Xr BIO_s_fd 3 ,
.Xr BIO_s_file 3 ,
.Xr BIO_s_mem 3 ,
.Xr BIO_s_null 3 ,
.Xr BIO_s_socket 3 ,
.Xr BIO_set_callback 3 ,

.Xr BIO_should_retry 3


.Sh HISTORY
.Fn BIO_new ,
.Fn BIO_set ,
and
.Fn BIO_free
first appeared in SSLeay 0.6.0.
.Fn BIO_free_all







>
|
>
>







246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
.Xr BIO_s_connect 3 ,
.Xr BIO_s_fd 3 ,
.Xr BIO_s_file 3 ,
.Xr BIO_s_mem 3 ,
.Xr BIO_s_null 3 ,
.Xr BIO_s_socket 3 ,
.Xr BIO_set_callback 3 ,
.Xr BIO_set_data 3 ,
.Xr BIO_should_retry 3 ,
.Xr BUF_MEM_new 3 ,
.Xr crypto 3
.Sh HISTORY
.Fn BIO_new ,
.Fn BIO_set ,
and
.Fn BIO_free
first appeared in SSLeay 0.6.0.
.Fn BIO_free_all
Added jni/libressl/man/BIO_new_CMS.3.


























































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
.\" $OpenBSD: BIO_new_CMS.3,v 1.6 2019/08/18 21:44:10 schwarze Exp $
.\" full merge up to: OpenSSL df75c2bfc Dec 9 01:02:36 2018 +0100
.\"
.\" This file was written by Dr. Stephen Henson <steve@openssl.org>.
.\" Copyright (c) 2008 The OpenSSL Project.  All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\"
.\" 1. Redistributions of source code must retain the above copyright
.\"    notice, this list of conditions and the following disclaimer.
.\"
.\" 2. Redistributions in binary form must reproduce the above copyright
.\"    notice, this list of conditions and the following disclaimer in
.\"    the documentation and/or other materials provided with the
.\"    distribution.
.\"
.\" 3. All advertising materials mentioning features or use of this
.\"    software must display the following acknowledgment:
.\"    "This product includes software developed by the OpenSSL Project
.\"    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
.\"
.\" 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
.\"    endorse or promote products derived from this software without
.\"    prior written permission. For written permission, please contact
.\"    openssl-core@openssl.org.
.\"
.\" 5. Products derived from this software may not be called "OpenSSL"
.\"    nor may "OpenSSL" appear in their names without prior written
.\"    permission of the OpenSSL Project.
.\"
.\" 6. Redistributions of any form whatsoever must retain the following
.\"    acknowledgment:
.\"    "This product includes software developed by the OpenSSL Project
.\"    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
.\"
.\" THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
.\" EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
.\" PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
.\" ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
.\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: August 18 2019 $
.Dt BIO_NEW_CMS 3
.Os
.Sh NAME
.Nm BIO_new_CMS
.Nd CMS streaming filter BIO
.Sh SYNOPSIS
.In openssl/cms.h
.Ft BIO *
.Fo BIO_new_CMS
.Fa "BIO *out"
.Fa "CMS_ContentInfo *cms"
.Fc
.Sh DESCRIPTION
.Fn BIO_new_CMS
returns a streaming filter
.Vt BIO
chain based on
.Fa cms .
The output of the filter is written to
.Fa out .
Any data written to the chain is automatically translated
to a BER format CMS structure of the appropriate type.
.Pp
The chain returned by this function behaves like a standard filter
.Vt BIO .
It supports non blocking I/O.
Content is processed and streamed on the fly and not all held in memory
at once: so it is possible to encode very large structures.
After all content has been written through the chain,
.Xr BIO_flush 3
must be called to finalise the structure.
.Pp
The
.Dv CMS_STREAM
flag must be included in the corresponding
.Fa flags
parameter of the
.Fa cms
creation function.
.Pp
If an application wishes to write additional data to
.Fa out ,
BIOs should be removed from the chain using
.Xr BIO_pop 3
and freed with
.Xr BIO_free 3
until
.Fa out
is reached.
If no additional data needs to be written,
.Xr BIO_free_all 3
can be called to free up the whole chain.
.Pp
Any content written through the filter is used verbatim:
no canonical translation is performed.
.Pp
It is possible to chain multiple BIOs to, for example,
create a triple wrapped signed, enveloped, signed structure.
In this case it is the application's responsibility
to set the inner content type of any outer
.Vt CMS_ContentInfo
structures.
.Pp
Large numbers of small writes through the chain should be avoided as this
will produce an output consisting of lots of OCTET STRING structures.
Prepending a
.Xr BIO_f_buffer 3
buffering BIO will prevent this.
.Sh RETURN VALUES
.Fn BIO_new_CMS
returns a
.Vt BIO
chain when successful or
.Dv NULL
if an error occurred.
The error can be obtained from
.Xr ERR_get_error 3 .
.Sh SEE ALSO
.Xr BIO_new 3 ,
.Xr CMS_ContentInfo_new 3 ,
.Xr CMS_encrypt 3 ,
.Xr CMS_sign 3
.Sh HISTORY
.Fn BIO_new_CMS
first appeared in OpenSSL 1.0.0
and has been available since
.Ox 6.6 .
.Sh BUGS
There is currently no corresponding inverse BIO
which can decode a CMS structure on the fly.
Changes to jni/libressl/man/BIO_s_mem.3.
1
2
3
4
5
6
7
8
.\" $OpenBSD: BIO_s_mem.3,v 1.13 2018/05/12 20:12:17 schwarze Exp $
.\" full merge up to: OpenSSL 8711efb4 Mon Apr 20 11:33:12 2009 +0000
.\" selective merge up to: OpenSSL 36359cec Mar 7 14:37:23 2018 +0100
.\"
.\" This file was written by Dr. Stephen Henson <steve@openssl.org>.
.\" Copyright (c) 2000 The OpenSSL Project.  All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
|







1
2
3
4
5
6
7
8
.\" $OpenBSD: BIO_s_mem.3,v 1.14 2019/06/06 01:06:58 schwarze Exp $
.\" full merge up to: OpenSSL 8711efb4 Mon Apr 20 11:33:12 2009 +0000
.\" selective merge up to: OpenSSL 36359cec Mar 7 14:37:23 2018 +0100
.\"
.\" This file was written by Dr. Stephen Henson <steve@openssl.org>.
.\" Copyright (c) 2000 The OpenSSL Project.  All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: May 12 2018 $
.Dt BIO_S_MEM 3
.Os
.Sh NAME
.Nm BIO_s_mem ,
.Nm BIO_set_mem_eof_return ,
.Nm BIO_get_mem_data ,
.Nm BIO_set_mem_buf ,







|







45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: June 6 2019 $
.Dt BIO_S_MEM 3
.Os
.Sh NAME
.Nm BIO_s_mem ,
.Nm BIO_set_mem_eof_return ,
.Nm BIO_get_mem_data ,
.Nm BIO_set_mem_buf ,
245
246
247
248
249
250
251
252

253
254
255
256
257
258
259
BUF_MEM *bptr;
BIO_get_mem_ptr(mem, &bptr);
/* Make sure BIO_free() leaves BUF_MEM alone. */
BIO_set_close(mem, BIO_NOCLOSE);
BIO_free(mem);
.Ed
.Sh SEE ALSO
.Xr BIO_new 3

.Sh HISTORY
.Fn BIO_s_mem
first appeared in SSLeay 0.6.0.
.Fn BIO_set_mem_buf
and
.Fn BIO_get_mem_ptr
first appeared in SSLeay 0.6.5.







|
>







245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
BUF_MEM *bptr;
BIO_get_mem_ptr(mem, &bptr);
/* Make sure BIO_free() leaves BUF_MEM alone. */
BIO_set_close(mem, BIO_NOCLOSE);
BIO_free(mem);
.Ed
.Sh SEE ALSO
.Xr BIO_new 3 ,
.Xr BUF_MEM_new 3
.Sh HISTORY
.Fn BIO_s_mem
first appeared in SSLeay 0.6.0.
.Fn BIO_set_mem_buf
and
.Fn BIO_get_mem_ptr
first appeared in SSLeay 0.6.5.
Changes to jni/libressl/man/BN_BLINDING_new.3.
1
2
3
4
5
6
7
8
.\"	$OpenBSD: BN_BLINDING_new.3,v 1.10 2018/03/23 23:18:17 schwarze Exp $
.\"	OpenSSL a528d4f0 Oct 27 13:40:11 2015 -0400
.\"
.\" This file was written by Nils Larsch <nils@openssl.org>.
.\" Copyright (c) 2005, 2008, 2013, 2015 The OpenSSL Project.
.\" All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
|







1
2
3
4
5
6
7
8
.\"	$OpenBSD: BN_BLINDING_new.3,v 1.11 2019/06/06 01:06:58 schwarze Exp $
.\"	OpenSSL a528d4f0 Oct 27 13:40:11 2015 -0400
.\"
.\" This file was written by Nils Larsch <nils@openssl.org>.
.\" Copyright (c) 2005, 2008, 2013, 2015 The OpenSSL Project.
.\" All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: March 23 2018 $
.Dt BN_BLINDING_NEW 3
.Os
.Sh NAME
.Nm BN_BLINDING_new ,
.Nm BN_BLINDING_free ,
.Nm BN_BLINDING_update ,
.Nm BN_BLINDING_convert ,







|







45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: June 6 2019 $
.Dt BN_BLINDING_NEW 3
.Os
.Sh NAME
.Nm BN_BLINDING_new ,
.Nm BN_BLINDING_free ,
.Nm BN_BLINDING_update ,
.Nm BN_BLINDING_convert ,
298
299
300
301
302
303
304
305

306
307
308
309
310
311
312
.Fn BN_BLINDING_create_param
returns the newly created
.Vt BN_BLINDING
parameters or
.Dv NULL
on error.
.Sh SEE ALSO
.Xr BN_new 3

.Sh HISTORY
.Fn BN_BLINDING_new ,
.Fn BN_BLINDING_free ,
.Fn BN_BLINDING_update ,
.Fn BN_BLINDING_convert ,
and
.Fn BN_BLINDING_invert







|
>







298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
.Fn BN_BLINDING_create_param
returns the newly created
.Vt BN_BLINDING
parameters or
.Dv NULL
on error.
.Sh SEE ALSO
.Xr BN_new 3 ,
.Xr RSA_blinding_on 3
.Sh HISTORY
.Fn BN_BLINDING_new ,
.Fn BN_BLINDING_free ,
.Fn BN_BLINDING_update ,
.Fn BN_BLINDING_convert ,
and
.Fn BN_BLINDING_invert
Changes to jni/libressl/man/BN_CTX_new.3.
1
2
3
4
5
6
7
8
.\"	$OpenBSD: BN_CTX_new.3,v 1.8 2018/03/27 17:35:50 schwarze Exp $
.\"	OpenSSL aafbe1cc Jun 12 23:42:08 2013 +0100
.\"
.\" This file was written by Ulf Moeller <ulf@openssl.org>.
.\" Copyright (c) 2000, 2013 The OpenSSL Project.  All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
|







1
2
3
4
5
6
7
8
.\"	$OpenBSD: BN_CTX_new.3,v 1.9 2019/06/10 14:58:48 schwarze Exp $
.\"	OpenSSL aafbe1cc Jun 12 23:42:08 2013 +0100
.\"
.\" This file was written by Ulf Moeller <ulf@openssl.org>.
.\" Copyright (c) 2000, 2013 The OpenSSL Project.  All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: March 27 2018 $
.Dt BN_CTX_NEW 3
.Os
.Sh NAME
.Nm BN_CTX_new ,
.Nm BN_CTX_free ,
.Nm BN_CTX_init
.Nd allocate and free BN_CTX structures







|







44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: June 10 2019 $
.Dt BN_CTX_NEW 3
.Os
.Sh NAME
.Nm BN_CTX_new ,
.Nm BN_CTX_free ,
.Nm BN_CTX_init
.Nd allocate and free BN_CTX structures
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
If the allocation fails, it returns
.Dv NULL
and sets an error code that can be obtained by
.Xr ERR_get_error 3 .
.Sh SEE ALSO
.Xr BN_add 3 ,
.Xr BN_CTX_start 3 ,
.Xr BN_new 3 ,
.Xr ERR_get_error 3
.Sh HISTORY
.Fn BN_CTX_new
and
.Fn BN_CTX_free
first appeared in SSLeay 0.5.1 and have been available since
.Ox 2.4 .
.Pp
.Fn BN_CTX_init
first appeared in SSLeay 0.9.1 and has been available since
.Ox 2.6 .







|
<










126
127
128
129
130
131
132
133

134
135
136
137
138
139
140
141
142
143
If the allocation fails, it returns
.Dv NULL
and sets an error code that can be obtained by
.Xr ERR_get_error 3 .
.Sh SEE ALSO
.Xr BN_add 3 ,
.Xr BN_CTX_start 3 ,
.Xr BN_new 3

.Sh HISTORY
.Fn BN_CTX_new
and
.Fn BN_CTX_free
first appeared in SSLeay 0.5.1 and have been available since
.Ox 2.4 .
.Pp
.Fn BN_CTX_init
first appeared in SSLeay 0.9.1 and has been available since
.Ox 2.6 .
Changes to jni/libressl/man/BN_CTX_start.3.
1
2
3
4
5
6
7
8
9
.\"	$OpenBSD: BN_CTX_start.3,v 1.7 2018/03/22 16:06:33 schwarze Exp $
.\"	OpenSSL 99d63d46 Oct 26 13:56:48 2016 -0400
.\"
.\" This file was written by Ulf Moeller <ulf@openssl.org>.
.\" Copyright (c) 2000 The OpenSSL Project.  All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
|
|







1
2
3
4
5
6
7
8
9
.\" $OpenBSD: BN_CTX_start.3,v 1.8 2019/08/20 10:59:09 schwarze Exp $
.\" full merge up to: OpenSSL 35fd9953 May 28 14:49:38 2019 +0200
.\"
.\" This file was written by Ulf Moeller <ulf@openssl.org>.
.\" Copyright (c) 2000 The OpenSSL Project.  All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: March 22 2018 $
.Dt BN_CTX_START 3
.Os
.Sh NAME
.Nm BN_CTX_start ,
.Nm BN_CTX_get ,
.Nm BN_CTX_end
.Nd use temporary BIGNUM variables







|







44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: August 20 2019 $
.Dt BN_CTX_START 3
.Os
.Sh NAME
.Nm BN_CTX_start ,
.Nm BN_CTX_get ,
.Nm BN_CTX_end
.Nd use temporary BIGNUM variables
100
101
102
103
104
105
106





107
108
109
110
111
112
113
When
.Fn BN_CTX_end
is called, the
.Vt BIGNUM
pointers obtained from
.Fn BN_CTX_get
become invalid.





.Sh RETURN VALUES
.Fn BN_CTX_get
returns a pointer to the
.Vt BIGNUM ,
or
.Dv NULL
on error.







>
>
>
>
>







100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
When
.Fn BN_CTX_end
is called, the
.Vt BIGNUM
pointers obtained from
.Fn BN_CTX_get
become invalid.
If
.Fa ctx
is
.Dv NULL ,
no action occurs.
.Sh RETURN VALUES
.Fn BN_CTX_get
returns a pointer to the
.Vt BIGNUM ,
or
.Dv NULL
on error.
Changes to jni/libressl/man/BN_add_word.3.
1
2
3
4
5
6
7
8
.\"	$OpenBSD: BN_add_word.3,v 1.8 2018/03/27 17:35:50 schwarze Exp $
.\"	OpenSSL b97fdb57 Nov 11 09:33:09 2016 +0100
.\"
.\" This file was written by Ulf Moeller <ulf@openssl.org>.
.\" Copyright (c) 2000, 2005 The OpenSSL Project.  All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
|







1
2
3
4
5
6
7
8
.\"	$OpenBSD: BN_add_word.3,v 1.9 2019/06/10 14:58:48 schwarze Exp $
.\"	OpenSSL b97fdb57 Nov 11 09:33:09 2016 +0100
.\"
.\" This file was written by Ulf Moeller <ulf@openssl.org>.
.\" Copyright (c) 2000, 2005 The OpenSSL Project.  All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: March 27 2018 $
.Dt BN_ADD_WORD 3
.Os
.Sh NAME
.Nm BN_add_word ,
.Nm BN_sub_word ,
.Nm BN_mul_word ,
.Nm BN_div_word ,







|







44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: June 10 2019 $
.Dt BN_ADD_WORD 3
.Os
.Sh NAME
.Nm BN_add_word ,
.Nm BN_sub_word ,
.Nm BN_mul_word ,
.Nm BN_div_word ,
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
return
.Fa a Ns % Ns Fa w
on success and
.Po Vt BN_ULONG Pc Ns -1
if an error occurred.
.Sh SEE ALSO
.Xr BN_add 3 ,
.Xr BN_new 3 ,
.Xr ERR_get_error 3
.Sh HISTORY
.Fn BN_add_word ,
.Fn BN_div_word ,
and
.Fn BN_mod_word
first appeared in SSLeay 0.5.1.
.Fn BN_sub_word







|
<







148
149
150
151
152
153
154
155

156
157
158
159
160
161
162
return
.Fa a Ns % Ns Fa w
on success and
.Po Vt BN_ULONG Pc Ns -1
if an error occurred.
.Sh SEE ALSO
.Xr BN_add 3 ,
.Xr BN_new 3

.Sh HISTORY
.Fn BN_add_word ,
.Fn BN_div_word ,
and
.Fn BN_mod_word
first appeared in SSLeay 0.5.1.
.Fn BN_sub_word
Changes to jni/libressl/man/BN_bn2bin.3.
1
2
3
4
5
6
7
8
.\"	$OpenBSD: BN_bn2bin.3,v 1.12 2018/12/19 21:53:53 schwarze Exp $
.\" full merge up to: OpenSSL a528d4f0 Oct 27 13:40:11 2015 -0400
.\" selective merge up to: OpenSSL 1212818e Sep 11 13:22:14 2018 +0100
.\"
.\" This file was written by Ulf Moeller <ulf@openssl.org>.
.\" Copyright (c) 2000, 2002, 2016 The OpenSSL Project.  All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
|







1
2
3
4
5
6
7
8
.\"	$OpenBSD: BN_bn2bin.3,v 1.13 2019/06/10 14:58:48 schwarze Exp $
.\" full merge up to: OpenSSL a528d4f0 Oct 27 13:40:11 2015 -0400
.\" selective merge up to: OpenSSL 1212818e Sep 11 13:22:14 2018 +0100
.\"
.\" This file was written by Ulf Moeller <ulf@openssl.org>.
.\" Copyright (c) 2000, 2002, 2016 The OpenSSL Project.  All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: December 19 2018 $
.Dt BN_BN2BIN 3
.Os
.Sh NAME
.Nm BN_bn2bin ,
.Nm BN_bin2bn ,
.Nm BN_bn2hex ,
.Nm BN_bn2dec ,







|







45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: June 10 2019 $
.Dt BN_BN2BIN 3
.Os
.Sh NAME
.Nm BN_bn2bin ,
.Nm BN_bin2bn ,
.Nm BN_bn2hex ,
.Nm BN_bn2dec ,
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
on error.
.Pp
The error codes can be obtained by
.Xr ERR_get_error 3 .
.Sh SEE ALSO
.Xr BN_new 3 ,
.Xr BN_num_bytes 3 ,
.Xr BN_zero 3 ,
.Xr ERR_get_error 3
.Sh HISTORY
.Fn BN_bn2bin ,
.Fn BN_bin2bn ,
and
.Fn BN_print
first appeared in SSLeay 0.5.1.
.Fn BN_print_fp







|
<







295
296
297
298
299
300
301
302

303
304
305
306
307
308
309
on error.
.Pp
The error codes can be obtained by
.Xr ERR_get_error 3 .
.Sh SEE ALSO
.Xr BN_new 3 ,
.Xr BN_num_bytes 3 ,
.Xr BN_zero 3

.Sh HISTORY
.Fn BN_bn2bin ,
.Fn BN_bin2bn ,
and
.Fn BN_print
first appeared in SSLeay 0.5.1.
.Fn BN_print_fp
Changes to jni/libressl/man/BN_generate_prime.3.
1
2
3
4
5
6
7
8
9
10
.\" $OpenBSD: BN_generate_prime.3,v 1.15 2018/12/21 19:30:19 schwarze Exp $
.\" full merge up to: OpenSSL b3696a55 Sep 2 09:35:50 2017 -0400
.\" selective merge up to: OpenSSL df75c2bf Dec 9 01:02:36 2018 +0100
.\"
.\" This file was written by Ulf Moeller <ulf@openssl.org>
.\" Bodo Moeller <bodo@openssl.org>, and Matt Caswell <matt@openssl.org>.
.\" Copyright (c) 2000, 2003, 2013, 2014, 2018 The OpenSSL Project.
.\" All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
|
|
<







1
2

3
4
5
6
7
8
9
.\" $OpenBSD: BN_generate_prime.3,v 1.18 2019/08/25 19:24:00 schwarze Exp $
.\" full merge up to: OpenSSL f987a4dd Jun 27 10:12:08 2019 +0200

.\"
.\" This file was written by Ulf Moeller <ulf@openssl.org>
.\" Bodo Moeller <bodo@openssl.org>, and Matt Caswell <matt@openssl.org>.
.\" Copyright (c) 2000, 2003, 2013, 2014, 2018 The OpenSSL Project.
.\" All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: December 21 2018 $
.Dt BN_GENERATE_PRIME 3
.Os
.Sh NAME
.Nm BN_generate_prime_ex ,
.Nm BN_is_prime_ex ,
.Nm BN_is_prime_fasttest_ex ,
.Nm BN_GENCB_call ,







|







46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: August 25 2019 $
.Dt BN_GENERATE_PRIME 3
.Os
.Sh NAME
.Nm BN_generate_prime_ex ,
.Nm BN_is_prime_ex ,
.Nm BN_is_prime_fasttest_ex ,
.Nm BN_GENCB_call ,
152
153
154
155
156
157
158


159
160
161
162
163
164
165
.Fa "void *cb_arg"
.Fa "int do_trial_division"
.Fc
.Sh DESCRIPTION
.Fn BN_generate_prime_ex
generates a pseudo-random prime number of at least bit length
.Fa bits .


If
.Fa ret
is not
.Dv NULL ,
it will be used to store the number.
.Pp
If







>
>







151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
.Fa "void *cb_arg"
.Fa "int do_trial_division"
.Fc
.Sh DESCRIPTION
.Fn BN_generate_prime_ex
generates a pseudo-random prime number of at least bit length
.Fa bits .
The returned number is probably prime, but there is a very small
probability of returning a non-prime number.
If
.Fa ret
is not
.Dv NULL ,
it will be used to store the number.
.Pp
If
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
in order to suit a given generator.
.Pp
If
.Fa safe
is true, it will be a safe prime (i.e. a prime p so that (p-1)/2
is also prime).
.Pp
The prime number generation has a negligible error probability.
.Pp
.Fn BN_is_prime_ex
and
.Fn BN_is_prime_fasttest_ex
test if the number
.Fa p
is prime.
The following tests are performed until one of them shows that







<
<







209
210
211
212
213
214
215


216
217
218
219
220
221
222
in order to suit a given generator.
.Pp
If
.Fa safe
is true, it will be a safe prime (i.e. a prime p so that (p-1)/2
is also prime).
.Pp


.Fn BN_is_prime_ex
and
.Fn BN_is_prime_fasttest_ex
test if the number
.Fa p
is prime.
The following tests are performed until one of them shows that
247
248
249
250
251
252
253
254
255













256
257
258
259
260
261
262
perform a Miller-Rabin probabilistic primality test with
.Fa nchecks
iterations.
If
.Fa nchecks
==
.Dv BN_prime_checks ,
a number of iterations is used that yields a false positive rate of at
most 2^-80 for random input.













.Pp
If
.Fa cb
is not
.Dv NULL ,
.Fa BN_GENCB_call cb 1 j
is called after the j-th iteration (j = 0, 1, ...).







|
|
>
>
>
>
>
>
>
>
>
>
>
>
>







246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
perform a Miller-Rabin probabilistic primality test with
.Fa nchecks
iterations.
If
.Fa nchecks
==
.Dv BN_prime_checks ,
a number of iterations is used that yields a false positive rate
of at most 2\(ha-64 for random input.
The error rate depends on the size of the prime
and goes down for bigger primes.
The rate is 2\(ha-80 starting at 308 bits, 2\(ha-112 at 852 bits,
2\(ha-128 at 1080 bits, 2\(ha-192 at 3747 bits
and 2\(ha-256 at 6394 bits.
.Pp
When the source of the prime is not random or not trusted, the
number of checks needs to be much higher to reach the same level
of assurance: It should equal half of the targeted security level
in bits (rounded up to the next integer if necessary).
For instance, to reach the 128 bit security level,
.Fa nchecks
should be set to 64.
.Pp
If
.Fa cb
is not
.Dv NULL ,
.Fa BN_GENCB_call cb 1 j
is called after the j-th iteration (j = 0, 1, ...).
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
.Pp
The error codes can be obtained by
.Xr ERR_get_error 3 .
.Sh SEE ALSO
.Xr BN_new 3 ,
.Xr DH_generate_parameters 3 ,
.Xr DSA_generate_parameters 3 ,
.Xr ERR_get_error 3 ,
.Xr RAND_bytes 3 ,
.Xr RSA_generate_key 3
.Sh HISTORY
.Fn BN_generate_prime
and
.Fn BN_is_prime
first appeared in SSLeay 0.5.1 and had their
.Fa cb_arg







<
<







391
392
393
394
395
396
397


398
399
400
401
402
403
404
.Pp
The error codes can be obtained by
.Xr ERR_get_error 3 .
.Sh SEE ALSO
.Xr BN_new 3 ,
.Xr DH_generate_parameters 3 ,
.Xr DSA_generate_parameters 3 ,


.Xr RSA_generate_key 3
.Sh HISTORY
.Fn BN_generate_prime
and
.Fn BN_is_prime
first appeared in SSLeay 0.5.1 and had their
.Fa cb_arg
Changes to jni/libressl/man/BN_new.3.
1
2
3
4
5
6
7
8
.\" $OpenBSD: BN_new.3,v 1.14 2018/04/29 15:58:21 schwarze Exp $
.\" full merge up to: OpenSSL man3/BN_new 2457c19d Mar 6 08:43:36 2004 +0000
.\" selective merge up to: man3/BN_new 681acb31 Sep 29 13:10:34 2017 +0200
.\" full merge up to: OpenSSL man7/bn 05ea606a May 20 20:52:46 2016 -0400
.\"
.\" This file was written by Ulf Moeller <ulf@openssl.org>.
.\" Copyright (c) 2000, 2004 The OpenSSL Project.  All rights reserved.
.\"
|







1
2
3
4
5
6
7
8
.\" $OpenBSD: BN_new.3,v 1.16 2019/06/10 09:49:48 schwarze Exp $
.\" full merge up to: OpenSSL man3/BN_new 2457c19d Mar 6 08:43:36 2004 +0000
.\" selective merge up to: man3/BN_new 681acb31 Sep 29 13:10:34 2017 +0200
.\" full merge up to: OpenSSL man7/bn 05ea606a May 20 20:52:46 2016 -0400
.\"
.\" This file was written by Ulf Moeller <ulf@openssl.org>.
.\" Copyright (c) 2000, 2004 The OpenSSL Project.  All rights reserved.
.\"
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: April 29 2018 $
.Dt BN_NEW 3
.Os
.Sh NAME
.Nm BN_new ,
.Nm BN_init ,
.Nm BN_clear ,
.Nm BN_free ,







|







46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: June 10 2019 $
.Dt BN_NEW 3
.Os
.Sh NAME
.Nm BN_new ,
.Nm BN_init ,
.Nm BN_clear ,
.Nm BN_free ,
159
160
161
162
163
164
165
166


167
168
169
170
171
172
173
.Xr BN_mod_mul_reciprocal 3 ,
.Xr BN_num_bytes 3 ,
.Xr BN_rand 3 ,
.Xr BN_set_bit 3 ,
.Xr BN_set_flags 3 ,
.Xr BN_set_negative 3 ,
.Xr BN_swap 3 ,
.Xr BN_zero 3


.Sh HISTORY
.Fn BN_new ,
.Fn BN_clear ,
.Fn BN_free ,
and
.Fn BN_clear_free
first appeared in SSLeay 0.5.1 and have been available since







|
>
>







159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
.Xr BN_mod_mul_reciprocal 3 ,
.Xr BN_num_bytes 3 ,
.Xr BN_rand 3 ,
.Xr BN_set_bit 3 ,
.Xr BN_set_flags 3 ,
.Xr BN_set_negative 3 ,
.Xr BN_swap 3 ,
.Xr BN_zero 3 ,
.Xr crypto 3 ,
.Xr get_rfc3526_prime_8192 3
.Sh HISTORY
.Fn BN_new ,
.Fn BN_clear ,
.Fn BN_free ,
and
.Fn BN_clear_free
first appeared in SSLeay 0.5.1 and have been available since
Changes to jni/libressl/man/BN_rand.3.
1
2
3
4
5
6
7
8
.\"	$OpenBSD: BN_rand.3,v 1.14 2018/12/24 10:07:22 schwarze Exp $
.\" full merge up to: OpenSSL 05ea606a May 20 20:52:46 2016 -0400
.\" selective merge up to: OpenSSL df75c2bf Dec 9 01:02:36 2018 +0100
.\"
.\" This file was written by Ulf Moeller <ulf@openssl.org>.
.\" Copyright (c) 2000, 2001, 2002, 2013, 2015 The OpenSSL Project.
.\" All rights reserved.
.\"
|







1
2
3
4
5
6
7
8
.\"	$OpenBSD: BN_rand.3,v 1.16 2019/06/10 14:58:48 schwarze Exp $
.\" full merge up to: OpenSSL 05ea606a May 20 20:52:46 2016 -0400
.\" selective merge up to: OpenSSL df75c2bf Dec 9 01:02:36 2018 +0100
.\"
.\" This file was written by Ulf Moeller <ulf@openssl.org>.
.\" Copyright (c) 2000, 2001, 2002, 2013, 2015 The OpenSSL Project.
.\" All rights reserved.
.\"
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: December 24 2018 $
.Dt BN_RAND 3
.Os
.Sh NAME
.Nm BN_rand ,
.Nm BN_rand_range ,
.Nm BN_pseudo_rand ,
.Nm BN_pseudo_rand_range







|







46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: June 10 2019 $
.Dt BN_RAND 3
.Os
.Sh NAME
.Nm BN_rand ,
.Nm BN_rand_range ,
.Nm BN_pseudo_rand ,
.Nm BN_pseudo_rand_range
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
for
.Fn BN_rand_range .
.Sh RETURN VALUES
The functions return 1 on success, 0 on error.
The error codes can be obtained by
.Xr ERR_get_error 3 .
.Sh SEE ALSO
.Xr BN_new 3 ,
.Xr ERR_get_error 3 ,
.Xr RAND_add 3 ,
.Xr RAND_bytes 3
.Sh HISTORY
.Fn BN_rand
first appeared in SSLeay 0.5.1 and has been available since
.Ox 2.4 .
.Pp
The
.Fa top
== -1 case and the function
.Fn BN_rand_range
first appeared in OpenSSL 0.9.6a and have been available since
.Ox 3.0 .







|
<
<
<











116
117
118
119
120
121
122
123



124
125
126
127
128
129
130
131
132
133
134
for
.Fn BN_rand_range .
.Sh RETURN VALUES
The functions return 1 on success, 0 on error.
The error codes can be obtained by
.Xr ERR_get_error 3 .
.Sh SEE ALSO
.Xr BN_new 3



.Sh HISTORY
.Fn BN_rand
first appeared in SSLeay 0.5.1 and has been available since
.Ox 2.4 .
.Pp
The
.Fa top
== -1 case and the function
.Fn BN_rand_range
first appeared in OpenSSL 0.9.6a and have been available since
.Ox 3.0 .
Changes to jni/libressl/man/BN_set_negative.3.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24

25
26
27
28
29
30
31
.\"	$OpenBSD: BN_set_negative.3,v 1.4 2018/03/23 00:09:11 schwarze Exp $
.\"
.\" Copyright (c) 2016 Ingo Schwarze <schwarze@openbsd.org>
.\"
.\" Permission to use, copy, modify, and distribute this software for any
.\" purpose with or without fee is hereby granted, provided that the above
.\" copyright notice and this permission notice appear in all copies.
.\"
.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
.Dd $Mdocdate: March 23 2018 $
.Dt BN_SET_NEGATIVE 3
.Os
.Sh NAME
.Nm BN_set_negative ,
.Nm BN_is_negative
.Nd change and inspect the sign of a BIGNUM
.Sh SYNOPSIS

.Ft void
.Fo BN_set_negative
.Fa "BIGNUM *b"
.Fa "int n"
.Fc
.Ft int
.Fo BN_is_negative
|















|







>







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
.\"	$OpenBSD: BN_set_negative.3,v 1.5 2019/06/03 14:43:15 schwarze Exp $
.\"
.\" Copyright (c) 2016 Ingo Schwarze <schwarze@openbsd.org>
.\"
.\" Permission to use, copy, modify, and distribute this software for any
.\" purpose with or without fee is hereby granted, provided that the above
.\" copyright notice and this permission notice appear in all copies.
.\"
.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
.Dd $Mdocdate: June 3 2019 $
.Dt BN_SET_NEGATIVE 3
.Os
.Sh NAME
.Nm BN_set_negative ,
.Nm BN_is_negative
.Nd change and inspect the sign of a BIGNUM
.Sh SYNOPSIS
.In openssl/bn.h
.Ft void
.Fo BN_set_negative
.Fa "BIGNUM *b"
.Fa "int n"
.Fc
.Ft int
.Fo BN_is_negative
Changes to jni/libressl/man/BUF_MEM_new.3.
1
2
3
4
5
6
7
8
.\"	$OpenBSD: BUF_MEM_new.3,v 1.15 2018/03/27 17:35:50 schwarze Exp $
.\"	OpenSSL doc/crypto/buffer.pod 18edda0f Sep 20 03:28:54 2000 +0000
.\"	not merged: 74924dcb, 58e3457a, 21b0fa91, 7644a9ae
.\"	OpenSSL doc/crypto/BUF_MEM_new.pod 53934822 Jun 9 16:39:19 2016 -0400
.\"	not merged: c952780c, 91da5e77
.\"	OpenSSL doc/man3/BUF_MEM_new.pod 498180de Dec 12 15:35:09 2016 +0300
.\"
.\" This file was written by Ralf S. Engelschall <rse@openssl.org>.
|







1
2
3
4
5
6
7
8
.\"	$OpenBSD: BUF_MEM_new.3,v 1.16 2019/06/06 01:06:58 schwarze Exp $
.\"	OpenSSL doc/crypto/buffer.pod 18edda0f Sep 20 03:28:54 2000 +0000
.\"	not merged: 74924dcb, 58e3457a, 21b0fa91, 7644a9ae
.\"	OpenSSL doc/crypto/BUF_MEM_new.pod 53934822 Jun 9 16:39:19 2016 -0400
.\"	not merged: c952780c, 91da5e77
.\"	OpenSSL doc/man3/BUF_MEM_new.pod 498180de Dec 12 15:35:09 2016 +0300
.\"
.\" This file was written by Ralf S. Engelschall <rse@openssl.org>.
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: March 27 2018 $
.Dt BUF_MEM_NEW 3
.Os
.Sh NAME
.Nm BUF_MEM_new ,
.Nm BUF_MEM_free ,
.Nm BUF_MEM_grow ,
.Nm BUF_MEM_grow_clean ,







|







48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: June 6 2019 $
.Dt BUF_MEM_NEW 3
.Os
.Sh NAME
.Nm BUF_MEM_new ,
.Nm BUF_MEM_free ,
.Nm BUF_MEM_grow ,
.Nm BUF_MEM_grow_clean ,
180
181
182
183
184
185
186
187

188
189
190
191
192
193
194
.Pp
.Fn BUF_MEM_grow
and
.Fn BUF_MEM_grow_clean
return zero on error or the new size (i.e.\&
.Fa len ) .
.Sh SEE ALSO
.Xr BIO_new 3

.Sh HISTORY
.Fn BUF_MEM_new ,
.Fn BUF_MEM_free ,
and
.Fn BUF_MEM_grow
first appeared in SSLeay 0.6.0.
.Fn BUF_strdup







|
>







180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
.Pp
.Fn BUF_MEM_grow
and
.Fn BUF_MEM_grow_clean
return zero on error or the new size (i.e.\&
.Fa len ) .
.Sh SEE ALSO
.Xr BIO_new 3 ,
.Xr BIO_s_mem 3
.Sh HISTORY
.Fn BUF_MEM_new ,
.Fn BUF_MEM_free ,
and
.Fn BUF_MEM_grow
first appeared in SSLeay 0.6.0.
.Fn BUF_strdup
Added jni/libressl/man/CMS_ContentInfo_new.3.












































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
.\" $OpenBSD: CMS_ContentInfo_new.3,v 1.2 2019/08/18 21:44:10 schwarze Exp $
.\" Copyright (c) 2019 Ingo Schwarze <schwarze@openbsd.org>
.\"
.\" Permission to use, copy, modify, and distribute this software for any
.\" purpose with or without fee is hereby granted, provided that the above
.\" copyright notice and this permission notice appear in all copies.
.\"
.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
.Dd $Mdocdate: August 18 2019 $
.Dt CMS_CONTENTINFO_NEW 3
.Os
.Sh NAME
.Nm CMS_ContentInfo_new ,
.Nm CMS_ContentInfo_free ,
.Nm CMS_ContentInfo_print_ctx ,
.Nm CMS_ReceiptRequest_new ,
.Nm CMS_ReceiptRequest_free
.Nd Cryptographic Message Syntax data structures
.Sh SYNOPSIS
.In openssl/cms.h
.Ft CMS_ContentInfo *
.Fn CMS_ContentInfo_new void
.Ft void
.Fn CMS_ContentInfo_free "CMS_ContentInfo *cms"
.Ft int
.Fo CMS_ContentInfo_print_ctx
.Fa "BIO *out"
.Fa "CMS_ContentInfo *cms"
.Fa "int indent"
.Fa "const ASN1_PCTX *pctx"
.Fc
.Ft CMS_ReceiptRequest *
.Fn CMS_ReceiptRequest_new void
.Ft void
.Fn CMS_ReceiptRequest_free "CMS_ReceiptRequest *rr"
.Sh DESCRIPTION
.Fn CMS_ContentInfo_new
allocates and initializes an empty
.Vt CMS_ContentInfo
object, representing an ASN.1
.Vt ContentInfo
structure defined in RFC 5652 section 3.
It can hold a pointer to an ASN.1 OBJECT IDENTIFIER
and a pointer to either a
.Vt SignedData ,
.Vt EnvelopedData ,
.Vt DigestedData ,
.Vt EncryptedData ,
.Vt AuthenticatedData ,
or
.Vt CompressedData
object or to an arbitrary ASN.1 object.
.Fn CMS_ContentInfo_free
frees
.Fa cms .
.Pp
.Fn CMS_ContentInfo_print_ctx
prints a human readable representation of
.Fa cms
to
.Fa out .
.Pp
.Fn CMS_ReceiptRequest_new
allocates and initializes an empty
.Vt CMS_ReceiptRequest
object, representing an ASN.1
.Vt ReceiptRequest
structure defined in RFC 2634 section 2.7.
It can contain a content identifier, a list of recipients requested
to return a signed receipt, and a list of users to send the receipt to.
.Fn CMS_ReceiptRequest_free
frees
.Fa rr .
.Sh RETURN VALUES
.Fn CMS_ContentInfo_new
and
.Fn CMS_ReceiptRequest_new
return the new
.Vt CMS_ContentInfo
or
.Vt CMS_ReceiptRequest
object, respectively, or
.Dv NULL
if an error occurs.
.Sh SEE ALSO
.Xr BIO_new_CMS 3 ,
.Xr CMS_add0_cert 3 ,
.Xr CMS_add1_recipient_cert 3 ,
.Xr CMS_add1_signer 3 ,
.Xr CMS_compress 3 ,
.Xr CMS_decrypt 3 ,
.Xr CMS_encrypt 3 ,
.Xr CMS_final 3 ,
.Xr CMS_get0_RecipientInfos 3 ,
.Xr CMS_get0_SignerInfos 3 ,
.Xr CMS_get0_type 3 ,
.Xr CMS_get1_ReceiptRequest 3 ,
.Xr CMS_sign 3 ,
.Xr CMS_sign_receipt 3 ,
.Xr CMS_uncompress 3 ,
.Xr CMS_verify 3 ,
.Xr CMS_verify_receipt 3 ,
.Xr crypto 3 ,
.Xr d2i_CMS_ContentInfo 3 ,
.Xr i2d_CMS_bio_stream 3 ,
.Xr PEM_read_bio_PrivateKey 3 ,
.Xr PEM_write_bio_CMS_stream 3 ,
.Xr SMIME_read_CMS 3 ,
.Xr SMIME_write_CMS 3
.Sh STANDARDS
RFC 5652: Cryptographic Message Syntax, section 3: General Syntax
.Pp
RFC 3274: Compressed Data Content Type for Cryptographic Message Syntax (CMS)
.Pp
RFC 2634: Enhanced Security Services for S/MIME,
section 2.7: Receipt Request Syntax
.Sh HISTORY
.Fn CMS_ContentInfo_new ,
.Fn CMS_ContentInfo_free ,
.Fn CMS_ReceiptRequest_new ,
and
.Fn CMS_ReceiptRequest_free
first appeared in OpenSSL 0.9.8h and
.Fn CMS_ContentInfo_print_ctx
in OpenSSL 1.0.0.
This functions have been available since
.Ox 6.6 .
Added jni/libressl/man/CMS_add0_cert.3.












































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
.\" $OpenBSD: CMS_add0_cert.3,v 1.6 2019/08/18 21:44:10 schwarze Exp $
.\" full merge up to: OpenSSL e9b77246 Jan 20 19:58:49 2017 +0100
.\"
.\" This file is a derived work.
.\" The changes are covered by the following Copyright and license:
.\"
.\" Copyright (c) 2019 Ingo Schwarze <schwarze@openbsd.org>
.\"
.\" Permission to use, copy, modify, and distribute this software for any
.\" purpose with or without fee is hereby granted, provided that the above
.\" copyright notice and this permission notice appear in all copies.
.\"
.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
.\" The original file was written by Dr. Stephen Henson <steve@openssl.org>.
.\" Copyright (c) 2008 The OpenSSL Project.  All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\"
.\" 1. Redistributions of source code must retain the above copyright
.\"    notice, this list of conditions and the following disclaimer.
.\"
.\" 2. Redistributions in binary form must reproduce the above copyright
.\"    notice, this list of conditions and the following disclaimer in
.\"    the documentation and/or other materials provided with the
.\"    distribution.
.\"
.\" 3. All advertising materials mentioning features or use of this
.\"    software must display the following acknowledgment:
.\"    "This product includes software developed by the OpenSSL Project
.\"    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
.\"
.\" 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
.\"    endorse or promote products derived from this software without
.\"    prior written permission. For written permission, please contact
.\"    openssl-core@openssl.org.
.\"
.\" 5. Products derived from this software may not be called "OpenSSL"
.\"    nor may "OpenSSL" appear in their names without prior written
.\"    permission of the OpenSSL Project.
.\"
.\" 6. Redistributions of any form whatsoever must retain the following
.\"    acknowledgment:
.\"    "This product includes software developed by the OpenSSL Project
.\"    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
.\"
.\" THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
.\" EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
.\" PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
.\" ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
.\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: August 18 2019 $
.Dt CMS_ADD0_CERT 3
.Os
.Sh NAME
.Nm CMS_add0_cert ,
.Nm CMS_add1_cert ,
.Nm CMS_get1_certs ,
.Nm CMS_add0_crl ,
.Nm CMS_add1_crl ,
.Nm CMS_get1_crls
.Nd CMS certificate and CRL utility functions
.Sh SYNOPSIS
.In openssl/cms.h
.Ft int
.Fo CMS_add0_cert
.Fa "CMS_ContentInfo *cms"
.Fa "X509 *certificate"
.Fc
.Ft int
.Fo CMS_add1_cert
.Fa "CMS_ContentInfo *cms"
.Fa "X509 *certificate"
.Fc
.Ft STACK_OF(X509) *
.Fo CMS_get1_certs
.Fa "CMS_ContentInfo *cms"
.Fc
.Ft int
.Fo CMS_add0_crl
.Fa "CMS_ContentInfo *cms"
.Fa "X509_CRL *crl"
.Fc
.Ft int
.Fo CMS_add1_crl
.Fa "CMS_ContentInfo *cms"
.Fa "X509_CRL *crl"
.Fc
.Ft STACK_OF(X509_CRL) *
.Fo CMS_get1_crls
.Fa "CMS_ContentInfo *cms"
.Fc
.Sh DESCRIPTION
.Fn CMS_add0_cert
adds the
.Fa certificate
to the
.Fa certificates
field of
.Fa cms
if it is of the type
.Vt SignedData
or to the
.Fa originatorInfo.certs
field if it is of the type
.Vt EnvelopedData .
.Fn CMS_add1_cert
does the same and also increments the reference count of the
.Fa certificate
with
.Xr X509_up_ref 3
in case of success.
.Pp
.Fn CMS_get1_certs
returns all certificates in
.Fa cms .
.Pp
.Fn CMS_add0_crl
adds the
.Fa crl
to the
.Fa crls
field of
.Fa cms
if it is of the type
.Vt SignedData
or to the
.Fa originatorInfo.crls
field if it is of the type
.Vt EnvelopedData .
.Fn CMS_add1_crl
does the same and also increments the reference count of the
.Fa crl
with
.Xr X509_CRL_up_ref 3
in case of success.
.Pp
.Fn CMS_get1_crls
returns any CRLs in
.Fa cms .
.Pp
An error occurs if
.Fa cms
is of any type other than
.Vt SignedData
or
.Vt EnvelopedData .
.Pp
The same
.Fa certificate
or
.Fa crl
must not be added to the same
.Fa cms
structure more than once.
.Sh RETURN VALUES
.Fn CMS_add0_cert ,
.Fn CMS_add1_cert ,
.Fn CMS_add0_crl ,
and
.Fn CMS_add1_crl
return 1 for success or 0 for failure.
.Pp
.Fn CMS_get1_certs
and
.Fn CMS_get1_crls
return the STACK of certificates or CRLs or
.Dv NULL
if there are none or an error occurs.
The only error which will occur in practice is if the
.Fa cms
type is invalid.
.Sh SEE ALSO
.Xr CMS_ContentInfo_new 3 ,
.Xr CMS_encrypt 3 ,
.Xr CMS_final 3 ,
.Xr CMS_sign 3 ,
.Xr ERR_get_error 3
.Sh STANDARDS
RFC 5652: Cryptographic Message Syntax
.Bl -dash -compact -offset indent
.It
section 5.1: SignedData Type
.It
section 6.1: EnvelopedData Type
.El
.Sh HISTORY
.Fn CMS_add0_cert ,
.Fn CMS_add1_cert ,
.Fn CMS_get1_certs ,
.Fn CMS_add0_crl ,
and
.Fn CMS_get1_crls
first appeared in OpenSSL 0.9.8h and
.Fn CMS_add1_crl
in OpenSSL 1.0.0.
These functions have been available since
.Ox 6.6 .
Added jni/libressl/man/CMS_add1_recipient_cert.3.
















































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
.\" $OpenBSD: CMS_add1_recipient_cert.3,v 1.6 2019/08/18 21:44:10 schwarze Exp $
.\" full merge up to: OpenSSL e9b77246 Jan 20 19:58:49 2017 +0100
.\"
.\" This file is a derived work.
.\" The changes are covered by the following Copyright and license:
.\"
.\" Copyright (c) 2019 Ingo Schwarze <schwarze@openbsd.org>
.\"
.\" Permission to use, copy, modify, and distribute this software for any
.\" purpose with or without fee is hereby granted, provided that the above
.\" copyright notice and this permission notice appear in all copies.
.\"
.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
.\" The original file was written by Dr. Stephen Henson <steve@openssl.org>.
.\" Copyright (c) 2008 The OpenSSL Project.  All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\"
.\" 1. Redistributions of source code must retain the above copyright
.\"    notice, this list of conditions and the following disclaimer.
.\"
.\" 2. Redistributions in binary form must reproduce the above copyright
.\"    notice, this list of conditions and the following disclaimer in
.\"    the documentation and/or other materials provided with the
.\"    distribution.
.\"
.\" 3. All advertising materials mentioning features or use of this
.\"    software must display the following acknowledgment:
.\"    "This product includes software developed by the OpenSSL Project
.\"    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
.\"
.\" 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
.\"    endorse or promote products derived from this software without
.\"    prior written permission. For written permission, please contact
.\"    openssl-core@openssl.org.
.\"
.\" 5. Products derived from this software may not be called "OpenSSL"
.\"    nor may "OpenSSL" appear in their names without prior written
.\"    permission of the OpenSSL Project.
.\"
.\" 6. Redistributions of any form whatsoever must retain the following
.\"    acknowledgment:
.\"    "This product includes software developed by the OpenSSL Project
.\"    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
.\"
.\" THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
.\" EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
.\" PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
.\" ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
.\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: August 18 2019 $
.Dt CMS_ADD1_RECIPIENT_CERT 3
.Os
.Sh NAME
.Nm CMS_add1_recipient_cert ,
.Nm CMS_add0_recipient_key
.Nd add recipients to a CMS EnvelopedData structure
.Sh SYNOPSIS
.In openssl/cms.h
.Ft CMS_RecipientInfo *
.Fo CMS_add1_recipient_cert
.Fa "CMS_ContentInfo *cms"
.Fa "X509 *certificate"
.Fa "unsigned int flags"
.Fc
.Ft CMS_RecipientInfo *
.Fo CMS_add0_recipient_key
.Fa "CMS_ContentInfo *cms"
.Fa "int nid"
.Fa "unsigned char *key"
.Fa "size_t keylen"
.Fa "unsigned char *id"
.Fa "size_t idlen"
.Fa "ASN1_GENERALIZEDTIME *date"
.Fa "ASN1_OBJECT *otherTypeId"
.Fa "ASN1_TYPE *otherType"
.Fc
.Sh DESCRIPTION
These functions add a new
.Vt RecipientInfo
structure to the
.Fa recipientInfos
field of the
.Vt EnvelopedData
structure
.Fa cms ,
which should have been obtained from an initial call to
.Xr CMS_encrypt 3
with the flag
.Dv CMS_PARTIAL
set.
.Pp
.Fn CMS_add1_recipient_cert
adds the recipient
.Fa certificate
as a
.Vt KeyTransRecipientInfo
structure.
.Pp
.Fn CMS_add0_recipient_key
adds the symmetric
.Fa key
of length
.Fa keylen
using the wrapping algorithm
.Fa nid ,
the identifier
.Fa id
of length
.Fa idlen ,
and the optional values
.Fa date ,
.Fa otherTypeId
and
.Fa otherType
as a
.Vt KEKRecipientInfo
structure.
.Pp
The main purpose of these functions is to provide finer control over a CMS
.Vt EnvelopedData
structure where the simpler
.Xr CMS_encrypt 3
function defaults are not appropriate,
for example if one or more
.Vt KEKRecipientInfo
structures need to be added.
New attributes can also be added using the returned
.Vt CMS_RecipientInfo
structure and the CMS attribute utility functions.
.Pp
By default, recipient certificates are identified using issuer
name and serial number.
If the flag
.Dv CMS_USE_KEYID
is set, the subject key identifier value is used instead.
An error occurs if all recipient certificates do not have a subject key
identifier extension.
.Pp
Currently only AES based key wrapping algorithms are supported for
.Fa nid ,
specifically
.Dv NID_id_aes128_wrap ,
.Dv NID_id_aes192_wrap ,
and
.Dv NID_id_aes256_wrap .
If
.Fa nid
is set to
.Dv NID_undef ,
then an AES wrap algorithm will be used consistent with
.Fa keylen .
.Sh RETURN VALUES
.Fn CMS_add1_recipient_cert
and
.Fn CMS_add0_recipient_key
return an internal pointer to the
.Vt CMS_RecipientInfo
structure just added or
.Dv NULL
if an error occurs.
.Sh SEE ALSO
.Xr CMS_ContentInfo_new 3 ,
.Xr CMS_encrypt 3 ,
.Xr CMS_final 3 ,
.Xr ERR_get_error 3
.Sh STANDARDS
RFC 5652: Cryptographic Message Syntax
.Bl -dash -compact -offset indent
.It
section 6.1: EnvelopedData Type
.It
section 6.2.1: KeyTransRecipientInfo Type
.It
section 6.2.3: KEKRecipientInfo Type
.El
.Sh HISTORY
.Fn CMS_add1_recipient_cert
and
.Fn CMS_add0_recipient_key
first appeared in OpenSSL 0.9.8h
and have been available since
.Ox 6.6 .
Added jni/libressl/man/CMS_add1_signer.3.












































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
.\" $OpenBSD: CMS_add1_signer.3,v 1.6 2019/08/18 21:44:10 schwarze Exp $
.\" full merge up to: OpenSSL e9b77246 Jan 20 19:58:49 2017 +0100
.\"
.\" This file is a derived work.
.\" The changes are covered by the following Copyright and license:
.\"
.\" Copyright (c) 2019 Ingo Schwarze <schwarze@openbsd.org>
.\"
.\" Permission to use, copy, modify, and distribute this software for any
.\" purpose with or without fee is hereby granted, provided that the above
.\" copyright notice and this permission notice appear in all copies.
.\"
.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
.\" The original file was written by Dr. Stephen Henson <steve@openssl.org>.
.\" Copyright (c) 2008 The OpenSSL Project.  All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\"
.\" 1. Redistributions of source code must retain the above copyright
.\"    notice, this list of conditions and the following disclaimer.
.\"
.\" 2. Redistributions in binary form must reproduce the above copyright
.\"    notice, this list of conditions and the following disclaimer in
.\"    the documentation and/or other materials provided with the
.\"    distribution.
.\"
.\" 3. All advertising materials mentioning features or use of this
.\"    software must display the following acknowledgment:
.\"    "This product includes software developed by the OpenSSL Project
.\"    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
.\"
.\" 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
.\"    endorse or promote products derived from this software without
.\"    prior written permission. For written permission, please contact
.\"    openssl-core@openssl.org.
.\"
.\" 5. Products derived from this software may not be called "OpenSSL"
.\"    nor may "OpenSSL" appear in their names without prior written
.\"    permission of the OpenSSL Project.
.\"
.\" 6. Redistributions of any form whatsoever must retain the following
.\"    acknowledgment:
.\"    "This product includes software developed by the OpenSSL Project
.\"    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
.\"
.\" THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
.\" EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
.\" PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
.\" ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
.\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: August 18 2019 $
.Dt CMS_ADD1_SIGNER 3
.Os
.Sh NAME
.Nm CMS_add1_signer ,
.Nm CMS_SignerInfo_sign
.Nd add a signer to a CMS SignedData structure
.Sh SYNOPSIS
.In openssl/cms.h
.Ft CMS_SignerInfo *
.Fo CMS_add1_signer
.Fa "CMS_ContentInfo *cms"
.Fa "X509 *signcert"
.Fa "EVP_PKEY *pkey"
.Fa "const EVP_MD *md"
.Fa "unsigned int flags"
.Fc
.Ft int
.Fo CMS_SignerInfo_sign
.Fa "CMS_SignerInfo *si"
.Fc
.Sh DESCRIPTION
.Fn CMS_add1_signer
adds a signer with certificate
.Fa signcert
and private key
.Fa pkey
using message digest
.Fa md
to the
.Fa signerInfos
field of the
.Vt SignedData
structure
.Fa cms ,
which should have been obtained from an initial call to
.Xr CMS_sign 3
with the flag
.Dv CMS_PARTIAL
set, or which can be a valid
.Vt SignedData
structure in the case of re-signing.
.Pp
If
.Fa md
is
.Dv NULL ,
the default digest for the public key algorithm of
.Fa pkey
is used.
.Pp
Unless the
.Dv CMS_REUSE_DIGEST
flag is set, the
.Fa cms
structure remains incomplete and must be finalized either by streaming
(if applicable) or by a call to
.Xr CMS_final 3 .
.Pp
The main purpose of
.Fn CMS_add1_signer
is to provide finer control over a CMS
.Vt SignedData
structure where the simpler
.Xr CMS_sign 3
function defaults are not appropriate, for example if multiple signers
or non default digest algorithms are needed.
New attributes can also be added using the returned
.Vt CMS_SignerInfo
structure and the CMS attribute utility functions or the CMS signed
receipt request functions.
.Pp
Any of the following flags (OR'ed together) can be passed in the
.Fa flags
parameter:
.Bl -tag -width Ds
.It Dv CMS_REUSE_DIGEST
Attempt to copy the content digest value from one of the existing
.Vt CMS_SignerInfo
structures in
.Fa cms
while adding another signer.
An error occurs if a matching digest value cannot be found to copy.
The
.Fa cms
structure will be valid and finalized when this flag is set.
.It Dv CMS_PARTIAL
If this flag is set in addition to
.Dv CMS_REUSE_DIGEST ,
the returned
.Vt CMS_SignerInfo
structure will not be finalized so additional attributes can be added.
In this case an explicit call to
.Fn CMS_SignerInfo_sign
is needed to finalize it.
.It Dv CMS_NOCERTS
Do not add the signer's certificate to the
.Fa certificates
field of
.Fa cms .
The signer's certificate must still be supplied in the
.Fa signcert
parameter though.
This flag can reduce the size of the signature if the signer's certificate can
be obtained by other means, for example from a previously signed message.
.It Dv CMS_NOATTR
Leave the
.Fa signedAttrs
field of the returned
.Vt CMS_SignedData
structure empty.
By default, several CMS
.Vt SignedAttributes
are added, including the signing time, the CMS content type,
and the supported list of ciphers in an
.Vt SMIMECapabilities
attribute.
.It Dv CMS_NOSMIMECAP
Omit just the
.Vt SMIMECapabilities
attribute.
.It Dv CMS_USE_KEYID
Use the subject key identifier value to identify signing certificates.
An error occurs if the signing certificate does not have a subject key
identifier extension.
By default, issuer name and serial number are used instead.
.El
.Pp
If present, the
.Vt SMIMECapabilities
attribute indicates support for the
following algorithms in preference order: 256 bit AES, Gost R3411-94,
Gost 28147-89, 192 bit AES, 128 bit AES, triple DES, 128 bit RC2, 64 bit
RC2, DES and 40 bit RC2.
If any of these algorithms is not available then it will not be
included.
.Pp
The
.Fn CMS_SignerInfo_sign
function explicitly signs
.Fa si .
Its main use is when the
.Dv CMS_REUSE_DIGEST
and
.Dv CMS_PARTIAL
flags were both set in the call to
.Fn CMS_add1_signer
that created
.Fa si .
.Sh RETURN VALUES
.Fn CMS_add1_signer
returns an internal pointer to the new
.Vt CMS_SignerInfo
structure just added or
.Dv NULL
if an error occurs.
.Sh SEE ALSO
.Xr CMS_ContentInfo_new 3 ,
.Xr CMS_final 3 ,
.Xr CMS_sign 3 ,
.Xr ERR_get_error 3
.Sh STANDARDS
RFC 5652: Cryptographic Message Syntax, section 5.1: SignedData Type
.Pp
RFC 8551: Secure/Multipurpose Internet Mail Extensions (S/MIME)
Version\ 4.0 Message Specification
.Bl -dash -compact -offset indent
.It
section 2.5: Attributes and the SignerInfo Type
.It
section 2.5.2: SMIMECapabilities Attribute
.El
.Sh HISTORY
.Fn CMS_add1_signer
and
.Fn CMS_SignerInfo_sign
first appeared in OpenSSL 0.9.8h
and have been available since
.Ox 6.6 .
Added jni/libressl/man/CMS_compress.3.




















































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
.\" $OpenBSD: CMS_compress.3,v 1.6 2019/08/18 21:44:10 schwarze Exp $
.\" full merge up to: OpenSSL 99d63d46 Oct 26 13:56:48 2016 -0400
.\"
.\" This file is a derived work.
.\" The changes are covered by the following Copyright and license:
.\"
.\" Copyright (c) 2019 Ingo Schwarze <schwarze@openbsd.org>
.\"
.\" Permission to use, copy, modify, and distribute this software for any
.\" purpose with or without fee is hereby granted, provided that the above
.\" copyright notice and this permission notice appear in all copies.
.\"
.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
.\" The original file was written by Dr. Stephen Henson <steve@openssl.org>.
.\" Copyright (c) 2008 The OpenSSL Project.  All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\"
.\" 1. Redistributions of source code must retain the above copyright
.\"    notice, this list of conditions and the following disclaimer.
.\"
.\" 2. Redistributions in binary form must reproduce the above copyright
.\"    notice, this list of conditions and the following disclaimer in
.\"    the documentation and/or other materials provided with the
.\"    distribution.
.\"
.\" 3. All advertising materials mentioning features or use of this
.\"    software must display the following acknowledgment:
.\"    "This product includes software developed by the OpenSSL Project
.\"    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
.\"
.\" 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
.\"    endorse or promote products derived from this software without
.\"    prior written permission. For written permission, please contact
.\"    openssl-core@openssl.org.
.\"
.\" 5. Products derived from this software may not be called "OpenSSL"
.\"    nor may "OpenSSL" appear in their names without prior written
.\"    permission of the OpenSSL Project.
.\"
.\" 6. Redistributions of any form whatsoever must retain the following
.\"    acknowledgment:
.\"    "This product includes software developed by the OpenSSL Project
.\"    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
.\"
.\" THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
.\" EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
.\" PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
.\" ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
.\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: August 18 2019 $
.Dt CMS_COMPRESS 3
.Os
.Sh NAME
.Nm CMS_compress
.Nd create a CMS CompressedData structure
.Sh SYNOPSIS
.In openssl/cms.h
.Ft CMS_ContentInfo *
.Fo CMS_compress
.Fa "BIO *in"
.Fa "int comp_nid"
.Fa "unsigned int flags"
.Fc
.Sh DESCRIPTION
.Fn CMS_compress
creates and returns a CMS
.Vt CompressedData
structure.
.Pp
.Fa comp_nid
is the compression algorithm to use or
.Dv NID_undef
to use the default algorithm.
Currently, the default algorithm
.Dv NID_zlib_compression
is the only supported algorithm.
If zlib support is not compiled in,
.Fn CMS_compress
always returns an error.
.Pp
.Fa in
provides the content to be compressed.
.Pp
Any of the following flags (OR'ed together) can be passed in the
.Fa flags
parameter:
.Bl -tag -width Ds
.It Dv CMS_TEXT
Prepend MIME headers for type text/plain to the data.
.It Dv CMS_BINARY
Do not translate the supplied content into MIME canonical format,
even though that is required by the S/MIME specifications.
This option should be used if the supplied data is in binary format.
Otherwise, the translation will corrupt it.
If
.Dv CMS_BINARY
is set,
.Dv CMS_TEXT
is ignored.
.It Dv CMS_STREAM
Return a partial
.Vt CMS_ContentInfo
structure suitable for streaming I/O: no data is read from
.Fa in .
Several functions including
.Xr SMIME_write_CMS 3 ,
.Xr i2d_CMS_bio_stream 3 ,
or
.Xr PEM_write_bio_CMS_stream 3
can be used to finalize the structure.
Alternatively, finalization can be performed by obtaining the streaming
ASN1
.Vt BIO
directly using
.Xr BIO_new_CMS 3 .
Outputting the contents of the
.Vt CMS_ContentInfo
structure via a function that does not
properly finalize it will give unpredictable results.
.It Dv CMS_DETACHED
Do not include the compressed data in the
.Vt CMS_ContentInfo
structure.
This is rarely used in practice and is not supported by
.Xr SMIME_write_CMS 3 .
.El
.Pp
Additional compression parameters such as the zlib compression level
cannot currently be set.
.Sh RETURN VALUES
.Fn CMS_compress
returns either a
.Vt CMS_ContentInfo
structure or
.Dv NULL
if an error occurred.
The error can be obtained from
.Xr ERR_get_error 3 .
.Sh SEE ALSO
.Xr CMS_ContentInfo_new 3 ,
.Xr CMS_uncompress 3
.Sh STANDARDS
RFC 3274: Compressed Data Content Type for Cryptographic Message Syntax (CMS)
.Sh HISTORY
.Fn CMS_compress
first appeared in OpenSSL 0.9.8h
and has been available since
.Ox 6.6 .
.Pp
The
.Dv CMS_STREAM
flag first appeared in OpenSSL 1.0.0.
Added jni/libressl/man/CMS_decrypt.3.




































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
.\" $OpenBSD: CMS_decrypt.3,v 1.7 2019/08/18 21:44:10 schwarze Exp $
.\" full merge up to: OpenSSL e9b77246 Jan 20 19:58:49 2017 +0100
.\"
.\" This file is a derived work.
.\" The changes are covered by the following Copyright and license:
.\"
.\" Copyright (c) 2019 Ingo Schwarze <schwarze@openbsd.org>
.\"
.\" Permission to use, copy, modify, and distribute this software for any
.\" purpose with or without fee is hereby granted, provided that the above
.\" copyright notice and this permission notice appear in all copies.
.\"
.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
.\" The original file was written by Dr. Stephen Henson <steve@openssl.org>.
.\" Copyright (c) 2008, 2014 The OpenSSL Project.  All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\"
.\" 1. Redistributions of source code must retain the above copyright
.\"    notice, this list of conditions and the following disclaimer.
.\"
.\" 2. Redistributions in binary form must reproduce the above copyright
.\"    notice, this list of conditions and the following disclaimer in
.\"    the documentation and/or other materials provided with the
.\"    distribution.
.\"
.\" 3. All advertising materials mentioning features or use of this
.\"    software must display the following acknowledgment:
.\"    "This product includes software developed by the OpenSSL Project
.\"    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
.\"
.\" 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
.\"    endorse or promote products derived from this software without
.\"    prior written permission. For written permission, please contact
.\"    openssl-core@openssl.org.
.\"
.\" 5. Products derived from this software may not be called "OpenSSL"
.\"    nor may "OpenSSL" appear in their names without prior written
.\"    permission of the OpenSSL Project.
.\"
.\" 6. Redistributions of any form whatsoever must retain the following
.\"    acknowledgment:
.\"    "This product includes software developed by the OpenSSL Project
.\"    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
.\"
.\" THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
.\" EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
.\" PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
.\" ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
.\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: August 18 2019 $
.Dt CMS_DECRYPT 3
.Os
.Sh NAME
.Nm CMS_decrypt ,
.Nm CMS_decrypt_set1_pkey ,
.Nm CMS_decrypt_set1_key
.Nd decrypt content from a CMS EnvelopedData structure
.Sh SYNOPSIS
.In openssl/cms.h
.Ft int
.Fo CMS_decrypt
.Fa "CMS_ContentInfo *cms"
.Fa "EVP_PKEY *private_key"
.Fa "X509 *certificate"
.Fa "BIO *dcont"
.Fa "BIO *out"
.Fa "unsigned int flags"
.Fc
.Ft int
.Fo CMS_decrypt_set1_pkey
.Fa "CMS_ContentInfo *cms"
.Fa "EVP_PKEY *private_key"
.Fa "X509 *certificate"
.Fc
.Ft int
.Fo CMS_decrypt_set1_key
.Fa "CMS_ContentInfo *cms"
.Fa "unsigned char *symmetric_key"
.Fa "size_t keylen"
.Fa "const unsigned char *id"
.Fa "size_t idlen"
.Fc
.Sh DESCRIPTION
.Fn CMS_decrypt
extracts and decrypts the content from the CMS
.Vt EnvelopedData
structure
.Fa cms
using the
.Fa private_key
and the
.Fa certificate
of the recipient.
It writes the decrypted content to
.Fa out .
.Pp
In the rare case where the compressed content is detached, pass it in via
.Fa dcont .
For normal use, set
.Fa dcont
to
.Dv NULL .
.Pp
Although the recipient's
.Fa certificate
is not needed to decrypt the data, it is needed to locate the
appropriate (of possibly several) recipients in the CMS structure.
.Pp
If the
.Fa certificate
is set to
.Dv NULL ,
all possible recipients are tried.
This case however is problematic.
To thwart the MMA attack (Bleichenbacher's attack on PKCS #1 v1.5 RSA
padding), all recipients are tried whether they succeed or not.
If no recipient succeeds, a random symmetric key is used to decrypt
the content: this will typically output garbage and may (but is not
guaranteed to) ultimately return a padding error only.
If
.Fn CMS_decrypt
just returned an error when all recipient encrypted keys failed to
decrypt, an attacker could use this in a timing attack.
If the special flag
.Dv CMS_DEBUG_DECRYPT
is set, the above behaviour is modified and an error
.Em is
returned if no recipient encrypted key can be decrypted
.Em without
generating a random content encryption key.
Applications should use this flag with extreme caution
especially in automated gateways as it can leave them open to attack.
.Pp
It is possible to determine the correct recipient key by other means
(for example by looking them up in a database) and setting them in the
.Fa cms
structure in advance using the CMS utility functions such as
.Fn CMS_decrypt_set1_pkey .
In this case both
.Fa certificate
and
.Fa private_key
should be set to
.Dv NULL
when calling
.Fn CMS_decrypt
later on.
.Pp
To process
.Vt KEKRecipientInfo
types,
.Fn CMS_decrypt_set1_key
or
.Xr CMS_RecipientInfo_set0_key 3
and
.Xr CMS_RecipientInfo_decrypt 3
should be called before
.Fn CMS_decrypt
and
.Fa certificate
and
.Fa private_key
set to
.Dv NULL
when calling
.Fn CMS_decrypt
later on.
.Pp
If the
.Dv CMS_TEXT
bit is set in
.Fa flags ,
MIME headers for type text/plain are deleted from the content.
If the content is not of type text/plain, an error occurs.
.Sh RETURN VALUES
.Fn CMS_decrypt ,
.Fn CMS_decrypt_set1_pkey ,
and
.Fn CMS_decrypt_set1_key
return 1 for success or 0 for failure.
The error can be obtained from
.Xr ERR_get_error 3 .
.Sh SEE ALSO
.Xr CMS_ContentInfo_new 3 ,
.Xr CMS_encrypt 3 ,
.Xr CMS_get0_RecipientInfos 3
.Sh STANDARDS
RFC 5652: Cryptographic Message Syntax (CMS)
.Bl -dash -compact -offset indent
.It
section 6.1: EnvelopedData Type
.It
section 6.2.3: KEKRecipientInfo Type
.El
.Sh HISTORY
.Fn CMS_decrypt ,
.Fn CMS_decrypt_set1_pkey ,
and
.Fn CMS_decrypt_set1_key
first appeared in OpenSSL 0.9.8h
and have been available since
.Ox 6.6 .
.Sh BUGS
The lack of single pass processing and the need to hold all data in
memory as mentioned in
.Xr CMS_verify 3
also applies to
.Fn CMS_decrypt .
Added jni/libressl/man/CMS_encrypt.3.






























































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
.\" $OpenBSD: CMS_encrypt.3,v 1.6 2019/08/18 21:44:10 schwarze Exp $
.\" full merge up to: OpenSSL 83cf7abf May 29 13:07:08 2018 +0100
.\"
.\" This file was written by Dr. Stephen Henson <steve@openssl.org>.
.\" Copyright (c) 2008 The OpenSSL Project.  All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\"
.\" 1. Redistributions of source code must retain the above copyright
.\"    notice, this list of conditions and the following disclaimer.
.\"
.\" 2. Redistributions in binary form must reproduce the above copyright
.\"    notice, this list of conditions and the following disclaimer in
.\"    the documentation and/or other materials provided with the
.\"    distribution.
.\"
.\" 3. All advertising materials mentioning features or use of this
.\"    software must display the following acknowledgment:
.\"    "This product includes software developed by the OpenSSL Project
.\"    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
.\"
.\" 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
.\"    endorse or promote products derived from this software without
.\"    prior written permission. For written permission, please contact
.\"    openssl-core@openssl.org.
.\"
.\" 5. Products derived from this software may not be called "OpenSSL"
.\"    nor may "OpenSSL" appear in their names without prior written
.\"    permission of the OpenSSL Project.
.\"
.\" 6. Redistributions of any form whatsoever must retain the following
.\"    acknowledgment:
.\"    "This product includes software developed by the OpenSSL Project
.\"    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
.\"
.\" THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
.\" EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
.\" PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
.\" ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
.\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: August 18 2019 $
.Dt CMS_ENCRYPT 3
.Os
.Sh NAME
.Nm CMS_encrypt
.Nd create a CMS EnvelopedData structure
.Sh SYNOPSIS
.In openssl/cms.h
.Ft CMS_ContentInfo *
.Fo CMS_encrypt
.Fa "STACK_OF(X509) *certificates"
.Fa "BIO *in"
.Fa "const EVP_CIPHER *cipher"
.Fa "unsigned int flags"
.Fc
.Sh DESCRIPTION
.Fn CMS_encrypt
creates a CMS
.Vt EnvelopedData
structure, encrypting the content provided by
.Fa in .
.Pp
The recipient
.Fa certificates
are added as
.Vt KeyTransRecipientInfo
structures by calling the function
.Xr CMS_add1_recipient_cert 3
internally.
Only certificates carrying RSA, Diffie-Hellman or EC keys are supported
by this function.
The
.Fa certificates
argument can be set to
.Dv NULL
if the
.Dv CMS_PARTIAL
flag is set and recipients are added later using
.Xr CMS_add1_recipient_cert 3
or
.Xr CMS_add0_recipient_key 3 .
.Pp
.Fa cipher
is the symmetric cipher to use.
It must support ASN.1 encoding of its parameters.
.Xr EVP_des_ede3_cbc 3
(triple DES) is the algorithm of choice for S/MIME use because most
clients support it.
.Pp
Many browsers implement a "sign and encrypt" option which is simply an
S/MIME
.Vt EnvelopedData
containing an S/MIME signed message.
This can be readily produced by storing the S/MIME signed message in a
memory BIO and passing it to
.Fn CMS_encrypt .
.Pp
The following flags can be passed in the
.Fa flags
parameter:
.Bl -tag -width Ds
.It Dv CMS_TEXT
MIME headers for type text/plain are prepended to the data.
.It Dv CMS_BINARY
Do not translate the supplied content into MIME canonical format
even though that is required by the S/MIME specifications.
This option should be used if the supplied data is in binary format.
Otherwise, the translation will corrupt it.
If
.Dv CMS_BINARY
is set, then
.Dv CMS_TEXT
is ignored.
.It Dv CMS_USE_KEYID
Use the subject key identifier value to identify recipient certificates.
An error occurs if all recipient certificates do not have a subject key
identifier extension.
By default, issuer name and serial number are used instead.
.It Dv CMS_STREAM
Return a partial
.Vt CMS_ContentInfo
structure suitable for streaming I/O: no data is read from the BIO
.Fa in .
Several functions including
.Xr SMIME_write_CMS 3 ,
.Xr i2d_CMS_bio_stream 3 ,
or
.Xr PEM_write_bio_CMS_stream 3
can be used  to finalize the structure.
Alternatively, finalization can be performed by obtaining the streaming
ASN1
.Vt BIO
directly using
.Xr BIO_new_CMS 3 .
Outputting the content of the returned
.Vt CMS_ContentInfo
structure via a function that does not properly finalize it
will give unpredictable results.
.It Dv CMS_PARTIAL
Return a partial
.Vt CMS_ContentInfo
structure to which additional recipients and attributes can
be added before finalization.
.It Dv CMS_DETACHED
Omit the data being encrypted from the
.Vt CMS_ContentInfo
structure.
This is rarely used in practice and is not supported by
.Xr SMIME_write_CMS 3 .
.El
.Sh RETURN VALUES
.Fn CMS_encrypt
returns either a
.Vt CMS_ContentInfo
structure or
.Dv NULL
if an error occurred.
The error can be obtained from
.Xr ERR_get_error 3 .
.Sh SEE ALSO
.Xr CMS_add0_cert 3 ,
.Xr CMS_add1_recipient_cert 3 ,
.Xr CMS_ContentInfo_new 3 ,
.Xr CMS_decrypt 3
.Sh STANDARDS
RFC 5652: Cryptographic Message Syntax (CMS)
.Bl -dash -compact -offset indent
.It
section 6.1: EnvelopedData Type
.It
section 6.2.1: KeyTransRecipientInfo Type
.El
.Sh HISTORY
.Fn CMS_encrypt
first appeared in OpenSSL 0.9.8h
and has been available since
.Ox 6.6 .
.Pp
The
.Dv CMS_STREAM
flag first appeared in OpenSSL 1.0.0.
Added jni/libressl/man/CMS_final.3.










































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
.\" $OpenBSD: CMS_final.3,v 1.5 2019/08/18 21:44:10 schwarze Exp $
.\" full merge up to: OpenSSL 25ccb589 Jul 1 02:02:06 2019 +0800
.\"
.\" This file was written by Dr. Stephen Henson <steve@openssl.org>.
.\" Copyright (c) 2008 The OpenSSL Project.  All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\"
.\" 1. Redistributions of source code must retain the above copyright
.\"    notice, this list of conditions and the following disclaimer.
.\"
.\" 2. Redistributions in binary form must reproduce the above copyright
.\"    notice, this list of conditions and the following disclaimer in
.\"    the documentation and/or other materials provided with the
.\"    distribution.
.\"
.\" 3. All advertising materials mentioning features or use of this
.\"    software must display the following acknowledgment:
.\"    "This product includes software developed by the OpenSSL Project
.\"    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
.\"
.\" 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
.\"    endorse or promote products derived from this software without
.\"    prior written permission. For written permission, please contact
.\"    openssl-core@openssl.org.
.\"
.\" 5. Products derived from this software may not be called "OpenSSL"
.\"    nor may "OpenSSL" appear in their names without prior written
.\"    permission of the OpenSSL Project.
.\"
.\" 6. Redistributions of any form whatsoever must retain the following
.\"    acknowledgment:
.\"    "This product includes software developed by the OpenSSL Project
.\"    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
.\"
.\" THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
.\" EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
.\" PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
.\" ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
.\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: August 18 2019 $
.Dt CMS_FINAL 3
.Os
.Sh NAME
.Nm CMS_final
.Nd finalise a CMS_ContentInfo structure
.Sh SYNOPSIS
.In openssl/cms.h
.Ft int
.Fo CMS_final
.Fa "CMS_ContentInfo *cms"
.Fa "BIO *data"
.Fa "BIO *dcont"
.Fa "unsigned int flags"
.Fc
.Sh DESCRIPTION
.Fn CMS_final
finalises the structure
.Fa cms .
Its purpose is to perform any operations necessary on
.Fa cms
(digest computation for example) and set the appropriate fields.
The parameter
.Fa data
contains the content to be processed.
The
.Fa dcont
parameter contains a
.Vt BIO
to write content to after processing: this is
only used with detached data and will usually be set to
.Dv NULL .
.Pp
This function will normally be called when the
.Dv CMS_PARTIAL
flag is used.
It should only be used when streaming is not performed because the
streaming I/O functions perform finalisation operations internally.
.Sh RETURN VALUES
.Fn CMS_final
returns 1 for success or 0 for failure.
.Sh SEE ALSO
.Xr CMS_ContentInfo_new 3 ,
.Xr CMS_encrypt 3 ,
.Xr CMS_sign 3 ,
.Xr ERR_get_error 3
.Sh HISTORY
.Fn CMS_final
first appeared in OpenSSL 0.9.8h
and has been available since
.Ox 6.6 .
Added jni/libressl/man/CMS_get0_RecipientInfos.3.
















































































































































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
.\" $OpenBSD: CMS_get0_RecipientInfos.3,v 1.6 2019/08/18 21:44:10 schwarze Exp $
.\" full merge up to: OpenSSL e9b77246 Jan 20 19:58:49 2017 +0100
.\"
.\" This file was written by Dr. Stephen Henson <steve@openssl.org>.
.\" Copyright (c) 2008, 2013 The OpenSSL Project.  All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\"
.\" 1. Redistributions of source code must retain the above copyright
.\"    notice, this list of conditions and the following disclaimer.
.\"
.\" 2. Redistributions in binary form must reproduce the above copyright
.\"    notice, this list of conditions and the following disclaimer in
.\"    the documentation and/or other materials provided with the
.\"    distribution.
.\"
.\" 3. All advertising materials mentioning features or use of this
.\"    software must display the following acknowledgment:
.\"    "This product includes software developed by the OpenSSL Project
.\"    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
.\"
.\" 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
.\"    endorse or promote products derived from this software without
.\"    prior written permission. For written permission, please contact
.\"    openssl-core@openssl.org.
.\"
.\" 5. Products derived from this software may not be called "OpenSSL"
.\"    nor may "OpenSSL" appear in their names without prior written
.\"    permission of the OpenSSL Project.
.\"
.\" 6. Redistributions of any form whatsoever must retain the following
.\"    acknowledgment:
.\"    "This product includes software developed by the OpenSSL Project
.\"    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
.\"
.\" THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
.\" EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
.\" PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
.\" ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
.\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: August 18 2019 $
.Dt CMS_GET0_RECIPIENTINFOS 3
.Os
.Sh NAME
.Nm CMS_get0_RecipientInfos ,
.Nm CMS_RecipientInfo_type ,
.Nm CMS_RecipientInfo_ktri_get0_signer_id ,
.Nm CMS_RecipientInfo_ktri_cert_cmp ,
.Nm CMS_RecipientInfo_set0_pkey ,
.Nm CMS_RecipientInfo_kekri_get0_id ,
.Nm CMS_RecipientInfo_kekri_id_cmp ,
.Nm CMS_RecipientInfo_set0_key ,
.Nm CMS_RecipientInfo_decrypt ,
.Nm CMS_RecipientInfo_encrypt
.Nd CMS EnvelopedData RecipientInfo routines
.Sh SYNOPSIS
.In openssl/cms.h
.Ft STACK_OF(CMS_RecipientInfo) *
.Fo CMS_get0_RecipientInfos
.Fa "CMS_ContentInfo *cms"
.Fc
.Ft int
.Fo CMS_RecipientInfo_type
.Fa "CMS_RecipientInfo *ri"
.Fc
.Ft int
.Fo CMS_RecipientInfo_ktri_get0_signer_id
.Fa "CMS_RecipientInfo *ri"
.Fa "ASN1_OCTET_STRING **keyid"
.Fa "X509_NAME **issuer"
.Fa "ASN1_INTEGER **sno"
.Fc
.Ft int
.Fo CMS_RecipientInfo_ktri_cert_cmp
.Fa "CMS_RecipientInfo *ri"
.Fa "X509 *certificate"
.Fc
.Ft int
.Fo CMS_RecipientInfo_set0_pkey
.Fa "CMS_RecipientInfo *ri"
.Fa "EVP_PKEY *pkey"
.Fc
.Ft int
.Fo CMS_RecipientInfo_kekri_get0_id
.Fa "CMS_RecipientInfo *ri"
.Fa "X509_ALGOR **palg"
.Fa "ASN1_OCTET_STRING **pid"
.Fa "ASN1_GENERALIZEDTIME **pdate"
.Fa "ASN1_OBJECT **potherid"
.Fa "ASN1_TYPE **pothertype"
.Fc
.Ft int
.Fo CMS_RecipientInfo_kekri_id_cmp
.Fa "CMS_RecipientInfo *ri"
.Fa "const unsigned char *id"
.Fa "size_t idlen"
.Fc
.Ft int
.Fo CMS_RecipientInfo_set0_key
.Fa "CMS_RecipientInfo *ri"
.Fa "unsigned char *key"
.Fa "size_t keylen"
.Fc
.Ft int
.Fo CMS_RecipientInfo_decrypt
.Fa "CMS_ContentInfo *cms"
.Fa "CMS_RecipientInfo *ri"
.Fc
.Ft int
.Fo CMS_RecipientInfo_encrypt
.Fa "CMS_ContentInfo *cms"
.Fa "CMS_RecipientInfo *ri"
.Fc
.Sh DESCRIPTION
.Fn CMS_get0_RecipientInfos
returns all the
.Vt RecipientInfo
structures associated with the
.Vt EnvelopedData
structure
.Fa cms .
.Pp
.Fn CMS_RecipientInfo_type
returns the type of
.Fa ri :
.Bl -column CMS_RECIPINFO_TRANS for -compact
.It Dv CMS_RECIPINFO_TRANS Ta for Ta Vt KeyTransRecipientInfo ,
.It Dv CMS_RECIPINFO_AGREE Ta for Ta Vt KeyAgreeRecipientInfo ,
.It Dv CMS_RECIPINFO_KEK   Ta for Ta Vt KEKRecipientInfo ,
.It Dv CMS_RECIPINFO_PASS  Ta for Ta Vt PasswordRecipientinfo , No or
.It Dv CMS_RECIPINFO_OTHER Ta for Ta Vt OtherRecipientInfo .
.El
.Pp
.Fn CMS_RecipientInfo_ktri_get0_signer_id
retrieves the certificate
.Vt RecipientIdentifier
associated with the
.Vt KeyTransRecipientInfo
structure
.Fa ri .
Either the
.Vt SubjectKeyIdentifier
will be set in
.Fa keyid
or both issuer name and serial number in
.Fa issuer
and
.Fa sno .
.Pp
.Fn CMS_RecipientInfo_ktri_cert_cmp
compares the
.Fa certificate
against the
.Vt KeyTransRecipientInfo
structure
.Fa ri .
.Pp
.Fn CMS_RecipientInfo_set0_pkey
associates the private key
.Fa pkey
with the
.Vt KeyTransRecipientInfo
structure
.Fa ri .
.Pp
.Fn CMS_RecipientInfo_kekri_get0_id
retrieves the key information from the
.Vt KEKRecipientInfo
structure
.Fa ri .
Fields are copied out as follows:
.Bl -column keyEncryptionAlgorithm to -compact
.It Fa keyEncryptionAlgorithm Ta to Ta Pf * Fa palg ,
.It Fa keyIdentifier          Ta to Ta Pf * Fa pid ,
.It Fa date                   Ta to Ta Pf * Fa pdate Pq optional ,
.It Fa other.keyAttrId        Ta to Ta Pf * Fa potherid Pq optional ,
.It Fa other.keyAttr          Ta to Ta Pf * Fa pothertype Pq optional .
.El
Where a field is optional and absent,
.Dv NULL
is written to the corresponding parameter.
Parameters the application is not interested in can be set to
.Dv NULL .
.Pp
.Fn CMS_RecipientInfo_kekri_id_cmp
compares the identifier in the
.Fa id
and
.Fa idlen
parameters against the
.Fa keyIdentifier
field of the
.Vt KEKRecipientInfo
structure
.Fa ri .
.Pp
.Fn CMS_RecipientInfo_set0_key
associates the symmetric
.Fa key
of length
.Fa keylen
with the
.Vt KEKRecipientInfo
structure
.Fa ri .
.Pp
.Fn CMS_RecipientInfo_decrypt
attempts to decrypt the
.Vt RecipientInfo
structure
.Fa ri
in
.Fa cms .
A key must have been associated with
.Fa ri
first.
.Pp
.Fn CMS_RecipientInfo_encrypt
attempts to encrypt the
.Vt RecipientInfo
structure
.Fa ri
in
.Fa cms .
A key must have been associated with
.Fa ri
first and the content encryption key must be available,
for example by a previous call to
.Fn CMS_RecipientInfo_decrypt .
.Pp
The main purpose of these functions is to enable an application to
lookup recipient keys using any appropriate technique when the simpler
method of
.Xr CMS_decrypt 3
is not appropriate.
.Pp
In typical usage, an application retrieves all
.Vt CMS_RecipientInfo
structures using
.Fn CMS_get0_RecipientInfos
and checks the type of each using
.Fn CMS_RecipientInfo_type .
Depending on the type, the
.Vt CMS_RecipientInfo
structure can be ignored or its key identifier data retrieved using
an appropriate function.
If the corresponding secret or private key can be obtained by any
appropriate means it can then be associated with the structure and
.Fn CMS_RecipientInfo_decrypt
called.
If successful,
.Xr CMS_decrypt 3
can be called with a
.Dv NULL
key to decrypt the enveloped content.
.Pp
The function
.Fn CMS_RecipientInfo_encrypt
can be used to add a new recipient to an existing enveloped data
structure.
Typically an application will first decrypt an appropriate
.Vt CMS_RecipientInfo
structure to make the content encrypt key available.
It will then add a new recipient using a function such as
.Xr CMS_add1_recipient_cert 3
and finally encrypt the content encryption key using
.Fn CMS_RecipientInfo_encrypt .
.Sh RETURN VALUES
.Fn CMS_get0_RecipientInfos
returns an internal pointer to all the
.Vt CMS_RecipientInfo
structures, or
.Dv NULL
if an error occurs.
.Pp
.Fn CMS_RecipientInfo_type
returns an integer constant.
.Pp
.Fn CMS_RecipientInfo_ktri_get0_signer_id ,
.Fn CMS_RecipientInfo_set0_pkey ,
.Fn CMS_RecipientInfo_kekri_get0_id ,
.Fn CMS_RecipientInfo_set0_key ,
.Fn CMS_RecipientInfo_decrypt ,
and
.Fn CMS_RecipientInfo_encrypt
return 1 for success or 0 if an error occurs.
.Pp
.Fn CMS_RecipientInfo_ktri_cert_cmp
and
.Fn CMS_RecipientInfo_kekri_id_cmp
return 0 when
.Fa ri
matches or non-zero otherwise.
.Pp
Any error can be obtained from
.Xr ERR_get_error 3 .
.Sh SEE ALSO
.Xr CMS_ContentInfo_new 3 ,
.Xr CMS_decrypt 3
.Sh STANDARDS
RFC 5652 Cryptographic Message Syntax (CMS):
.Bl -dash -compact -offset indent
.It
section 6.1: EnvelopedData Type
.It
section 6.2: RecipientInfo Type
.It
section 6.2.1: KeyTransRecipientInfo Type
.It
section 6.2.3: KEKRecipientInfo Type
.El
.Sh HISTORY
These functions first appeared in OpenSSL 0.9.8h,
except that
.Fn CMS_RecipientInfo_encrypt
first appeared in OpenSSL 1.0.2.
They have been available since
.Ox 6.6 .
Added jni/libressl/man/CMS_get0_SignerInfos.3.
































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
.\" $OpenBSD: CMS_get0_SignerInfos.3,v 1.6 2019/08/18 21:44:10 schwarze Exp $
.\" full merge up to: OpenSSL 83cf7abf May 29 13:07:08 2018 +0100
.\"
.\" This file was written by Dr. Stephen Henson <steve@openssl.org>.
.\" Copyright (c) 2008, 2013 The OpenSSL Project.  All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\"
.\" 1. Redistributions of source code must retain the above copyright
.\"    notice, this list of conditions and the following disclaimer.
.\"
.\" 2. Redistributions in binary form must reproduce the above copyright
.\"    notice, this list of conditions and the following disclaimer in
.\"    the documentation and/or other materials provided with the
.\"    distribution.
.\"
.\" 3. All advertising materials mentioning features or use of this
.\"    software must display the following acknowledgment:
.\"    "This product includes software developed by the OpenSSL Project
.\"    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
.\"
.\" 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
.\"    endorse or promote products derived from this software without
.\"    prior written permission. For written permission, please contact
.\"    openssl-core@openssl.org.
.\"
.\" 5. Products derived from this software may not be called "OpenSSL"
.\"    nor may "OpenSSL" appear in their names without prior written
.\"    permission of the OpenSSL Project.
.\"
.\" 6. Redistributions of any form whatsoever must retain the following
.\"    acknowledgment:
.\"    "This product includes software developed by the OpenSSL Project
.\"    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
.\"
.\" THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
.\" EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
.\" PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
.\" ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
.\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: August 18 2019 $
.Dt CMS_GET0_SIGNERINFOS 3
.Os
.Sh NAME
.Nm CMS_get0_SignerInfos ,
.Nm CMS_SignerInfo_get0_signer_id ,
.Nm CMS_SignerInfo_get0_signature ,
.Nm CMS_SignerInfo_cert_cmp ,
.Nm CMS_SignerInfo_set1_signer_cert
.Nd CMS SignedData signer functions
.Sh SYNOPSIS
.In openssl/cms.h
.Ft STACK_OF(CMS_SignerInfo) *
.Fo CMS_get0_SignerInfos
.Fa "CMS_ContentInfo *cms"
.Fc
.Ft int
.Fo CMS_SignerInfo_get0_signer_id
.Fa "CMS_SignerInfo *si"
.Fa "ASN1_OCTET_STRING **keyid"
.Fa "X509_NAME **issuer"
.Fa "ASN1_INTEGER **sno"
.Fc
.Ft ASN1_OCTET_STRING *
.Fo CMS_SignerInfo_get0_signature
.Fa "CMS_SignerInfo *si"
.Fc
.Ft int
.Fo CMS_SignerInfo_cert_cmp
.Fa "CMS_SignerInfo *si"
.Fa "X509 *certificate"
.Fc
.Ft void
.Fo CMS_SignerInfo_set1_signer_cert
.Fa "CMS_SignerInfo *si"
.Fa "X509 *signer"
.Fc
.Sh DESCRIPTION
.Fn CMS_get0_SignerInfos
returns all the
.Vt SignerInfo
structures associated with the
.Vt SignedData
structure
.Fa cms .
.Pp
.Fn CMS_SignerInfo_get0_signer_id
retrieves the certificate
.Vt SignerIdentifier
associated with the
.Vt SignerInfo
structure
.Fa si .
Either the
.Vt SubjectKeyIdentifier
will be set in
.Fa keyid
or both issuer name and serial number in
.Fa issuer
and
.Fa sno .
.Pp
.Fn CMS_SignerInfo_get0_signature
retrieves the
.Fa signature
field of
.Fa si .
The application program is allowed to modify the data pointed to.
.Pp
.Fn CMS_SignerInfo_cert_cmp
compares the
.Fa certificate
against the signer identifier of
.Fa si .
.Pp
.Fn CMS_SignerInfo_set1_signer_cert
sets the signer certificate of
.Fa si
to
.Fa signer .
.Pp
The main purpose of these functions is to enable an application to
look up signer certificates using any appropriate technique when the
simpler method of
.Xr CMS_verify 3
is not appropriate.
.Pp
In typical usage, an application retrieves all
.Vt CMS_SignerInfo
structures using
.Fn CMS_get0_SignerInfos
and retrieves the identifier information using CMS.
It will then obtain the signer certificate by some unspecified means
(or return and error if it cannot be found) and set it using
.Fn CMS_SignerInfo_set1_signer_cert .
Once all signer certificates have been set,
.Xr CMS_verify 3
can be used.
.Sh RETURN VALUES
.Fn CMS_get0_SignerInfos
returns an internal pointer to all the
.Vt CMS_SignerInfo
structures, or
.Dv NULL
if there are no signers or if
.Fa cms
is not of the type
.Vt SignedData .
.Pp
.Fn CMS_SignerInfo_get0_signer_id
returns 1 for success or 0 for failure.
.Pp
.Fn CMS_SignerInfo_get0_signature
returns an internal pointer to the signature.
.Pp
.Fn CMS_SignerInfo_cert_cmp
returns 0 for a match or non-zero otherwise.
.Pp
Any error can be obtained from
.Xr ERR_get_error 3 .
.Sh SEE ALSO
.Xr CMS_ContentInfo_new 3 ,
.Xr CMS_verify 3
.Sh STANDARDS
RFC 5652: Cryptographic Message Syntax (CMS)
.Bl -dash -compact -offset indent
.It
section 5.1: SignedData Type
.It
section 5.3: SignerInfo Type
.El
.Sh HISTORY
.Fn CMS_get0_SignerInfos ,
.Fn CMS_SignerInfo_get0_signer_id ,
.Fn CMS_SignerInfo_cert_cmp ,
and
.Fn CMS_SignerInfo_set1_signer_cert
first appeared in OpenSSL 0.9.8h and
.Fn CMS_SignerInfo_get0_signature
in OpenSSL 1.0.2.
These functions have been available since
.Ox 6.6 .
Added jni/libressl/man/CMS_get0_type.3.












































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
.\" $OpenBSD: CMS_get0_type.3,v 1.6 2019/08/18 21:44:10 schwarze Exp $
.\" full merge up to: OpenSSL 72a7a702 Feb 26 14:05:09 2019 +0000
.\"
.\" This file is a derived work.
.\" The changes are covered by the following Copyright and license:
.\"
.\" Copyright (c) 2019 Ingo Schwarze <schwarze@openbsd.org>
.\"
.\" Permission to use, copy, modify, and distribute this software for any
.\" purpose with or without fee is hereby granted, provided that the above
.\" copyright notice and this permission notice appear in all copies.
.\"
.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
.\" The original file was written by Dr. Stephen Henson <steve@openssl.org>.
.\" Copyright (c) 2008, 2015 The OpenSSL Project.  All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\"
.\" 1. Redistributions of source code must retain the above copyright
.\"    notice, this list of conditions and the following disclaimer.
.\"
.\" 2. Redistributions in binary form must reproduce the above copyright
.\"    notice, this list of conditions and the following disclaimer in
.\"    the documentation and/or other materials provided with the
.\"    distribution.
.\"
.\" 3. All advertising materials mentioning features or use of this
.\"    software must display the following acknowledgment:
.\"    "This product includes software developed by the OpenSSL Project
.\"    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
.\"
.\" 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
.\"    endorse or promote products derived from this software without
.\"    prior written permission. For written permission, please contact
.\"    openssl-core@openssl.org.
.\"
.\" 5. Products derived from this software may not be called "OpenSSL"
.\"    nor may "OpenSSL" appear in their names without prior written
.\"    permission of the OpenSSL Project.
.\"
.\" 6. Redistributions of any form whatsoever must retain the following
.\"    acknowledgment:
.\"    "This product includes software developed by the OpenSSL Project
.\"    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
.\"
.\" THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
.\" EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
.\" PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
.\" ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
.\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: August 18 2019 $
.Dt CMS_GET0_TYPE 3
.Os
.Sh NAME
.Nm CMS_get0_type ,
.Nm CMS_set1_eContentType ,
.Nm CMS_get0_eContentType ,
.Nm CMS_get0_content
.Nd get and set CMS content types and content
.Sh SYNOPSIS
.In openssl/cms.h
.Ft const ASN1_OBJECT *
.Fo CMS_get0_type
.Fa "const CMS_ContentInfo *cms"
.Fc
.Ft int
.Fo CMS_set1_eContentType
.Fa "CMS_ContentInfo *cms"
.Fa "const ASN1_OBJECT *oid"
.Fc
.Ft const ASN1_OBJECT *
.Fo CMS_get0_eContentType
.Fa "CMS_ContentInfo *cms"
.Fc
.Ft ASN1_OCTET_STRING **
.Fo CMS_get0_content
.Fa "CMS_ContentInfo *cms"
.Fc
.Sh DESCRIPTION
.Fn CMS_get0_type
returns the content type of the
.Vt ContentInfo
structure
.Fa cms .
The
.Vt ASN1_OBJECT
value returned can be converted to an integer NID value using
.Xr OBJ_obj2nid 3 .
The following content types are identified by the following NIDs:
.Pp
.Bl -column AuthenticatedData NID_id_smime_ct_compressedData -compact
.It Vt SignedData        Ta Dv NID_pkcs7_signed
.It Vt EnvelopedData     Ta Dv NID_pkcs7_enveloped
.It Vt DigestedData      Ta Dv NID_pkcs7_digest
.It Vt EncryptedData     Ta Dv NID_pkcs7_encrypted
.It Vt AuthenticatedData Ta Dv NID_id_smime_ct_authData
.It Vt CompressedData    Ta Dv NID_id_smime_ct_compressedData
.It arbitrary data       Ta Dv NID_pkcs7_data
.El
.Pp
The
.Vt SignedData ,
.Vt DigestedData ,
.Vt AuthenticatedData ,
and
.Vt CompressedData
types contain a field
.Fa encapContentInfo
to allow embedding content, and
.Vt EnvelopedData
and
.Vt EncryptedData
contain a field
.Fa encryptedContentInfo
for that purpose.
The type of the embedded content to be stored in that field can be
set with the function
.Fn CMS_set1_eContentType ,
to be called on
.Fa cms
structures returned from functions such as
.Xr CMS_sign 3
or
.Xr CMS_encrypt 3
with the
.Dv CMS_PARTIAL
flag set and
.Em before
the structure is finalised; otherwise the results are undefined.
.Fn CMS_set1_eContentType
copies the supplied
.Fa oid ,
so it should be freed up after use.
.Pp
.Fn CMS_get0_eContentType
returns the type of the embedded content.
.Pp
.Fn CMS_get0_content
returns a pointer to the storage location where the pointer to the
embedded content is stored.
That means that for example after
.Pp
.Dl ASN1_OCTET_STRING **pconf = CMS_get0_content(cms);
.Pp
.Pf * Va pconf
could be
.Dv NULL
if there is no embedded content.
Applications can access, modify or create the embedded content in a
.Vt CMS_ContentInfo
structure using this function.
Applications usually will not need to modify the embedded content as it
is normally set by higher level functions.
.Sh RETURN VALUES
.Fn CMS_get0_type
and
.Fn CMS_get0_eContentType
return internal pointers to
.Vt OBJECT IDENTIFIER
structures.
.Pp
.Fn CMS_get0_content
returns an internal pointer to the storage location where the pointer
to the embedded content is stored.
.Pp
.Fn CMS_set1_eContentType
returns 1 for success or 0 if an error occurred.
The error can be obtained from
.Xr ERR_get_error 3 .
.Sh SEE ALSO
.Xr CMS_ContentInfo_new 3 ,
.Xr d2i_CMS_ContentInfo 3 ,
.Xr SMIME_read_CMS 3
.Sh STANDARDS
RFC 5652: Cryptographic Message Syntax
.Pp
RFC 3274: Compressed Data Content Type for Cryptographic Message Syntax (CMS)
.Sh HISTORY
These functions first appeared in OpenSSL 0.9.8h
and have been available since
.Ox 6.6 .
Added jni/libressl/man/CMS_get1_ReceiptRequest.3.












































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
.\" $OpenBSD: CMS_get1_ReceiptRequest.3,v 1.6 2019/08/18 21:44:10 schwarze Exp $
.\" full merge up to: OpenSSL 83cf7abf May 29 13:07:08 2018 +0100
.\"
.\" This file was written by Dr. Stephen Henson <steve@openssl.org>.
.\" Copyright (c) 2008 The OpenSSL Project.  All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\"
.\" 1. Redistributions of source code must retain the above copyright
.\"    notice, this list of conditions and the following disclaimer.
.\"
.\" 2. Redistributions in binary form must reproduce the above copyright
.\"    notice, this list of conditions and the following disclaimer in
.\"    the documentation and/or other materials provided with the
.\"    distribution.
.\"
.\" 3. All advertising materials mentioning features or use of this
.\"    software must display the following acknowledgment:
.\"    "This product includes software developed by the OpenSSL Project
.\"    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
.\"
.\" 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
.\"    endorse or promote products derived from this software without
.\"    prior written permission. For written permission, please contact
.\"    openssl-core@openssl.org.
.\"
.\" 5. Products derived from this software may not be called "OpenSSL"
.\"    nor may "OpenSSL" appear in their names without prior written
.\"    permission of the OpenSSL Project.
.\"
.\" 6. Redistributions of any form whatsoever must retain the following
.\"    acknowledgment:
.\"    "This product includes software developed by the OpenSSL Project
.\"    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
.\"
.\" THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
.\" EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
.\" PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
.\" ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
.\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: August 18 2019 $
.Dt CMS_GET1_RECEIPTREQUEST 3
.Os
.Sh NAME
.Nm CMS_ReceiptRequest_create0 ,
.Nm CMS_add1_ReceiptRequest ,
.Nm CMS_get1_ReceiptRequest ,
.Nm CMS_ReceiptRequest_get0_values
.Nd CMS signed receipt request functions
.Sh SYNOPSIS
.In openssl/cms.h
.Ft CMS_ReceiptRequest *
.Fo CMS_ReceiptRequest_create0
.Fa "unsigned char *id"
.Fa "int idlen"
.Fa "int allorfirst"
.Fa "STACK_OF(GENERAL_NAMES) *receiptList"
.Fa "STACK_OF(GENERAL_NAMES) *receiptsTo"
.Fc
.Ft int
.Fo CMS_add1_ReceiptRequest
.Fa "CMS_SignerInfo *si"
.Fa "CMS_ReceiptRequest *rr"
.Fc
.Ft int
.Fo CMS_get1_ReceiptRequest
.Fa "CMS_SignerInfo *si"
.Fa "CMS_ReceiptRequest **prr"
.Fc
.Ft void
.Fo CMS_ReceiptRequest_get0_values
.Fa "CMS_ReceiptRequest *rr"
.Fa "ASN1_STRING **pcid"
.Fa "int *pallorfirst"
.Fa "STACK_OF(GENERAL_NAMES) **plist"
.Fa "STACK_OF(GENERAL_NAMES) **prto"
.Fc
.Sh DESCRIPTION
.Fn CMS_ReceiptRequest_create0
creates a new
.Vt ReceiptRequest
structure.
The
.Fa signedContentIdentifier
field is set using
.Fa id
and
.Fa idlen ,
or it is set to 32 bytes of pseudo random data if
.Fa id
is
.Dv NULL .
If
.Fa receiptList
is
.Dv NULL ,
the
.Fa allOrFirstTier
option in the
.Fa receiptsFrom
field is set to the value of the
.Fa allorfirst
argument.
If
.Fa receiptList
is not
.Dv NULL ,
the
.Fa receiptList
option in the
.Fa receiptsFrom
field is used.
The
.Fa receiptsTo
argument specifies the value of the
.Fa receiptsTo
field.
.Pp
.Fn CMS_add1_ReceiptRequest
adds a BER-encoded copy of
.Fa rr
to
.Fa si .
.Pp
.Fn CMS_get1_ReceiptRequest
looks for a signed receipt request in
.Fa si .
If any is found, it is decoded and written to
.Fa prr .
.Pp
.Fn CMS_ReceiptRequest_get0_values
retrieves the values of a receipt request.
The
.Fa signedContentIdentifier
is copied to
.Fa pcid .
If the
.Fa allOrFirstTier
option is used in the
.Fa receiptsFrom
field, its value is copied to
.Fa pallorfirst ;
otherwise the
.Fa receiptList
field is copied to
.Fa plist .
The
.Fa receiptsTo
field is copied to
.Fa prto .
.Pp
The contents of a signed receipt should only be considered meaningful if
the corresponding
.Vt CMS_ContentInfo
structure can be successfully verified using
.Xr CMS_verify 3 .
.Sh RETURN VALUES
.Fn CMS_ReceiptRequest_create0
returns the new signed receipt request structure or
.Dv NULL
if an error occurred.
.Pp
.Fn CMS_add1_ReceiptRequest
returns 1 for success or 0 if an error occurred.
.Pp
.Fn CMS_get1_ReceiptRequest
returns 1 is a signed receipt request is found and decoded.
It returns 0 if a signed receipt request is not present or -1 if it is
present but malformed.
.Sh SEE ALSO
.Xr CMS_ContentInfo_new 3 ,
.Xr CMS_sign 3 ,
.Xr CMS_sign_receipt 3 ,
.Xr CMS_verify 3 ,
.Xr CMS_verify_receipt 3 ,
.Xr ERR_get_error 3
.Sh STANDARDS
RFC 2634: Enhanced Security Services for S/MIME,
section 2.7: Receipt Request Syntax
.Sh HISTORY
.Fn CMS_ReceiptRequest_create0 ,
.Fn CMS_add1_ReceiptRequest ,
.Fn CMS_get1_ReceiptRequest ,
and
.Fn CMS_ReceiptRequest_get0_values
first appeared in OpenSSL 0.9.8h
and have been available since
.Ox 6.6 .
Added jni/libressl/man/CMS_sign.3.






































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
.\" $OpenBSD: CMS_sign.3,v 1.7 2019/08/18 21:44:10 schwarze Exp $
.\" full merge up to: OpenSSL e9b77246 Jan 20 19:58:49 2017 +0100
.\"
.\" This file was written by Dr. Stephen Henson <steve@openssl.org>.
.\" Copyright (c) 2008 The OpenSSL Project.  All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\"
.\" 1. Redistributions of source code must retain the above copyright
.\"    notice, this list of conditions and the following disclaimer.
.\"
.\" 2. Redistributions in binary form must reproduce the above copyright
.\"    notice, this list of conditions and the following disclaimer in
.\"    the documentation and/or other materials provided with the
.\"    distribution.
.\"
.\" 3. All advertising materials mentioning features or use of this
.\"    software must display the following acknowledgment:
.\"    "This product includes software developed by the OpenSSL Project
.\"    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
.\"
.\" 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
.\"    endorse or promote products derived from this software without
.\"    prior written permission. For written permission, please contact
.\"    openssl-core@openssl.org.
.\"
.\" 5. Products derived from this software may not be called "OpenSSL"
.\"    nor may "OpenSSL" appear in their names without prior written
.\"    permission of the OpenSSL Project.
.\"
.\" 6. Redistributions of any form whatsoever must retain the following
.\"    acknowledgment:
.\"    "This product includes software developed by the OpenSSL Project
.\"    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
.\"
.\" THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
.\" EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
.\" PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
.\" ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
.\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: August 18 2019 $
.Dt CMS_SIGN 3
.Os
.Sh NAME
.Nm CMS_sign
.Nd create a CMS SignedData structure
.Sh SYNOPSIS
.In openssl/cms.h
.Ft CMS_ContentInfo *
.Fo CMS_sign
.Fa "X509 *signcert"
.Fa "EVP_PKEY *pkey"
.Fa "STACK_OF(X509) *certs"
.Fa "BIO *data"
.Fa "unsigned int flags"
.Fc
.Sh DESCRIPTION
.Fn CMS_sign
creates and returns a CMS
.Vt SignedData
structure.
.Fa signcert
is the certificate to sign with,
.Fa pkey
is the corresponding private key.
.Fa certs
is an optional additional set of certificates to include in the CMS
structure (for example any intermediate CAs in the chain).
Any or all of these parameters can be
.Dv NULL .
.Pp
The data to be signed is read from
.Fa data .
.Pp
Any of the following flags (OR'ed together) can be passed in the
.Fa flags
argument:
.Bl -tag -width Ds
.It Dv CMS_TEXT
Prepend MIME headers for the type text/plain to the data.
Many S/MIME clients expect the signed content to include valid MIME
headers.
.It Dv CMS_NOCERTS
Do not include the signer's certificate in the
.Vt CMS_ContentInfo
structure.
The signer's certificate must still be supplied in the
.Fa signcert
parameter though.
This can reduce the size of the signature if the signer's certificate can
be obtained by other means, for example from a previously signed message.
.It Dv CMS_DETACHED
Omit the data being signed from the
.Vt CMS_ContentInfo
structure.
This is used for
.Vt CMS_ContentInfo
detached signatures which are used in S/MIME plaintext signed messages
for example.
.It Dv CMS_BINARY
Do not translate the supplied content into MIME canonical format
even though that is required by the S/MIME specifications.
This option should be used if the supplied data is in binary format.
Otherwise the translation will corrupt it.
.It Dv CMS_NOATTR
Do not add any
.Vt SignedAttributes .
By default, the
.Fa signerInfos
field includes several CMS
.Vt SignedAttributes
including the signing time, the CMS content type,
and the supported list of ciphers in an
.Vt SMIMECapabilities
attribute.
.It Dv CMS_NOSMIMECAP
Omit just the
.Vt SMIMECapabilities .
If present, the SMIMECapabilities attribute indicates support for the
following algorithms in preference order: 256 bit AES, Gost R3411-94,
Gost 28147-89, 192 bit AES, 128 bit AES, triple DES, 128 bit RC2, 64 bit
RC2, DES and 40 bit RC2.
If any of these algorithms is not available, then it will not be
included.
.It Dv CMS_USE_KEYID
Use the subject key identifier value to identify signing certificates.
An error occurs if the signing certificate does not have a subject key
identifier extension.
By default, issuer name and serial number are used instead.
.It Dv CMS_STREAM
Only initialize the returned
.Vt CMS_ContentInfo
structure to prepare it for performing the signing operation.
The signing is however
.Em not
performed and the data to be signed is not read from the
.Fa data
parameter.
Signing is deferred until after the data has been written.
In this way, data can be signed in a single pass.
The returned
.Vt CMS_ContentInfo
structure is
.Em not
complete and outputting its contents via a function that does not
properly finalize the
.Vt CMS_ContentInfo
structure will give unpredictable results.
Several functions including
.Xr SMIME_write_CMS 3 ,
.Xr i2d_CMS_bio_stream 3 ,
or
.Xr PEM_write_bio_CMS_stream 3
finalize the structure.
Alternatively, finalization can be performed by obtaining the streaming
ASN1
.Vt BIO
directly using
.Xr BIO_new_CMS 3 .
.It Dv CMS_PARTIAL
Output a partial
.Vt CMS_ContentInfo
structure to which additional signers and capabilities can be
added before finalization.
.El
.Pp
If a signer is specified, it will use the default digest for the signing
algorithm.
This is SHA1 for both RSA and DSA keys.
.Pp
If
.Fa signcert
and
.Fa pkey
are
.Dv NULL ,
then a certificates only CMS structure is output.
.Pp
The function
.Fn CMS_sign
is a basic CMS signing function whose output will be suitable for many
purposes.
For finer control of the output format the
.Fa certs ,
.Fa signcert
and
.Fa pkey
parameters can all be
.Dv NULL
and the
.Dv CMS_PARTIAL
flag set.
Then one or more signers can be added using the function
.Xr CMS_add1_signer 3 ,
non default digests can be used and custom attributes added.
.Xr CMS_final 3
must then be called to finalize the structure if streaming is not
enabled.
.Sh RETURN VALUES
.Fn CMS_sign
returns either a valid
.Vt CMS_ContentInfo
structure or
.Dv NULL
if an error occurred.
The error can be obtained from
.Xr ERR_get_error 3 .
.Sh SEE ALSO
.Xr CMS_add0_cert 3 ,
.Xr CMS_add1_signer 3 ,
.Xr CMS_ContentInfo_new 3 ,
.Xr CMS_final 3 ,
.Xr CMS_sign_receipt 3 ,
.Xr CMS_verify 3
.Sh STANDARDS
RFC 5652: Cryptographic Message Syntax (CMS)
.Bl -dash -compact -offset indent
.It
section 5.1: SignedData Type
.It
section 5.3: SignerInfo Type
.El
.Pp
RFC 8551: Secure/Multipurpose Internet Mail Extensions (S/MIME)
Version\ 4.0 Message Specification,
section 2.5.2: SMIMECapabilities Attribute
.Sh HISTORY
.Fn CMS_sign
first appeared in OpenSSL 0.9.8h
and has been available since
.Ox 6.6 .
.Sh BUGS
Some attributes such as counter signatures are not supported.
Added jni/libressl/man/CMS_sign_receipt.3.














































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
.\" $OpenBSD: CMS_sign_receipt.3,v 1.6 2019/08/18 21:44:10 schwarze Exp $
.\" full merge up to: OpenSSL e9b77246 Jan 20 19:58:49 2017 +0100
.\"
.\" This file was written by Dr. Stephen Henson <steve@openssl.org>.
.\" Copyright (c) 2008 The OpenSSL Project.  All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\"
.\" 1. Redistributions of source code must retain the above copyright
.\"    notice, this list of conditions and the following disclaimer.
.\"
.\" 2. Redistributions in binary form must reproduce the above copyright
.\"    notice, this list of conditions and the following disclaimer in
.\"    the documentation and/or other materials provided with the
.\"    distribution.
.\"
.\" 3. All advertising materials mentioning features or use of this
.\"    software must display the following acknowledgment:
.\"    "This product includes software developed by the OpenSSL Project
.\"    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
.\"
.\" 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
.\"    endorse or promote products derived from this software without
.\"    prior written permission. For written permission, please contact
.\"    openssl-core@openssl.org.
.\"
.\" 5. Products derived from this software may not be called "OpenSSL"
.\"    nor may "OpenSSL" appear in their names without prior written
.\"    permission of the OpenSSL Project.
.\"
.\" 6. Redistributions of any form whatsoever must retain the following
.\"    acknowledgment:
.\"    "This product includes software developed by the OpenSSL Project
.\"    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
.\"
.\" THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
.\" EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
.\" PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
.\" ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
.\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: August 18 2019 $
.Dt CMS_SIGN_RECEIPT 3
.Os
.Sh NAME
.Nm CMS_sign_receipt
.Nd create a CMS signed receipt
.Sh SYNOPSIS
.In openssl/cms.h
.Ft CMS_ContentInfo *
.Fo CMS_sign_receipt
.Fa "CMS_SignerInfo *si"
.Fa "X509 *signcert"
.Fa "EVP_PKEY *pkey"
.Fa "STACK_OF(X509) *certs"
.Fa "unsigned int flags"
.Fc
.Sh DESCRIPTION
.Fn CMS_sign_receipt
creates a new CMS
.Vt SignedData
structure containing a signed
.Vt Receipt
as its embedded content.
.Fa si
is the
.Vt SignerInfo
structure containing the signed receipt request.
.Fa signcert
is the certificate to sign with,
.Fa pkey
is the corresponding private key.
.Fa certs
is an optional additional set of certificates to include in the CMS
structure (for example any intermediate CAs in the chain).
.Pp
This functions behaves in a similar way to
.Xr CMS_sign 3
except that the
.Fa flags
values
.Dv CMS_DETACHED ,
.Dv CMS_BINARY ,
.Dv CMS_NOATTR ,
.Dv CMS_TEXT ,
and
.Dv CMS_STREAM
are not supported since they do not make sense in the context of
signed receipts.
.Sh RETURN VALUES
.Fn CMS_sign_receipt
returns either a valid
.Vt CMS_ContentInfo
structure or
.Dv NULL
if an error occurred.
The error can be obtained from
.Xr ERR_get_error 3 .
.Sh SEE ALSO
.Xr CMS_ContentInfo_new 3 ,
.Xr CMS_get1_ReceiptRequest 3 ,
.Xr CMS_sign 3 ,
.Xr CMS_verify_receipt 3
.Sh STANDARDS
RFC 2634: Enhanced Security Services for S/MIME, section 2.8: Receipt Syntax
.Sh HISTORY
.Fn CMS_sign_receipt
first appeared in OpenSSL 0.9.8h
and has been available since
.Ox 6.6 .
Added jni/libressl/man/CMS_uncompress.3.






































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
.\" $OpenBSD: CMS_uncompress.3,v 1.6 2019/08/18 21:44:10 schwarze Exp $
.\" full merge up to: OpenSSL 99d63d46 Oct 26 13:56:48 2016 -0400
.\"
.\" This file was written by Dr. Stephen Henson <steve@openssl.org>.
.\" Copyright (c) 2008 The OpenSSL Project.  All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\"
.\" 1. Redistributions of source code must retain the above copyright
.\"    notice, this list of conditions and the following disclaimer.
.\"
.\" 2. Redistributions in binary form must reproduce the above copyright
.\"    notice, this list of conditions and the following disclaimer in
.\"    the documentation and/or other materials provided with the
.\"    distribution.
.\"
.\" 3. All advertising materials mentioning features or use of this
.\"    software must display the following acknowledgment:
.\"    "This product includes software developed by the OpenSSL Project
.\"    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
.\"
.\" 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
.\"    endorse or promote products derived from this software without
.\"    prior written permission. For written permission, please contact
.\"    openssl-core@openssl.org.
.\"
.\" 5. Products derived from this software may not be called "OpenSSL"
.\"    nor may "OpenSSL" appear in their names without prior written
.\"    permission of the OpenSSL Project.
.\"
.\" 6. Redistributions of any form whatsoever must retain the following
.\"    acknowledgment:
.\"    "This product includes software developed by the OpenSSL Project
.\"    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
.\"
.\" THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
.\" EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
.\" PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
.\" ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
.\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: August 18 2019 $
.Dt CMS_UNCOMPRESS 3
.Os
.Sh NAME
.Nm CMS_uncompress
.Nd uncompress a CMS CompressedData structure
.Sh SYNOPSIS
.In openssl/cms.h
.Ft int
.Fo CMS_uncompress
.Fa "CMS_ContentInfo *cms"
.Fa "BIO *dcont"
.Fa "BIO *out"
.Fa "unsigned int flags"
.Fc
.Sh DESCRIPTION
.Fn CMS_uncompress
extracts and uncompresses the content of a CMS
.Vt CompressedData
structure
.Fa cms
and writes it to
.Fa out .
.Pp
In the rare case where the compressed content is detached,
pass it in via
.Fa dcont .
For normal use, set
.Fa dcont
to
.Dv NULL .
.Pp
The only currently supported compression algorithm is zlib: if the
structure indicates the use of any other algorithm, an error is returned.
If zlib support is not compiled in,
.Fn CMS_uncompress
always returns an error.
.Pp
If the
.Dv CMS_TEXT
bit is set in
.Fa flags ,
MIME headers for type text/plain are deleted from the content.
If the content is not of type text/plain, an error is returned.
.Sh RETURN VALUES
.Fn CMS_uncompress
returns 1 for success or 0 for failure.
The error can be obtained from
.Xr ERR_get_error 3 .
.Sh SEE ALSO
.Xr CMS_compress 3 ,
.Xr CMS_ContentInfo_new 3
.Sh STANDARDS
RFC 3274: Compressed Data Content Type for Cryptographic Message Syntax (CMS)
.Sh HISTORY
.Fn CMS_uncompress
first appeared in OpenSSL 0.9.8h
and has been available since
.Ox 6.6 .
.Sh BUGS
The lack of single pass processing and the need to hold all data in
memory as mentioned in
.Xr CMS_verify 3
also applies to
.Fn CMS_uncompress .
Added jni/libressl/man/CMS_verify.3.






























































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
.\" $OpenBSD: CMS_verify.3,v 1.6 2019/08/18 21:44:10 schwarze Exp $
.\" full merge up to: OpenSSL 35fd9953 May 28 14:49:38 2019 +0200
.\"
.\" This file was written by Dr. Stephen Henson <steve@openssl.org>.
.\" Copyright (c) 2008 The OpenSSL Project.  All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\"
.\" 1. Redistributions of source code must retain the above copyright
.\"    notice, this list of conditions and the following disclaimer.
.\"
.\" 2. Redistributions in binary form must reproduce the above copyright
.\"    notice, this list of conditions and the following disclaimer in
.\"    the documentation and/or other materials provided with the
.\"    distribution.
.\"
.\" 3. All advertising materials mentioning features or use of this
.\"    software must display the following acknowledgment:
.\"    "This product includes software developed by the OpenSSL Project
.\"    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
.\"
.\" 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
.\"    endorse or promote products derived from this software without
.\"    prior written permission. For written permission, please contact
.\"    openssl-core@openssl.org.
.\"
.\" 5. Products derived from this software may not be called "OpenSSL"
.\"    nor may "OpenSSL" appear in their names without prior written
.\"    permission of the OpenSSL Project.
.\"
.\" 6. Redistributions of any form whatsoever must retain the following
.\"    acknowledgment:
.\"    "This product includes software developed by the OpenSSL Project
.\"    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
.\"
.\" THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
.\" EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
.\" PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
.\" ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
.\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: August 18 2019 $
.Dt CMS_VERIFY 3
.Os
.Sh NAME
.Nm CMS_verify ,
.Nm CMS_get0_signers
.Nd verify a CMS SignedData structure
.Sh SYNOPSIS
.In openssl/cms.h
.Ft int
.Fo CMS_verify
.Fa "CMS_ContentInfo *cms"
.Fa "STACK_OF(X509) *certs"
.Fa "X509_STORE *store"
.Fa "BIO *indata"
.Fa "BIO *out"
.Fa "unsigned int flags"
.Fc
.Ft STACK_OF(X509) *
.Fo CMS_get0_signers
.Fa "CMS_ContentInfo *cms"
.Fc
.Sh DESCRIPTION
.Fn CMS_verify
verifies the CMS
.Vt SignedData
structure
.Fa cms .
.Fa certs
is a set of certificates in which to search for the signing
certificate(s).
.Fa store
is a trusted certificate store used for chain verification.
.Fa indata
is the detached content if the content is not present in
.Fa cms .
The content is written to
.Fa out
if it is not
.Dv NULL .
.Pp
.Fn CMS_get0_signers
retrieves the signing certificate(s) from
.Fa cms .
It must be called after a successful
.Fn CMS_verify
operation.
.Pp
Normally the verify process proceeds as follows.
.Pp
Initially some sanity checks are performed on
.Fa cms .
There must be at least one signature on the data.
If the content is detached,
.Fa indata
cannot be
.Dv NULL .
.Pp
An attempt is made to locate all the signing certificate(s), first
looking in the
.Fa certs
parameter (if it is not
.Dv NULL )
and then looking in any certificates contained in the
.Fa cms
structure itself.
If any signing certificate cannot be located, the operation fails.
.Pp
Each signing certificate is chain verified using the
.Sy smimesign
purpose and the supplied trusted certificate
.Fa store .
Any internal certificates in the message are used as untrusted CAs.
If CRL checking is enabled in
.Fa store ,
any internal CRLs are used in addition to attempting to look them up in
.Fa store .
If any chain verify fails, an error code is returned.
.Pp
Finally the signed content is read (and written to
.Fa out
if it is not
.Dv NULL )
and the signature is checked.
.Pp
If all signatures verify correctly, then the function is successful.
.Pp
Any of the following
.Fa flags
(OR'ed together) can be passed to change the default verify behaviour:
.Bl -tag -width Ds
.It Dv CMS_NOINTERN
Do not use the certificates in the message itself when
locating the signing certificate(s).
This means that all the signing certificates must be in the
.Fa certs
parameter.
.It Dv CMS_NOCRL
If CRL checking is enabled in
.Fa store ,
then any CRLs in the message itself are ignored.
.It Dv CMS_TEXT
MIME headers for type text/plain are deleted from the content.
If the content is not of type text/plain, an error is returned.
.It Dv CMS_NO_SIGNER_CERT_VERIFY
Do not verify signing certificates.
.It Dv CMS_NO_ATTR_VERIFY
Do not check the signed attributes signature.
.It Dv CMS_NO_CONTENT_VERIFY
Do not check the content digest.
.El
.Pp
One application of
.Dv CMS_NOINTERN
is to only accept messages signed by a small number of certificates.
The acceptable certificates would be passed in the
.Fa certs
parameter.
In this case, if the signer is not one of the certificates supplied in
.Fa certs ,
then the verify will fail because the signer cannot be found.
.Pp
In some cases the standard techniques for looking up and validating
certificates are not appropriate: for example an application may wish to
lookup certificates in a database or perform customised verification.
This can be achieved by setting and verifying the signers certificates
manually using the signed data utility functions.
.Pp
Care should be taken when modifying the default verify behaviour, for
example setting
.Dv CMS_NO_CONTENT_VERIFY
will totally disable all content verification and any modified content
will be considered valid.
This combination is however useful if one merely wishes to write the
content to
.Fa out
and its validity is not considered important.
.Pp
Chain verification should arguably be performed using the signing time
rather than the current time.
However since the signing time is supplied by the signer it cannot be
trusted without additional evidence (such as a trusted timestamp).
.Sh RETURN VALUES
.Fn CMS_verify
returns 1 for a successful verification or 0 if an error occurred.
.Pp
.Fn CMS_get0_signers
returns all signers or
.Dv NULL
if an error occurred.
.Pp
The error can be obtained from
.Xr ERR_get_error 3 .
.Sh SEE ALSO
.Xr CMS_ContentInfo_new 3 ,
.Xr CMS_get0_SignerInfos 3 ,
.Xr CMS_sign 3 ,
.Xr CMS_verify_receipt 3
.Sh STANDARDS
RFC 5652: Cryptographic Message Syntax (CMS),
section 5.1: SignedData Type
.Sh HISTORY
These functions first appeared in OpenSSL 0.9.8h
and have been available since
.Ox 6.6 .
.Sh BUGS
The trusted certificate store is not searched for the signing certificate.
This is primarily due to the inadequacies of the current
.Vt X509_STORE
functionality.
.Pp
The lack of single pass processing means that the signed content must
all be held in memory if it is not detached.
Added jni/libressl/man/CMS_verify_receipt.3.




























































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
.\" $OpenBSD: CMS_verify_receipt.3,v 1.6 2019/08/18 21:44:10 schwarze Exp $
.\" full merge up to: OpenSSL e9b77246 Jan 20 19:58:49 2017 +0100
.\"
.\" This file was written by Dr. Stephen Henson <steve@openssl.org>.
.\" Copyright (c) 2008 The OpenSSL Project.  All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\"
.\" 1. Redistributions of source code must retain the above copyright
.\"    notice, this list of conditions and the following disclaimer.
.\"
.\" 2. Redistributions in binary form must reproduce the above copyright
.\"    notice, this list of conditions and the following disclaimer in
.\"    the documentation and/or other materials provided with the
.\"    distribution.
.\"
.\" 3. All advertising materials mentioning features or use of this
.\"    software must display the following acknowledgment:
.\"    "This product includes software developed by the OpenSSL Project
.\"    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
.\"
.\" 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
.\"    endorse or promote products derived from this software without
.\"    prior written permission. For written permission, please contact
.\"    openssl-core@openssl.org.
.\"
.\" 5. Products derived from this software may not be called "OpenSSL"
.\"    nor may "OpenSSL" appear in their names without prior written
.\"    permission of the OpenSSL Project.
.\"
.\" 6. Redistributions of any form whatsoever must retain the following
.\"    acknowledgment:
.\"    "This product includes software developed by the OpenSSL Project
.\"    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
.\"
.\" THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
.\" EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
.\" PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
.\" ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
.\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: August 18 2019 $
.Dt CMS_VERIFY_RECEIPT 3
.Os
.Sh NAME
.Nm CMS_verify_receipt
.Nd verify a CMS signed receipt
.Sh SYNOPSIS
.In openssl/cms.h
.Ft int
.Fo CMS_verify_receipt
.Fa "CMS_ContentInfo *rcms"
.Fa "CMS_ContentInfo *ocms"
.Fa "STACK_OF(X509) *certs"
.Fa "X509_STORE *store"
.Fa "unsigned int flags"
.Fc
.Sh DESCRIPTION
.Fn CMS_verify_receipt
verifies a CMS signed receipt.
.Fa rcms
is the signed receipt to verify.
.Fa ocms
is the original
.Vt SignedData
structure containing the receipt request.
.Fa certs
is a set of certificates in which to search for the signing certificate.
.Fa store
is a trusted certificate store (used for chain verification).
.Pp
This functions behaves in a similar way to
.Xr CMS_verify 3
except that the
.Fa flags
values
.Dv CMS_DETACHED ,
.Dv CMS_BINARY ,
.Dv CMS_TEXT ,
and
.Dv CMS_STREAM
are not supported since they do not make sense in the context of signed
receipts.
.Sh RETURN VALUES
.Fn CMS_verify_receipt
returns 1 for a successful verification or 0 if an error occurred.
.Pp
The error can be obtained from
.Xr ERR_get_error 3 .
.Sh SEE ALSO
.Xr CMS_ContentInfo_new 3 ,
.Xr CMS_get1_ReceiptRequest 3 ,
.Xr CMS_sign_receipt 3 ,
.Xr CMS_verify 3
.Sh STANDARDS
RFC 2634: Enhanced Security Services for S/MIME, section 2.8: Receipt Syntax
.Sh HISTORY
.Fn CMS_verify_receipt
first appeared in OpenSSL 0.9.8h
and has been available since
.Ox 6.6 .
Changes to jni/libressl/man/CONF_modules_load_file.3.
1
2
3
4
5
6
7
8
.\"	$OpenBSD: CONF_modules_load_file.3,v 1.8 2019/03/20 04:02:07 schwarze Exp $
.\"	OpenSSL b97fdb57 Nov 11 09:33:09 2016 +0100
.\"
.\" This file was written by Dr. Stephen Henson <steve@openssl.org>.
.\" Copyright (c) 2000, 2015 The OpenSSL Project.  All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
|







1
2
3
4
5
6
7
8
.\"	$OpenBSD: CONF_modules_load_file.3,v 1.9 2019/06/14 13:41:31 schwarze Exp $
.\"	OpenSSL b97fdb57 Nov 11 09:33:09 2016 +0100
.\"
.\" This file was written by Dr. Stephen Henson <steve@openssl.org>.
.\" Copyright (c) 2000, 2015 The OpenSSL Project.  All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: March 20 2019 $
.Dt CONF_MODULES_LOAD_FILE 3
.Os
.Sh NAME
.Nm CONF_modules_load_file ,
.Nm CONF_modules_load
.Nd OpenSSL configuration functions
.Sh SYNOPSIS







|







44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: June 14 2019 $
.Dt CONF_MODULES_LOAD_FILE 3
.Os
.Sh NAME
.Nm CONF_modules_load_file ,
.Nm CONF_modules_load
.Nd OpenSSL configuration functions
.Sh SYNOPSIS
91
92
93
94
95
96
97







98
99
100
101
102
103
104
.Dv NULL ,
the standard OpenSSL application name
.Qq openssl_conf
is used.
The behaviour can be customized using
.Fa flags .
.Pp







.Fn CONF_modules_load
is identical to
.Fn CONF_modules_load_file
except it reads configuration information from
.Fa cnf .
.Pp
The following







>
>
>
>
>
>
>







91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
.Dv NULL ,
the standard OpenSSL application name
.Qq openssl_conf
is used.
The behaviour can be customized using
.Fa flags .
.Pp
See the
.Sx EXAMPLES
section for additional functions that may need to be called.
Calling configuration functions in the right order for the intended
effect can be tricky because many configuration functions internally
call each other.
.Pp
.Fn CONF_modules_load
is identical to
.Fn CONF_modules_load_file
except it reads configuration information from
.Fa cnf .
.Pp
The following
176
177
178
179
180
181
182
183
184
185



186
187
188
189
190
191











192
193
194
195
196
197
198
    CONF_MFLAGS_IGNORE_MISSING_FILE) <= 0) {
	fprintf(stderr, "FATAL: error loading configuration file\en");
	ERR_print_errors_fp(stderr);
	exit(1);
}
.Ed
.Pp
Load custom configuration file and section, only print warnings on
error, missing configuration file ignored:
.Bd -literal



if (CONF_modules_load_file("/something/app.cnf", "myapp",
    CONF_MFLAGS_IGNORE_MISSING_FILE) <= 0) {
	fprintf(stderr, "WARNING: error loading configuration file\en");
	ERR_print_errors_fp(stderr);
}
.Ed











.Pp
Load and parse configuration file manually, custom error handling:
.Bd -literal
FILE	*fp;
CONF	*cnf = NULL;
long	 eline;








|
|

>
>
>






>
>
>
>
>
>
>
>
>
>
>







183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
    CONF_MFLAGS_IGNORE_MISSING_FILE) <= 0) {
	fprintf(stderr, "FATAL: error loading configuration file\en");
	ERR_print_errors_fp(stderr);
	exit(1);
}
.Ed
.Pp
Load custom configuration file and section instead of the standard one,
only print warnings on error, missing configuration file ignored:
.Bd -literal
OPENSSL_no_config();
ENGINE_load_builtin_engines();
OPENSSL_load_builtin_modules();
if (CONF_modules_load_file("/something/app.cnf", "myapp",
    CONF_MFLAGS_IGNORE_MISSING_FILE) <= 0) {
	fprintf(stderr, "WARNING: error loading configuration file\en");
	ERR_print_errors_fp(stderr);
}
.Ed
.Pp
In the previous example, the call to
.Xr OPENSSL_no_config 3
is required first to suppress automatic loading
of the standard configuration file, and the calls to
.Xr ENGINE_load_builtin_engines 3
and
.Xr OPENSSL_load_builtin_modules 3
are needed so that the configuration of builtin modules and engines
is also loaded in addition to the configuration of
.Qq myapp .
.Pp
Load and parse configuration file manually, custom error handling:
.Bd -literal
FILE	*fp;
CONF	*cnf = NULL;
long	 eline;

214
215
216
217
218
219
220

221
222
223
224
225
226
227
228
229
	}
	fclose(fp);
	NCONF_free(cnf);
}
.Ed
.Sh SEE ALSO
.Xr CONF_modules_free 3 ,

.Xr ERR 3 ,
.Xr OPENSSL_config 3 ,
.Xr OPENSSL_init_crypto 3
.Sh HISTORY
.Fn CONF_modules_load_file
and
.Fn CONF_modules_load
first appeared in OpenSSL 0.9.7 and have been available since
.Ox 3.2 .







>


|






235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
	}
	fclose(fp);
	NCONF_free(cnf);
}
.Ed
.Sh SEE ALSO
.Xr CONF_modules_free 3 ,
.Xr ENGINE_load_builtin_engines 3 ,
.Xr ERR 3 ,
.Xr OPENSSL_config 3 ,
.Xr OPENSSL_load_builtin_modules 3
.Sh HISTORY
.Fn CONF_modules_load_file
and
.Fn CONF_modules_load
first appeared in OpenSSL 0.9.7 and have been available since
.Ox 3.2 .
Changes to jni/libressl/man/CRYPTO_get_mem_functions.3.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
.\"	$OpenBSD: CRYPTO_get_mem_functions.3,v 1.6 2018/08/24 19:17:38 tb Exp $
.\"
.\" Copyright (c) 2016 Ingo Schwarze <schwarze@openbsd.org>
.\"
.\" Permission to use, copy, modify, and distribute this software for any
.\" purpose with or without fee is hereby granted, provided that the above
.\" copyright notice and this permission notice appear in all copies.
.\"
.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
.Dd $Mdocdate: August 24 2018 $
.Dt CRYPTO_GET_MEM_FUNCTIONS 3
.Os
.Sh NAME
.Nm CRYPTO_get_mem_functions ,
.Nm CRYPTO_set_mem_functions ,
.Nm CRYPTO_mem_ctrl ,
.Nm CRYPTO_mem_leaks ,
|















|







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
.\"	$OpenBSD: CRYPTO_get_mem_functions.3,v 1.7 2019/06/10 09:49:48 schwarze Exp $
.\"
.\" Copyright (c) 2016 Ingo Schwarze <schwarze@openbsd.org>
.\"
.\" Permission to use, copy, modify, and distribute this software for any
.\" purpose with or without fee is hereby granted, provided that the above
.\" copyright notice and this permission notice appear in all copies.
.\"
.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
.Dd $Mdocdate: June 10 2019 $
.Dt CRYPTO_GET_MEM_FUNCTIONS 3
.Os
.Sh NAME
.Nm CRYPTO_get_mem_functions ,
.Nm CRYPTO_set_mem_functions ,
.Nm CRYPTO_mem_ctrl ,
.Nm CRYPTO_mem_leaks ,
92
93
94
95
96
97
98


99
100
101
102
103
104
105
.Dv CRYPTO_MEM_CHECK_OFF .
.Pp
.Fn CRYPTO_mem_leaks ,
.Fn CRYPTO_mem_leaks_fp ,
and
.Fn CRYPTO_mem_leaks_cb
always return -1.


.Sh HISTORY
.Fn CRYPTO_mem_ctrl ,
.Fn CRYPTO_mem_leaks ,
and
.Fn CRYPTO_mem_leaks_fp
first appeared in SSLeay 0.6.4.
.Fn CRYPTO_get_mem_functions







>
>







92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
.Dv CRYPTO_MEM_CHECK_OFF .
.Pp
.Fn CRYPTO_mem_leaks ,
.Fn CRYPTO_mem_leaks_fp ,
and
.Fn CRYPTO_mem_leaks_cb
always return -1.
.Sh SEE ALSO
.Xr crypto 3
.Sh HISTORY
.Fn CRYPTO_mem_ctrl ,
.Fn CRYPTO_mem_leaks ,
and
.Fn CRYPTO_mem_leaks_fp
first appeared in SSLeay 0.6.4.
.Fn CRYPTO_get_mem_functions
Added jni/libressl/man/CRYPTO_memcmp.3.






























































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
.\" $OpenBSD: CRYPTO_memcmp.3,v 1.1 2019/08/25 06:20:22 schwarze Exp $
.\" full merge up to: OpenSSL 1075139c Jun 24 09:18:48 2019 +1000
.\"
.\" This file was written by Pauli <paul.dale@oracle.com>.
.\" Copyright (c) 2019 The OpenSSL Project.  All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\"
.\" 1. Redistributions of source code must retain the above copyright
.\"    notice, this list of conditions and the following disclaimer.
.\"
.\" 2. Redistributions in binary form must reproduce the above copyright
.\"    notice, this list of conditions and the following disclaimer in
.\"    the documentation and/or other materials provided with the
.\"    distribution.
.\"
.\" 3. All advertising materials mentioning features or use of this
.\"    software must display the following acknowledgment:
.\"    "This product includes software developed by the OpenSSL Project
.\"    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
.\"
.\" 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
.\"    endorse or promote products derived from this software without
.\"    prior written permission. For written permission, please contact
.\"    openssl-core@openssl.org.
.\"
.\" 5. Products derived from this software may not be called "OpenSSL"
.\"    nor may "OpenSSL" appear in their names without prior written
.\"    permission of the OpenSSL Project.
.\"
.\" 6. Redistributions of any form whatsoever must retain the following
.\"    acknowledgment:
.\"    "This product includes software developed by the OpenSSL Project
.\"    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
.\"
.\" THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
.\" EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
.\" PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
.\" ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
.\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: August 25 2019 $
.Dt CRYPTO_MEMCMP 3
.Os
.Sh NAME
.Nm CRYPTO_memcmp
.Nd constant time memory comparison
.Sh SYNOPSIS
.In openssl/crypto.h
.Ft int
.Fo CRYPTO_memcmp
.Fa "const void *a"
.Fa "const void *b"
.Fa "size_t len"
.Fc
.Sh DESCRIPTION
.Fn CRYPTO_memcmp
compares the
.Fa len
bytes pointed to by
.Fa a
and
.Fa b
for equality.
It takes an amount of time dependent on
.Fa len ,
but independent of the contents of the memory regions pointed to by
.Fa a
and
.Fa b .
.Sh RETURN VALUES
.Fn CRYPTO_memcmp
returns 0 if the content of the memory regions is equal
or non-zero otherwise.
.Sh HISTORY
.Fn CRYPTO_memcmp
first appeared in OpenSSL 1.0.1d and has been available since
.Ox 5.6 .
.Sh BUGS
Unlike
.Xr memcmp 3
and
.Xr timingsafe_memcmp 3 ,
this function cannot be used to order the two memory regions.
In the current implementation, the return value is always greater
than or equal to 0.
Changes to jni/libressl/man/CRYPTO_set_ex_data.3.
1
2
3
4
5
6
7
8
9
10
11
.\" $OpenBSD: CRYPTO_set_ex_data.3,v 1.10 2018/04/08 01:00:15 schwarze Exp $
.\" full merge up to:
.\" OpenSSL CRYPTO_get_ex_new_index 9e183d22 Mar 11 08:56:44 2017 -0500
.\" selective merge up to: a73d990e Feb 27 19:02:24 2018 +0100
.\"
.\" This file was written by Dr. Stephen Henson <steve@openssl.org>
.\" and by Rich Salz <rsalz@akamai.com>.
.\" Copyright (c) 2000, 2006, 2015, 2016 The OpenSSL Project.
.\" All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
|


|







1
2
3
4
5
6
7
8
9
10
11
.\" $OpenBSD: CRYPTO_set_ex_data.3,v 1.12 2019/08/16 12:16:22 schwarze Exp $
.\" full merge up to:
.\" OpenSSL CRYPTO_get_ex_new_index 9e183d22 Mar 11 08:56:44 2017 -0500
.\" selective merge up to: 72a7a702 Feb 26 14:05:09 2019 +0000
.\"
.\" This file was written by Dr. Stephen Henson <steve@openssl.org>
.\" and by Rich Salz <rsalz@akamai.com>.
.\" Copyright (c) 2000, 2006, 2015, 2016 The OpenSSL Project.
.\" All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: April 8 2018 $
.Dt CRYPTO_SET_EX_DATA 3
.Os
.Sh NAME
.Nm CRYPTO_EX_new ,
.Nm CRYPTO_EX_free ,
.Nm CRYPTO_EX_dup ,
.Nm CRYPTO_get_ex_new_index ,







|







48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: August 16 2019 $
.Dt CRYPTO_SET_EX_DATA 3
.Os
.Sh NAME
.Nm CRYPTO_EX_new ,
.Nm CRYPTO_EX_free ,
.Nm CRYPTO_EX_dup ,
.Nm CRYPTO_get_ex_new_index ,
130
131
132
133
134
135
136

137
138
139
140
141
142
143
Several OpenSSL structures can have application specific data attached
to them, known as "exdata".
The specific structures are:
.Bd -literal
    BIO
    DH
    DSA

    ECDH
    ECDSA
    ENGINE
    RSA
    SSL
    SSL_CTX
    SSL_SESSION







>







130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
Several OpenSSL structures can have application specific data attached
to them, known as "exdata".
The specific structures are:
.Bd -literal
    BIO
    DH
    DSA
    EC_KEY
    ECDH
    ECDSA
    ENGINE
    RSA
    SSL
    SSL_CTX
    SSL_SESSION
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
.Fn CRYPTO_free_ex_data
is used to free all exdata attached to a structure.
The appropriate type-specific routine must be used.
The
.Fa class_index
identifies the structure type, the
.Fa obj
is be the pointer to the actual structure, and
.Fa r
is a pointer to the structure's exdata field.
.Pp
The callback functions are used as follows.
.Pp
When a structure is initially allocated (such as by
.Xr RSA_new 3 ) ,







|







211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
.Fn CRYPTO_free_ex_data
is used to free all exdata attached to a structure.
The appropriate type-specific routine must be used.
The
.Fa class_index
identifies the structure type, the
.Fa obj
is a pointer to the actual structure, and
.Fa r
is a pointer to the structure's exdata field.
.Pp
The callback functions are used as follows.
.Pp
When a structure is initially allocated (such as by
.Xr RSA_new 3 ) ,
341
342
343
344
345
346
347



348

349
350
351
352
353
354
355
On failure an error code can be obtained from
.Xr ERR_get_error 3 .
.Sh SEE ALSO
.Xr BIO_get_ex_new_index 3 ,
.Xr DH_get_ex_new_index 3 ,
.Xr DSA_get_ex_new_index 3 ,
.Xr RSA_get_ex_new_index 3 ,



.Xr X509_STORE_CTX_get_ex_new_index 3

.Sh HISTORY
.Fn CRYPTO_get_ex_new_index ,
.Fn CRYPTO_set_ex_data ,
.Fn CRYPTO_get_ex_data ,
.Fn CRYPTO_free_ex_data ,
and
.Fn CRYPTO_new_ex_data







>
>
>
|
>







342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
On failure an error code can be obtained from
.Xr ERR_get_error 3 .
.Sh SEE ALSO
.Xr BIO_get_ex_new_index 3 ,
.Xr DH_get_ex_new_index 3 ,
.Xr DSA_get_ex_new_index 3 ,
.Xr RSA_get_ex_new_index 3 ,
.Xr SSL_CTX_get_ex_new_index 3 ,
.Xr SSL_get_ex_new_index 3 ,
.Xr SSL_SESSION_get_ex_new_index 3 ,
.Xr X509_STORE_CTX_get_ex_new_index 3 ,
.Xr X509_STORE_get_ex_new_index 3
.Sh HISTORY
.Fn CRYPTO_get_ex_new_index ,
.Fn CRYPTO_set_ex_data ,
.Fn CRYPTO_get_ex_data ,
.Fn CRYPTO_free_ex_data ,
and
.Fn CRYPTO_new_ex_data
Changes to jni/libressl/man/DES_set_key.3.
1
2
3
4
5
6
7
8
.\" $OpenBSD: DES_set_key.3,v 1.13 2018/12/21 21:36:21 schwarze Exp $
.\" full merge up to:
.\" OpenSSL man3/DES_random_key 521738e9 Oct 5 14:58:30 2018 -0400
.\"
.\" --------------------------------------------------------------------------
.\" Major patches to this file were contributed by
.\" Ulf Moeller <ulf@openssl.org>, Ben Laurie <ben@openssl.org>,
.\" and Richard Levitte <levitte@openssl.org>.
|







1
2
3
4
5
6
7
8
.\" $OpenBSD: DES_set_key.3,v 1.14 2019/06/06 01:06:58 schwarze Exp $
.\" full merge up to:
.\" OpenSSL man3/DES_random_key 521738e9 Oct 5 14:58:30 2018 -0400
.\"
.\" --------------------------------------------------------------------------
.\" Major patches to this file were contributed by
.\" Ulf Moeller <ulf@openssl.org>, Ben Laurie <ben@openssl.org>,
.\" and Richard Levitte <levitte@openssl.org>.
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
.\" SUCH DAMAGE.
.\"
.\" The licence and distribution terms for any publically available version or
.\" derivative of this code cannot be changed.  i.e. this code cannot simply be
.\" copied and put under another distribution licence
.\" [including the GNU Public Licence.]
.\"
.Dd $Mdocdate: December 21 2018 $
.Dt DES_SET_KEY 3
.Os
.Sh NAME
.Nm DES_random_key ,
.Nm DES_set_key ,
.Nm DES_key_sched ,
.Nm DES_set_key_checked ,







|







111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
.\" SUCH DAMAGE.
.\"
.\" The licence and distribution terms for any publically available version or
.\" derivative of this code cannot be changed.  i.e. this code cannot simply be
.\" copied and put under another distribution licence
.\" [including the GNU Public Licence.]
.\"
.Dd $Mdocdate: June 6 2019 $
.Dt DES_SET_KEY 3
.Os
.Sh NAME
.Nm DES_random_key ,
.Nm DES_set_key ,
.Nm DES_key_sched ,
.Nm DES_set_key_checked ,
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
.Fn DES_crypt
returns a pointer to a static buffer.
Both are allowed to return
.Dv NULL
to indicate failure, but currently, they cannot fail.
.Sh SEE ALSO
.Xr crypt 3 ,
.Xr RAND_bytes 3
.Pp
The
.Xr evp 3
library provides higher-level encryption functions.
.Sh STANDARDS
ANSI X3.106
.Pp
The DES library was initially written to be source code compatible
with the MIT Kerberos library.
.Sh HISTORY
.Fn DES_random_key ,







|
<
<
|
<







772
773
774
775
776
777
778
779


780

781
782
783
784
785
786
787
.Fn DES_crypt
returns a pointer to a static buffer.
Both are allowed to return
.Dv NULL
to indicate failure, but currently, they cannot fail.
.Sh SEE ALSO
.Xr crypt 3 ,
.Xr EVP_des_cbc 3 ,


.Xr EVP_EncryptInit 3

.Sh STANDARDS
ANSI X3.106
.Pp
The DES library was initially written to be source code compatible
with the MIT Kerberos library.
.Sh HISTORY
.Fn DES_random_key ,
Changes to jni/libressl/man/DH_generate_key.3.
1
2
3
4
5
6
7
8
.\"	$OpenBSD: DH_generate_key.3,v 1.9 2018/03/27 17:35:50 schwarze Exp $
.\"	OpenSSL b97fdb57 Nov 11 09:33:09 2016 +0100
.\"
.\" This file was written by Ulf Moeller <ulf@openssl.org>.
.\" Copyright (c) 2000 The OpenSSL Project.  All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
|







1
2
3
4
5
6
7
8
.\"	$OpenBSD: DH_generate_key.3,v 1.12 2019/08/19 13:08:26 schwarze Exp $
.\"	OpenSSL b97fdb57 Nov 11 09:33:09 2016 +0100
.\"
.\" This file was written by Ulf Moeller <ulf@openssl.org>.
.\" Copyright (c) 2000 The OpenSSL Project.  All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: March 27 2018 $
.Dt DH_GENERATE_KEY 3
.Os
.Sh NAME
.Nm DH_generate_key ,
.Nm DH_compute_key
.Nd perform Diffie-Hellman key exchange
.Sh SYNOPSIS







|







44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: August 19 2019 $
.Dt DH_GENERATE_KEY 3
.Os
.Sh NAME
.Nm DH_generate_key ,
.Nm DH_compute_key
.Nd perform Diffie-Hellman key exchange
.Sh SYNOPSIS
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
.Pp
The error codes can be obtained by
.Xr ERR_get_error 3 .
.Sh SEE ALSO
.Xr DH_get0_key 3 ,
.Xr DH_new 3 ,
.Xr DH_size 3 ,
.Xr ERR_get_error 3 ,
.Xr RAND_bytes 3
.Sh HISTORY
.Fn DH_generate_key
and
.Fn DH_compute_key
first appeared in SSLeay 0.5.1 and have been available since
.Ox 2.4 .







|
<






109
110
111
112
113
114
115
116

117
118
119
120
121
122
.Pp
The error codes can be obtained by
.Xr ERR_get_error 3 .
.Sh SEE ALSO
.Xr DH_get0_key 3 ,
.Xr DH_new 3 ,
.Xr DH_size 3 ,
.Xr ECDH_compute_key 3

.Sh HISTORY
.Fn DH_generate_key
and
.Fn DH_compute_key
first appeared in SSLeay 0.5.1 and have been available since
.Ox 2.4 .
Changes to jni/libressl/man/DH_generate_parameters.3.
1
2
3
4
5
6
7
8
.\"	$OpenBSD: DH_generate_parameters.3,v 1.11 2018/03/27 17:35:50 schwarze Exp $
.\"	OpenSSL 05ea606a May 20 20:52:46 2016 -0400
.\"
.\" This file was written by Ulf Moeller <ulf@openssl.org>.
.\" Copyright (c) 2000, 2016 The OpenSSL Project.  All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
|







1
2
3
4
5
6
7
8
.\"	$OpenBSD: DH_generate_parameters.3,v 1.13 2019/06/10 14:58:48 schwarze Exp $
.\"	OpenSSL 05ea606a May 20 20:52:46 2016 -0400
.\"
.\" This file was written by Ulf Moeller <ulf@openssl.org>.
.\" Copyright (c) 2000, 2016 The OpenSSL Project.  All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: March 27 2018 $
.Dt DH_GENERATE_PARAMETERS 3
.Os
.Sh NAME
.Nm DH_generate_parameters_ex ,
.Nm DH_check ,
.Nm DH_generate_parameters
.Nd generate and check Diffie-Hellman parameters







|







44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: June 10 2019 $
.Dt DH_GENERATE_PARAMETERS 3
.Os
.Sh NAME
.Nm DH_generate_parameters_ex ,
.Nm DH_check ,
.Nm DH_generate_parameters
.Nd generate and check Diffie-Hellman parameters
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
.Dv NULL
if the parameter generation fails.
.Pp
The error codes can be obtained by
.Xr ERR_get_error 3 .
.Sh SEE ALSO
.Xr DH_get0_pqg 3 ,
.Xr DH_new 3 ,
.Xr ERR_get_error 3 ,
.Xr RAND_bytes 3
.Sh HISTORY
.Fn DH_check
and
.Fn DH_generate_parameters
first appeared in SSLeay 0.5.1 and have been available since
.Ox 2.4 .
.Pp







|
<
<







143
144
145
146
147
148
149
150


151
152
153
154
155
156
157
.Dv NULL
if the parameter generation fails.
.Pp
The error codes can be obtained by
.Xr ERR_get_error 3 .
.Sh SEE ALSO
.Xr DH_get0_pqg 3 ,
.Xr DH_new 3


.Sh HISTORY
.Fn DH_check
and
.Fn DH_generate_parameters
first appeared in SSLeay 0.5.1 and have been available since
.Ox 2.4 .
.Pp
Changes to jni/libressl/man/DH_new.3.
1
2
3
4
5
6
7
8
.\"	$OpenBSD: DH_new.3,v 1.8 2018/04/18 01:11:45 schwarze Exp $
.\"	OpenSSL b97fdb57 Nov 11 09:33:09 2016 +0100
.\"
.\" This file was written by Ulf Moeller <ulf@openssl.org>.
.\" Copyright (c) 2000 The OpenSSL Project.  All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
|







1
2
3
4
5
6
7
8
.\"	$OpenBSD: DH_new.3,v 1.11 2019/06/10 14:58:48 schwarze Exp $
.\"	OpenSSL b97fdb57 Nov 11 09:33:09 2016 +0100
.\"
.\" This file was written by Ulf Moeller <ulf@openssl.org>.
.\" Copyright (c) 2000 The OpenSSL Project.  All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: April 18 2018 $
.Dt DH_NEW 3
.Os
.Sh NAME
.Nm DH_new ,
.Nm DH_up_ref ,
.Nm DH_free
.Nd allocate and free DH objects







|







44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: June 10 2019 $
.Dt DH_NEW 3
.Os
.Sh NAME
.Nm DH_new ,
.Nm DH_up_ref ,
.Nm DH_free
.Nd allocate and free DH objects
104
105
106
107
108
109
110

111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
.Xr ERR_get_error 3 .
Otherwise it returns a pointer to the newly allocated structure.
.Pp
.Fn DH_up_ref
returns 1 for success or 0 for failure.
.Sh SEE ALSO
.Xr BN_new 3 ,

.Xr d2i_DHparams 3 ,
.Xr DH_generate_key 3 ,
.Xr DH_generate_parameters 3 ,
.Xr DH_get0_pqg 3 ,
.Xr DH_get_ex_new_index 3 ,
.Xr DH_set_method 3 ,
.Xr DH_size 3 ,
.Xr DHparams_print 3 ,
.Xr DSA_dup_DH 3 ,
.Xr ERR_get_error 3 ,
.Xr EVP_PKEY_set1_DH 3
.Sh HISTORY
.Fn DH_new
and
.Fn DH_free
first appeared in SSLeay 0.5.1 and have been available since
.Ox 2.4 .
.Pp
.Fn DH_up_ref
first appeared in OpenSSL 0.9.7 and has been available since
.Ox 3.2 .







>









|











104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
.Xr ERR_get_error 3 .
Otherwise it returns a pointer to the newly allocated structure.
.Pp
.Fn DH_up_ref
returns 1 for success or 0 for failure.
.Sh SEE ALSO
.Xr BN_new 3 ,
.Xr crypto 3 ,
.Xr d2i_DHparams 3 ,
.Xr DH_generate_key 3 ,
.Xr DH_generate_parameters 3 ,
.Xr DH_get0_pqg 3 ,
.Xr DH_get_ex_new_index 3 ,
.Xr DH_set_method 3 ,
.Xr DH_size 3 ,
.Xr DHparams_print 3 ,
.Xr DSA_dup_DH 3 ,
.Xr EVP_PKEY_CTX_set_dh_paramgen_prime_len 3 ,
.Xr EVP_PKEY_set1_DH 3
.Sh HISTORY
.Fn DH_new
and
.Fn DH_free
first appeared in SSLeay 0.5.1 and have been available since
.Ox 2.4 .
.Pp
.Fn DH_up_ref
first appeared in OpenSSL 0.9.7 and has been available since
.Ox 3.2 .
Changes to jni/libressl/man/DIST_POINT_new.3.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
.\"	$OpenBSD: DIST_POINT_new.3,v 1.4 2018/03/23 04:34:23 schwarze Exp $
.\"
.\" Copyright (c) 2016 Ingo Schwarze <schwarze@openbsd.org>
.\"
.\" Permission to use, copy, modify, and distribute this software for any
.\" purpose with or without fee is hereby granted, provided that the above
.\" copyright notice and this permission notice appear in all copies.
.\"
.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
.Dd $Mdocdate: March 23 2018 $
.Dt DIST_POINT_NEW 3
.Os
.Sh NAME
.Nm DIST_POINT_new ,
.Nm DIST_POINT_free ,
.Nm CRL_DIST_POINTS_new ,
.Nm CRL_DIST_POINTS_free ,
|















|







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
.\"	$OpenBSD: DIST_POINT_new.3,v 1.5 2019/06/06 01:06:58 schwarze Exp $
.\"
.\" Copyright (c) 2016 Ingo Schwarze <schwarze@openbsd.org>
.\"
.\" Permission to use, copy, modify, and distribute this software for any
.\" purpose with or without fee is hereby granted, provided that the above
.\" copyright notice and this permission notice appear in all copies.
.\"
.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
.Dd $Mdocdate: June 6 2019 $
.Dt DIST_POINT_NEW 3
.Os
.Sh NAME
.Nm DIST_POINT_new ,
.Nm DIST_POINT_free ,
.Nm CRL_DIST_POINTS_new ,
.Nm CRL_DIST_POINTS_free ,
117
118
119
120
121
122
123

124
125
126
127
128
129
130
.Vt DIST_POINT_NAME ,
or
.Vt ISSUING_DIST_POINT
object, respectively, or
.Dv NULL
if an error occurs.
.Sh SEE ALSO

.Xr GENERAL_NAMES_new 3 ,
.Xr X509_CRL_new 3 ,
.Xr X509_EXTENSION_new 3 ,
.Xr X509_NAME_new 3 ,
.Xr X509_new 3
.Sh STANDARDS
RFC 5280: Internet X.509 Public Key Infrastructure Certificate and







>







117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
.Vt DIST_POINT_NAME ,
or
.Vt ISSUING_DIST_POINT
object, respectively, or
.Dv NULL
if an error occurs.
.Sh SEE ALSO
.Xr d2i_DIST_POINT 3 ,
.Xr GENERAL_NAMES_new 3 ,
.Xr X509_CRL_new 3 ,
.Xr X509_EXTENSION_new 3 ,
.Xr X509_NAME_new 3 ,
.Xr X509_new 3
.Sh STANDARDS
RFC 5280: Internet X.509 Public Key Infrastructure Certificate and
Changes to jni/libressl/man/DSA_SIG_new.3.
1
2
3
4
5
6
7
8
.\" $OpenBSD: DSA_SIG_new.3,v 1.7 2018/03/23 23:18:17 schwarze Exp $
.\" full merge up to: OpenSSL b97fdb57 Nov 11 09:33:09 2016 +0100
.\"
.\" This file was written by Ulf Moeller <ulf@openssl.org>,
.\" Dr. Stephen Henson <steve@openssl.org>, and
.\" TJ Saunders <tj@castaglia.org>.
.\" Copyright (c) 2000, 2016 The OpenSSL Project.  All rights reserved.
.\"
|







1
2
3
4
5
6
7
8
.\" $OpenBSD: DSA_SIG_new.3,v 1.8 2019/06/10 14:58:48 schwarze Exp $
.\" full merge up to: OpenSSL b97fdb57 Nov 11 09:33:09 2016 +0100
.\"
.\" This file was written by Ulf Moeller <ulf@openssl.org>,
.\" Dr. Stephen Henson <steve@openssl.org>, and
.\" TJ Saunders <tj@castaglia.org>.
.\" Copyright (c) 2000, 2016 The OpenSSL Project.  All rights reserved.
.\"
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: March 23 2018 $
.Dt DSA_SIG_NEW 3
.Os
.Sh NAME
.Nm DSA_SIG_new ,
.Nm DSA_SIG_free ,
.Nm DSA_SIG_get0 ,
.Nm DSA_SIG_set0







|







46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: June 10 2019 $
.Dt DSA_SIG_NEW 3
.Os
.Sh NAME
.Nm DSA_SIG_new ,
.Nm DSA_SIG_free ,
.Nm DSA_SIG_get0 ,
.Nm DSA_SIG_set0
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
.Xr ERR_get_error 3 .
Otherwise it returns a pointer to the newly allocated structure.
.Pp
.Fn DSA_SIG_set0
returns 1 on success or 0 on failure.
.Sh SEE ALSO
.Xr DSA_do_sign 3 ,
.Xr DSA_new 3 ,
.Xr ERR_get_error 3
.Sh HISTORY
.Fn DSA_SIG_new
and
.Fn DSA_SIG_free
first appeared in OpenSSL 0.9.3 and have been available since
.Ox 2.6 .
.Pp
.Fn DSA_SIG_get0
and
.Fn DSA_SIG_set0
first appeared in OpenSSL 1.1.0 and have been available since
.Ox 6.3 .







|
<












122
123
124
125
126
127
128
129

130
131
132
133
134
135
136
137
138
139
140
141
.Xr ERR_get_error 3 .
Otherwise it returns a pointer to the newly allocated structure.
.Pp
.Fn DSA_SIG_set0
returns 1 on success or 0 on failure.
.Sh SEE ALSO
.Xr DSA_do_sign 3 ,
.Xr DSA_new 3

.Sh HISTORY
.Fn DSA_SIG_new
and
.Fn DSA_SIG_free
first appeared in OpenSSL 0.9.3 and have been available since
.Ox 2.6 .
.Pp
.Fn DSA_SIG_get0
and
.Fn DSA_SIG_set0
first appeared in OpenSSL 1.1.0 and have been available since
.Ox 6.3 .
Changes to jni/libressl/man/DSA_do_sign.3.
1
2
3
4
5
6
7
8
.\"	$OpenBSD: DSA_do_sign.3,v 1.8 2018/03/21 17:57:48 schwarze Exp $
.\"	OpenSSL b97fdb57 Nov 11 09:33:09 2016 +0100
.\"
.\" This file was written by Ulf Moeller <ulf@openssl.org>.
.\" Copyright (c) 2000 The OpenSSL Project.  All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
|







1
2
3
4
5
6
7
8
.\"	$OpenBSD: DSA_do_sign.3,v 1.10 2019/06/10 14:58:48 schwarze Exp $
.\"	OpenSSL b97fdb57 Nov 11 09:33:09 2016 +0100
.\"
.\" This file was written by Ulf Moeller <ulf@openssl.org>.
.\" Copyright (c) 2000 The OpenSSL Project.  All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: March 21 2018 $
.Dt DSA_DO_SIGN 3
.Os
.Sh NAME
.Nm DSA_do_sign ,
.Nm DSA_do_verify
.Nd raw DSA signature operations
.Sh SYNOPSIS







|







44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: June 10 2019 $
.Dt DSA_DO_SIGN 3
.Os
.Sh NAME
.Nm DSA_do_sign ,
.Nm DSA_do_verify
.Nd raw DSA signature operations
.Sh SYNOPSIS
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
The error codes can be obtained by
.Xr ERR_get_error 3 .
.Sh SEE ALSO
.Xr DSA_get0_key 3 ,
.Xr DSA_meth_set_sign 3 ,
.Xr DSA_new 3 ,
.Xr DSA_SIG_new 3 ,
.Xr DSA_sign 3 ,
.Xr ERR_get_error 3 ,
.Xr RAND_bytes 3
.Sh HISTORY
.Fn DSA_do_sign
and
.Fn DSA_do_verify
first appeared in OpenSSL 0.9.3 and have been available since
.Ox 2.6 .







|
<
<






106
107
108
109
110
111
112
113


114
115
116
117
118
119
The error codes can be obtained by
.Xr ERR_get_error 3 .
.Sh SEE ALSO
.Xr DSA_get0_key 3 ,
.Xr DSA_meth_set_sign 3 ,
.Xr DSA_new 3 ,
.Xr DSA_SIG_new 3 ,
.Xr DSA_sign 3


.Sh HISTORY
.Fn DSA_do_sign
and
.Fn DSA_do_verify
first appeared in OpenSSL 0.9.3 and have been available since
.Ox 2.6 .
Changes to jni/libressl/man/DSA_dup_DH.3.
1
2
3
4
5
6
7
8
.\"	$OpenBSD: DSA_dup_DH.3,v 1.7 2018/03/21 21:18:08 schwarze Exp $
.\"	OpenSSL b97fdb57 Nov 11 09:33:09 2016 +0100
.\"
.\" This file was written by Ulf Moeller <ulf@openssl.org>.
.\" Copyright (c) 2000, 2002 The OpenSSL Project.  All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
|







1
2
3
4
5
6
7
8
.\"	$OpenBSD: DSA_dup_DH.3,v 1.8 2019/06/10 14:58:48 schwarze Exp $
.\"	OpenSSL b97fdb57 Nov 11 09:33:09 2016 +0100
.\"
.\" This file was written by Ulf Moeller <ulf@openssl.org>.
.\" Copyright (c) 2000, 2002 The OpenSSL Project.  All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: March 21 2018 $
.Dt DSA_DUP_DH 3
.Os
.Sh NAME
.Nm DSA_dup_DH
.Nd create a DH structure out of DSA structure
.Sh SYNOPSIS
.In openssl/dsa.h







|







44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: June 10 2019 $
.Dt DSA_DUP_DH 3
.Os
.Sh NAME
.Nm DSA_dup_DH
.Nd create a DH structure out of DSA structure
.Sh SYNOPSIS
.In openssl/dsa.h
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
.Dv NULL
on error.
The error codes can be obtained by
.Xr ERR_get_error 3 .
.Sh SEE ALSO
.Xr DH_new 3 ,
.Xr DSA_get0_pqg 3 ,
.Xr DSA_new 3 ,
.Xr ERR_get_error 3
.Sh HISTORY
.Fn DSA_dup_DH
first appeared in OpenSSL 0.9.4 and has been available since
.Ox 2.6 .
.Sh CAVEATS
Be careful to avoid small subgroup attacks when using this.







|
<






79
80
81
82
83
84
85
86

87
88
89
90
91
92
.Dv NULL
on error.
The error codes can be obtained by
.Xr ERR_get_error 3 .
.Sh SEE ALSO
.Xr DH_new 3 ,
.Xr DSA_get0_pqg 3 ,
.Xr DSA_new 3

.Sh HISTORY
.Fn DSA_dup_DH
first appeared in OpenSSL 0.9.4 and has been available since
.Ox 2.6 .
.Sh CAVEATS
Be careful to avoid small subgroup attacks when using this.
Changes to jni/libressl/man/DSA_generate_key.3.
1
2
3
4
5
6
7
8
.\"	$OpenBSD: DSA_generate_key.3,v 1.8 2018/03/27 17:35:50 schwarze Exp $
.\"	OpenSSL b97fdb57 Nov 11 09:33:09 2016 +0100
.\"
.\" This file was written by Ulf Moeller <ulf@openssl.org>.
.\" Copyright (c) 2000 The OpenSSL Project.  All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
|







1
2
3
4
5
6
7
8
.\"	$OpenBSD: DSA_generate_key.3,v 1.10 2019/06/10 14:58:48 schwarze Exp $
.\"	OpenSSL b97fdb57 Nov 11 09:33:09 2016 +0100
.\"
.\" This file was written by Ulf Moeller <ulf@openssl.org>.
.\" Copyright (c) 2000 The OpenSSL Project.  All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: March 27 2018 $
.Dt DSA_GENERATE_KEY 3
.Os
.Sh NAME
.Nm DSA_generate_key
.Nd generate DSA key pair
.Sh SYNOPSIS
.In openssl/dsa.h







|







44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: June 10 2019 $
.Dt DSA_GENERATE_KEY 3
.Os
.Sh NAME
.Nm DSA_generate_key
.Nd generate DSA key pair
.Sh SYNOPSIS
.In openssl/dsa.h
73
74
75
76
77
78
79
80
81
82
83
84
85
86
.Fn DSA_generate_key
returns 1 on success or 0 otherwise.
The error codes can be obtained by
.Xr ERR_get_error 3 .
.Sh SEE ALSO
.Xr DSA_generate_parameters 3 ,
.Xr DSA_get0_key 3 ,
.Xr DSA_new 3 ,
.Xr ERR_get_error 3 ,
.Xr RAND_bytes 3
.Sh HISTORY
.Fn DSA_generate_key
first appeared in SSLeay 0.6.0 and has been available since
.Ox 2.4 .







|
<
<




73
74
75
76
77
78
79
80


81
82
83
84
.Fn DSA_generate_key
returns 1 on success or 0 otherwise.
The error codes can be obtained by
.Xr ERR_get_error 3 .
.Sh SEE ALSO
.Xr DSA_generate_parameters 3 ,
.Xr DSA_get0_key 3 ,
.Xr DSA_new 3


.Sh HISTORY
.Fn DSA_generate_key
first appeared in SSLeay 0.6.0 and has been available since
.Ox 2.4 .
Changes to jni/libressl/man/DSA_generate_parameters.3.
1
2
3
4
5
6
7
8
.\"	$OpenBSD: DSA_generate_parameters.3,v 1.10 2018/03/27 17:35:50 schwarze Exp $
.\"	OpenSSL 9b86974e Aug 7 22:14:47 2015 -0400
.\"
.\" This file was written by Ulf Moeller <ulf@openssl.org>,
.\" Bodo Moeller <bodo@openssl.org>, and Matt Caswell <matt@openssl.org>.
.\" Copyright (c) 2000, 2013 The OpenSSL Project.  All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
|







1
2
3
4
5
6
7
8
.\"	$OpenBSD: DSA_generate_parameters.3,v 1.12 2019/06/10 14:58:48 schwarze Exp $
.\"	OpenSSL 9b86974e Aug 7 22:14:47 2015 -0400
.\"
.\" This file was written by Ulf Moeller <ulf@openssl.org>,
.\" Bodo Moeller <bodo@openssl.org>, and Matt Caswell <matt@openssl.org>.
.\" Copyright (c) 2000, 2013 The OpenSSL Project.  All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: March 27 2018 $
.Dt DSA_GENERATE_PARAMETERS 3
.Os
.Sh NAME
.Nm DSA_generate_parameters_ex ,
.Nm DSA_generate_parameters
.Nd generate DSA parameters
.Sh SYNOPSIS







|







45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: June 10 2019 $
.Dt DSA_GENERATE_PARAMETERS 3
.Os
.Sh NAME
.Nm DSA_generate_parameters_ex ,
.Nm DSA_generate_parameters
.Nd generate DSA parameters
.Sh SYNOPSIS
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
if the parameter generation fails.
.Pp
The error codes can be obtained by
.Xr ERR_get_error 3 .
.Sh SEE ALSO
.Xr BN_generate_prime 3 ,
.Xr DSA_get0_pqg 3 ,
.Xr DSA_new 3 ,
.Xr ERR_get_error 3 ,
.Xr RAND_bytes 3
.Sh HISTORY
.Fn DSA_generate_parameters
first appeared in SSLeay 0.8.0 and had its
.Fa cb_arg
argument added in SSLeay 0.9.0.
It has been available since
.Ox 2.4 .







|
<
<







195
196
197
198
199
200
201
202


203
204
205
206
207
208
209
if the parameter generation fails.
.Pp
The error codes can be obtained by
.Xr ERR_get_error 3 .
.Sh SEE ALSO
.Xr BN_generate_prime 3 ,
.Xr DSA_get0_pqg 3 ,
.Xr DSA_new 3


.Sh HISTORY
.Fn DSA_generate_parameters
first appeared in SSLeay 0.8.0 and had its
.Fa cb_arg
argument added in SSLeay 0.9.0.
It has been available since
.Ox 2.4 .
Changes to jni/libressl/man/DSA_new.3.
1
2
3
4
5
6
7
8
.\"	$OpenBSD: DSA_new.3,v 1.10 2018/04/18 01:11:45 schwarze Exp $
.\"	OpenSSL b97fdb57 Nov 11 09:33:09 2016 +0100
.\"
.\" This file was written by Ulf Moeller <ulf@openssl.org>.
.\" Copyright (c) 2000, 2002 The OpenSSL Project.  All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
|







1
2
3
4
5
6
7
8
.\"	$OpenBSD: DSA_new.3,v 1.12 2019/06/10 14:58:48 schwarze Exp $
.\"	OpenSSL b97fdb57 Nov 11 09:33:09 2016 +0100
.\"
.\" This file was written by Ulf Moeller <ulf@openssl.org>.
.\" Copyright (c) 2000, 2002 The OpenSSL Project.  All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: April 18 2018 $
.Dt DSA_NEW 3
.Os
.Sh NAME
.Nm DSA_new ,
.Nm DSA_up_ref ,
.Nm DSA_free
.Nd allocate and free DSA objects







|







44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: June 10 2019 $
.Dt DSA_NEW 3
.Os
.Sh NAME
.Nm DSA_new ,
.Nm DSA_up_ref ,
.Nm DSA_free
.Nd allocate and free DSA objects
104
105
106
107
108
109
110

111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
.Xr ERR_get_error 3 .
Otherwise it returns a pointer to the newly allocated structure.
.Pp
.Fn DSA_up_ref
returns 1 for success or 0 for failure.
.Sh SEE ALSO
.Xr BN_new 3 ,

.Xr d2i_DSAPublicKey 3 ,
.Xr DH_new 3 ,
.Xr DSA_do_sign 3 ,
.Xr DSA_dup_DH 3 ,
.Xr DSA_generate_key 3 ,
.Xr DSA_generate_parameters 3 ,
.Xr DSA_get0_pqg 3 ,
.Xr DSA_get_ex_new_index 3 ,
.Xr DSA_meth_new 3 ,
.Xr DSA_print 3 ,
.Xr DSA_set_method 3 ,
.Xr DSA_SIG_new 3 ,
.Xr DSA_sign 3 ,
.Xr DSA_size 3 ,
.Xr ERR_get_error 3 ,
.Xr EVP_PKEY_set1_DSA 3 ,
.Xr RSA_new 3
.Sh STANDARDS
US Federal Information Processing Standard FIPS 186 (Digital Signature
Standard, DSS), ANSI X9.30
.Sh HISTORY
.Fn DSA_new







>














<







104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125

126
127
128
129
130
131
132
.Xr ERR_get_error 3 .
Otherwise it returns a pointer to the newly allocated structure.
.Pp
.Fn DSA_up_ref
returns 1 for success or 0 for failure.
.Sh SEE ALSO
.Xr BN_new 3 ,
.Xr crypto 3 ,
.Xr d2i_DSAPublicKey 3 ,
.Xr DH_new 3 ,
.Xr DSA_do_sign 3 ,
.Xr DSA_dup_DH 3 ,
.Xr DSA_generate_key 3 ,
.Xr DSA_generate_parameters 3 ,
.Xr DSA_get0_pqg 3 ,
.Xr DSA_get_ex_new_index 3 ,
.Xr DSA_meth_new 3 ,
.Xr DSA_print 3 ,
.Xr DSA_set_method 3 ,
.Xr DSA_SIG_new 3 ,
.Xr DSA_sign 3 ,
.Xr DSA_size 3 ,

.Xr EVP_PKEY_set1_DSA 3 ,
.Xr RSA_new 3
.Sh STANDARDS
US Federal Information Processing Standard FIPS 186 (Digital Signature
Standard, DSS), ANSI X9.30
.Sh HISTORY
.Fn DSA_new
Changes to jni/libressl/man/DSA_sign.3.
1
2
3
4
5
6
7
8
.\"	$OpenBSD: DSA_sign.3,v 1.8 2018/03/27 17:35:50 schwarze Exp $
.\"	OpenSSL b97fdb57 Nov 11 09:33:09 2016 +0100
.\"
.\" This file was written by Ulf Moeller <ulf@openssl.org>.
.\" Copyright (c) 2000 The OpenSSL Project.  All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
|







1
2
3
4
5
6
7
8
.\"	$OpenBSD: DSA_sign.3,v 1.10 2019/06/10 14:58:48 schwarze Exp $
.\"	OpenSSL b97fdb57 Nov 11 09:33:09 2016 +0100
.\"
.\" This file was written by Ulf Moeller <ulf@openssl.org>.
.\" Copyright (c) 2000 The OpenSSL Project.  All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: March 27 2018 $
.Dt DSA_SIGN 3
.Os
.Sh NAME
.Nm DSA_sign ,
.Nm DSA_sign_setup ,
.Nm DSA_verify
.Nd DSA signatures







|







44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: June 10 2019 $
.Dt DSA_SIGN 3
.Os
.Sh NAME
.Nm DSA_sign ,
.Nm DSA_sign_setup ,
.Nm DSA_verify
.Nd DSA signatures
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
returns 1 for a valid signature, 0 for an incorrect signature,
and -1 on error.
The error codes can be obtained by
.Xr ERR_get_error 3 .
.Sh SEE ALSO
.Xr DSA_do_sign 3 ,
.Xr DSA_get0_key 3 ,
.Xr DSA_new 3 ,
.Xr ERR_get_error 3 ,
.Xr RAND_bytes 3
.Sh STANDARDS
US Federal Information Processing Standard FIPS 186 (Digital Signature
Standard, DSS), ANSI X9.30
.Sh HISTORY
.Fn DSA_sign
and
.Fn DSA_verify
first appeared in SSLeay 0.6.0.
.Fn DSA_sign_setup
first appeared in SSLeay 0.8.0.
All these functions have been available since
.Ox 2.4 .







|
<
<












154
155
156
157
158
159
160
161


162
163
164
165
166
167
168
169
170
171
172
173
returns 1 for a valid signature, 0 for an incorrect signature,
and -1 on error.
The error codes can be obtained by
.Xr ERR_get_error 3 .
.Sh SEE ALSO
.Xr DSA_do_sign 3 ,
.Xr DSA_get0_key 3 ,
.Xr DSA_new 3


.Sh STANDARDS
US Federal Information Processing Standard FIPS 186 (Digital Signature
Standard, DSS), ANSI X9.30
.Sh HISTORY
.Fn DSA_sign
and
.Fn DSA_verify
first appeared in SSLeay 0.6.0.
.Fn DSA_sign_setup
first appeared in SSLeay 0.8.0.
All these functions have been available since
.Ox 2.4 .
Added jni/libressl/man/ECDH_compute_key.3.
















































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
.\" $OpenBSD: ECDH_compute_key.3,v 1.1 2019/08/19 13:08:26 schwarze Exp $
.\" Copyright (c) 2019 Ingo Schwarze <schwarze@openbsd.org>
.\"
.\" Permission to use, copy, modify, and distribute this software for any
.\" purpose with or without fee is hereby granted, provided that the above
.\" copyright notice and this permission notice appear in all copies.
.\"
.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
.Dd $Mdocdate: August 19 2019 $
.Dt ECDH_COMPUTE_KEY 3
.Os
.Sh NAME
.Nm ECDH_compute_key ,
.Nm ECDH_size
.Nd Elliptic Curve Diffie-Hellman key exchange
.Sh SYNOPSIS
.In openssl/ecdh.h
.Ft int
.Fo ECDH_compute_key
.Fa "void *out"
.Fa "size_t outlen"
.Fa "const EC_POINT *public_key"
.Fa "EC_KEY *ecdh"
.Fa "void *(*KDF)(const void *in, size_t inlen, void *out, size_t *outlen)"
.Fc
.Ft int
.Fo ECDH_size
.Fa "const EC_KEY *ecdh"
.Fc
.Sh DESCRIPTION
.Fn ECDH_compute_key
performs Elliptic Curve Diffie-Hellman key agreement.
It combines the private key contained in
.Fa ecdh
with the other party's
.Fa public_key ,
takes the
.Fa x
component of the affine coordinates,
and optionally applies the key derivation function
.Fa KDF .
It stores the resulting symmetric key in the buffer
.Fa out ,
which is
.Fa outlen
bytes long.
If
.Fa KDF
is
.Dv NULL ,
.Fa outlen
must be at least
.Fn ECDH_size ecdh .
.Pp
.Fn ECDH_size
returns the number of bytes needed to store an affine coordinate of a
point on the elliptic curve used by
.Fa ecdh ,
which is one eigth of the degree of the finite field underlying
that elliptic curve, rounded up to the next integer number.
.Sh RETURN VALUES
.Fn ECDH_compute_key
returns the length of the computed key in bytes or -1 if an error occurs.
.Pp
.Fn ECDH_size
returns the number of bytes needed to store an affine coordinate.
.Sh SEE ALSO
.Xr DH_generate_key 3 ,
.Xr DH_size 3 ,
.Xr EC_GROUP_new 3 ,
.Xr EC_KEY_new 3 ,
.Xr EC_POINT_new 3 ,
.Xr X25519 3
.Sh HISTORY
.Fn ECDH_compute_key
first appeared in OpenSSL 0.9.8 and has been available since
.Ox 4.5 .
.Pp
.Fn ECDH_size
first appeared in
.Ox 6.1 .
Changes to jni/libressl/man/ECDSA_SIG_new.3.
1
2
3
4
5
6
7
8
9
10
.\" $OpenBSD: ECDSA_SIG_new.3,v 1.12 2018/12/21 22:13:28 schwarze Exp $
.\" full merge up to: OpenSSL e9b77246 Jan 20 19:58:49 2017 +0100
.\" selective merge up to: OpenSSL 6da34cfb Jun 2 16:17:32 2018 -0400
.\"
.\" This file was written by Nils Larsch <nils@openssl.org>.
.\" Copyright (c) 2004, 2005, 2013, 2016 The OpenSSL Project.
.\" All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
|

|







1
2
3
4
5
6
7
8
9
10
.\" $OpenBSD: ECDSA_SIG_new.3,v 1.15 2019/08/25 14:11:41 schwarze Exp $
.\" full merge up to: OpenSSL e9b77246 Jan 20 19:58:49 2017 +0100
.\" selective merge up to: OpenSSL da4ea0cf Aug 5 16:13:24 2019 +0100
.\"
.\" This file was written by Nils Larsch <nils@openssl.org>.
.\" Copyright (c) 2004, 2005, 2013, 2016 The OpenSSL Project.
.\" All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: December 21 2018 $
.Dt ECDSA_SIG_NEW 3
.Os
.Sh NAME
.Nm ECDSA_SIG_new ,
.Nm ECDSA_SIG_free ,
.Nm ECDSA_SIG_get0 ,
.Nm ECDSA_SIG_set0 ,







|







46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: August 25 2019 $
.Dt ECDSA_SIG_NEW 3
.Os
.Sh NAME
.Nm ECDSA_SIG_new ,
.Nm ECDSA_SIG_free ,
.Nm ECDSA_SIG_get0 ,
.Nm ECDSA_SIG_set0 ,
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
.Fo ECDSA_SIG_set0
.Fa "ECDSA_SIG *sig"
.Fa "BIGNUM *r"
.Fa "BIGNUM *s"
.Fc
.Ft int
.Fo i2d_ECDSA_SIG
.Fa "const ECDSA_SIG *sig"
.Fa "unsigned char **pp"
.Fc
.Ft ECDSA_SIG*
.Fo d2i_ECDSA_SIG
.Fa "ECDSA_SIG **sig"
.Fa "const unsigned char **pp"
.Fa "long len"
.Fc
.Ft int
.Fo ECDSA_size
.Fa "const EC_KEY *eckey"
.Fc
.Ft int







|
|



|
|







93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
.Fo ECDSA_SIG_set0
.Fa "ECDSA_SIG *sig"
.Fa "BIGNUM *r"
.Fa "BIGNUM *s"
.Fc
.Ft int
.Fo i2d_ECDSA_SIG
.Fa "const ECDSA_SIG *sig_in"
.Fa "unsigned char **der_out"
.Fc
.Ft ECDSA_SIG*
.Fo d2i_ECDSA_SIG
.Fa "ECDSA_SIG **sig_out"
.Fa "const unsigned char **der_in"
.Fa "long len"
.Fc
.Ft int
.Fo ECDSA_size
.Fa "const EC_KEY *eckey"
.Fc
.Ft int
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268

269


270
271
272
273
274
275
276
Calling this function transfers the memory management of the values to
.Fa sig .
Therefore, the values that have been passed in
should not be freed by the caller.
.Pp
.Fn i2d_ECDSA_SIG
creates the DER encoding of the ECDSA signature
.Fa sig
and writes the encoded signature to
.Fa *pp
(note: if
.Fa pp
is
.Dv NULL ,
.Fn i2d_ECDSA_SIG
returns the expected length in bytes of the DER-encoded signature).
.Fn i2d_ECDSA_SIG
returns the length of the DER-encoded signature (or 0 on error).
.Pp
.Fn d2i_ECDSA_SIG
decodes a DER-encoded ECDSA signature and returns the decoded signature
in a newly allocated
.Vt ECDSA_SIG
structure.
.Fa *sig
points to the buffer containing the DER-encoded signature of size

.Fa len .


.Pp
.Fn ECDSA_size
returns the maximum length of a DER-encoded ECDSA signature created with
the private EC key
.Fa eckey .
.Pp
.Fn ECDSA_sign_setup







|

|
<
<
<
<
<
<
<
<
<

|
|
<
|
|
<
>
|
>
>







243
244
245
246
247
248
249
250
251
252









253
254
255

256
257

258
259
260
261
262
263
264
265
266
267
268
Calling this function transfers the memory management of the values to
.Fa sig .
Therefore, the values that have been passed in
should not be freed by the caller.
.Pp
.Fn i2d_ECDSA_SIG
creates the DER encoding of the ECDSA signature
.Fa sig_in
and writes the encoded signature to
.Pf * Fa der_out .









.Fn d2i_ECDSA_SIG
decodes the DER-encoded signature stored in the buffer
.Pf * Fa der_in

which is
.Fa len

bytes long into
.Pf * Fa sig_out .
For details about the semantics, examples, caveats, and bugs, see
.Xr ASN1_item_d2i 3 .
.Pp
.Fn ECDSA_size
returns the maximum length of a DER-encoded ECDSA signature created with
the private EC key
.Fa eckey .
.Pp
.Fn ECDSA_sign_setup
380
381
382
383
384
385
386











387
388
389
390
391
392
393
.Fn ECDSA_SIG_new
returns the new
.Vt ECDSA_SIG
object or
.Dv NULL
if an error occurs.
.Pp











.Fn ECDSA_size
returns the maximum length signature or 0 on error.
.Pp
.Fn ECDSA_SIG_set0 ,
.Fn ECDSA_sign ,
.Fn ECDSA_sign_ex ,
and







>
>
>
>
>
>
>
>
>
>
>







372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
.Fn ECDSA_SIG_new
returns the new
.Vt ECDSA_SIG
object or
.Dv NULL
if an error occurs.
.Pp
.Fn i2d_ECDSA_SIG
returns the number of bytes successfully encoded
or a negative value if an error occurs.
.Pp
.Fn d2i_ECDSA_SIG
returns a pointer to the decoded
.Vt ECDSA_SIG
structure or
.Dv NULL
if an error occurs.
.Pp
.Fn ECDSA_size
returns the maximum length signature or 0 on error.
.Pp
.Fn ECDSA_SIG_set0 ,
.Fn ECDSA_sign ,
.Fn ECDSA_sign_ex ,
and
475
476
477
478
479
480
481

482
483
484

485
486
487
488
489
490
491
	/* incorrect signature */
} else {
	/* ret == 1 */
	/* signature ok */
}
.Ed
.Sh SEE ALSO

.Xr d2i_ECPKParameters 3 ,
.Xr DSA_new 3 ,
.Xr EC_GROUP_new 3 ,

.Xr EC_KEY_new 3 ,
.Xr ECDSA_set_ex_data 3 ,
.Xr EVP_DigestSignInit 3 ,
.Xr EVP_DigestVerifyInit 3 ,
.Xr RSA_new 3
.Sh STANDARDS
ANSI X9.62, US Federal Information Processing Standard FIPS 186-2







>



>







478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
	/* incorrect signature */
} else {
	/* ret == 1 */
	/* signature ok */
}
.Ed
.Sh SEE ALSO
.Xr crypto 3 ,
.Xr d2i_ECPKParameters 3 ,
.Xr DSA_new 3 ,
.Xr EC_GROUP_new 3 ,
.Xr EC_KEY_METHOD_new 3 ,
.Xr EC_KEY_new 3 ,
.Xr ECDSA_set_ex_data 3 ,
.Xr EVP_DigestSignInit 3 ,
.Xr EVP_DigestVerifyInit 3 ,
.Xr RSA_new 3
.Sh STANDARDS
ANSI X9.62, US Federal Information Processing Standard FIPS 186-2
Changes to jni/libressl/man/EC_GROUP_new.3.
1
2
3
4
5
6
7
8
.\"	$OpenBSD: EC_GROUP_new.3,v 1.9 2019/03/29 20:21:54 tb Exp $
.\"	OpenSSL 9b86974e Mon Aug 17 15:21:33 2015 -0400
.\"
.\" This file was written by Matt Caswell <matt@openssl.org>.
.\" Copyright (c) 2013 The OpenSSL Project.  All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
|







1
2
3
4
5
6
7
8
.\"	$OpenBSD: EC_GROUP_new.3,v 1.11 2019/08/19 13:08:26 schwarze Exp $
.\"	OpenSSL 9b86974e Mon Aug 17 15:21:33 2015 -0400
.\"
.\" This file was written by Matt Caswell <matt@openssl.org>.
.\" Copyright (c) 2013 The OpenSSL Project.  All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: March 29 2019 $
.Dt EC_GROUP_NEW 3
.Os
.Sh NAME
.Nm EC_GROUP_new ,
.Nm EC_GROUP_free ,
.Nm EC_GROUP_clear_free ,
.Nm EC_GROUP_new_curve_GFp ,







|







44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: August 19 2019 $
.Dt EC_GROUP_NEW 3
.Os
.Sh NAME
.Nm EC_GROUP_new ,
.Nm EC_GROUP_free ,
.Nm EC_GROUP_clear_free ,
.Nm EC_GROUP_new_curve_GFp ,
295
296
297
298
299
300
301

302
303
304
305
306
307

308
309
310
311
312
313
314
.Fn EC_GROUP_set_curve_GFp ,
.Fn EC_GROUP_get_curve_GFp ,
.Fn EC_GROUP_set_curve_GF2m ,
and
.Fn EC_GROUP_get_curve_GF2m
return 1 on success or 0 on error.
.Sh SEE ALSO

.Xr d2i_ECPKParameters 3 ,
.Xr EC_GFp_simple_method 3 ,
.Xr EC_GROUP_copy 3 ,
.Xr EC_KEY_new 3 ,
.Xr EC_POINT_add 3 ,
.Xr EC_POINT_new 3 ,

.Xr ECDSA_SIG_new 3
.Sh HISTORY
.Fn EC_GROUP_new ,
.Fn EC_GROUP_free ,
.Fn EC_GROUP_clear_free ,
.Fn EC_GROUP_new_curve_GFp ,
.Fn EC_GROUP_set_curve_GFp ,







>






>







295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
.Fn EC_GROUP_set_curve_GFp ,
.Fn EC_GROUP_get_curve_GFp ,
.Fn EC_GROUP_set_curve_GF2m ,
and
.Fn EC_GROUP_get_curve_GF2m
return 1 on success or 0 on error.
.Sh SEE ALSO
.Xr crypto 3 ,
.Xr d2i_ECPKParameters 3 ,
.Xr EC_GFp_simple_method 3 ,
.Xr EC_GROUP_copy 3 ,
.Xr EC_KEY_new 3 ,
.Xr EC_POINT_add 3 ,
.Xr EC_POINT_new 3 ,
.Xr ECDH_compute_key 3 ,
.Xr ECDSA_SIG_new 3
.Sh HISTORY
.Fn EC_GROUP_new ,
.Fn EC_GROUP_free ,
.Fn EC_GROUP_clear_free ,
.Fn EC_GROUP_new_curve_GFp ,
.Fn EC_GROUP_set_curve_GFp ,
Added jni/libressl/man/EC_KEY_METHOD_new.3.










































































































































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
.\" $OpenBSD: EC_KEY_METHOD_new.3,v 1.1 2019/08/16 16:15:50 schwarze Exp $
.\" Copyright (c) 2019 Ingo Schwarze <schwarze@openbsd.org>
.\"
.\" Permission to use, copy, modify, and distribute this software for any
.\" purpose with or without fee is hereby granted, provided that the above
.\" copyright notice and this permission notice appear in all copies.
.\"
.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
.Dd $Mdocdate: August 16 2019 $
.Dt EC_KEY_METHOD_NEW 3
.Os
.Sh NAME
.Nm EC_KEY_METHOD_new ,
.Nm EC_KEY_METHOD_free ,
.Nm EC_KEY_METHOD_set_init ,
.Nm EC_KEY_METHOD_get_init ,
.Nm EC_KEY_METHOD_set_sign ,
.Nm EC_KEY_METHOD_get_sign ,
.Nm EC_KEY_METHOD_set_verify ,
.Nm EC_KEY_METHOD_get_verify ,
.Nm EC_KEY_METHOD_set_keygen ,
.Nm EC_KEY_METHOD_get_keygen ,
.Nm EC_KEY_METHOD_set_compute_key ,
.Nm EC_KEY_METHOD_get_compute_key ,
.Nm EC_KEY_OpenSSL ,
.Nm EC_KEY_set_default_method ,
.Nm EC_KEY_get_default_method ,
.Nm EC_KEY_new_method ,
.Nm EC_KEY_set_method ,
.Nm EC_KEY_get_method
.Nd custom EC_KEY implementations
.Sh SYNOPSIS
.In openssl/ec.h
.Ft EC_KEY_METHOD *
.Fo EC_KEY_METHOD_new
.Fa "const EC_KEY_METHOD *meth"
.Fc
.Ft void
.Fo EC_KEY_METHOD_free
.Fa "EC_KEY_METHOD *meth"
.Fc
.Ft void
.Fo EC_KEY_METHOD_set_init
.Fa "EC_KEY_METHOD *meth"
.Fa "int (*init)(EC_KEY *key)"
.Fa "void (*finish)(EC_KEY *key)"
.Fa "int (*copy)(EC_KEY *dest, const EC_KEY *src)"
.Fa "int (*set_group)(EC_KEY *key, const EC_GROUP *grp)"
.Fa "int (*set_private)(EC_KEY *key, const BIGNUM *priv_key)"
.Fa "int (*set_public)(EC_KEY *key, const EC_POINT *pub_key)"
.Fc
.Ft void
.Fo EC_KEY_METHOD_get_init
.Fa "const EC_KEY_METHOD *meth"
.Fa "int (**pinit)(EC_KEY *key)"
.Fa "void (**pfinish)(EC_KEY *key)"
.Fa "int (**pcopy)(EC_KEY *dest, const EC_KEY *src)"
.Fa "int (**pset_group)(EC_KEY *key, const EC_GROUP *grp)"
.Fa "int (**pset_private)(EC_KEY *key, const BIGNUM *priv_key)"
.Fa "int (**pset_public)(EC_KEY *key, const EC_POINT *pub_key)"
.Fc
.In openssl/ecdsa.h
.Ft void
.Fo EC_KEY_METHOD_set_sign
.Fa "EC_KEY_METHOD *meth"
.Fa "int (*sign)(int type, const unsigned char *dgst, int dgstlen,\
 unsigned char *sig, unsigned int *siglen,\
 const BIGNUM *kinv, const BIGNUM *r, EC_KEY *eckey)"
.Fa "int (*sign_setup)(EC_KEY *eckey, BN_CTX *ctx,\
 BIGNUM **kinv, BIGNUM **rp)"
.Fa "ECDSA_SIG *(*sign_sig)(const unsigned char *dgst, int dgstlen,\
 const BIGNUM *kinv, const BIGNUM *rp, EC_KEY *eckey)"
.Fc
.Ft void
.Fo EC_KEY_METHOD_get_sign
.Fa "const EC_KEY_METHOD *meth"
.Fa "int (**psign)(int type, const unsigned char *dgst, int dgstlen,\
 unsigned char *sig, unsigned int *siglen,\
 const BIGNUM *kinv, const BIGNUM *r, EC_KEY *eckey)"
.Fa "int (**psign_setup)(EC_KEY *eckey, BN_CTX *ctx,\
 BIGNUM **kinv, BIGNUM **rp)"
.Fa "ECDSA_SIG *(**psign_sig)(const unsigned char *dgst, int dgstlen,\
 const BIGNUM *kinv, const BIGNUM *rp, EC_KEY *eckey)"
.Fc
.Ft void
.Fo EC_KEY_METHOD_set_verify
.Fa "EC_KEY_METHOD *meth"
.Fa "int (*verify)(int type, const unsigned char *dgst, int dgst_len,\
 const unsigned char *sigbuf, int sig_len, EC_KEY *eckey)"
.Fa "int (*verify_sig)(const unsigned char *dgst, int dgst_len,\
 const ECDSA_SIG *sig, EC_KEY *eckey)"
.Fc
.Ft void
.Fo EC_KEY_METHOD_get_verify
.Fa "const EC_KEY_METHOD *meth"
.Fa "int (**pverify)(int type, const unsigned char *dgst, int dgst_len,\
 const unsigned char *sigbuf, int sig_len, EC_KEY *eckey)"
.Fa "int (**pverify_sig)(const unsigned char *dgst, int dgst_len,\
 const ECDSA_SIG *sig, EC_KEY *eckey)"
.Fc
.In openssl/ec.h
.Ft void
.Fo EC_KEY_METHOD_set_keygen
.Fa "EC_KEY_METHOD *meth"
.Fa "int (*keygen)(EC_KEY *key)"
.Fc
.Ft void
.Fo EC_KEY_METHOD_get_keygen
.Fa "const EC_KEY_METHOD *meth"
.Fa "int (**pkeygen)(EC_KEY *key)"
.Fc
.Ft void
.Fo EC_KEY_METHOD_set_compute_key
.Fa "EC_KEY_METHOD *meth"
.Fa "int (*ckey)(void *out, size_t outlen,\
 const EC_POINT *pub_key, EC_KEY *ecdh,\
 void *(*KDF) (const void *in, size_t inlen, void *out, size_t *outlen))"
.Fc
.Ft void
.Fo EC_KEY_METHOD_get_compute_key
.Fa "const EC_KEY_METHOD *meth"
.Fa "int (**pck)(void *out, size_t outlen,\
 const EC_POINT *pub_key, EC_KEY *ecdh,\
 void *(*KDF) (const void *in, size_t inlen, void *out, size_t *outlen))"
.Fc
.Ft const EC_KEY_METHOD *
.Fn EC_KEY_OpenSSL void
.Ft void
.Fo EC_KEY_set_default_method
.Fa "const EC_KEY_METHOD *meth"
.Fc
.Ft const EC_KEY_METHOD *
.Fn EC_KEY_get_default_method void
.Ft EC_KEY *
.Fo EC_KEY_new_method
.Fa "ENGINE *engine"
.Fc
.Ft int
.Fo EC_KEY_set_method
.Fa "EC_KEY *key"
.Fa "const EC_KEY_METHOD *meth"
.Fc
.Ft const EC_KEY_METHOD *
.Fo EC_KEY_get_method
.Fa "const EC_KEY *key"
.Fc
.Sh DESCRIPTION
An
.Vt EC_KEY_METHOD
object holds function pointers used for
.Vt EC_KEY
operations.
.Pp
.Fn EC_KEY_METHOD_new
creates a shallow copy of
.Fa meth ,
or an empty
.Vt EC_KEY_METHOD
object if
.Fa meth
is
.Dv NULL .
.Pp
.Fn EC_KEY_METHOD_free
frees
.Fa meth .
If
.Fa meth
is
.Dv NULL
or the return value of
.Fn EC_KEY_OpenSSL ,
no action occurs.
.Pp
.Fn EC_KEY_METHOD_set_init
and
.Fn EC_KEY_METHOD_get_init
set and retrieve optional callback functions called at the following places:
.Pp
.Bl -tag -width set_private -compact
.It Fa init
at the end of
.Fn EC_KEY_new_method
and
.Fn EC_KEY_set_method
.It Fa finish
at the beginning of
.Xr EC_KEY_free 3 ,
.Xr EC_KEY_copy 3 ,
and
.Fn EC_KEY_set_method
.It Fa copy
at the end of
.Xr EC_KEY_copy 3
.It Fa set_group
at the end of
.Xr EC_KEY_set_group 3
and
.Xr EC_KEY_new_by_curve_name 3
.It Fa set_private
at the beginning of
.Xr EC_KEY_set_private_key 3
.It Fa set_public
at the beginning of
.Xr EC_KEY_set_public_key 3
.El
.Pp
If any of these callbacks returns 0, the calling function fails.
By default, all these callbacks are
.Dv NULL .
Arguments of
.Fn EC_KEY_METHOD_get_init
can be set to
.Dv NULL
to selectively retrieve callback function pointers.
.Pp
.Fn EC_KEY_METHOD_set_sign
and
.Fn EC_KEY_METHOD_get_sign
set and retrieve the functions implementing
.Xr ECDSA_sign_ex 3 ,
.Xr ECDSA_sign_setup 3 ,
and
.Xr ECDSA_do_sign_ex 3 .
.Pp
.Fn EC_KEY_METHOD_set_verify
and
.Fn EC_KEY_METHOD_get_verify
set and retrieve the functions implementing
.Xr ECDSA_verify 3
and
.Xr ECDSA_do_verify 3 .
.Pp
.Fn EC_KEY_METHOD_set_keygen
and
.Fn EC_KEY_METHOD_get_keygen
set and retrieve the function implementing
.Xr EC_KEY_generate_key 3 .
.Pp
.Fn EC_KEY_METHOD_set_compute_key
and
.Fn EC_KEY_METHOD_get_compute_key
set and retrieve the function implementing
.Xr ECDH_compute_key 3 .
.Pp
.Fn EC_KEY_set_default_method
chooses the
.Fa meth
to be used for the creation of new
.Vt EC_KEY
objects by future invocations of
.Fn EC_KEY_new_method ,
or reverts to the default implementation if
.Fa meth
is
.Dv NULL .
.Pp
.Fn EC_KEY_new_method
creates and initializes a new
.Vt EC_KEY
object using the given
.Fa engine ,
or the using the
.Vt EC_KEY_METHOD
set with
.Fn EC_KEY_set_default_method
if
.Fa engine
is
.Dv NULL ,
or using the default EC_KEY implementation by default.
.Pp
.Fn EC_KEY_set_method
dissociates the
.Fa key
from the
.Vt ENGINE
it is using, if any, and causes it to use
.Fa meth
in the future.
.Sh RETURN VALUES
.Fn EC_KEY_METHOD_new
returns the newly allocated
.Vt EC_KEY_METHOD
object or
.Dv NULL
if an error occurs.
.Pp
.Fn EC_KEY_OpenSSL
returns a static object representing the default EC_KEY implementation.
.Pp
.Fn EC_KEY_get_default_method
returns the
.Vt EC_KEY_METHOD
that
.Fn EC_KEY_new_method
will use for the creation of new
.Vt EC_KEY
objects in the future.
.Pp
.Fn EC_KEY_new_method
returns the newly allocated
.Vt EC_KEY
object or NULL if an error occurs.
.Pp
.Fn EC_KEY_set_method
returns 1 for success or 0 for failure.
.Pp
.Fn EC_KEY_get_method
returns the EC_KEY implementation used by the given
.Fa key .
.Sh SEE ALSO
.Xr EC_KEY_new 3 ,
.Xr ECDSA_sign 3
.Sh HISTORY
These functions first appeared in OpenSSL 1.1.0
and have been available since
.Ox 6.5 .
Changes to jni/libressl/man/EC_KEY_new.3.
1
2

3
4
5
6
7
8
9
.\"	$OpenBSD: EC_KEY_new.3,v 1.13 2018/03/23 23:18:17 schwarze Exp $
.\"	OpenSSL d900a015 Oct 8 14:40:42 2015 +0200

.\"
.\" This file was written by Matt Caswell <matt@openssl.org>.
.\" Copyright (c) 2013, 2014 The OpenSSL Project.  All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
|
|
>







1
2
3
4
5
6
7
8
9
10
.\" $OpenBSD: EC_KEY_new.3,v 1.15 2019/08/19 13:08:26 schwarze Exp $
.\" full merge up to: OpenSSL 3aef36ff Jan 5 13:06:03 2016 -0500
.\" partial merge up to: OpenSSL e9b77246 Jan 20 19:58:49 2017 +0100
.\"
.\" This file was written by Matt Caswell <matt@openssl.org>.
.\" Copyright (c) 2013, 2014 The OpenSSL Project.  All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: March 23 2018 $
.Dt EC_KEY_NEW 3
.Os
.Sh NAME
.Nm EC_KEY_new ,
.Nm EC_KEY_get_flags ,
.Nm EC_KEY_set_flags ,
.Nm EC_KEY_clear_flags ,







|







45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: August 19 2019 $
.Dt EC_KEY_NEW 3
.Os
.Sh NAME
.Nm EC_KEY_new ,
.Nm EC_KEY_get_flags ,
.Nm EC_KEY_set_flags ,
.Nm EC_KEY_clear_flags ,
482
483
484
485
486
487
488

489
490
491
492
493
494
495
returns the flags associated with the
.Vt EC_KEY object .
.Pp
.Fn EC_KEY_copy
returns a pointer to the destination key or
.Dv NULL
on error.

.Pp
.Fn EC_KEY_up_ref ,
.Fn EC_KEY_set_group ,
.Fn EC_KEY_set_private_key ,
.Fn EC_KEY_set_public_key ,
.Fn EC_KEY_precompute_mult ,
.Fn EC_KEY_generate_key ,







>







483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
returns the flags associated with the
.Vt EC_KEY object .
.Pp
.Fn EC_KEY_copy
returns a pointer to the destination key or
.Dv NULL
on error.
In the latter case, part of the content may already have been copied.
.Pp
.Fn EC_KEY_up_ref ,
.Fn EC_KEY_set_group ,
.Fn EC_KEY_set_private_key ,
.Fn EC_KEY_set_public_key ,
.Fn EC_KEY_precompute_mult ,
.Fn EC_KEY_generate_key ,
518
519
520
521
522
523
524

525
526

527
528
529
530
531
532
533
returns the point_conversion_form for the
.Vt EC_KEY .
.Sh SEE ALSO
.Xr d2i_ECPKParameters 3 ,
.Xr EC_GFp_simple_method 3 ,
.Xr EC_GROUP_copy 3 ,
.Xr EC_GROUP_new 3 ,

.Xr EC_POINT_add 3 ,
.Xr EC_POINT_new 3 ,

.Xr ECDSA_SIG_new 3 ,
.Xr EVP_PKEY_set1_EC_KEY 3
.Sh HISTORY
.Fn EC_KEY_new ,
.Fn EC_KEY_new_by_curve_name ,
.Fn EC_KEY_free ,
.Fn EC_KEY_copy ,







>


>







520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
returns the point_conversion_form for the
.Vt EC_KEY .
.Sh SEE ALSO
.Xr d2i_ECPKParameters 3 ,
.Xr EC_GFp_simple_method 3 ,
.Xr EC_GROUP_copy 3 ,
.Xr EC_GROUP_new 3 ,
.Xr EC_KEY_METHOD_new 3 ,
.Xr EC_POINT_add 3 ,
.Xr EC_POINT_new 3 ,
.Xr ECDH_compute_key 3 ,
.Xr ECDSA_SIG_new 3 ,
.Xr EVP_PKEY_set1_EC_KEY 3
.Sh HISTORY
.Fn EC_KEY_new ,
.Fn EC_KEY_new_by_curve_name ,
.Fn EC_KEY_free ,
.Fn EC_KEY_copy ,
Changes to jni/libressl/man/EC_POINT_new.3.
1
2
3
4
5
6
7
8
.\" $OpenBSD: EC_POINT_new.3,v 1.10 2019/03/18 12:58:00 schwarze Exp $
.\" full merge up to: OpenSSL ddc1caac Mar 6 14:00:24 2018 -0500
.\"
.\" This file was written by Matt Caswell <matt@openssl.org>.
.\" Copyright (c) 2013, 2016 The OpenSSL Project.  All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
|







1
2
3
4
5
6
7
8
.\" $OpenBSD: EC_POINT_new.3,v 1.11 2019/08/19 13:08:26 schwarze Exp $
.\" full merge up to: OpenSSL ddc1caac Mar 6 14:00:24 2018 -0500
.\"
.\" This file was written by Matt Caswell <matt@openssl.org>.
.\" Copyright (c) 2013, 2016 The OpenSSL Project.  All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: March 18 2019 $
.Dt EC_POINT_NEW 3
.Os
.Sh NAME
.Nm EC_POINT_new ,
.Nm EC_POINT_free ,
.Nm EC_POINT_clear_free ,
.Nm EC_POINT_copy ,







|







44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: August 19 2019 $
.Dt EC_POINT_NEW 3
.Os
.Sh NAME
.Nm EC_POINT_new ,
.Nm EC_POINT_free ,
.Nm EC_POINT_clear_free ,
.Nm EC_POINT_copy ,
478
479
480
481
482
483
484
485

486
487
488
489
490
491
492
on error.
.Sh SEE ALSO
.Xr d2i_ECPKParameters 3 ,
.Xr EC_GFp_simple_method 3 ,
.Xr EC_GROUP_copy 3 ,
.Xr EC_GROUP_new 3 ,
.Xr EC_KEY_new 3 ,
.Xr EC_POINT_add 3

.Sh HISTORY
.Fn EC_POINT_new ,
.Fn EC_POINT_free ,
.Fn EC_POINT_clear_free ,
.Fn EC_POINT_copy ,
.Fn EC_POINT_method_of ,
.Fn EC_POINT_set_to_infinity ,







|
>







478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
on error.
.Sh SEE ALSO
.Xr d2i_ECPKParameters 3 ,
.Xr EC_GFp_simple_method 3 ,
.Xr EC_GROUP_copy 3 ,
.Xr EC_GROUP_new 3 ,
.Xr EC_KEY_new 3 ,
.Xr EC_POINT_add 3 ,
.Xr ECDH_compute_key 3
.Sh HISTORY
.Fn EC_POINT_new ,
.Fn EC_POINT_free ,
.Fn EC_POINT_clear_free ,
.Fn EC_POINT_copy ,
.Fn EC_POINT_method_of ,
.Fn EC_POINT_set_to_infinity ,
Changes to jni/libressl/man/ENGINE_new.3.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
.\" $OpenBSD: ENGINE_new.3,v 1.3 2018/04/18 03:39:22 schwarze Exp $
.\" content checked up to:
.\" OpenSSL ENGINE_add 1f13ad31 Dec 25 17:50:39 2017 +0800
.\"
.\" Copyright (c) 2018 Ingo Schwarze <schwarze@openbsd.org>
.\"
.\" Permission to use, copy, modify, and distribute this software for any
.\" purpose with or without fee is hereby granted, provided that the above
.\" copyright notice and this permission notice appear in all copies.
.\"
.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
.Dd $Mdocdate: April 18 2018 $
.Dt ENGINE_NEW 3
.Os
.Sh NAME
.Nm ENGINE_new ,
.Nm ENGINE_up_ref ,
.Nm ENGINE_free ,
.Nm ENGINE_set_destroy_function ,
|

















|







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
.\" $OpenBSD: ENGINE_new.3,v 1.4 2019/06/10 09:49:48 schwarze Exp $
.\" content checked up to:
.\" OpenSSL ENGINE_add 1f13ad31 Dec 25 17:50:39 2017 +0800
.\"
.\" Copyright (c) 2018 Ingo Schwarze <schwarze@openbsd.org>
.\"
.\" Permission to use, copy, modify, and distribute this software for any
.\" purpose with or without fee is hereby granted, provided that the above
.\" copyright notice and this permission notice appear in all copies.
.\"
.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
.Dd $Mdocdate: June 10 2019 $
.Dt ENGINE_NEW 3
.Os
.Sh NAME
.Nm ENGINE_new ,
.Nm ENGINE_up_ref ,
.Nm ENGINE_free ,
.Nm ENGINE_set_destroy_function ,
157
158
159
160
161
162
163

164
165
166
167
168
169
170
always return 1.
.Pp
.Fn ENGINE_get_destroy_function
returns a function pointer to the callback, or
.Dv NULL
if none is installed.
.Sh SEE ALSO

.Xr ENGINE_add 3 ,
.Xr ENGINE_ctrl 3 ,
.Xr ENGINE_get_default_RSA 3 ,
.Xr ENGINE_init 3 ,
.Xr ENGINE_register_all_RSA 3 ,
.Xr ENGINE_register_RSA 3 ,
.Xr ENGINE_set_default 3 ,







>







157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
always return 1.
.Pp
.Fn ENGINE_get_destroy_function
returns a function pointer to the callback, or
.Dv NULL
if none is installed.
.Sh SEE ALSO
.Xr crypto 3 ,
.Xr ENGINE_add 3 ,
.Xr ENGINE_ctrl 3 ,
.Xr ENGINE_get_default_RSA 3 ,
.Xr ENGINE_init 3 ,
.Xr ENGINE_register_all_RSA 3 ,
.Xr ENGINE_register_RSA 3 ,
.Xr ENGINE_set_default 3 ,
Changes to jni/libressl/man/ENGINE_set_RSA.3.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
.\" $OpenBSD: ENGINE_set_RSA.3,v 1.3 2018/05/17 07:21:32 jmc Exp $
.\" content checked up to:
.\" OpenSSL ENGINE_add 1f13ad31 Dec 25 17:50:39 2017 +0800
.\"
.\" Copyright (c) 2018 Ingo Schwarze <schwarze@openbsd.org>
.\"
.\" Permission to use, copy, modify, and distribute this software for any
.\" purpose with or without fee is hereby granted, provided that the above
.\" copyright notice and this permission notice appear in all copies.
.\"
.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
.Dd $Mdocdate: May 17 2018 $
.Dt ENGINE_SET_RSA 3
.Os
.Sh NAME
.Nm ENGINE_set_RSA ,
.Nm ENGINE_get_RSA ,
.Nm ENGINE_set_DSA ,
.Nm ENGINE_get_DSA ,
|

















|







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
.\" $OpenBSD: ENGINE_set_RSA.3,v 1.5 2019/06/06 17:41:43 schwarze Exp $
.\" content checked up to:
.\" OpenSSL ENGINE_add 1f13ad31 Dec 25 17:50:39 2017 +0800
.\"
.\" Copyright (c) 2018 Ingo Schwarze <schwarze@openbsd.org>
.\"
.\" Permission to use, copy, modify, and distribute this software for any
.\" purpose with or without fee is hereby granted, provided that the above
.\" copyright notice and this permission notice appear in all copies.
.\"
.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
.Dd $Mdocdate: June 6 2019 $
.Dt ENGINE_SET_RSA 3
.Os
.Sh NAME
.Nm ENGINE_set_RSA ,
.Nm ENGINE_get_RSA ,
.Nm ENGINE_set_DSA ,
.Nm ENGINE_get_DSA ,
283
284
285
286
287
288
289

290
291
292
293
294



295
296
297
298
299
300
301
.Fa nid
or
.Dv NULL
if
.Fa e
does not implement that digest.
.Sh SEE ALSO

.Xr ENGINE_ctrl 3 ,
.Xr ENGINE_new 3 ,
.Xr ENGINE_register_RSA 3 ,
.Xr ENGINE_set_default 3 ,
.Xr ENGINE_set_flags 3



.Sh HISTORY
.Fn ENGINE_set_RSA ,
.Fn ENGINE_get_RSA ,
.Fn ENGINE_set_DSA ,
.Fn ENGINE_get_DSA ,
.Fn ENGINE_set_DH ,
.Fn ENGINE_get_DH ,







>




|
>
>
>







283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
.Fa nid
or
.Dv NULL
if
.Fa e
does not implement that digest.
.Sh SEE ALSO
.Xr DSA_new 3 ,
.Xr ENGINE_ctrl 3 ,
.Xr ENGINE_new 3 ,
.Xr ENGINE_register_RSA 3 ,
.Xr ENGINE_set_default 3 ,
.Xr ENGINE_set_flags 3 ,
.Xr EVP_DigestInit 3 ,
.Xr EVP_EncryptInit 3 ,
.Xr RSA_new 3
.Sh HISTORY
.Fn ENGINE_set_RSA ,
.Fn ENGINE_get_RSA ,
.Fn ENGINE_set_DSA ,
.Fn ENGINE_get_DSA ,
.Fn ENGINE_set_DH ,
.Fn ENGINE_get_DH ,
Changes to jni/libressl/man/ENGINE_set_default.3.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34

35
36
37
38
39
40
41
.\" $OpenBSD: ENGINE_set_default.3,v 1.3 2018/04/18 12:56:50 jmc Exp $
.\" content checked up to:
.\" OpenSSL ENGINE_add 1f13ad31 Dec 25 17:50:39 2017 +0800
.\"
.\" Copyright (c) 2018 Ingo Schwarze <schwarze@openbsd.org>
.\"
.\" Permission to use, copy, modify, and distribute this software for any
.\" purpose with or without fee is hereby granted, provided that the above
.\" copyright notice and this permission notice appear in all copies.
.\"
.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
.Dd $Mdocdate: April 18 2018 $
.Dt ENGINE 3
.Os
.Sh NAME
.Nm ENGINE_set_default ,
.Nm ENGINE_set_default_string ,
.Nm ENGINE_set_default_RSA ,
.Nm ENGINE_set_default_DSA ,
.Nm ENGINE_set_default_ECDH ,
.Nm ENGINE_set_default_ECDSA ,
.Nm ENGINE_set_default_DH ,
.Nm ENGINE_set_default_RAND ,
.Nm ENGINE_set_default_ciphers ,
.Nm ENGINE_set_default_digests
.Nd register an ENGINE as the default for an algorithm
.Sh SYNOPSIS

.Ft int
.Fo ENGINE_set_default_RSA
.Fa "ENGINE *e"
.Fc
.Ft int
.Fo ENGINE_set_default_DSA
.Fa "ENGINE *e"
|

















|















>







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
.\" $OpenBSD: ENGINE_set_default.3,v 1.4 2019/06/03 14:43:15 schwarze Exp $
.\" content checked up to:
.\" OpenSSL ENGINE_add 1f13ad31 Dec 25 17:50:39 2017 +0800
.\"
.\" Copyright (c) 2018 Ingo Schwarze <schwarze@openbsd.org>
.\"
.\" Permission to use, copy, modify, and distribute this software for any
.\" purpose with or without fee is hereby granted, provided that the above
.\" copyright notice and this permission notice appear in all copies.
.\"
.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
.Dd $Mdocdate: June 3 2019 $
.Dt ENGINE 3
.Os
.Sh NAME
.Nm ENGINE_set_default ,
.Nm ENGINE_set_default_string ,
.Nm ENGINE_set_default_RSA ,
.Nm ENGINE_set_default_DSA ,
.Nm ENGINE_set_default_ECDH ,
.Nm ENGINE_set_default_ECDSA ,
.Nm ENGINE_set_default_DH ,
.Nm ENGINE_set_default_RAND ,
.Nm ENGINE_set_default_ciphers ,
.Nm ENGINE_set_default_digests
.Nd register an ENGINE as the default for an algorithm
.Sh SYNOPSIS
.In openssl/engine.h
.Ft int
.Fo ENGINE_set_default_RSA
.Fa "ENGINE *e"
.Fc
.Ft int
.Fo ENGINE_set_default_DSA
.Fa "ENGINE *e"
Changes to jni/libressl/man/ERR.3.
1
2
3
4
5
6
7
8
.\"	$OpenBSD: ERR.3,v 1.6 2019/03/10 14:50:05 schwarze Exp $
.\"	OpenSSL 186bb907 Apr 13 11:05:13 2015 -0700
.\"
.\" This file was written by Ulf Moeller <ulf@openssl.org> and
.\" Dr. Stephen Henson <steve@openssl.org>.
.\" Copyright (c) 2000, 2015 The OpenSSL Project.  All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
|







1
2
3
4
5
6
7
8
.\"	$OpenBSD: ERR.3,v 1.8 2019/06/10 09:49:48 schwarze Exp $
.\"	OpenSSL 186bb907 Apr 13 11:05:13 2015 -0700
.\"
.\" This file was written by Ulf Moeller <ulf@openssl.org> and
.\" Dr. Stephen Henson <steve@openssl.org>.
.\" Copyright (c) 2000, 2015 The OpenSSL Project.  All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: March 10 2019 $
.Dt ERR 3
.Os
.Sh NAME
.Nm ERR
.Nd OpenSSL error codes
.Sh SYNOPSIS
.In openssl/err.h







|







45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: June 10 2019 $
.Dt ERR 3
.Os
.Sh NAME
.Nm ERR
.Nd OpenSSL error codes
.Sh SYNOPSIS
.In openssl/err.h
196
197
198
199
200
201
202


203
204
205
206
207
208
209
210
211
212
213
.Pp
Error strings are also stored in a hash table.
The hash tables can be obtained by calling
.Fn ERR_get_err_state_table
and
.Fn ERR_get_string_table .
.Sh SEE ALSO


.Xr ERR_clear_error 3 ,
.Xr ERR_error_string 3 ,
.Xr ERR_get_error 3 ,
.Xr ERR_GET_LIB 3 ,
.Xr ERR_load_crypto_strings 3 ,
.Xr ERR_load_strings 3 ,
.Xr ERR_print_errors 3 ,
.Xr ERR_put_error 3 ,
.Xr ERR_remove_state 3 ,
.Xr ERR_set_mark 3 ,
.Xr SSL_get_error 3







>
>











196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
.Pp
Error strings are also stored in a hash table.
The hash tables can be obtained by calling
.Fn ERR_get_err_state_table
and
.Fn ERR_get_string_table .
.Sh SEE ALSO
.Xr crypto 3 ,
.Xr ERR_asprintf_error_data 3 ,
.Xr ERR_clear_error 3 ,
.Xr ERR_error_string 3 ,
.Xr ERR_get_error 3 ,
.Xr ERR_GET_LIB 3 ,
.Xr ERR_load_crypto_strings 3 ,
.Xr ERR_load_strings 3 ,
.Xr ERR_print_errors 3 ,
.Xr ERR_put_error 3 ,
.Xr ERR_remove_state 3 ,
.Xr ERR_set_mark 3 ,
.Xr SSL_get_error 3
Changes to jni/libressl/man/ERR_load_crypto_strings.3.
1
2
3
4
5
6
7
8
.\"	$OpenBSD: ERR_load_crypto_strings.3,v 1.7 2018/03/27 17:35:50 schwarze Exp $
.\"	OpenSSL a528d4f0 Oct 27 13:40:11 2015 -0400
.\"
.\" This file is a derived work.
.\" The changes are covered by the following Copyright and license:
.\"
.\" Copyright (c) 2017 Ingo Schwarze <schwarze@openbsd.org>
.\"
|







1
2
3
4
5
6
7
8
.\"	$OpenBSD: ERR_load_crypto_strings.3,v 1.8 2019/06/14 13:41:31 schwarze Exp $
.\"	OpenSSL a528d4f0 Oct 27 13:40:11 2015 -0400
.\"
.\" This file is a derived work.
.\" The changes are covered by the following Copyright and license:
.\"
.\" Copyright (c) 2017 Ingo Schwarze <schwarze@openbsd.org>
.\"
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89




90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: March 27 2018 $
.Dt ERR_LOAD_CRYPTO_STRINGS 3
.Os
.Sh NAME
.Nm ERR_load_crypto_strings ,
.Nm ERR_free_strings ,
.Nm ERR_load_BN_strings ,
.Nm SSL_load_error_strings
.Nd load and free OpenSSL error strings
.Sh SYNOPSIS
.In openssl/err.h
.Ft void
.Fn ERR_load_crypto_strings void
.Ft void
.Fn ERR_free_strings void
.In openssl/bn.h
.Ft void
.Fn ERR_load_BN_strings void
.In openssl/ssl.h
.Ft void
.Fn SSL_load_error_strings void
.Sh DESCRIPTION




.Fn ERR_load_crypto_strings
registers the error strings for all
.Xr crypto 3
functions.
.Fn SSL_load_error_strings
does the same, but also registers the
.Xr ssl 3
error strings.
.Pp
.Fn ERR_load_BN_strings
only registers the error strings for the
.Vt BIGNUM
part of the library, i.e. the functions documented in
.Xr BN_new 3
and in the manual pages referenced from there.
That may be useful if no other parts of the crypto library
are used by the program.
Similar functions exist for other parts of the crypto library,
but they are not yet documented.
.Pp
If the error strings were already loaded before, no action occurs.
.Pp
One of these functions should be called before generating textual error
messages.
However, this is not required when memory usage is an issue.
.Pp
.Fn ERR_free_strings
frees all previously loaded error strings.
.Sh SEE ALSO
.Xr ERR 3 ,
.Xr ERR_error_string 3
.Sh HISTORY
.Fn ERR_load_crypto_strings
and
.Fn SSL_load_error_strings
first appeared in SSLeay 0.4.4.
.Fn ERR_free_strings
and
.Fn ERR_load_BN_strings
first appeared in SSLeay 0.5.1.
These functions been available since
.Ox 2.4 .
.Sh BUGS
Even though the error strings are already compiled into the object
code of the library as static strings, these functions store them
again using dynamically allocated memory on the heap.
That may fail if insufficient memory is available,
but these functions do not report such errors.
Instead, they fail silently, possibly having registered none or only
a part of the strings requested.







|





<








<
<
<




>
>
>
>









<
<
<
<
<
<
<
<
<
<
<


<
<
<
<











<
<











61
62
63
64
65
66
67
68
69
70
71
72
73

74
75
76
77
78
79
80
81



82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98











99
100




101
102
103
104
105
106
107
108
109
110
111


112
113
114
115
116
117
118
119
120
121
122
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: June 14 2019 $
.Dt ERR_LOAD_CRYPTO_STRINGS 3
.Os
.Sh NAME
.Nm ERR_load_crypto_strings ,
.Nm ERR_free_strings ,

.Nm SSL_load_error_strings
.Nd load and free OpenSSL error strings
.Sh SYNOPSIS
.In openssl/err.h
.Ft void
.Fn ERR_load_crypto_strings void
.Ft void
.Fn ERR_free_strings void



.In openssl/ssl.h
.Ft void
.Fn SSL_load_error_strings void
.Sh DESCRIPTION
These functions are deprecated.
It is never useful for any application program to call any of them explicitly.
The library automatically calls them internally whenever needed.
.Pp
.Fn ERR_load_crypto_strings
registers the error strings for all
.Xr crypto 3
functions.
.Fn SSL_load_error_strings
does the same, but also registers the
.Xr ssl 3
error strings.
.Pp











If the error strings were already loaded before, no action occurs.
.Pp




.Fn ERR_free_strings
frees all previously loaded error strings.
.Sh SEE ALSO
.Xr ERR 3 ,
.Xr ERR_error_string 3
.Sh HISTORY
.Fn ERR_load_crypto_strings
and
.Fn SSL_load_error_strings
first appeared in SSLeay 0.4.4.
.Fn ERR_free_strings


first appeared in SSLeay 0.5.1.
These functions been available since
.Ox 2.4 .
.Sh BUGS
Even though the error strings are already compiled into the object
code of the library as static strings, these functions store them
again using dynamically allocated memory on the heap.
That may fail if insufficient memory is available,
but these functions do not report such errors.
Instead, they fail silently, possibly having registered none or only
a part of the strings requested.
Changes to jni/libressl/man/ESS_SIGNING_CERT_new.3.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
.\"	$OpenBSD: ESS_SIGNING_CERT_new.3,v 1.4 2018/03/23 04:34:23 schwarze Exp $
.\"
.\" Copyright (c) 2016 Ingo Schwarze <schwarze@openbsd.org>
.\"
.\" Permission to use, copy, modify, and distribute this software for any
.\" purpose with or without fee is hereby granted, provided that the above
.\" copyright notice and this permission notice appear in all copies.
.\"
.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
.Dd $Mdocdate: March 23 2018 $
.Dt ESS_SIGNING_CERT_NEW 3
.Os
.Sh NAME
.Nm ESS_SIGNING_CERT_new ,
.Nm ESS_SIGNING_CERT_free ,
.Nm ESS_CERT_ID_new ,
.Nm ESS_CERT_ID_free ,
|















|







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
.\"	$OpenBSD: ESS_SIGNING_CERT_new.3,v 1.5 2019/06/06 01:06:58 schwarze Exp $
.\"
.\" Copyright (c) 2016 Ingo Schwarze <schwarze@openbsd.org>
.\"
.\" Permission to use, copy, modify, and distribute this software for any
.\" purpose with or without fee is hereby granted, provided that the above
.\" copyright notice and this permission notice appear in all copies.
.\"
.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
.Dd $Mdocdate: June 6 2019 $
.Dt ESS_SIGNING_CERT_NEW 3
.Os
.Sh NAME
.Nm ESS_SIGNING_CERT_new ,
.Nm ESS_SIGNING_CERT_free ,
.Nm ESS_CERT_ID_new ,
.Nm ESS_CERT_ID_free ,
93
94
95
96
97
98
99


100
101
102
103
104
105
106
.Vt ESS_SIGNING_CERT ,
.Vt ESS_CERT_ID ,
or
.Vt ESS_ISSUER_SERIAL
object, respectively, or
.Dv NULL
if an error occurred.


.Sh STANDARDS
RFC 2634: Enhanced Security Services for S/MIME,
section 5: Signing Certificate Attribute
.Pp
Note that RFC 2634 has been updated by RFC 5035:
Enhanced Security Services (ESS) Update:
Adding CertID Algorithm Agility.







>
>







93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
.Vt ESS_SIGNING_CERT ,
.Vt ESS_CERT_ID ,
or
.Vt ESS_ISSUER_SERIAL
object, respectively, or
.Dv NULL
if an error occurred.
.Sh SEE ALSO
.Xr d2i_ESS_SIGNING_CERT 3
.Sh STANDARDS
RFC 2634: Enhanced Security Services for S/MIME,
section 5: Signing Certificate Attribute
.Pp
Note that RFC 2634 has been updated by RFC 5035:
Enhanced Security Services (ESS) Update:
Adding CertID Algorithm Agility.
Changes to jni/libressl/man/EVP_AEAD_CTX_init.3.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
.\" $OpenBSD: EVP_AEAD_CTX_init.3,v 1.8 2019/03/21 14:12:48 jmc Exp $
.\"
.\" Copyright (c) 2014, Google Inc.
.\" Parts of the text were written by Adam Langley and David Benjamin.
.\" Copyright (c) 2015 Reyk Floeter <reyk@openbsd.org>
.\"
.\" Permission to use, copy, modify, and/or distribute this software for any
.\" purpose with or without fee is hereby granted, provided that the above
.\" copyright notice and this permission notice appear in all copies.
.\"
.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
.Dd $Mdocdate: March 21 2019 $
.Dt EVP_AEAD_CTX_INIT 3
.Os
.Sh NAME
.Nm EVP_AEAD_CTX_init ,
.Nm EVP_AEAD_CTX_cleanup ,
.Nm EVP_AEAD_CTX_open ,
.Nm EVP_AEAD_CTX_seal ,
|

















|







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
.\" $OpenBSD: EVP_AEAD_CTX_init.3,v 1.9 2019/06/06 01:06:58 schwarze Exp $
.\"
.\" Copyright (c) 2014, Google Inc.
.\" Parts of the text were written by Adam Langley and David Benjamin.
.\" Copyright (c) 2015 Reyk Floeter <reyk@openbsd.org>
.\"
.\" Permission to use, copy, modify, and/or distribute this software for any
.\" purpose with or without fee is hereby granted, provided that the above
.\" copyright notice and this permission notice appear in all copies.
.\"
.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
.Dd $Mdocdate: June 6 2019 $
.Dt EVP_AEAD_CTX_INIT 3
.Os
.Sh NAME
.Nm EVP_AEAD_CTX_init ,
.Nm EVP_AEAD_CTX_cleanup ,
.Nm EVP_AEAD_CTX_open ,
.Nm EVP_AEAD_CTX_seal ,
271
272
273
274
275
276
277
278

279
280
281
282
283
284
285

EVP_AEAD_CTX_seal(&ctx, out, &out_len, BUFSIZE, nonce,
    nonce_len, in, in_len, NULL, 0);

EVP_AEAD_CTX_cleanup(&ctx);
.Ed
.Sh SEE ALSO
.Xr evp 3

.Sh STANDARDS
.Rs
.%A A. Langley
.%A W. Chang
.%D November 2013
.%R draft-agl-tls-chacha20poly1305-04
.%T ChaCha20 and Poly1305 based Cipher Suites for TLS







|
>







271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286

EVP_AEAD_CTX_seal(&ctx, out, &out_len, BUFSIZE, nonce,
    nonce_len, in, in_len, NULL, 0);

EVP_AEAD_CTX_cleanup(&ctx);
.Ed
.Sh SEE ALSO
.Xr evp 3 ,
.Xr EVP_EncryptInit 3
.Sh STANDARDS
.Rs
.%A A. Langley
.%A W. Chang
.%D November 2013
.%R draft-agl-tls-chacha20poly1305-04
.%T ChaCha20 and Poly1305 based Cipher Suites for TLS
Changes to jni/libressl/man/EVP_BytesToKey.3.
1
2
3
4
5
6
7
8
.\"	$OpenBSD: EVP_BytesToKey.3,v 1.7 2018/03/27 17:35:50 schwarze Exp $
.\"	OpenSSL b97fdb57 Nov 11 09:33:09 2016 +0100
.\"
.\" This file was written by Dr. Stephen Henson <steve@openssl.org>.
.\" Copyright (c) 2001, 2011, 2013, 2014, 2015 The OpenSSL Project.
.\" All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
|







1
2
3
4
5
6
7
8
.\"	$OpenBSD: EVP_BytesToKey.3,v 1.8 2019/06/07 20:46:25 schwarze Exp $
.\"	OpenSSL b97fdb57 Nov 11 09:33:09 2016 +0100
.\"
.\" This file was written by Dr. Stephen Henson <steve@openssl.org>.
.\" Copyright (c) 2001, 2011, 2013, 2014, 2015 The OpenSSL Project.
.\" All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: March 27 2018 $
.Dt EVP_BYTESTOKEY 3
.Os
.Sh NAME
.Nm EVP_BytesToKey
.Nd password based encryption routine
.Sh SYNOPSIS
.In openssl/evp.h







|







45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: June 7 2019 $
.Dt EVP_BYTESTOKEY 3
.Os
.Sh NAME
.Nm EVP_BytesToKey
.Nd password based encryption routine
.Sh SYNOPSIS
.In openssl/evp.h
132
133
134
135
136
137
138
139
140
141
142
143
144
returns the number of bytes needed to store the derived key.
Otherwise,
.Fn EVP_BytesToKey
returns the size of the derived key in bytes or 0 on error.
.Sh SEE ALSO
.Xr evp 3 ,
.Xr EVP_EncryptInit 3 ,
.Xr PKCS5_PBKDF2_HMAC 3 ,
.Xr RAND_bytes 3
.Sh HISTORY
.Fn EVP_BytesToKey
first appeared in SSLeay 0.5.1 and has been available since
.Ox 2.4 .







|
<




132
133
134
135
136
137
138
139

140
141
142
143
returns the number of bytes needed to store the derived key.
Otherwise,
.Fn EVP_BytesToKey
returns the size of the derived key in bytes or 0 on error.
.Sh SEE ALSO
.Xr evp 3 ,
.Xr EVP_EncryptInit 3 ,
.Xr PKCS5_PBKDF2_HMAC 3

.Sh HISTORY
.Fn EVP_BytesToKey
first appeared in SSLeay 0.5.1 and has been available since
.Ox 2.4 .
Changes to jni/libressl/man/EVP_DigestInit.3.
1
2
3
4

















5
6
7
8
9
10
11
12
.\" $OpenBSD: EVP_DigestInit.3,v 1.15 2018/03/27 17:35:50 schwarze Exp $
.\" full merge up to: OpenSSL 7f572e95 Dec 2 13:57:04 2015 +0000
.\" selective merge up to: OpenSSL a95d7574 Jul 2 12:16:38 2017 -0400
.\"

















.\" This file was written by Dr. Stephen Henson <steve@openssl.org>
.\" and Richard Levitte <levitte@openssl.org>.
.\" Copyright (c) 2000-2004, 2009, 2012-2016 The OpenSSL Project.
.\" All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
|



>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
|







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
.\" $OpenBSD: EVP_DigestInit.3,v 1.18 2019/08/25 17:08:20 schwarze Exp $
.\" full merge up to: OpenSSL 7f572e95 Dec 2 13:57:04 2015 +0000
.\" selective merge up to: OpenSSL a95d7574 Jul 2 12:16:38 2017 -0400
.\"
.\" This file is a derived work.
.\" The changes are covered by the following Copyright and license:
.\"
.\" Copyright (c) 2019 Ingo Schwarze <schwarze@openbsd.org>
.\"
.\" Permission to use, copy, modify, and distribute this software for any
.\" purpose with or without fee is hereby granted, provided that the above
.\" copyright notice and this permission notice appear in all copies.
.\"
.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
.\" The original file was written by Dr. Stephen Henson <steve@openssl.org>
.\" and Richard Levitte <levitte@openssl.org>.
.\" Copyright (c) 2000-2004, 2009, 2012-2016 The OpenSSL Project.
.\" All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68

69
70
71
72
73
74
75
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: March 27 2018 $
.Dt EVP_DIGESTINIT 3
.Os
.Sh NAME
.Nm EVP_MD_CTX_new ,
.Nm EVP_MD_CTX_reset ,
.Nm EVP_MD_CTX_free ,
.Nm EVP_MD_CTX_init ,
.Nm EVP_MD_CTX_create ,
.Nm EVP_MD_CTX_cleanup ,
.Nm EVP_MD_CTX_destroy ,
.Nm EVP_MD_CTX_ctrl ,
.Nm EVP_DigestInit_ex ,
.Nm EVP_DigestUpdate ,
.Nm EVP_DigestFinal_ex ,

.Nm EVP_MD_CTX_copy_ex ,
.Nm EVP_DigestInit ,
.Nm EVP_DigestFinal ,
.Nm EVP_MD_CTX_copy ,
.Nm EVP_MAX_MD_SIZE ,
.Nm EVP_MD_type ,
.Nm EVP_MD_pkey_type ,







|














>







64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: August 25 2019 $
.Dt EVP_DIGESTINIT 3
.Os
.Sh NAME
.Nm EVP_MD_CTX_new ,
.Nm EVP_MD_CTX_reset ,
.Nm EVP_MD_CTX_free ,
.Nm EVP_MD_CTX_init ,
.Nm EVP_MD_CTX_create ,
.Nm EVP_MD_CTX_cleanup ,
.Nm EVP_MD_CTX_destroy ,
.Nm EVP_MD_CTX_ctrl ,
.Nm EVP_DigestInit_ex ,
.Nm EVP_DigestUpdate ,
.Nm EVP_DigestFinal_ex ,
.Nm EVP_Digest ,
.Nm EVP_MD_CTX_copy_ex ,
.Nm EVP_DigestInit ,
.Nm EVP_DigestFinal ,
.Nm EVP_MD_CTX_copy ,
.Nm EVP_MAX_MD_SIZE ,
.Nm EVP_MD_type ,
.Nm EVP_MD_pkey_type ,
141
142
143
144
145
146
147









148
149
150
151
152
153
154
.Fc
.Ft int
.Fo EVP_DigestFinal_ex
.Fa "EVP_MD_CTX *ctx"
.Fa "unsigned char *md"
.Fa "unsigned int *s"
.Fc









.Ft int
.Fo EVP_MD_CTX_copy_ex
.Fa "EVP_MD_CTX *out"
.Fa "const EVP_MD_CTX *in"
.Fc
.Ft int
.Fo EVP_DigestInit







>
>
>
>
>
>
>
>
>







159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
.Fc
.Ft int
.Fo EVP_DigestFinal_ex
.Fa "EVP_MD_CTX *ctx"
.Fa "unsigned char *md"
.Fa "unsigned int *s"
.Fc
.Ft int
.Fo EVP_Digest
.Fa "const void *d"
.Fa "size_t cnt"
.Fa "unsigned char *md"
.Fa "unsigned int *s"
.Fa "const EVP_MD *type"
.Fa "ENGINE *impl"
.Fc
.Ft int
.Fo EVP_MD_CTX_copy_ex
.Fa "EVP_MD_CTX *out"
.Fa "const EVP_MD_CTX *in"
.Fc
.Ft int
.Fo EVP_DigestInit
330
331
332
333
334
335
336

























337
338
339
340
341
342
343
After calling
.Fn EVP_DigestFinal_ex ,
no additional calls to
.Fn EVP_DigestUpdate
can be made, but
.Fn EVP_DigestInit_ex
can be called to initialize a new digest operation.

























.Pp
.Fn EVP_MD_CTX_copy_ex
can be used to copy the message digest state from
.Fa in
to
.Fa out .
This is useful if large amounts of data are to be hashed which only







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
After calling
.Fn EVP_DigestFinal_ex ,
no additional calls to
.Fn EVP_DigestUpdate
can be made, but
.Fn EVP_DigestInit_ex
can be called to initialize a new digest operation.
.Pp
.Fn EVP_Digest
is a simple wrapper function to hash
.Fa cnt
bytes of data at
.Fa d
using the digest
.Fa type
from
.Vt ENGINE
.Fa impl
in a one-shot operation and place the digest value into
.Fa md ,
and, unless
.Fa s
is
.Dv NULL ,
the length of the digest in bytes into
.Pf * Fa s .
This wrapper uses a temporary digest context and passes its arguments to
.Fn EVP_DigestInit_ex ,
.Fn EVP_DigestUpdate ,
and
.Fn EVP_DigestFinal_ex
internally.
.Pp
.Fn EVP_MD_CTX_copy_ex
can be used to copy the message digest state from
.Fa in
to
.Fa out .
This is useful if large amounts of data are to be hashed which only
512
513
514
515
516
517
518

519
520
521
522
523
524
525
.Fn EVP_MD_CTX_cleanup
always return 1.
.Pp
.Fn EVP_MD_CTX_ctrl ,
.Fn EVP_DigestInit_ex ,
.Fn EVP_DigestUpdate ,
.Fn EVP_DigestFinal_ex ,

.Fn EVP_MD_CTX_copy_ex ,
.Fn EVP_DigestInit ,
.Fn EVP_DigestFinal ,
and
.Fn EVP_MD_CTX_copy
return 1 for success or 0 for failure.
.Pp







>







564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
.Fn EVP_MD_CTX_cleanup
always return 1.
.Pp
.Fn EVP_MD_CTX_ctrl ,
.Fn EVP_DigestInit_ex ,
.Fn EVP_DigestUpdate ,
.Fn EVP_DigestFinal_ex ,
.Fn EVP_Digest ,
.Fn EVP_MD_CTX_copy_ex ,
.Fn EVP_DigestInit ,
.Fn EVP_DigestFinal ,
and
.Fn EVP_MD_CTX_copy
return 1 for success or 0 for failure.
.Pp
613
614
615
616
617
618
619

620

















621
622
623
624
625
626
627
		printf("%02x", md_value[i]);
	printf("\en");

	return 0;
}
.Ed
.Sh SEE ALSO

.Xr evp 3

















.Sh HISTORY
.Fn EVP_DigestInit ,
.Fn EVP_DigestUpdate ,
.Fn EVP_DigestFinal ,
.Dv EVP_MAX_MD_SIZE ,
.Fn EVP_md5 ,
and







>
|
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
		printf("%02x", md_value[i]);
	printf("\en");

	return 0;
}
.Ed
.Sh SEE ALSO
.Xr BIO_f_md 3 ,
.Xr evp 3 ,
.Xr EVP_BytesToKey 3 ,
.Xr EVP_DigestSignInit 3 ,
.Xr EVP_DigestVerifyInit 3 ,
.Xr EVP_PKEY_CTX_set_signature_md 3 ,
.Xr EVP_PKEY_meth_set_signctx 3 ,
.Xr EVP_SignInit 3 ,
.Xr EVP_sm3 3 ,
.Xr EVP_VerifyInit 3 ,
.Xr EVP_whirlpool 3 ,
.Xr HMAC 3 ,
.Xr OCSP_basic_sign 3 ,
.Xr OCSP_request_sign 3 ,
.Xr PKCS5_PBKDF2_HMAC 3 ,
.Xr PKCS7_sign_add_signer 3 ,
.Xr X509_ALGOR_set_md 3 ,
.Xr X509_digest 3 ,
.Xr X509_sign 3
.Sh HISTORY
.Fn EVP_DigestInit ,
.Fn EVP_DigestUpdate ,
.Fn EVP_DigestFinal ,
.Dv EVP_MAX_MD_SIZE ,
.Fn EVP_md5 ,
and
666
667
668
669
670
671
672

673
674
675
676
677
678
679
.Pp
.Fn EVP_MD_CTX_init ,
.Fn EVP_MD_CTX_create ,
.Fn EVP_MD_CTX_cleanup ,
.Fn EVP_MD_CTX_destroy ,
.Fn EVP_DigestInit_ex ,
.Fn EVP_DigestFinal_ex ,

and
.Fn EVP_MD_CTX_copy_ex
first appeared in OpenSSL 0.9.7 and have been available since
.Ox 3.2 .
.Pp
.Fn EVP_sha224 ,
.Fn EVP_sha256 ,







>







737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
.Pp
.Fn EVP_MD_CTX_init ,
.Fn EVP_MD_CTX_create ,
.Fn EVP_MD_CTX_cleanup ,
.Fn EVP_MD_CTX_destroy ,
.Fn EVP_DigestInit_ex ,
.Fn EVP_DigestFinal_ex ,
.Fn EVP_Digest ,
and
.Fn EVP_MD_CTX_copy_ex
first appeared in OpenSSL 0.9.7 and have been available since
.Ox 3.2 .
.Pp
.Fn EVP_sha224 ,
.Fn EVP_sha256 ,
Changes to jni/libressl/man/EVP_DigestSignInit.3.
1
2
3
4
5
6
7
8
.\"	$OpenBSD: EVP_DigestSignInit.3,v 1.6 2018/12/23 08:35:14 tb Exp $
.\"	OpenSSL 9b86974e Aug 17 15:21:33 2015 -0400
.\"
.\" This file was written by Dr. Stephen Henson <steve@openssl.org>.
.\" Copyright (c) 2006, 2009, 2015, 2016 The OpenSSL Project.
.\" All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
|







1
2
3
4
5
6
7
8
.\"	$OpenBSD: EVP_DigestSignInit.3,v 1.7 2019/06/10 14:58:48 schwarze Exp $
.\"	OpenSSL 9b86974e Aug 17 15:21:33 2015 -0400
.\"
.\" This file was written by Dr. Stephen Henson <steve@openssl.org>.
.\" Copyright (c) 2006, 2009, 2015, 2016 The OpenSSL Project.
.\" All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: December 23 2018 $
.Dt EVP_DIGESTSIGNINIT 3
.Os
.Sh NAME
.Nm EVP_DigestSignInit ,
.Nm EVP_DigestSignUpdate ,
.Nm EVP_DigestSignFinal
.Nd EVP signing functions







|







45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: June 10 2019 $
.Dt EVP_DIGESTSIGNINIT 3
.Os
.Sh NAME
.Nm EVP_DigestSignInit ,
.Nm EVP_DigestSignUpdate ,
.Nm EVP_DigestSignFinal
.Nd EVP signing functions
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
return 1 for success and 0 or a negative value for failure.
In particular, a return value of -2 indicates the operation is not
supported by the public key algorithm.
.Pp
The error codes can be obtained from
.Xr ERR_get_error 3 .
.Sh SEE ALSO
.Xr ERR 3 ,
.Xr evp 3 ,
.Xr EVP_DigestInit 3 ,
.Xr EVP_DigestVerifyInit 3 ,
.Xr EVP_PKEY_meth_set_signctx 3
.Sh HISTORY
.Fn EVP_DigestSignInit ,
.Fn EVP_DigestSignUpdate ,
and
.Fn EVP_DigestSignFinal
first appeared in OpenSSL 1.0.0 and have been available since
.Ox 4.9 .







<











187
188
189
190
191
192
193

194
195
196
197
198
199
200
201
202
203
204
return 1 for success and 0 or a negative value for failure.
In particular, a return value of -2 indicates the operation is not
supported by the public key algorithm.
.Pp
The error codes can be obtained from
.Xr ERR_get_error 3 .
.Sh SEE ALSO

.Xr evp 3 ,
.Xr EVP_DigestInit 3 ,
.Xr EVP_DigestVerifyInit 3 ,
.Xr EVP_PKEY_meth_set_signctx 3
.Sh HISTORY
.Fn EVP_DigestSignInit ,
.Fn EVP_DigestSignUpdate ,
and
.Fn EVP_DigestSignFinal
first appeared in OpenSSL 1.0.0 and have been available since
.Ox 4.9 .
Changes to jni/libressl/man/EVP_DigestVerifyInit.3.
1
2
3
4
5
6
7
8
.\"	$OpenBSD: EVP_DigestVerifyInit.3,v 1.7 2018/12/23 08:35:14 tb Exp $
.\"	OpenSSL fb552ac6 Sep 30 23:43:01 2009 +0000
.\"
.\" This file was written by Dr. Stephen Henson <steve@openssl.org>.
.\" Copyright (c) 2006, 2009, 2014, 2015, 2016 The OpenSSL Project.
.\" All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
|







1
2
3
4
5
6
7
8
.\"	$OpenBSD: EVP_DigestVerifyInit.3,v 1.8 2019/06/10 14:58:48 schwarze Exp $
.\"	OpenSSL fb552ac6 Sep 30 23:43:01 2009 +0000
.\"
.\" This file was written by Dr. Stephen Henson <steve@openssl.org>.
.\" Copyright (c) 2006, 2009, 2014, 2015, 2016 The OpenSSL Project.
.\" All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: December 23 2018 $
.Dt EVP_DIGESTVERIFYINIT 3
.Os
.Sh NAME
.Nm EVP_DigestVerifyInit ,
.Nm EVP_DigestVerifyUpdate ,
.Nm EVP_DigestVerifyFinal
.Nd EVP signature verification functions







|







45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: June 10 2019 $
.Dt EVP_DIGESTVERIFYINIT 3
.Os
.Sh NAME
.Nm EVP_DigestVerifyInit ,
.Nm EVP_DigestVerifyUpdate ,
.Nm EVP_DigestVerifyFinal
.Nd EVP signature verification functions
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
data or the signature had an invalid form), while other values
indicate a more serious error (and sometimes also indicate an invalid
signature form).
.Pp
The error codes can be obtained from
.Xr ERR_get_error 3 .
.Sh SEE ALSO
.Xr ERR 3 ,
.Xr evp 3 ,
.Xr EVP_DigestInit 3 ,
.Xr EVP_DigestSignInit 3 ,
.Xr EVP_PKEY_meth_set_verifyctx 3
.Sh HISTORY
.Fn EVP_DigestVerifyInit ,
.Fn EVP_DigestVerifyUpdate ,
and
.Fn EVP_DigestVerifyFinal
first appeared in OpenSSL 1.0.0 and have been available since
.Ox 4.9 .







<











168
169
170
171
172
173
174

175
176
177
178
179
180
181
182
183
184
185
data or the signature had an invalid form), while other values
indicate a more serious error (and sometimes also indicate an invalid
signature form).
.Pp
The error codes can be obtained from
.Xr ERR_get_error 3 .
.Sh SEE ALSO

.Xr evp 3 ,
.Xr EVP_DigestInit 3 ,
.Xr EVP_DigestSignInit 3 ,
.Xr EVP_PKEY_meth_set_verifyctx 3
.Sh HISTORY
.Fn EVP_DigestVerifyInit ,
.Fn EVP_DigestVerifyUpdate ,
and
.Fn EVP_DigestVerifyFinal
first appeared in OpenSSL 1.0.0 and have been available since
.Ox 4.9 .
Changes to jni/libressl/man/EVP_EncodeInit.3.
1
2
3
4
5
6
7
8
.\" $OpenBSD: EVP_EncodeInit.3,v 1.6 2019/01/19 19:09:22 jmc Exp $
.\" full merge up to: OpenSSL f430ba31 Jun 19 19:39:01 2016 +0200
.\" selective merge up to: OpenSSL e9b77246 Jan 20 19:58:49 2017 +0100
.\"
.\" This file was written by Matt Caswell <matt@openssl.org>.
.\" Copyright (c) 2016 The OpenSSL Project.  All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
|







1
2
3
4
5
6
7
8
.\" $OpenBSD: EVP_EncodeInit.3,v 1.7 2019/06/06 01:06:58 schwarze Exp $
.\" full merge up to: OpenSSL f430ba31 Jun 19 19:39:01 2016 +0200
.\" selective merge up to: OpenSSL e9b77246 Jan 20 19:58:49 2017 +0100
.\"
.\" This file was written by Matt Caswell <matt@openssl.org>.
.\" Copyright (c) 2016 The OpenSSL Project.  All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: January 19 2019 $
.Dt EVP_ENCODEINIT 3
.Os
.Sh NAME
.Nm EVP_ENCODE_CTX_new ,
.Nm EVP_ENCODE_CTX_free ,
.Nm EVP_EncodeInit ,
.Nm EVP_EncodeUpdate ,







|







45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: June 6 2019 $
.Dt EVP_ENCODEINIT 3
.Os
.Sh NAME
.Nm EVP_ENCODE_CTX_new ,
.Nm EVP_ENCODE_CTX_free ,
.Nm EVP_EncodeInit ,
.Nm EVP_EncodeUpdate ,
312
313
314
315
316
317
318

319
320
321
322
323
324
325
.Pp
.Fn EVP_DecodeFinal
returns -1 on error or 1 on success.
.Pp
.Fn EVP_DecodeBlock
returns the length of the data decoded or -1 on error.
.Sh SEE ALSO

.Xr evp 3
.Sh HISTORY
The
.Fn EVP_Encode*
and
.Fn EVP_Decode*
functions first appeared in SSLeay 0.5.1







>







312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
.Pp
.Fn EVP_DecodeFinal
returns -1 on error or 1 on success.
.Pp
.Fn EVP_DecodeBlock
returns the length of the data decoded or -1 on error.
.Sh SEE ALSO
.Xr BIO_f_base64 3 ,
.Xr evp 3
.Sh HISTORY
The
.Fn EVP_Encode*
and
.Fn EVP_Decode*
functions first appeared in SSLeay 0.5.1
Changes to jni/libressl/man/EVP_EncryptInit.3.
1
2
3
4
5
6
7

















8
9
10
11
12
13
14
15
.\" $OpenBSD: EVP_EncryptInit.3,v 1.34 2019/03/21 14:15:13 schwarze Exp $
.\" full merge up to: OpenSSL 5211e094 Nov 11 14:39:11 2014 -0800
.\"   EVP_bf_cbc.pod EVP_cast5_cbc.pod EVP_idea_cbc.pod EVP_rc2_cbc.pod
.\"   7c6d372a Nov 20 13:20:01 2018 +0000
.\" selective merge up to: OpenSSL 16cfc2c9 Mar 8 22:30:28 2018 +0100
.\"   EVP_chacha20.pod 8fa4d95e Oct 21 11:59:09 2017 +0900
.\"

















.\" This file was written by Dr. Stephen Henson <steve@openssl.org>
.\" and Richard Levitte <levitte@openssl.org>.
.\" Copyright (c) 2000-2002, 2005, 2012-2016 The OpenSSL Project.
.\" All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
|






>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
|







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
.\" $OpenBSD: EVP_EncryptInit.3,v 1.36 2019/08/15 09:36:29 schwarze Exp $
.\" full merge up to: OpenSSL 5211e094 Nov 11 14:39:11 2014 -0800
.\"   EVP_bf_cbc.pod EVP_cast5_cbc.pod EVP_idea_cbc.pod EVP_rc2_cbc.pod
.\"   7c6d372a Nov 20 13:20:01 2018 +0000
.\" selective merge up to: OpenSSL 16cfc2c9 Mar 8 22:30:28 2018 +0100
.\"   EVP_chacha20.pod 8fa4d95e Oct 21 11:59:09 2017 +0900
.\"
.\" This file is a derived work.
.\" The changes are covered by the following Copyright and license:
.\"
.\" Copyright (c) 2019 Ingo Schwarze <schwarze@openbsd.org>
.\"
.\" Permission to use, copy, modify, and distribute this software for any
.\" purpose with or without fee is hereby granted, provided that the above
.\" copyright notice and this permission notice appear in all copies.
.\"
.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
.\" The original file was written by Dr. Stephen Henson <steve@openssl.org>
.\" and Richard Levitte <levitte@openssl.org>.
.\" Copyright (c) 2000-2002, 2005, 2012-2016 The OpenSSL Project.
.\" All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: March 21 2019 $
.Dt EVP_ENCRYPTINIT 3
.Os
.Sh NAME
.Nm EVP_CIPHER_CTX_new ,
.Nm EVP_CIPHER_CTX_reset ,
.Nm EVP_CIPHER_CTX_cleanup ,
.Nm EVP_CIPHER_CTX_init ,







|







67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: August 15 2019 $
.Dt EVP_ENCRYPTINIT 3
.Os
.Sh NAME
.Nm EVP_CIPHER_CTX_new ,
.Nm EVP_CIPHER_CTX_reset ,
.Nm EVP_CIPHER_CTX_cleanup ,
.Nm EVP_CIPHER_CTX_init ,
74
75
76
77
78
79
80

81
82
83
84
85
86
87
.Nm EVP_CipherFinal_ex ,
.Nm EVP_EncryptInit ,
.Nm EVP_EncryptFinal ,
.Nm EVP_DecryptInit ,
.Nm EVP_DecryptFinal ,
.Nm EVP_CipherInit ,
.Nm EVP_CipherFinal ,

.Nm EVP_CIPHER_CTX_set_flags ,
.Nm EVP_CIPHER_CTX_clear_flags ,
.Nm EVP_CIPHER_CTX_test_flags ,
.Nm EVP_CIPHER_CTX_set_padding ,
.Nm EVP_CIPHER_CTX_set_key_length ,
.Nm EVP_CIPHER_CTX_ctrl ,
.Nm EVP_CIPHER_CTX_rand_key ,







>







91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
.Nm EVP_CipherFinal_ex ,
.Nm EVP_EncryptInit ,
.Nm EVP_EncryptFinal ,
.Nm EVP_DecryptInit ,
.Nm EVP_DecryptFinal ,
.Nm EVP_CipherInit ,
.Nm EVP_CipherFinal ,
.Nm EVP_Cipher ,
.Nm EVP_CIPHER_CTX_set_flags ,
.Nm EVP_CIPHER_CTX_clear_flags ,
.Nm EVP_CIPHER_CTX_test_flags ,
.Nm EVP_CIPHER_CTX_set_padding ,
.Nm EVP_CIPHER_CTX_set_key_length ,
.Nm EVP_CIPHER_CTX_ctrl ,
.Nm EVP_CIPHER_CTX_rand_key ,
257
258
259
260
261
262
263







264
265
266
267
268
269
270
.Fc
.Ft int
.Fo EVP_CipherFinal
.Fa "EVP_CIPHER_CTX *ctx"
.Fa "unsigned char *outm"
.Fa "int *outl"
.Fc







.Ft void
.Fo EVP_CIPHER_CTX_set_flags
.Fa "EVP_CIPHER_CTX *ctx"
.Fa "int flags"
.Fc
.Ft void
.Fo EVP_CIPHER_CTX_clear_flags







>
>
>
>
>
>
>







275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
.Fc
.Ft int
.Fo EVP_CipherFinal
.Fa "EVP_CIPHER_CTX *ctx"
.Fa "unsigned char *outm"
.Fa "int *outl"
.Fc
.Ft int
.Fo EVP_Cipher
.Fa "EVP_CIPHER_CTX *ctx"
.Fa "unsigned char *out"
.Fa "const unsigned char *in"
.Fa "unsigned int inl"
.Fc
.Ft void
.Fo EVP_CIPHER_CTX_set_flags
.Fa "EVP_CIPHER_CTX *ctx"
.Fa "int flags"
.Fc
.Ft void
.Fo EVP_CIPHER_CTX_clear_flags
578
579
580
581
582
583
584






















585
586
587
588
589
590
591
In previous releases of OpenSSL, they also used to clean up the
.Fa ctx ,
but this is no longer done and
.Fn EVP_CIPHER_CTX_reset
or
.Fn EVP_CIPHER_CTX_free
must be called to free any context resources.






















.Pp
.Fn EVP_get_cipherbyname ,
.Fn EVP_get_cipherbynid ,
and
.Fn EVP_get_cipherbyobj
return an
.Vt EVP_CIPHER







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
In previous releases of OpenSSL, they also used to clean up the
.Fa ctx ,
but this is no longer done and
.Fn EVP_CIPHER_CTX_reset
or
.Fn EVP_CIPHER_CTX_free
must be called to free any context resources.
.Pp
.Fn EVP_Cipher
encrypts or decrypts aligned blocks of data
whose lengths match the cipher block size.
It requires that the previous encryption or decryption operation
using the same
.Fa ctx ,
if there was any, ended exactly on a block boundary and that
.Fa inl
is an integer multiple of the cipher block size.
If either of these conditions is violated,
.Fn EVP_Cipher
silently produces incorrect results.
For that reason, using the function
.Fn EVP_CipherUpdate
instead is strongly recommended.
The latter can safely handle partial blocks, and even if
.Fa inl
actually is a multiple of the cipher block size for all calls,
the overhead incurred by using
.Fn EVP_CipherUpdate
is minimal.
.Pp
.Fn EVP_get_cipherbyname ,
.Fn EVP_get_cipherbynid ,
and
.Fn EVP_get_cipherbyobj
return an
.Vt EVP_CIPHER
853
854
855
856
857
858
859

860
861
862
863
864
865
866
.Fn EVP_CipherFinal_ex ,
.Fn EVP_EncryptInit ,
.Fn EVP_EncryptFinal ,
.Fn EVP_DecryptInit ,
.Fn EVP_DecryptFinal ,
.Fn EVP_CipherInit ,
.Fn EVP_CipherFinal ,

.Fn EVP_CIPHER_CTX_set_key_length ,
and
.Fn EVP_CIPHER_CTX_rand_key
return 1 for success or 0 for failure.
.Pp
.Fn EVP_CIPHER_CTX_set_padding
always returns 1.







>







900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
.Fn EVP_CipherFinal_ex ,
.Fn EVP_EncryptInit ,
.Fn EVP_EncryptFinal ,
.Fn EVP_DecryptInit ,
.Fn EVP_DecryptFinal ,
.Fn EVP_CipherInit ,
.Fn EVP_CipherFinal ,
.Fn EVP_Cipher ,
.Fn EVP_CIPHER_CTX_set_key_length ,
and
.Fn EVP_CIPHER_CTX_rand_key
return 1 for success or 0 for failure.
.Pp
.Fn EVP_CIPHER_CTX_set_padding
always returns 1.
1189
1190
1191
1192
1193
1194
1195

1196

1197
1198
1199

1200

1201
1202
1203
1204
1205
1206
1207
	fwrite(outbuf, 1, outlen, out);

	EVP_CIPHER_CTX_free(ctx);
	return 1;
}
.Ed
.Sh SEE ALSO

.Xr evp 3 ,

.Xr EVP_aes_128_cbc 3 ,
.Xr EVP_camellia_128_cbc 3 ,
.Xr EVP_des_cbc 3 ,

.Xr EVP_rc4 3 ,

.Xr EVP_sm4_cbc 3
.Sh HISTORY
.Fn EVP_EncryptInit ,
.Fn EVP_EncryptUpdate ,
.Fn EVP_EncryptFinal ,
.Fn EVP_DecryptInit ,
.Fn EVP_DecryptUpdate ,







>

>



>

>







1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
	fwrite(outbuf, 1, outlen, out);

	EVP_CIPHER_CTX_free(ctx);
	return 1;
}
.Ed
.Sh SEE ALSO
.Xr BIO_f_cipher 3 ,
.Xr evp 3 ,
.Xr EVP_AEAD_CTX_init 3 ,
.Xr EVP_aes_128_cbc 3 ,
.Xr EVP_camellia_128_cbc 3 ,
.Xr EVP_des_cbc 3 ,
.Xr EVP_OpenInit 3 ,
.Xr EVP_rc4 3 ,
.Xr EVP_SealInit 3 ,
.Xr EVP_sm4_cbc 3
.Sh HISTORY
.Fn EVP_EncryptInit ,
.Fn EVP_EncryptUpdate ,
.Fn EVP_EncryptFinal ,
.Fn EVP_DecryptInit ,
.Fn EVP_DecryptUpdate ,
1218
1219
1220
1221
1222
1223
1224

1225
1226
1227
1228
1229
1230
1231
first appeared in SSLeay 0.5.1.
.Fn EVP_rc2_cbc ,
.Fn EVP_rc2_ecb ,
.Fn EVP_rc2_cfb ,
and
.Fn EVP_rc2_ofb
first appeared in SSLeay 0.5.2.

.Fn EVP_CIPHER_block_size ,
.Fn EVP_CIPHER_key_length ,
.Fn EVP_CIPHER_iv_length ,
.Fn EVP_CIPHER_type ,
.Fn EVP_CIPHER_CTX_block_size ,
.Fn EVP_CIPHER_CTX_key_length ,
.Fn EVP_CIPHER_CTX_iv_length ,







>







1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
first appeared in SSLeay 0.5.1.
.Fn EVP_rc2_cbc ,
.Fn EVP_rc2_ecb ,
.Fn EVP_rc2_cfb ,
and
.Fn EVP_rc2_ofb
first appeared in SSLeay 0.5.2.
.Fn EVP_Cipher ,
.Fn EVP_CIPHER_block_size ,
.Fn EVP_CIPHER_key_length ,
.Fn EVP_CIPHER_iv_length ,
.Fn EVP_CIPHER_type ,
.Fn EVP_CIPHER_CTX_block_size ,
.Fn EVP_CIPHER_CTX_key_length ,
.Fn EVP_CIPHER_CTX_iv_length ,
Changes to jni/libressl/man/EVP_OpenInit.3.
1
2
3
4
5
6
7
8
.\"	$OpenBSD: EVP_OpenInit.3,v 1.7 2018/03/27 17:35:50 schwarze Exp $
.\"	OpenSSL b97fdb57 Nov 11 09:33:09 2016 +0100
.\"
.\" This file was written by Dr. Stephen Henson <steve@openssl.org>.
.\" Copyright (c) 2000 The OpenSSL Project.  All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
|







1
2
3
4
5
6
7
8
.\"	$OpenBSD: EVP_OpenInit.3,v 1.8 2019/06/07 20:46:25 schwarze Exp $
.\"	OpenSSL b97fdb57 Nov 11 09:33:09 2016 +0100
.\"
.\" This file was written by Dr. Stephen Henson <steve@openssl.org>.
.\" Copyright (c) 2000 The OpenSSL Project.  All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: March 27 2018 $
.Dt EVP_OPENINIT 3
.Os
.Sh NAME
.Nm EVP_OpenInit ,
.Nm EVP_OpenUpdate ,
.Nm EVP_OpenFinal
.Nd EVP envelope decryption







|







44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: June 7 2019 $
.Dt EVP_OPENINIT 3
.Os
.Sh NAME
.Nm EVP_OpenInit ,
.Nm EVP_OpenUpdate ,
.Nm EVP_OpenFinal
.Nd EVP envelope decryption
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
returns 1 for success or 0 for failure.
.Pp
.Fn EVP_OpenFinal
returns 0 if the decrypt failed or 1 for success.
.Sh SEE ALSO
.Xr evp 3 ,
.Xr EVP_EncryptInit 3 ,
.Xr EVP_SealInit 3 ,
.Xr RAND_bytes 3
.Sh HISTORY
.Fn EVP_OpenInit ,
.Fn EVP_OpenUpdate ,
and
.Fn EVP_OpenFinal
first appeared in SSLeay 0.5.1 and have been available since
.Ox 2.4 .







|
<







140
141
142
143
144
145
146
147

148
149
150
151
152
153
154
returns 1 for success or 0 for failure.
.Pp
.Fn EVP_OpenFinal
returns 0 if the decrypt failed or 1 for success.
.Sh SEE ALSO
.Xr evp 3 ,
.Xr EVP_EncryptInit 3 ,
.Xr EVP_SealInit 3

.Sh HISTORY
.Fn EVP_OpenInit ,
.Fn EVP_OpenUpdate ,
and
.Fn EVP_OpenFinal
first appeared in SSLeay 0.5.1 and have been available since
.Ox 2.4 .
Changes to jni/libressl/man/EVP_PKEY_CTX_ctrl.3.
1
2
3
4
5
6
7
8
.\" $OpenBSD: EVP_PKEY_CTX_ctrl.3,v 1.12 2018/12/21 23:51:42 schwarze Exp $
.\" full merge up to: OpenSSL e03af178 Dec 11 17:05:57 2014 -0500
.\" selective merge up to: OpenSSL df75c2bf Dec 9 01:02:36 2018 +0100
.\"
.\" This file was written by Dr. Stephen Henson <steve@openssl.org>.
.\" Copyright (c) 2006, 2009, 2013, 2014, 2015, 2018 The OpenSSL Project.
.\" All rights reserved.
.\"
|







1
2
3
4
5
6
7
8
.\" $OpenBSD: EVP_PKEY_CTX_ctrl.3,v 1.14 2019/09/10 19:44:32 schwarze Exp $
.\" full merge up to: OpenSSL e03af178 Dec 11 17:05:57 2014 -0500
.\" selective merge up to: OpenSSL df75c2bf Dec 9 01:02:36 2018 +0100
.\"
.\" This file was written by Dr. Stephen Henson <steve@openssl.org>.
.\" Copyright (c) 2006, 2009, 2013, 2014, 2015, 2018 The OpenSSL Project.
.\" All rights reserved.
.\"
46
47
48
49
50
51
52
53
54
55
56
57
58
59

60
61
62
63
64
65
66
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: December 21 2018 $
.Dt EVP_PKEY_CTX_CTRL 3
.Os
.Sh NAME
.Nm EVP_PKEY_CTX_ctrl ,
.Nm EVP_PKEY_CTX_ctrl_str ,
.Nm EVP_PKEY_CTX_set_signature_md ,

.Nm EVP_PKEY_CTX_set_rsa_padding ,
.Nm EVP_PKEY_CTX_get_rsa_padding ,
.Nm EVP_PKEY_CTX_set_rsa_pss_saltlen ,
.Nm EVP_PKEY_CTX_get_rsa_pss_saltlen ,
.Nm EVP_PKEY_CTX_set_rsa_keygen_bits ,
.Nm EVP_PKEY_CTX_set_rsa_keygen_pubexp ,
.Nm EVP_PKEY_CTX_set_rsa_mgf1_md ,







|






>







46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: September 10 2019 $
.Dt EVP_PKEY_CTX_CTRL 3
.Os
.Sh NAME
.Nm EVP_PKEY_CTX_ctrl ,
.Nm EVP_PKEY_CTX_ctrl_str ,
.Nm EVP_PKEY_CTX_set_signature_md ,
.Nm EVP_PKEY_CTX_get_signature_md ,
.Nm EVP_PKEY_CTX_set_rsa_padding ,
.Nm EVP_PKEY_CTX_get_rsa_padding ,
.Nm EVP_PKEY_CTX_set_rsa_pss_saltlen ,
.Nm EVP_PKEY_CTX_get_rsa_pss_saltlen ,
.Nm EVP_PKEY_CTX_set_rsa_keygen_bits ,
.Nm EVP_PKEY_CTX_set_rsa_keygen_pubexp ,
.Nm EVP_PKEY_CTX_set_rsa_mgf1_md ,
88
89
90
91
92
93
94





95
96
97
98
99
100
101
.Fa "const char *value"
.Fc
.Ft int
.Fo EVP_PKEY_CTX_set_signature_md
.Fa "EVP_PKEY_CTX *ctx"
.Fa "const EVP_MD *md"
.Fc





.In openssl/rsa.h
.Ft int
.Fo EVP_PKEY_CTX_set_rsa_padding
.Fa "EVP_PKEY_CTX *ctx"
.Fa "int pad"
.Fc
.Ft int







>
>
>
>
>







89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
.Fa "const char *value"
.Fc
.Ft int
.Fo EVP_PKEY_CTX_set_signature_md
.Fa "EVP_PKEY_CTX *ctx"
.Fa "const EVP_MD *md"
.Fc
.Ft int
.Fo EVP_PKEY_CTX_get_signature_md
.Fa "EVP_PKEY_CTX *ctx"
.Fa "const EVP_MD **pmd"
.Fc
.In openssl/rsa.h
.Ft int
.Fo EVP_PKEY_CTX_set_rsa_padding
.Fa "EVP_PKEY_CTX *ctx"
.Fa "int pad"
.Fc
.Ft int
198
199
200
201
202
203
204


205
206
207
208
209
210
211
212
213
.Cm req
commands.
.Pp
All the remaining "functions" are implemented as macros.
.Pp
The
.Fn EVP_PKEY_CTX_set_signature_md


macro sets the message digest type used in a signature.
It can be used with the RSA, DSA, and ECDSA algorithms.
.Ss RSA parameters
The
.Fn EVP_PKEY_CTX_set_rsa_padding
macro sets the RSA padding mode for
.Fa ctx .
The
.Fa pad







>
>
|
|







204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
.Cm req
commands.
.Pp
All the remaining "functions" are implemented as macros.
.Pp
The
.Fn EVP_PKEY_CTX_set_signature_md
and
.Fn EVP_PKEY_CTX_get_signature_md
macros set and get the message digest type used in a signature.
They can be used with the RSA, DSA, and ECDSA algorithms.
.Ss RSA parameters
The
.Fn EVP_PKEY_CTX_set_rsa_padding
macro sets the RSA padding mode for
.Fa ctx .
The
.Fa pad
330
331
332
333
334
335
336


337
338
339
340
341
342
343
344
345
346
347
348
349
350





.Sh RETURN VALUES
.Fn EVP_PKEY_CTX_ctrl
and its macros return a positive value for success and 0 or a negative
value for failure.
In particular, a return value of -2 indicates the operation is not
supported by the public key algorithm.
.Sh SEE ALSO


.Xr EVP_PKEY_CTX_new 3 ,
.Xr EVP_PKEY_decrypt 3 ,
.Xr EVP_PKEY_derive 3 ,
.Xr EVP_PKEY_encrypt 3 ,
.Xr EVP_PKEY_get_default_digest_nid 3 ,
.Xr EVP_PKEY_keygen 3 ,
.Xr EVP_PKEY_meth_set_ctrl 3 ,
.Xr EVP_PKEY_sign 3 ,
.Xr EVP_PKEY_verify 3 ,
.Xr EVP_PKEY_verify_recover 3
.Sh HISTORY
These functions first appeared in OpenSSL 1.0.0
and have been available since
.Ox 4.9 .












>
>














>
>
>
>
>
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
.Sh RETURN VALUES
.Fn EVP_PKEY_CTX_ctrl
and its macros return a positive value for success and 0 or a negative
value for failure.
In particular, a return value of -2 indicates the operation is not
supported by the public key algorithm.
.Sh SEE ALSO
.Xr DH_new 3 ,
.Xr EVP_DigestInit 3 ,
.Xr EVP_PKEY_CTX_new 3 ,
.Xr EVP_PKEY_decrypt 3 ,
.Xr EVP_PKEY_derive 3 ,
.Xr EVP_PKEY_encrypt 3 ,
.Xr EVP_PKEY_get_default_digest_nid 3 ,
.Xr EVP_PKEY_keygen 3 ,
.Xr EVP_PKEY_meth_set_ctrl 3 ,
.Xr EVP_PKEY_sign 3 ,
.Xr EVP_PKEY_verify 3 ,
.Xr EVP_PKEY_verify_recover 3
.Sh HISTORY
These functions first appeared in OpenSSL 1.0.0
and have been available since
.Ox 4.9 .
.Pp
As an exception,
.Fn EVP_PKEY_CTX_get_signature_md
first appeared in OpenSSL 1.0.2 and has been available since
.Ox 6.6 .
Changes to jni/libressl/man/EVP_PKEY_CTX_new.3.
1
2
3
4
5
6
7
8
.\"	$OpenBSD: EVP_PKEY_CTX_new.3,v 1.7 2018/03/23 04:34:23 schwarze Exp $
.\"	OpenSSL 99d63d46 Oct 26 13:56:48 2016 -0400
.\"
.\" This file was written by Dr. Stephen Henson <steve@openssl.org>.
.\" Copyright (c) 2006, 2009, 2015 The OpenSSL Project.  All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
|







1
2
3
4
5
6
7
8
.\"	$OpenBSD: EVP_PKEY_CTX_new.3,v 1.8 2019/06/06 01:06:58 schwarze Exp $
.\"	OpenSSL 99d63d46 Oct 26 13:56:48 2016 -0400
.\"
.\" This file was written by Dr. Stephen Henson <steve@openssl.org>.
.\" Copyright (c) 2006, 2009, 2015 The OpenSSL Project.  All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: March 23 2018 $
.Dt EVP_PKEY_CTX_NEW 3
.Os
.Sh NAME
.Nm EVP_PKEY_CTX_new ,
.Nm EVP_PKEY_CTX_new_id ,
.Nm EVP_PKEY_CTX_dup ,
.Nm EVP_PKEY_CTX_free







|







44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: June 6 2019 $
.Dt EVP_PKEY_CTX_NEW 3
.Os
.Sh NAME
.Nm EVP_PKEY_CTX_new ,
.Nm EVP_PKEY_CTX_new_id ,
.Nm EVP_PKEY_CTX_dup ,
.Nm EVP_PKEY_CTX_free
119
120
121
122
123
124
125







126
127



128
129
130
131
132
133
134
.Fn EVP_PKEY_CTX_dup
return either the newly allocated
.Vt EVP_PKEY_CTX
structure or
.Dv NULL
if an error occurred.
.Sh SEE ALSO







.Xr EVP_PKEY_meth_set_init 3 ,
.Xr EVP_PKEY_new 3 ,



.Xr X25519 3
.Sh HISTORY
These functions first appeared in OpenSSL 1.0.0
and have been available since
.Ox 4.9 .
.Sh CAVEATS
The







>
>
>
>
>
>
>


>
>
>







119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
.Fn EVP_PKEY_CTX_dup
return either the newly allocated
.Vt EVP_PKEY_CTX
structure or
.Dv NULL
if an error occurred.
.Sh SEE ALSO
.Xr EVP_DigestSignInit 3 ,
.Xr EVP_DigestVerifyInit 3 ,
.Xr EVP_PKEY_CTX_ctrl 3 ,
.Xr EVP_PKEY_decrypt 3 ,
.Xr EVP_PKEY_derive 3 ,
.Xr EVP_PKEY_encrypt 3 ,
.Xr EVP_PKEY_keygen 3 ,
.Xr EVP_PKEY_meth_set_init 3 ,
.Xr EVP_PKEY_new 3 ,
.Xr EVP_PKEY_sign 3 ,
.Xr EVP_PKEY_verify 3 ,
.Xr EVP_PKEY_verify_recover 3 ,
.Xr X25519 3
.Sh HISTORY
These functions first appeared in OpenSSL 1.0.0
and have been available since
.Ox 4.9 .
.Sh CAVEATS
The
Changes to jni/libressl/man/EVP_PKEY_asn1_get_count.3.
1
2
3
4
5
6
7
8
.\" $OpenBSD: EVP_PKEY_asn1_get_count.3,v 1.3 2018/05/13 16:42:21 schwarze Exp $
.\" full merge up to: OpenSSL 751148e2 Oct 27 00:11:11 2017 +0200
.\"
.\" This file was written by Richard Levitte <levitte@openssl.org>.
.\" Copyright (c) 2017 The OpenSSL Project.  All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
|







1
2
3
4
5
6
7
8
.\" $OpenBSD: EVP_PKEY_asn1_get_count.3,v 1.4 2019/06/06 01:06:58 schwarze Exp $
.\" full merge up to: OpenSSL 751148e2 Oct 27 00:11:11 2017 +0200
.\"
.\" This file was written by Richard Levitte <levitte@openssl.org>.
.\" Copyright (c) 2017 The OpenSSL Project.  All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: May 13 2018 $
.Dt EVP_PKEY_ASN1_GET_COUNT 3
.Os
.Sh NAME
.Nm EVP_PKEY_asn1_get_count ,
.Nm EVP_PKEY_asn1_get0 ,
.Nm EVP_PKEY_get0_asn1 ,
.Nm EVP_PKEY_asn1_find ,







|







44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: June 6 2019 $
.Dt EVP_PKEY_ASN1_GET_COUNT 3
.Os
.Sh NAME
.Nm EVP_PKEY_asn1_get_count ,
.Nm EVP_PKEY_asn1_get0 ,
.Nm EVP_PKEY_get0_asn1 ,
.Nm EVP_PKEY_asn1_find ,
161
162
163
164
165
166
167
168

169
170
171
172
returns the public key method used by
.Fa pkey .
.Pp
.Fn EVP_PKEY_asn1_get0_info
returns 1 on success or 0 on failure.
.Sh SEE ALSO
.Xr EVP_PKEY_asn1_new 3 ,
.Xr EVP_PKEY_base_id 3

.Sh HISTORY
These functions first appeared in OpenSSL 1.0.0
and have been available since
.Ox 4.9 .







|
>




161
162
163
164
165
166
167
168
169
170
171
172
173
returns the public key method used by
.Fa pkey .
.Pp
.Fn EVP_PKEY_asn1_get0_info
returns 1 on success or 0 on failure.
.Sh SEE ALSO
.Xr EVP_PKEY_asn1_new 3 ,
.Xr EVP_PKEY_base_id 3 ,
.Xr EVP_PKEY_new 3
.Sh HISTORY
These functions first appeared in OpenSSL 1.0.0
and have been available since
.Ox 4.9 .
Changes to jni/libressl/man/EVP_PKEY_asn1_new.3.
1
2
3
4
5
6
7
8
.\" $OpenBSD: EVP_PKEY_asn1_new.3,v 1.3 2018/05/13 15:53:30 schwarze Exp $
.\" selective merge up to:
.\" OpenSSL man3/EVP_PKEY_ASN1_METHOD b0004708 Nov 1 00:45:24 2017 +0800
.\"
.\" This file was written by Richard Levitte <levitte@openssl.org>
.\" Copyright (c) 2017 The OpenSSL Project.  All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
|







1
2
3
4
5
6
7
8
.\" $OpenBSD: EVP_PKEY_asn1_new.3,v 1.5 2019/09/01 09:10:09 schwarze Exp $
.\" selective merge up to:
.\" OpenSSL man3/EVP_PKEY_ASN1_METHOD b0004708 Nov 1 00:45:24 2017 +0800
.\"
.\" This file was written by Richard Levitte <levitte@openssl.org>
.\" Copyright (c) 2017 The OpenSSL Project.  All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: May 13 2018 $
.Dt EVP_PKEY_ASN1_METHOD 3
.Os
.Sh NAME
.Nm EVP_PKEY_asn1_new ,
.Nm EVP_PKEY_asn1_copy ,
.Nm EVP_PKEY_asn1_free ,
.Nm EVP_PKEY_asn1_add0 ,







|







45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: September 1 2019 $
.Dt EVP_PKEY_ASN1_METHOD 3
.Os
.Sh NAME
.Nm EVP_PKEY_asn1_new ,
.Nm EVP_PKEY_asn1_copy ,
.Nm EVP_PKEY_asn1_free ,
.Nm EVP_PKEY_asn1_add0 ,
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
.Pp
The
.Fn pkey_free
method helps freeing the internals of
.Fa pkey .
It is called by
.Xr EVP_PKEY_free 3 ,
.Fn EVP_PKEY_set_type ,
.Fn EVP_PKEY_set_type_str ,
and
.Fn EVP_PKEY_assign .
.Bd -unfilled
.Ft int Fo (*pkey_ctrl)
.Fa "EVP_PKEY *pkey"
.Fa "int op"
.Fa "long arg1"
.Fa "void *arg2"
.Fc







|


|







340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
.Pp
The
.Fn pkey_free
method helps freeing the internals of
.Fa pkey .
It is called by
.Xr EVP_PKEY_free 3 ,
.Xr EVP_PKEY_set_type 3 ,
.Fn EVP_PKEY_set_type_str ,
and
.Xr EVP_PKEY_assign 3 .
.Bd -unfilled
.Ft int Fo (*pkey_ctrl)
.Fa "EVP_PKEY *pkey"
.Fa "int op"
.Fa "long arg1"
.Fa "void *arg2"
.Fc
449
450
451
452
453
454
455




456
457
458
459
.Dv NULL
on error.
.Pp
.Fn EVP_PKEY_asn1_add0
and
.Fn EVP_PKEY_asn1_add_alias
return 0 on error or 1 on success.




.Sh HISTORY
These functions first appeared in OpenSSL 1.0.0
and have been available since
.Ox 4.9 .







>
>
>
>




449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
.Dv NULL
on error.
.Pp
.Fn EVP_PKEY_asn1_add0
and
.Fn EVP_PKEY_asn1_add_alias
return 0 on error or 1 on success.
.Sh SEE ALSO
.Xr EVP_PKEY_asn1_get_count 3 ,
.Xr EVP_PKEY_new 3 ,
.Xr X509_PUBKEY_new 3
.Sh HISTORY
These functions first appeared in OpenSSL 1.0.0
and have been available since
.Ox 4.9 .
Changes to jni/libressl/man/EVP_PKEY_cmp.3.
1
2
3
4
5
6
7
8
.\"	$OpenBSD: EVP_PKEY_cmp.3,v 1.9 2018/03/27 17:35:50 schwarze Exp $
.\"	OpenSSL 05ea606a May 20 20:52:46 2016 -0400
.\"
.\" This file was written by Dr. Stephen Henson <steve@openssl.org>.
.\" Copyright (c) 2006, 2013, 2014, 2016 The OpenSSL Project.
.\" All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
|







1
2
3
4
5
6
7
8
.\"	$OpenBSD: EVP_PKEY_cmp.3,v 1.10 2019/06/06 01:06:58 schwarze Exp $
.\"	OpenSSL 05ea606a May 20 20:52:46 2016 -0400
.\"
.\" This file was written by Dr. Stephen Henson <steve@openssl.org>.
.\" Copyright (c) 2006, 2013, 2014, 2016 The OpenSSL Project.
.\" All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: March 27 2018 $
.Dt EVP_PKEY_CMP 3
.Os
.Sh NAME
.Nm EVP_PKEY_missing_parameters ,
.Nm EVP_PKEY_copy_parameters ,
.Nm EVP_PKEY_cmp_parameters ,
.Nm EVP_PKEY_cmp







|







45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: June 6 2019 $
.Dt EVP_PKEY_CMP 3
.Os
.Sh NAME
.Nm EVP_PKEY_missing_parameters ,
.Nm EVP_PKEY_copy_parameters ,
.Nm EVP_PKEY_cmp_parameters ,
.Nm EVP_PKEY_cmp
139
140
141
142
143
144
145
146

147
148
149
150
151
152
153
154
155
156
157
158
159
and
.Fn EVP_PKEY_cmp
return 1 if the keys match, 0 if they don't match, -1 if the key types
are different and -2 if the operation is not supported.
.Sh SEE ALSO
.Xr EVP_PKEY_asn1_set_public 3 ,
.Xr EVP_PKEY_CTX_new 3 ,
.Xr EVP_PKEY_keygen 3

.Sh HISTORY
.Fn EVP_PKEY_missing_parameters
and
.Fn EVP_PKEY_copy_parameters
first appeared in SSLeay 0.8.0.
.Fn EVP_PKEY_cmp_parameters
first appeared in SSLeay 0.9.0.
These functions have been available since
.Ox 2.4 .
.Pp
.Fn EVP_PKEY_cmp
first appeared in OpenSSL 0.9.8 and has been available since
.Ox 4.5 .







|
>













139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
and
.Fn EVP_PKEY_cmp
return 1 if the keys match, 0 if they don't match, -1 if the key types
are different and -2 if the operation is not supported.
.Sh SEE ALSO
.Xr EVP_PKEY_asn1_set_public 3 ,
.Xr EVP_PKEY_CTX_new 3 ,
.Xr EVP_PKEY_keygen 3 ,
.Xr EVP_PKEY_new 3
.Sh HISTORY
.Fn EVP_PKEY_missing_parameters
and
.Fn EVP_PKEY_copy_parameters
first appeared in SSLeay 0.8.0.
.Fn EVP_PKEY_cmp_parameters
first appeared in SSLeay 0.9.0.
These functions have been available since
.Ox 2.4 .
.Pp
.Fn EVP_PKEY_cmp
first appeared in OpenSSL 0.9.8 and has been available since
.Ox 4.5 .
Changes to jni/libressl/man/EVP_PKEY_get_default_digest_nid.3.
1
2
3
4
5
6
7
8
.\"	$OpenBSD: EVP_PKEY_get_default_digest_nid.3,v 1.4 2018/03/23 04:34:23 schwarze Exp $
.\"	OpenSSL 99d63d46 Oct 26 13:56:48 2016 -0400
.\"
.\" This file was written by Dr. Stephen Henson <steve@openssl.org>.
.\" Copyright (c) 2006, 2009, 2013 The OpenSSL Project.  All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
|







1
2
3
4
5
6
7
8
.\"	$OpenBSD: EVP_PKEY_get_default_digest_nid.3,v 1.5 2019/06/06 01:06:58 schwarze Exp $
.\"	OpenSSL 99d63d46 Oct 26 13:56:48 2016 -0400
.\"
.\" This file was written by Dr. Stephen Henson <steve@openssl.org>.
.\" Copyright (c) 2006, 2009, 2013 The OpenSSL Project.  All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: March 23 2018 $
.Dt EVP_PKEY_GET_DEFAULT_DIGEST_NID 3
.Os
.Sh NAME
.Nm EVP_PKEY_get_default_digest_nid
.Nd get default signature digest
.Sh SYNOPSIS
.In openssl/evp.h







|







44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: June 6 2019 $
.Dt EVP_PKEY_GET_DEFAULT_DIGEST_NID 3
.Os
.Sh NAME
.Nm EVP_PKEY_get_default_digest_nid
.Nd get default signature digest
.Sh SYNOPSIS
.In openssl/evp.h
80
81
82
83
84
85
86

87
88
89
90
91
92
93
It returns 0 or a negative value for failure.
In particular, a return value of -2 indicates the operation is not
supported by the public key algorithm.
.Sh SEE ALSO
.Xr EVP_PKEY_asn1_set_ctrl 3 ,
.Xr EVP_PKEY_CTX_ctrl 3 ,
.Xr EVP_PKEY_CTX_new 3 ,

.Xr EVP_PKEY_sign 3 ,
.Xr EVP_PKEY_verify 3 ,
.Xr EVP_PKEY_verify_recover 3
.Sh HISTORY
.Fn EVP_PKEY_get_default_digest_nid
first appeared in OpenSSL 1.0.0 and has been available since
.Ox 4.9 .







>







80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
It returns 0 or a negative value for failure.
In particular, a return value of -2 indicates the operation is not
supported by the public key algorithm.
.Sh SEE ALSO
.Xr EVP_PKEY_asn1_set_ctrl 3 ,
.Xr EVP_PKEY_CTX_ctrl 3 ,
.Xr EVP_PKEY_CTX_new 3 ,
.Xr EVP_PKEY_new 3 ,
.Xr EVP_PKEY_sign 3 ,
.Xr EVP_PKEY_verify 3 ,
.Xr EVP_PKEY_verify_recover 3
.Sh HISTORY
.Fn EVP_PKEY_get_default_digest_nid
first appeared in OpenSSL 1.0.0 and has been available since
.Ox 4.9 .
Changes to jni/libressl/man/EVP_PKEY_meth_get0_info.3.
1
2
3
4
5
6
7
8
.\"	$OpenBSD: EVP_PKEY_meth_get0_info.3,v 1.2 2018/03/23 05:48:56 schwarze Exp $
.\"	OpenSSL EVP_PKEY_meth_get_count.pod 6a2da303 Aug 9 11:25:19 2017 -0400
.\"	OpenSSL EVP_PKEY_meth_get_count.pod 48ed9c23 Jul 25 17:48:26 2017 +0100
.\"
.\" This file was written by Dr. Stephen Henson <steve@openssl.org>.
.\" Copyright (c) 2017 The OpenSSL Project.  All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
|







1
2
3
4
5
6
7
8
.\"	$OpenBSD: EVP_PKEY_meth_get0_info.3,v 1.3 2019/06/06 01:06:58 schwarze Exp $
.\"	OpenSSL EVP_PKEY_meth_get_count.pod 6a2da303 Aug 9 11:25:19 2017 -0400
.\"	OpenSSL EVP_PKEY_meth_get_count.pod 48ed9c23 Jul 25 17:48:26 2017 +0100
.\"
.\" This file was written by Dr. Stephen Henson <steve@openssl.org>.
.\" Copyright (c) 2017 The OpenSSL Project.  All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72

73
74
75
76
77
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: March 23 2018 $
.Dt EVP_PKEY_METH_GET0_INFO 3
.Os
.Sh NAME
.Nm EVP_PKEY_meth_get0_info
.Nd enumerate public key methods
.Sh SYNOPSIS
.In openssl/evp.h
.Ft void
.Fo EVP_PKEY_meth_get0_info
.Fa "int *ppkey_id"
.Fa "int *pflags"
.Fa "const EVP_PKEY_METHOD *meth"
.Fc
.Sh DESCRIPTION
The function
.Fn EVP_PKEY_meth_get0_info
retrieves the public key ID (a NID) and any flags associated with the
public key method
.Pf * Fa meth .
.Sh SEE ALSO

.Xr EVP_PKEY_new 3
.Sh HISTORY
.Fn EVP_PKEY_meth_get0_info
first appeared in OpenSSL 1.0.1 and has been available since
.Ox 5.3 .







|




















>





45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: June 6 2019 $
.Dt EVP_PKEY_METH_GET0_INFO 3
.Os
.Sh NAME
.Nm EVP_PKEY_meth_get0_info
.Nd enumerate public key methods
.Sh SYNOPSIS
.In openssl/evp.h
.Ft void
.Fo EVP_PKEY_meth_get0_info
.Fa "int *ppkey_id"
.Fa "int *pflags"
.Fa "const EVP_PKEY_METHOD *meth"
.Fc
.Sh DESCRIPTION
The function
.Fn EVP_PKEY_meth_get0_info
retrieves the public key ID (a NID) and any flags associated with the
public key method
.Pf * Fa meth .
.Sh SEE ALSO
.Xr EVP_PKEY_meth_new 3 ,
.Xr EVP_PKEY_new 3
.Sh HISTORY
.Fn EVP_PKEY_meth_get0_info
first appeared in OpenSSL 1.0.1 and has been available since
.Ox 5.3 .
Changes to jni/libressl/man/EVP_PKEY_meth_new.3.
1
2
3
4
5
6
7
8
.\" $OpenBSD: EVP_PKEY_meth_new.3,v 1.3 2018/03/23 05:48:56 schwarze Exp $
.\" selective merge up to: OpenSSL 43f985fd Aug 21 11:47:17 2017 -0400
.\"
.\" This file was written by Paul Yang <yang.yang@baishancloud.com>
.\" Copyright (c) 2017 The OpenSSL Project.  All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
|







1
2
3
4
5
6
7
8
.\" $OpenBSD: EVP_PKEY_meth_new.3,v 1.4 2019/06/06 01:06:58 schwarze Exp $
.\" selective merge up to: OpenSSL 43f985fd Aug 21 11:47:17 2017 -0400
.\"
.\" This file was written by Paul Yang <yang.yang@baishancloud.com>
.\" Copyright (c) 2017 The OpenSSL Project.  All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: March 23 2018 $
.Dt EVP_PKEY_METH_NEW 3
.Os
.Sh NAME
.Nm EVP_PKEY_meth_new ,
.Nm EVP_PKEY_meth_free ,
.Nm EVP_PKEY_meth_copy ,
.Nm EVP_PKEY_meth_find ,







|







44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: June 6 2019 $
.Dt EVP_PKEY_METH_NEW 3
.Os
.Sh NAME
.Nm EVP_PKEY_meth_new ,
.Nm EVP_PKEY_meth_free ,
.Nm EVP_PKEY_meth_copy ,
.Nm EVP_PKEY_meth_find ,
519
520
521
522
523
524
525




526
527
528
529
530
531
532
.Vt EVP_PKEY_METHOD
object or
.Dv NULL
if no matching object is found.
.Pp
.Fn EVP_PKEY_meth_add0
returns 1 if the method is added successfully or 0 if an error occurred.




.Sh HISTORY
.Fn EVP_PKEY_meth_new ,
.Fn EVP_PKEY_meth_free ,
.Fn EVP_PKEY_meth_find ,
.Fn EVP_PKEY_meth_add0 ,
.Fn EVP_PKEY_meth_set_init ,
.Fn EVP_PKEY_meth_set_copy ,







>
>
>
>







519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
.Vt EVP_PKEY_METHOD
object or
.Dv NULL
if no matching object is found.
.Pp
.Fn EVP_PKEY_meth_add0
returns 1 if the method is added successfully or 0 if an error occurred.
.Sh SEE ALSO
.Xr EVP_DigestInit 3 ,
.Xr EVP_PKEY_meth_get0_info 3 ,
.Xr EVP_PKEY_new 3
.Sh HISTORY
.Fn EVP_PKEY_meth_new ,
.Fn EVP_PKEY_meth_free ,
.Fn EVP_PKEY_meth_find ,
.Fn EVP_PKEY_meth_add0 ,
.Fn EVP_PKEY_meth_set_init ,
.Fn EVP_PKEY_meth_set_copy ,
Changes to jni/libressl/man/EVP_PKEY_new.3.
1
2
3
4
5
6
7
8
.\" $OpenBSD: EVP_PKEY_new.3,v 1.9 2018/12/22 23:19:53 schwarze Exp $
.\" full merge up to: OpenSSL 99d63d46 Oct 26 13:56:48 2016 -0400
.\" selective merge up to: OpenSSL df75c2bf Dec 9 01:02:36 2018 +0100
.\"
.\" This file was written by Dr. Stephen Henson <steve@openssl.org>
.\" and Matt Caswell <matt@openssl.org>.
.\" Copyright (c) 2002, 2018 The OpenSSL Project.  All rights reserved.
.\"
|







1
2
3
4
5
6
7
8
.\" $OpenBSD: EVP_PKEY_new.3,v 1.11 2019/06/07 19:59:11 schwarze Exp $
.\" full merge up to: OpenSSL 99d63d46 Oct 26 13:56:48 2016 -0400
.\" selective merge up to: OpenSSL df75c2bf Dec 9 01:02:36 2018 +0100
.\"
.\" This file was written by Dr. Stephen Henson <steve@openssl.org>
.\" and Matt Caswell <matt@openssl.org>.
.\" Copyright (c) 2002, 2018 The OpenSSL Project.  All rights reserved.
.\"
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: December 22 2018 $
.Dt EVP_PKEY_NEW 3
.Os
.Sh NAME
.Nm EVP_PKEY_new ,
.Nm EVP_PKEY_up_ref ,
.Nm EVP_PKEY_free ,
.Nm EVP_PKEY_new_mac_key







|







46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: June 7 2019 $
.Dt EVP_PKEY_NEW 3
.Os
.Sh NAME
.Nm EVP_PKEY_new ,
.Nm EVP_PKEY_up_ref ,
.Nm EVP_PKEY_free ,
.Nm EVP_PKEY_new_mac_key
142
143
144
145
146
147
148


149





150
151
152
153
154
155
156
structure or
.Dv NULL
if an error occurred.
.Pp
.Fn EVP_PKEY_up_ref
returns 1 for success or 0 for failure.
.Sh SEE ALSO


.Xr EVP_PKEY_asn1_set_free 3 ,





.Xr EVP_PKEY_set1_RSA 3
.Sh HISTORY
.Fn EVP_PKEY_new
and
.Fn EVP_PKEY_free
first appeared in SSLeay 0.6.0 and have been available since
.Ox 2.4 .







>
>
|
>
>
>
>
>







142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
structure or
.Dv NULL
if an error occurred.
.Pp
.Fn EVP_PKEY_up_ref
returns 1 for success or 0 for failure.
.Sh SEE ALSO
.Xr d2i_PrivateKey 3 ,
.Xr evp 3 ,
.Xr EVP_PKEY_asn1_new 3 ,
.Xr EVP_PKEY_cmp 3 ,
.Xr EVP_PKEY_CTX_new 3 ,
.Xr EVP_PKEY_get_default_digest_nid 3 ,
.Xr EVP_PKEY_meth_new 3 ,
.Xr EVP_PKEY_print_private 3 ,
.Xr EVP_PKEY_set1_RSA 3
.Sh HISTORY
.Fn EVP_PKEY_new
and
.Fn EVP_PKEY_free
first appeared in SSLeay 0.6.0 and have been available since
.Ox 2.4 .
Changes to jni/libressl/man/EVP_PKEY_print_private.3.
1
2
3
4
5
6
7
8
.\"	$OpenBSD: EVP_PKEY_print_private.3,v 1.6 2018/03/23 04:34:23 schwarze Exp $
.\"	OpenSSL 99d63d46 Oct 26 13:56:48 2016 -0400
.\"
.\" This file was written by Dr. Stephen Henson <steve@openssl.org>.
.\" Copyright (c) 2006, 2009 The OpenSSL Project.  All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
|







1
2
3
4
5
6
7
8
.\"	$OpenBSD: EVP_PKEY_print_private.3,v 1.7 2019/06/06 01:06:58 schwarze Exp $
.\"	OpenSSL 99d63d46 Oct 26 13:56:48 2016 -0400
.\"
.\" This file was written by Dr. Stephen Henson <steve@openssl.org>.
.\" Copyright (c) 2006, 2009 The OpenSSL Project.  All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: March 23 2018 $
.Dt EVP_PKEY_PRINT_PRIVATE 3
.Os
.Sh NAME
.Nm EVP_PKEY_print_public ,
.Nm EVP_PKEY_print_private ,
.Nm EVP_PKEY_print_params
.Nd public key algorithm printing routines







|







44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: June 6 2019 $
.Dt EVP_PKEY_PRINT_PRIVATE 3
.Os
.Sh NAME
.Nm EVP_PKEY_print_public ,
.Nm EVP_PKEY_print_private ,
.Nm EVP_PKEY_print_params
.Nd public key algorithm printing routines
118
119
120
121
122
123
124
125

126
127
128
129
These functions all return 1 for success and 0 or a negative value for
failure.
In particular, a return value of -2 indicates the operation is not
supported by the public key algorithm.
.Sh SEE ALSO
.Xr EVP_PKEY_asn1_set_public 3 ,
.Xr EVP_PKEY_CTX_new 3 ,
.Xr EVP_PKEY_keygen 3

.Sh HISTORY
These functions first appeared in OpenSSL 1.0.0
and have been available since
.Ox 4.9 .







|
>




118
119
120
121
122
123
124
125
126
127
128
129
130
These functions all return 1 for success and 0 or a negative value for
failure.
In particular, a return value of -2 indicates the operation is not
supported by the public key algorithm.
.Sh SEE ALSO
.Xr EVP_PKEY_asn1_set_public 3 ,
.Xr EVP_PKEY_CTX_new 3 ,
.Xr EVP_PKEY_keygen 3 ,
.Xr EVP_PKEY_new 3
.Sh HISTORY
These functions first appeared in OpenSSL 1.0.0
and have been available since
.Ox 4.9 .
Changes to jni/libressl/man/EVP_PKEY_set1_RSA.3.
1
2
3
4

















5
6
7
8
9
10
11
12
.\" $OpenBSD: EVP_PKEY_set1_RSA.3,v 1.15 2019/03/18 04:01:53 schwarze Exp $
.\" full merge up to: OpenSSL bb9ad09e Jun 6 00:43:05 2016 -0400
.\" selective merge up to: OpenSSL 99d63d46 Oct 26 13:56:48 2016 -0400
.\"

















.\" This file was written by Dr. Stephen Henson <steve@openssl.org>.
.\" Copyright (c) 2002, 2015, 2016 The OpenSSL Project.  All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\"
.\" 1. Redistributions of source code must retain the above copyright
|
<
|

>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
|







1

2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
.\" $OpenBSD: EVP_PKEY_set1_RSA.3,v 1.16 2019/09/01 09:10:09 schwarze Exp $

.\" full merge up to: OpenSSL 99d63d46 Oct 26 13:56:48 2016 -0400
.\"
.\" This file is a derived work.
.\" The changes are covered by the following Copyright and license:
.\"
.\" Copyright (c) 2019 Ingo Schwarze <schwarze@openbsd.org>
.\"
.\" Permission to use, copy, modify, and distribute this software for any
.\" purpose with or without fee is hereby granted, provided that the above
.\" copyright notice and this permission notice appear in all copies.
.\"
.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
.\" The original file was written by by Dr. Stephen Henson <steve@openssl.org>.
.\" Copyright (c) 2002, 2015, 2016 The OpenSSL Project.  All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\"
.\" 1. Redistributions of source code must retain the above copyright
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68

69
70
71
72



73
74
75
76
77
78
79
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: March 18 2019 $
.Dt EVP_PKEY_SET1_RSA 3
.Os
.Sh NAME
.Nm EVP_PKEY_set1_RSA ,
.Nm EVP_PKEY_set1_DSA ,
.Nm EVP_PKEY_set1_DH ,
.Nm EVP_PKEY_set1_EC_KEY ,
.Nm EVP_PKEY_get1_RSA ,
.Nm EVP_PKEY_get1_DSA ,
.Nm EVP_PKEY_get1_DH ,
.Nm EVP_PKEY_get1_EC_KEY ,
.Nm EVP_PKEY_get0_RSA ,
.Nm EVP_PKEY_get0_DSA ,
.Nm EVP_PKEY_get0_DH ,
.Nm EVP_PKEY_get0_EC_KEY ,
.Nm EVP_PKEY_get0_hmac ,

.Nm EVP_PKEY_assign_RSA ,
.Nm EVP_PKEY_assign_DSA ,
.Nm EVP_PKEY_assign_DH ,
.Nm EVP_PKEY_assign_EC_KEY ,



.Nm EVP_PKEY_base_id ,
.Nm EVP_PKEY_id ,
.Nm EVP_PKEY_type
.Nd EVP_PKEY assignment functions
.Sh SYNOPSIS
.In openssl/evp.h
.Ft int







|
















>




>
>
>







61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: September 1 2019 $
.Dt EVP_PKEY_SET1_RSA 3
.Os
.Sh NAME
.Nm EVP_PKEY_set1_RSA ,
.Nm EVP_PKEY_set1_DSA ,
.Nm EVP_PKEY_set1_DH ,
.Nm EVP_PKEY_set1_EC_KEY ,
.Nm EVP_PKEY_get1_RSA ,
.Nm EVP_PKEY_get1_DSA ,
.Nm EVP_PKEY_get1_DH ,
.Nm EVP_PKEY_get1_EC_KEY ,
.Nm EVP_PKEY_get0_RSA ,
.Nm EVP_PKEY_get0_DSA ,
.Nm EVP_PKEY_get0_DH ,
.Nm EVP_PKEY_get0_EC_KEY ,
.Nm EVP_PKEY_get0_hmac ,
.Nm EVP_PKEY_get0 ,
.Nm EVP_PKEY_assign_RSA ,
.Nm EVP_PKEY_assign_DSA ,
.Nm EVP_PKEY_assign_DH ,
.Nm EVP_PKEY_assign_EC_KEY ,
.Nm EVP_PKEY_assign_GOST ,
.Nm EVP_PKEY_assign ,
.Nm EVP_PKEY_set_type ,
.Nm EVP_PKEY_base_id ,
.Nm EVP_PKEY_id ,
.Nm EVP_PKEY_type
.Nd EVP_PKEY assignment functions
.Sh SYNOPSIS
.In openssl/evp.h
.Ft int
129
130
131
132
133
134
135




136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
















156
157
158
159
160
161
162
.Fa "EVP_PKEY *pkey"
.Fc
.Ft const unsigned char *
.Fo EVP_PKEY_get0_hmac
.Fa "const EVP_PKEY *pkey"
.Fa "size_t *len"
.Fc




.Ft int
.Fo EVP_PKEY_assign_RSA
.Fa "EVP_PKEY *pkey"
.Fa "RSA *key"
.Fc
.Ft int
.Fo EVP_PKEY_assign_DSA
.Fa "EVP_PKEY *pkey"
.Fa "DSA *key"
.Fc
.Ft int
.Fo EVP_PKEY_assign_DH
.Fa "EVP_PKEY *pkey"
.Fa "DH *key"
.Fc
.Ft int
.Fo EVP_PKEY_assign_EC_KEY
.Fa "EVP_PKEY *pkey"
.Fa "EC_KEY *key"
.Fc
















.Ft int
.Fo EVP_PKEY_base_id
.Fa "EVP_PKEY *pkey"
.Fc
.Ft int
.Fo EVP_PKEY_id
.Fa "EVP_PKEY *pkey"







>
>
>
>




















>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
.Fa "EVP_PKEY *pkey"
.Fc
.Ft const unsigned char *
.Fo EVP_PKEY_get0_hmac
.Fa "const EVP_PKEY *pkey"
.Fa "size_t *len"
.Fc
.Ft void *
.Fo EVP_PKEY_get0
.Fa "const EVP_PKEY *pkey"
.Fc
.Ft int
.Fo EVP_PKEY_assign_RSA
.Fa "EVP_PKEY *pkey"
.Fa "RSA *key"
.Fc
.Ft int
.Fo EVP_PKEY_assign_DSA
.Fa "EVP_PKEY *pkey"
.Fa "DSA *key"
.Fc
.Ft int
.Fo EVP_PKEY_assign_DH
.Fa "EVP_PKEY *pkey"
.Fa "DH *key"
.Fc
.Ft int
.Fo EVP_PKEY_assign_EC_KEY
.Fa "EVP_PKEY *pkey"
.Fa "EC_KEY *key"
.Fc
.Ft int
.Fo EVP_PKEY_assign_GOST
.Fa "EVP_PKEY *pkey"
.Fa "GOST_KEY *key"
.Fc
.Ft int
.Fo EVP_PKEY_assign
.Fa "EVP_PKEY *pkey"
.Fa "int type"
.Fa "void *key"
.Fc
.Ft int
.Fo EVP_PKEY_set_type
.Fa "EVP_PKEY *pkey"
.Fa "int type"
.Fc
.Ft int
.Fo EVP_PKEY_base_id
.Fa "EVP_PKEY *pkey"
.Fc
.Ft int
.Fo EVP_PKEY_id
.Fa "EVP_PKEY *pkey"
170
171
172
173
174
175
176
177



178
179
180
181
182
183
184
185
186
187
188
189
190
191
192

193
194
195
196
197
198
199
200
201
.Fn EVP_PKEY_set1_DSA ,
.Fn EVP_PKEY_set1_DH ,
and
.Fn EVP_PKEY_set1_EC_KEY
set the key referenced by
.Fa pkey
to
.Fa key .



.Pp
.Fn EVP_PKEY_get1_RSA ,
.Fn EVP_PKEY_get1_DSA ,
.Fn EVP_PKEY_get1_DH ,
and
.Fn EVP_PKEY_get1_EC_KEY
return the key referenced in
.Fa pkey ,
incrementing its reference count by 1, or
.Dv NULL
if the key is not of the correct type.
.Pp
.Fn EVP_PKEY_get0_RSA ,
.Fn EVP_PKEY_get0_DSA ,
.Fn EVP_PKEY_get0_DH ,

and
.Fn EVP_PKEY_get0_EC_KEY
are identical except that they do not increment the reference count.
Consequently, the returned key must not be freed by the caller.
.Pp
.Fn EVP_PKEY_get0_hmac
returns an internal pointer to the key referenced in
.Fa pkey
and sets







|
>
>
>















>

|







210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
.Fn EVP_PKEY_set1_DSA ,
.Fn EVP_PKEY_set1_DH ,
and
.Fn EVP_PKEY_set1_EC_KEY
set the key referenced by
.Fa pkey
to
.Fa key
and increment the reference count of
.Fa key
by 1 in case of success.
.Pp
.Fn EVP_PKEY_get1_RSA ,
.Fn EVP_PKEY_get1_DSA ,
.Fn EVP_PKEY_get1_DH ,
and
.Fn EVP_PKEY_get1_EC_KEY
return the key referenced in
.Fa pkey ,
incrementing its reference count by 1, or
.Dv NULL
if the key is not of the correct type.
.Pp
.Fn EVP_PKEY_get0_RSA ,
.Fn EVP_PKEY_get0_DSA ,
.Fn EVP_PKEY_get0_DH ,
.Fn EVP_PKEY_get0_EC_KEY ,
and
.Fn EVP_PKEY_get0
are identical except that they do not increment the reference count.
Consequently, the returned key must not be freed by the caller.
.Pp
.Fn EVP_PKEY_get0_hmac
returns an internal pointer to the key referenced in
.Fa pkey
and sets
209
210
211
212
213
214
215


216
217
218
219
220
221
222
223
224
225
226


























227
228
229
230
231
232
233
is returned and the content of
.Pf * Fa len
becomes unspecified.
.Pp
.Fn EVP_PKEY_assign_RSA ,
.Fn EVP_PKEY_assign_DSA ,
.Fn EVP_PKEY_assign_DH ,


and
.Fn EVP_PKEY_assign_EC_KEY
also set the referenced key to
.Fa key ;
however these use the supplied
.Fa key
internally and so
.Fa key
will be freed when the parent
.Fa pkey
is freed.


























.Pp
.Fn EVP_PKEY_base_id
returns the type of
.Fa pkey .
For example, an RSA key will return
.Dv EVP_PKEY_RSA .
.Pp







>
>

|




|




>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
is returned and the content of
.Pf * Fa len
becomes unspecified.
.Pp
.Fn EVP_PKEY_assign_RSA ,
.Fn EVP_PKEY_assign_DSA ,
.Fn EVP_PKEY_assign_DH ,
.Fn EVP_PKEY_assign_EC_KEY ,
.Fn EVP_PKEY_assign_GOST ,
and
.Fn EVP_PKEY_assign
also set the referenced key to
.Fa key ;
however these use the supplied
.Fa key
internally without incrementing its reference count, such that
.Fa key
will be freed when the parent
.Fa pkey
is freed.
If the
.Fa key
is of the wrong type, these functions report success even though
.Fa pkey
ends up in a corrupted state.
Even the functions explicitly containing the type in their name are
.Em not
type safe because they are implemented as macros.
The following types are supported:
.Dv EVP_PKEY_RSA ,
.Dv EVP_PKEY_DSA ,
.Dv EVP_PKEY_DH ,
.Dv EVP_PKEY_EC ,
and
.Dv EVP_PKEY_GOSTR01 .
.Pp
.Fn EVP_PKEY_set_type
frees the key referenced in
.Fa pkey ,
if any, and sets the key type of
.Fa pkey
to
.Fa type
without referencing a new key from
.Fa pkey
yet.
.Pp
.Fn EVP_PKEY_base_id
returns the type of
.Fa pkey .
For example, an RSA key will return
.Dv EVP_PKEY_RSA .
.Pp
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280







281
282
283
284
285
286
287
288
289
290
291
292

293
294
295
296
297
298

299


300
301
302
303

304



305
306
307
308
309
310
311
In accordance with the OpenSSL naming convention, the key obtained from
or assigned to
.Fa pkey
using the
.Sy 1
functions must be freed as well as
.Fa pkey .
.Pp
.Fn EVP_PKEY_assign_RSA ,
.Fn EVP_PKEY_assign_DSA ,
.Fn EVP_PKEY_assign_DH ,
and
.Fn EVP_PKEY_assign_EC_KEY
are implemented as macros.
.Sh RETURN VALUES
.Fn EVP_PKEY_set1_RSA ,
.Fn EVP_PKEY_set1_DSA ,
.Fn EVP_PKEY_set1_DH ,







and
.Fn EVP_PKEY_set1_EC_KEY
return 1 for success or 0 for failure.
.Pp
.Fn EVP_PKEY_get1_RSA ,
.Fn EVP_PKEY_get1_DSA ,
.Fn EVP_PKEY_get1_DH ,
.Fn EVP_PKEY_get1_EC_KEY ,
.Fn EVP_PKEY_get0_RSA ,
.Fn EVP_PKEY_get0_DSA ,
.Fn EVP_PKEY_get0_DH ,
.Fn EVP_PKEY_get0_EC_KEY ,

and
.Fn EVP_PKEY_get0_hmac
return the referenced key or
.Dv NULL
if an error occurred.
.Pp

.Fn EVP_PKEY_assign_RSA ,


.Fn EVP_PKEY_assign_DSA ,
.Fn EVP_PKEY_assign_DH ,
and
.Fn EVP_PKEY_assign_EC_KEY

return 1 for success and 0 for failure.



.Pp
.Fn EVP_PKEY_base_id ,
.Fn EVP_PKEY_id ,
and
.Fn EVP_PKEY_type
return a key type or
.Dv NID_undef







<
<
<
<
<
<
<




>
>
>
>
>
>
>

|










>

|



<
>
|
>
>
|
|
<
|
>
|
>
>
>







335
336
337
338
339
340
341







342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370

371
372
373
374
375
376

377
378
379
380
381
382
383
384
385
386
387
388
389
In accordance with the OpenSSL naming convention, the key obtained from
or assigned to
.Fa pkey
using the
.Sy 1
functions must be freed as well as
.Fa pkey .







.Sh RETURN VALUES
.Fn EVP_PKEY_set1_RSA ,
.Fn EVP_PKEY_set1_DSA ,
.Fn EVP_PKEY_set1_DH ,
.Fn EVP_PKEY_set1_EC_KEY ,
.Fn EVP_PKEY_assign_RSA ,
.Fn EVP_PKEY_assign_DSA ,
.Fn EVP_PKEY_assign_DH ,
.Fn EVP_PKEY_assign_EC_KEY ,
.Fn EVP_PKEY_assign_GOST ,
.Fn EVP_PKEY_assign ,
and
.Fn EVP_PKEY_set_type
return 1 for success or 0 for failure.
.Pp
.Fn EVP_PKEY_get1_RSA ,
.Fn EVP_PKEY_get1_DSA ,
.Fn EVP_PKEY_get1_DH ,
.Fn EVP_PKEY_get1_EC_KEY ,
.Fn EVP_PKEY_get0_RSA ,
.Fn EVP_PKEY_get0_DSA ,
.Fn EVP_PKEY_get0_DH ,
.Fn EVP_PKEY_get0_EC_KEY ,
.Fn EVP_PKEY_get0_hmac ,
and
.Fn EVP_PKEY_get0
return the referenced key or
.Dv NULL
if an error occurred.

For
.Fn EVP_PKEY_get0 ,
the return value points to an
.Vt RSA ,
.Vt DSA ,
.Vt DH ,

.Vt EC_KEY ,
.Vt GOST_KEY ,
or
.Vt ASN1_OCTET_STRING
object depending on the type of
.Fa pkey .
.Pp
.Fn EVP_PKEY_base_id ,
.Fn EVP_PKEY_id ,
and
.Fn EVP_PKEY_type
return a key type or
.Dv NID_undef
319
320
321
322
323
324
325

326
327
328
329
330
331
332
.Xr EVP_PKEY_get0_asn1 3 ,
.Xr EVP_PKEY_new 3 ,
.Xr RSA_new 3
.Sh HISTORY
.Fn EVP_PKEY_assign_RSA ,
.Fn EVP_PKEY_assign_DSA ,
.Fn EVP_PKEY_assign_DH ,

and
.Fn EVP_PKEY_type
first appeared in SSLeay 0.8.0 and have been available since
.Ox 2.4 .
.Pp
.Fn EVP_PKEY_set1_RSA ,
.Fn EVP_PKEY_set1_DSA ,







>







397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
.Xr EVP_PKEY_get0_asn1 3 ,
.Xr EVP_PKEY_new 3 ,
.Xr RSA_new 3
.Sh HISTORY
.Fn EVP_PKEY_assign_RSA ,
.Fn EVP_PKEY_assign_DSA ,
.Fn EVP_PKEY_assign_DH ,
.Fn EVP_PKEY_assign ,
and
.Fn EVP_PKEY_type
first appeared in SSLeay 0.8.0 and have been available since
.Ox 2.4 .
.Pp
.Fn EVP_PKEY_set1_RSA ,
.Fn EVP_PKEY_set1_DSA ,
341
342
343
344
345
346
347

348

349
350
351
352




353
354
355
356
357
358
359
360
361
362
363
364
.Fn EVP_PKEY_set1_EC_KEY ,
.Fn EVP_PKEY_get1_EC_KEY ,
and
.Fn EVP_PKEY_assign_EC_KEY
first appeared in OpenSSL 0.9.8 and have been available since
.Ox 4.5 .
.Pp

.Fn EVP_PKEY_id

and
.Fn EVP_PKEY_base_id
first appeared in OpenSSL 1.0.0 and have been available since
.Ox 4.9 .




.Pp
.Fn EVP_PKEY_get0_RSA ,
.Fn EVP_PKEY_get0_DSA ,
.Fn EVP_PKEY_get0_DH ,
and
.Fn EVP_PKEY_get0_EC_KEY
first appeared in OpenSSL 1.1.0 and have been available since
.Ox 6.3 .
.Pp
.Fn EVP_PKEY_get0_hmac
first appeared in OpenSSL 1.1.0 and has been available since
.Ox 6.5 .







>
|
>

|


>
>
>
>












420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
.Fn EVP_PKEY_set1_EC_KEY ,
.Fn EVP_PKEY_get1_EC_KEY ,
and
.Fn EVP_PKEY_assign_EC_KEY
first appeared in OpenSSL 0.9.8 and have been available since
.Ox 4.5 .
.Pp
.Fn EVP_PKEY_get0 ,
.Fn EVP_PKEY_set_type ,
.Fn EVP_PKEY_base_id ,
and
.Fn EVP_PKEY_id
first appeared in OpenSSL 1.0.0 and have been available since
.Ox 4.9 .
.Pp
.Fn EVP_PKEY_assign_GOST
first appeared in
.Ox 5.7 .
.Pp
.Fn EVP_PKEY_get0_RSA ,
.Fn EVP_PKEY_get0_DSA ,
.Fn EVP_PKEY_get0_DH ,
and
.Fn EVP_PKEY_get0_EC_KEY
first appeared in OpenSSL 1.1.0 and have been available since
.Ox 6.3 .
.Pp
.Fn EVP_PKEY_get0_hmac
first appeared in OpenSSL 1.1.0 and has been available since
.Ox 6.5 .
Changes to jni/libressl/man/EVP_SealInit.3.
1
2
3
4
5
6
7
8
.\"	$OpenBSD: EVP_SealInit.3,v 1.7 2018/03/27 17:35:50 schwarze Exp $
.\"	OpenSSL b97fdb57 Nov 11 09:33:09 2016 +0100
.\"
.\" This file was written by Dr. Stephen Henson <steve@openssl.org>.
.\" Copyright (c) 2000, 2002, 2003, 2005, 2015 The OpenSSL Project.
.\" All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
|







1
2
3
4
5
6
7
8
.\"	$OpenBSD: EVP_SealInit.3,v 1.8 2019/06/07 20:46:25 schwarze Exp $
.\"	OpenSSL b97fdb57 Nov 11 09:33:09 2016 +0100
.\"
.\" This file was written by Dr. Stephen Henson <steve@openssl.org>.
.\" Copyright (c) 2000, 2002, 2003, 2005, 2015 The OpenSSL Project.
.\" All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: March 27 2018 $
.Dt EVP_SEALINIT 3
.Os
.Sh NAME
.Nm EVP_SealInit ,
.Nm EVP_SealUpdate ,
.Nm EVP_SealFinal
.Nd EVP envelope encryption







|







45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: June 7 2019 $
.Dt EVP_SEALINIT 3
.Os
.Sh NAME
.Nm EVP_SealInit ,
.Nm EVP_SealUpdate ,
.Nm EVP_SealFinal
.Nd EVP envelope encryption
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
.Fn EVP_SealUpdate
and
.Fn EVP_SealFinal
return 1 for success and 0 for failure.
.Sh SEE ALSO
.Xr evp 3 ,
.Xr EVP_EncryptInit 3 ,
.Xr EVP_OpenInit 3 ,
.Xr RAND_bytes 3
.Sh HISTORY
.Fn EVP_SealInit ,
.Fn EVP_SealUpdate ,
and
.Fn EVP_SealFinal
first appeared in SSLeay 0.5.1 and have been available since
.Ox 2.4 .
.Pp
.Fn EVP_SealFinal
did not return a value before OpenSSL 0.9.7.







|
<










171
172
173
174
175
176
177
178

179
180
181
182
183
184
185
186
187
188
.Fn EVP_SealUpdate
and
.Fn EVP_SealFinal
return 1 for success and 0 for failure.
.Sh SEE ALSO
.Xr evp 3 ,
.Xr EVP_EncryptInit 3 ,
.Xr EVP_OpenInit 3

.Sh HISTORY
.Fn EVP_SealInit ,
.Fn EVP_SealUpdate ,
and
.Fn EVP_SealFinal
first appeared in SSLeay 0.5.1 and have been available since
.Ox 2.4 .
.Pp
.Fn EVP_SealFinal
did not return a value before OpenSSL 0.9.7.
Changes to jni/libressl/man/EVP_SignInit.3.
1
2
3
4
5
6
7
8
.\" $OpenBSD: EVP_SignInit.3,v 1.12 2018/12/23 08:35:14 tb Exp $
.\" full merge up to: OpenSSL b97fdb57 Nov 11 09:33:09 2016 +0100
.\" selective merge up to: OpenSSL 79b49fb0 Mar 20 10:03:10 2018 +1000
.\"
.\" This file was written by Dr. Stephen Henson <steve@openssl.org>.
.\" Copyright (c) 2000-2002, 2005, 2006, 2014-2016 The OpenSSL Project.
.\" All rights reserved.
.\"
|







1
2
3
4
5
6
7
8
.\" $OpenBSD: EVP_SignInit.3,v 1.14 2019/06/10 14:58:48 schwarze Exp $
.\" full merge up to: OpenSSL b97fdb57 Nov 11 09:33:09 2016 +0100
.\" selective merge up to: OpenSSL 79b49fb0 Mar 20 10:03:10 2018 +1000
.\"
.\" This file was written by Dr. Stephen Henson <steve@openssl.org>.
.\" Copyright (c) 2000-2002, 2005, 2006, 2014-2016 The OpenSSL Project.
.\" All rights reserved.
.\"
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: December 23 2018 $
.Dt EVP_SIGNINIT 3
.Os
.Sh NAME
.Nm EVP_SignInit_ex ,
.Nm EVP_SignUpdate ,
.Nm EVP_SignFinal ,
.Nm EVP_SignInit ,







|







46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: June 10 2019 $
.Dt EVP_SIGNINIT 3
.Os
.Sh NAME
.Nm EVP_SignInit_ex ,
.Nm EVP_SignUpdate ,
.Nm EVP_SignFinal ,
.Nm EVP_SignInit ,
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
.Fn EVP_PKEY_bits
returns the number of significant bits in the key
or 0 if an error occurs.
.Pp
The error codes can be obtained by
.Xr ERR_get_error 3 .
.Sh SEE ALSO
.Xr ERR 3 ,
.Xr evp 3 ,
.Xr EVP_DigestInit 3 ,
.Xr EVP_PKEY_asn1_set_public 3 ,
.Xr EVP_VerifyInit 3
.Sh HISTORY
.Fn EVP_SignInit ,
.Fn EVP_SignUpdate ,







<







186
187
188
189
190
191
192

193
194
195
196
197
198
199
.Fn EVP_PKEY_bits
returns the number of significant bits in the key
or 0 if an error occurs.
.Pp
The error codes can be obtained by
.Xr ERR_get_error 3 .
.Sh SEE ALSO

.Xr evp 3 ,
.Xr EVP_DigestInit 3 ,
.Xr EVP_PKEY_asn1_set_public 3 ,
.Xr EVP_VerifyInit 3
.Sh HISTORY
.Fn EVP_SignInit ,
.Fn EVP_SignUpdate ,
223
224
225
226
227
228
229
230
digest combination) will not be indicated until after potentially large
amounts of data have been passed through
.Fn EVP_SignUpdate .
.Pp
It is not possible to change the signing parameters using these
function.
.Pp
The previous two bugs are fixed in the newer EVP_SignDigest* function.







|
222
223
224
225
226
227
228
229
digest combination) will not be indicated until after potentially large
amounts of data have been passed through
.Fn EVP_SignUpdate .
.Pp
It is not possible to change the signing parameters using these
function.
.Pp
The previous two bugs are fixed in the newer EVP_DigestSign* function.
Changes to jni/libressl/man/EVP_VerifyInit.3.
1
2
3
4
5
6
7
8
.\" $OpenBSD: EVP_VerifyInit.3,v 1.9 2018/12/23 08:35:14 tb Exp $
.\" full merge up to: OpenSSL b97fdb57 Nov 11 09:33:09 2016 +0100
.\" selective merge up to: OpenSSL 79b49fb0 Mar 20 10:03:10 2018 +1000
.\"
.\" This file was written by Dr. Stephen Henson <steve@openssl.org>.
.\" Copyright (c) 2000, 2001, 2006, 2016 The OpenSSL Project.
.\" All rights reserved.
.\"
|







1
2
3
4
5
6
7
8
.\" $OpenBSD: EVP_VerifyInit.3,v 1.10 2019/06/10 14:58:48 schwarze Exp $
.\" full merge up to: OpenSSL b97fdb57 Nov 11 09:33:09 2016 +0100
.\" selective merge up to: OpenSSL 79b49fb0 Mar 20 10:03:10 2018 +1000
.\"
.\" This file was written by Dr. Stephen Henson <steve@openssl.org>.
.\" Copyright (c) 2000, 2001, 2006, 2016 The OpenSSL Project.
.\" All rights reserved.
.\"
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: December 23 2018 $
.Dt EVP_VERIFYINIT 3
.Os
.Sh NAME
.Nm EVP_VerifyInit_ex ,
.Nm EVP_VerifyUpdate ,
.Nm EVP_VerifyFinal ,
.Nm EVP_VerifyInit







|







46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: June 10 2019 $
.Dt EVP_VERIFYINIT 3
.Os
.Sh NAME
.Nm EVP_VerifyInit_ex ,
.Nm EVP_VerifyUpdate ,
.Nm EVP_VerifyFinal ,
.Nm EVP_VerifyInit
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
.Fn EVP_VerifyFinal
returns 1 for a correct signature, 0 for failure, and -1 if some other
error occurred.
.Pp
The error codes can be obtained by
.Xr ERR_get_error 3 .
.Sh SEE ALSO
.Xr ERR 3 ,
.Xr evp 3 ,
.Xr EVP_DigestInit 3 ,
.Xr EVP_SignInit 3
.Sh HISTORY
.Fn EVP_VerifyInit ,
.Fn EVP_VerifyUpdate ,
and







<







156
157
158
159
160
161
162

163
164
165
166
167
168
169
.Fn EVP_VerifyFinal
returns 1 for a correct signature, 0 for failure, and -1 if some other
error occurred.
.Pp
The error codes can be obtained by
.Xr ERR_get_error 3 .
.Sh SEE ALSO

.Xr evp 3 ,
.Xr EVP_DigestInit 3 ,
.Xr EVP_SignInit 3
.Sh HISTORY
.Fn EVP_VerifyInit ,
.Fn EVP_VerifyUpdate ,
and
Changes to jni/libressl/man/EVP_aes_128_cbc.3.
1
2
3
4
5
6
7
8
.\" $OpenBSD: EVP_aes_128_cbc.3,v 1.2 2019/03/19 19:50:03 schwarze Exp $
.\" selective merge up to: OpenSSL 7c6d372a Nov 20 13:20:01 2018 +0000
.\"
.\" This file was written by Ronald Tse <ronald.tse@ribose.com>
.\" Copyright (c) 2017 The OpenSSL Project.  All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
|







1
2
3
4
5
6
7
8
.\" $OpenBSD: EVP_aes_128_cbc.3,v 1.3 2019/08/28 10:37:42 schwarze Exp $
.\" selective merge up to: OpenSSL 7c6d372a Nov 20 13:20:01 2018 +0000
.\"
.\" This file was written by Ronald Tse <ronald.tse@ribose.com>
.\" Copyright (c) 2017 The OpenSSL Project.  All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: March 19 2019 $
.Dt EVP_AES_128_CBC 3
.Os
.Sh NAME
.Nm EVP_aes_128_cbc ,
.Nm EVP_aes_192_cbc ,
.Nm EVP_aes_256_cbc ,
.Nm EVP_aes_128_cfb1 ,







|







44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: August 28 2019 $
.Dt EVP_AES_128_CBC 3
.Os
.Sh NAME
.Nm EVP_aes_128_cbc ,
.Nm EVP_aes_192_cbc ,
.Nm EVP_aes_256_cbc ,
.Nm EVP_aes_128_cfb1 ,
275
276
277
278
279
280
281

282
283
284
285
286
287
288
AES 128-bit security, and XTS-AES-256 takes input of a 512-bit key
to achieve AES 256-bit security.
.Sh RETURN VALUES
These functions return an
.Vt EVP_CIPHER
structure that provides the implementation of the symmetric cipher.
.Sh SEE ALSO

.Xr evp 3 ,
.Xr EVP_EncryptInit 3
.Sh HISTORY
.Fn EVP_aes_128_cbc ,
.Fn EVP_aes_192_cbc ,
.Fn EVP_aes_256_cbc ,
.Fn EVP_aes_128_cfb ,







>







275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
AES 128-bit security, and XTS-AES-256 takes input of a 512-bit key
to achieve AES 256-bit security.
.Sh RETURN VALUES
These functions return an
.Vt EVP_CIPHER
structure that provides the implementation of the symmetric cipher.
.Sh SEE ALSO
.Xr AES_encrypt 3 ,
.Xr evp 3 ,
.Xr EVP_EncryptInit 3
.Sh HISTORY
.Fn EVP_aes_128_cbc ,
.Fn EVP_aes_192_cbc ,
.Fn EVP_aes_256_cbc ,
.Fn EVP_aes_128_cfb ,
Added jni/libressl/man/EVP_sm3.3.




































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
.\" $OpenBSD: EVP_sm3.3,v 1.1 2019/08/25 17:08:20 schwarze Exp $
.\" full merge up to: OpenSSL 21ebd2fc Aug 24 20:38:04 2018 +0800
.\"
.\" This file was written by Jack Lloyd <jack.lloyd@ribose.com>
.\" and Ronald Tse <ronald.tse@ribose.com>.
.\" Copyright (c) 2017 The OpenSSL Project.  All rights reserved.
.\" Copyright (c) 2017 Ribose Inc.  All Rights Reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\"
.\" 1. Redistributions of source code must retain the above copyright
.\"    notice, this list of conditions and the following disclaimer.
.\"
.\" 2. Redistributions in binary form must reproduce the above copyright
.\"    notice, this list of conditions and the following disclaimer in
.\"    the documentation and/or other materials provided with the
.\"    distribution.
.\"
.\" 3. All advertising materials mentioning features or use of this
.\"    software must display the following acknowledgment:
.\"    "This product includes software developed by the OpenSSL Project
.\"    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
.\"
.\" 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
.\"    endorse or promote products derived from this software without
.\"    prior written permission. For written permission, please contact
.\"    openssl-core@openssl.org.
.\"
.\" 5. Products derived from this software may not be called "OpenSSL"
.\"    nor may "OpenSSL" appear in their names without prior written
.\"    permission of the OpenSSL Project.
.\"
.\" 6. Redistributions of any form whatsoever must retain the following
.\"    acknowledgment:
.\"    "This product includes software developed by the OpenSSL Project
.\"    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
.\"
.\" THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
.\" EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
.\" PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
.\" ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
.\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: August 25 2019 $
.Dt EVP_SM3 3
.Os
.Sh NAME
.Nm EVP_sm3
.Nd SM3 hash function for EVP
.Sh SYNOPSIS
.In openssl/evp.h
.Ft const EVP_MD *
.Fn EVP_sm3 void
.Sh DESCRIPTION
SM3 is a cryptographic hash function with a 256-bit output.
It is part of the Chinese
.Dq Commercial Cryptography
suite of algorithms which is required
for certain commercial applications in China.
.Sh RETURN VALUES
.Fn EVP_sm3
returns a pointer to a static
.Vt EVP_MD
object implementing the SM3 hash function.
.Sh SEE ALSO
.Xr evp 3 ,
.Xr EVP_DigestInit 3
.Sh STANDARDS
GB/T 32905-2016 and GM/T 0004-2012
.Sh HISTORY
.Fn EVP_sm3
first appeared in OpenSSL 1.1.1 and has been available since
.Ox 6.5 .
Added jni/libressl/man/EVP_whirlpool.3.






































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
.\" $OpenBSD: EVP_whirlpool.3,v 1.1 2019/08/25 17:08:20 schwarze Exp $
.\" full merge up to: OpenSSL bbda8ce9 Oct 31 15:43:01 2017 +0800
.\"
.\" This file was written by Ronald Tse <ronald.tse@ribose.com>.
.\" Copyright (c) 2017 The OpenSSL Project.  All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\"
.\" 1. Redistributions of source code must retain the above copyright
.\"    notice, this list of conditions and the following disclaimer.
.\"
.\" 2. Redistributions in binary form must reproduce the above copyright
.\"    notice, this list of conditions and the following disclaimer in
.\"    the documentation and/or other materials provided with the
.\"    distribution.
.\"
.\" 3. All advertising materials mentioning features or use of this
.\"    software must display the following acknowledgment:
.\"    "This product includes software developed by the OpenSSL Project
.\"    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
.\"
.\" 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
.\"    endorse or promote products derived from this software without
.\"    prior written permission. For written permission, please contact
.\"    openssl-core@openssl.org.
.\"
.\" 5. Products derived from this software may not be called "OpenSSL"
.\"    nor may "OpenSSL" appear in their names without prior written
.\"    permission of the OpenSSL Project.
.\"
.\" 6. Redistributions of any form whatsoever must retain the following
.\"    acknowledgment:
.\"    "This product includes software developed by the OpenSSL Project
.\"    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
.\"
.\" THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
.\" EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
.\" PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
.\" ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
.\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: August 25 2019 $
.Dt EVP_WHIRLPOOL 3
.Os
.Sh NAME
.Nm EVP_whirlpool
.Nd WHIRLPOOL hash function for EVP
.Sh SYNOPSIS
.In openssl/evp.h
.Ft const EVP_MD *
.Fn EVP_whirlpool void
.Sh DESCRIPTION
WHIRLPOOL is a cryptographic hash function
producing a message digest of 512 bits.
.Sh RETURN VALUES
.Fn EVP_whirlpool
returns a pointer to a static
.Vt EVP_MD
object implementing the WHIRLPOOL hash function.
.Sh SEE ALSO
.Xr evp 3 ,
.Xr EVP_DigestInit 3
.Sh STANDARDS
ISO/IEC 10118-3:2004
.Sh HISTORY
.Fn EVP_whirlpool
first appeared in OpenSSL 1.0.0 and has been available since
.Ox 4.9 .
.Sh AUTHORS
.An -nosplit
The WHIRLPOOL algorithm was designed by
.An Vincent Rijmen
and
.An Paulo S. L. M. Barreto .
Changes to jni/libressl/man/EXTENDED_KEY_USAGE_new.3.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
.\"	$OpenBSD: EXTENDED_KEY_USAGE_new.3,v 1.3 2018/03/22 21:08:22 schwarze Exp $
.\"
.\" Copyright (c) 2016 Ingo Schwarze <schwarze@openbsd.org>
.\"
.\" Permission to use, copy, modify, and distribute this software for any
.\" purpose with or without fee is hereby granted, provided that the above
.\" copyright notice and this permission notice appear in all copies.
.\"
.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
.Dd $Mdocdate: March 22 2018 $
.Dt EXTENDED_KEY_USAGE_NEW 3
.Os
.Sh NAME
.Nm EXTENDED_KEY_USAGE_new ,
.Nm EXTENDED_KEY_USAGE_free
.Nd X.509 key usage restrictions
.Sh SYNOPSIS
|















|







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
.\" $OpenBSD: EXTENDED_KEY_USAGE_new.3,v 1.5 2019/08/22 15:15:35 schwarze Exp $
.\"
.\" Copyright (c) 2016 Ingo Schwarze <schwarze@openbsd.org>
.\"
.\" Permission to use, copy, modify, and distribute this software for any
.\" purpose with or without fee is hereby granted, provided that the above
.\" copyright notice and this permission notice appear in all copies.
.\"
.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
.Dd $Mdocdate: August 22 2019 $
.Dt EXTENDED_KEY_USAGE_NEW 3
.Os
.Sh NAME
.Nm EXTENDED_KEY_USAGE_new ,
.Nm EXTENDED_KEY_USAGE_free
.Nd X.509 key usage restrictions
.Sh SYNOPSIS
57
58
59
60
61
62
63

64

65
66
67
68
69
70
71
returns the new
.Vt EXTENDED_KEY_USAGE
object or
.Dv NULL
if an error occurs.
.Sh SEE ALSO
.Xr BASIC_CONSTRAINTS_new 3 ,

.Xr POLICYINFO_new 3 ,

.Xr X509_EXTENSION_new 3 ,
.Xr X509_new 3
.Sh STANDARDS
RFC 5280: Internet X.509 Public Key Infrastructure Certificate and
Certificate Revocation List (CRL) Profile:
.Bl -dash -compact
.It







>

>







57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
returns the new
.Vt EXTENDED_KEY_USAGE
object or
.Dv NULL
if an error occurs.
.Sh SEE ALSO
.Xr BASIC_CONSTRAINTS_new 3 ,
.Xr d2i_EXTENDED_KEY_USAGE 3 ,
.Xr POLICYINFO_new 3 ,
.Xr X509_check_purpose 3 ,
.Xr X509_EXTENSION_new 3 ,
.Xr X509_new 3
.Sh STANDARDS
RFC 5280: Internet X.509 Public Key Infrastructure Certificate and
Certificate Revocation List (CRL) Profile:
.Bl -dash -compact
.It
Changes to jni/libressl/man/GENERAL_NAME_new.3.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
.\"	$OpenBSD: GENERAL_NAME_new.3,v 1.5 2018/03/22 21:08:22 schwarze Exp $
.\"
.\" Copyright (c) 2016 Ingo Schwarze <schwarze@openbsd.org>
.\"
.\" Permission to use, copy, modify, and distribute this software for any
.\" purpose with or without fee is hereby granted, provided that the above
.\" copyright notice and this permission notice appear in all copies.
.\"
.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
.Dd $Mdocdate: March 22 2018 $
.Dt GENERAL_NAME_NEW 3
.Os
.Sh NAME
.Nm GENERAL_NAME_new ,
.Nm GENERAL_NAME_free ,
.Nm GENERAL_NAMES_new ,
.Nm GENERAL_NAMES_free ,
|















|







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
.\"	$OpenBSD: GENERAL_NAME_new.3,v 1.6 2019/06/06 01:06:58 schwarze Exp $
.\"
.\" Copyright (c) 2016 Ingo Schwarze <schwarze@openbsd.org>
.\"
.\" Permission to use, copy, modify, and distribute this software for any
.\" purpose with or without fee is hereby granted, provided that the above
.\" copyright notice and this permission notice appear in all copies.
.\"
.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
.Dd $Mdocdate: June 6 2019 $
.Dt GENERAL_NAME_NEW 3
.Os
.Sh NAME
.Nm GENERAL_NAME_new ,
.Nm GENERAL_NAME_free ,
.Nm GENERAL_NAMES_new ,
.Nm GENERAL_NAMES_free ,
132
133
134
135
136
137
138

139
140
141
142
143
144
145
.Vt EDIPARTYNAME ,
or
.Vt OTHERNAME
object or
.Dv NULL
if an error occurs.
.Sh SEE ALSO

.Xr X509_EXTENSION_new 3 ,
.Xr X509_NAME_new 3
.Sh STANDARDS
RFC 5280: Internet X.509 Public Key Infrastructure Certificate and
Certificate Revocation List (CRL) Profile,
section 4.2: Certificate Extensions
.Sh HISTORY







>







132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
.Vt EDIPARTYNAME ,
or
.Vt OTHERNAME
object or
.Dv NULL
if an error occurs.
.Sh SEE ALSO
.Xr d2i_GENERAL_NAME 3 ,
.Xr X509_EXTENSION_new 3 ,
.Xr X509_NAME_new 3
.Sh STANDARDS
RFC 5280: Internet X.509 Public Key Infrastructure Certificate and
Certificate Revocation List (CRL) Profile,
section 4.2: Certificate Extensions
.Sh HISTORY
Changes to jni/libressl/man/HMAC.3.
1
2
3
4
5
6
7
8
.\" $OpenBSD: HMAC.3,v 1.13 2018/03/23 23:18:17 schwarze Exp $
.\" full merge up to: OpenSSL crypto/hmac a528d4f0 Oct 27 13:40:11 2015 -0400
.\" selective merge up to: OpenSSL man3/HMAC b3696a55 Sep 2 09:35:50 2017 -0400
.\"
.\" This file was written by Ulf Moeller <ulf@openssl.org>,
.\" Richard Levitte <levitte@openssl.org>, and
.\" Matt Caswell <matt@openssl.org>.
.\" Copyright (c) 2000-2002, 2006, 2008, 2009, 2013, 2015, 2016
|







1
2
3
4
5
6
7
8
.\" $OpenBSD: HMAC.3,v 1.15 2019/06/07 19:40:35 schwarze Exp $
.\" full merge up to: OpenSSL crypto/hmac a528d4f0 Oct 27 13:40:11 2015 -0400
.\" selective merge up to: OpenSSL man3/HMAC b3696a55 Sep 2 09:35:50 2017 -0400
.\"
.\" This file was written by Ulf Moeller <ulf@openssl.org>,
.\" Richard Levitte <levitte@openssl.org>, and
.\" Matt Caswell <matt@openssl.org>.
.\" Copyright (c) 2000-2002, 2006, 2008, 2009, 2013, 2015, 2016
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: March 23 2018 $
.Dt HMAC 3
.Os
.Sh NAME
.Nm HMAC ,
.Nm HMAC_CTX_new ,
.Nm HMAC_CTX_reset ,
.Nm HMAC_CTX_free ,







|







48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: June 7 2019 $
.Dt HMAC 3
.Os
.Sh NAME
.Nm HMAC ,
.Nm HMAC_CTX_new ,
.Nm HMAC_CTX_reset ,
.Nm HMAC_CTX_free ,
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
.Dv NULL
if none was set.
.Pp
.Fn HMAC_size
returns the length in bytes of the underlying hash function output
or 0 on error.
.Sh SEE ALSO
.Xr evp 3
.Sh STANDARDS
RFC 2104
.Sh HISTORY
.Fn HMAC ,
.Fn HMAC_cleanup ,
.Fn HMAC_Init ,
.Fn HMAC_Update ,







|







361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
.Dv NULL
if none was set.
.Pp
.Fn HMAC_size
returns the length in bytes of the underlying hash function output
or 0 on error.
.Sh SEE ALSO
.Xr EVP_DigestInit 3
.Sh STANDARDS
RFC 2104
.Sh HISTORY
.Fn HMAC ,
.Fn HMAC_cleanup ,
.Fn HMAC_Init ,
.Fn HMAC_Update ,
Changes to jni/libressl/man/Makefile.am.
113
114
115
116
117
118
119

120
121
122
123
124
125
126
127
128
129
130

131
132
133
134
135
136
137
138
139
140
141
142
143
144
145

146
147
148
149
150
151
152
dist_man3_MANS += SSL_shutdown.3
dist_man3_MANS += SSL_state_string.3
dist_man3_MANS += SSL_want.3
dist_man3_MANS += SSL_write.3
dist_man3_MANS += d2i_SSL_SESSION.3
dist_man3_MANS += ssl.3
dist_man3_MANS += ACCESS_DESCRIPTION_new.3

dist_man3_MANS += ASN1_INTEGER_get.3
dist_man3_MANS += ASN1_OBJECT_new.3
dist_man3_MANS += ASN1_STRING_TABLE_add.3
dist_man3_MANS += ASN1_STRING_length.3
dist_man3_MANS += ASN1_STRING_new.3
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_generate_nconf.3
dist_man3_MANS += ASN1_item_d2i.3
dist_man3_MANS += ASN1_item_new.3

dist_man3_MANS += ASN1_time_parse.3
dist_man3_MANS += AUTHORITY_KEYID_new.3
dist_man3_MANS += BASIC_CONSTRAINTS_new.3
dist_man3_MANS += BF_set_key.3
dist_man3_MANS += BIO_ctrl.3
dist_man3_MANS += BIO_f_base64.3
dist_man3_MANS += BIO_f_buffer.3
dist_man3_MANS += BIO_f_cipher.3
dist_man3_MANS += BIO_f_md.3
dist_man3_MANS += BIO_f_null.3
dist_man3_MANS += BIO_find_type.3
dist_man3_MANS += BIO_get_data.3
dist_man3_MANS += BIO_get_ex_new_index.3
dist_man3_MANS += BIO_meth_new.3
dist_man3_MANS += BIO_new.3

dist_man3_MANS += BIO_printf.3
dist_man3_MANS += BIO_push.3
dist_man3_MANS += BIO_read.3
dist_man3_MANS += BIO_s_accept.3
dist_man3_MANS += BIO_s_bio.3
dist_man3_MANS += BIO_s_connect.3
dist_man3_MANS += BIO_s_fd.3







>











>















>







113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
dist_man3_MANS += SSL_shutdown.3
dist_man3_MANS += SSL_state_string.3
dist_man3_MANS += SSL_want.3
dist_man3_MANS += SSL_write.3
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_INTEGER_get.3
dist_man3_MANS += ASN1_OBJECT_new.3
dist_man3_MANS += ASN1_STRING_TABLE_add.3
dist_man3_MANS += ASN1_STRING_length.3
dist_man3_MANS += ASN1_STRING_new.3
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_generate_nconf.3
dist_man3_MANS += ASN1_item_d2i.3
dist_man3_MANS += ASN1_item_new.3
dist_man3_MANS += ASN1_put_object.3
dist_man3_MANS += ASN1_time_parse.3
dist_man3_MANS += AUTHORITY_KEYID_new.3
dist_man3_MANS += BASIC_CONSTRAINTS_new.3
dist_man3_MANS += BF_set_key.3
dist_man3_MANS += BIO_ctrl.3
dist_man3_MANS += BIO_f_base64.3
dist_man3_MANS += BIO_f_buffer.3
dist_man3_MANS += BIO_f_cipher.3
dist_man3_MANS += BIO_f_md.3
dist_man3_MANS += BIO_f_null.3
dist_man3_MANS += BIO_find_type.3
dist_man3_MANS += BIO_get_data.3
dist_man3_MANS += BIO_get_ex_new_index.3
dist_man3_MANS += BIO_meth_new.3
dist_man3_MANS += BIO_new.3
dist_man3_MANS += BIO_new_CMS.3
dist_man3_MANS += BIO_printf.3
dist_man3_MANS += BIO_push.3
dist_man3_MANS += BIO_read.3
dist_man3_MANS += BIO_s_accept.3
dist_man3_MANS += BIO_s_bio.3
dist_man3_MANS += BIO_s_connect.3
dist_man3_MANS += BIO_s_fd.3
174
175
176
177
178
179
180

















181
182
183
184

185
186
187
188
189
190
191
dist_man3_MANS += BN_rand.3
dist_man3_MANS += BN_set_bit.3
dist_man3_MANS += BN_set_flags.3
dist_man3_MANS += BN_set_negative.3
dist_man3_MANS += BN_swap.3
dist_man3_MANS += BN_zero.3
dist_man3_MANS += BUF_MEM_new.3

















dist_man3_MANS += CONF_modules_free.3
dist_man3_MANS += CONF_modules_load_file.3
dist_man3_MANS += CRYPTO_get_mem_functions.3
dist_man3_MANS += CRYPTO_lock.3

dist_man3_MANS += CRYPTO_set_ex_data.3
dist_man3_MANS += DES_set_key.3
dist_man3_MANS += DH_generate_key.3
dist_man3_MANS += DH_generate_parameters.3
dist_man3_MANS += DH_get0_pqg.3
dist_man3_MANS += DH_get_ex_new_index.3
dist_man3_MANS += DH_new.3







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>




>







177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
dist_man3_MANS += BN_rand.3
dist_man3_MANS += BN_set_bit.3
dist_man3_MANS += BN_set_flags.3
dist_man3_MANS += BN_set_negative.3
dist_man3_MANS += BN_swap.3
dist_man3_MANS += BN_zero.3
dist_man3_MANS += BUF_MEM_new.3
dist_man3_MANS += CMS_ContentInfo_new.3
dist_man3_MANS += CMS_add0_cert.3
dist_man3_MANS += CMS_add1_recipient_cert.3
dist_man3_MANS += CMS_add1_signer.3
dist_man3_MANS += CMS_compress.3
dist_man3_MANS += CMS_decrypt.3
dist_man3_MANS += CMS_encrypt.3
dist_man3_MANS += CMS_final.3
dist_man3_MANS += CMS_get0_RecipientInfos.3
dist_man3_MANS += CMS_get0_SignerInfos.3
dist_man3_MANS += CMS_get0_type.3
dist_man3_MANS += CMS_get1_ReceiptRequest.3
dist_man3_MANS += CMS_sign.3
dist_man3_MANS += CMS_sign_receipt.3
dist_man3_MANS += CMS_uncompress.3
dist_man3_MANS += CMS_verify.3
dist_man3_MANS += CMS_verify_receipt.3
dist_man3_MANS += CONF_modules_free.3
dist_man3_MANS += CONF_modules_load_file.3
dist_man3_MANS += CRYPTO_get_mem_functions.3
dist_man3_MANS += CRYPTO_lock.3
dist_man3_MANS += CRYPTO_memcmp.3
dist_man3_MANS += CRYPTO_set_ex_data.3
dist_man3_MANS += DES_set_key.3
dist_man3_MANS += DH_generate_key.3
dist_man3_MANS += DH_generate_parameters.3
dist_man3_MANS += DH_get0_pqg.3
dist_man3_MANS += DH_get_ex_new_index.3
dist_man3_MANS += DH_new.3
200
201
202
203
204
205
206

207
208
209
210

211
212
213
214
215
216
217
dist_man3_MANS += DSA_get0_pqg.3
dist_man3_MANS += DSA_get_ex_new_index.3
dist_man3_MANS += DSA_meth_new.3
dist_man3_MANS += DSA_new.3
dist_man3_MANS += DSA_set_method.3
dist_man3_MANS += DSA_sign.3
dist_man3_MANS += DSA_size.3

dist_man3_MANS += ECDSA_SIG_new.3
dist_man3_MANS += EC_GFp_simple_method.3
dist_man3_MANS += EC_GROUP_copy.3
dist_man3_MANS += EC_GROUP_new.3

dist_man3_MANS += EC_KEY_new.3
dist_man3_MANS += EC_POINT_add.3
dist_man3_MANS += EC_POINT_new.3
dist_man3_MANS += ENGINE_add.3
dist_man3_MANS += ENGINE_ctrl.3
dist_man3_MANS += ENGINE_get_default_RSA.3
dist_man3_MANS += ENGINE_init.3







>




>







221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
dist_man3_MANS += DSA_get0_pqg.3
dist_man3_MANS += DSA_get_ex_new_index.3
dist_man3_MANS += DSA_meth_new.3
dist_man3_MANS += DSA_new.3
dist_man3_MANS += DSA_set_method.3
dist_man3_MANS += DSA_sign.3
dist_man3_MANS += DSA_size.3
dist_man3_MANS += ECDH_compute_key.3
dist_man3_MANS += ECDSA_SIG_new.3
dist_man3_MANS += EC_GFp_simple_method.3
dist_man3_MANS += EC_GROUP_copy.3
dist_man3_MANS += EC_GROUP_new.3
dist_man3_MANS += EC_KEY_METHOD_new.3
dist_man3_MANS += EC_KEY_new.3
dist_man3_MANS += EC_POINT_add.3
dist_man3_MANS += EC_POINT_new.3
dist_man3_MANS += ENGINE_add.3
dist_man3_MANS += ENGINE_ctrl.3
dist_man3_MANS += ENGINE_get_default_RSA.3
dist_man3_MANS += ENGINE_init.3
264
265
266
267
268
269
270

271

272
273
274
275
276
277
278
dist_man3_MANS += EVP_SealInit.3
dist_man3_MANS += EVP_SignInit.3
dist_man3_MANS += EVP_VerifyInit.3
dist_man3_MANS += EVP_aes_128_cbc.3
dist_man3_MANS += EVP_camellia_128_cbc.3
dist_man3_MANS += EVP_des_cbc.3
dist_man3_MANS += EVP_rc4.3

dist_man3_MANS += EVP_sm4_cbc.3

dist_man3_MANS += EXTENDED_KEY_USAGE_new.3
dist_man3_MANS += GENERAL_NAME_new.3
dist_man3_MANS += HMAC.3
dist_man3_MANS += MD5.3
dist_man3_MANS += NAME_CONSTRAINTS_new.3
dist_man3_MANS += OBJ_nid2obj.3
dist_man3_MANS += OCSP_CRLID_new.3







>

>







287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
dist_man3_MANS += EVP_SealInit.3
dist_man3_MANS += EVP_SignInit.3
dist_man3_MANS += EVP_VerifyInit.3
dist_man3_MANS += EVP_aes_128_cbc.3
dist_man3_MANS += EVP_camellia_128_cbc.3
dist_man3_MANS += EVP_des_cbc.3
dist_man3_MANS += EVP_rc4.3
dist_man3_MANS += EVP_sm3.3
dist_man3_MANS += EVP_sm4_cbc.3
dist_man3_MANS += EVP_whirlpool.3
dist_man3_MANS += EXTENDED_KEY_USAGE_new.3
dist_man3_MANS += GENERAL_NAME_new.3
dist_man3_MANS += HMAC.3
dist_man3_MANS += MD5.3
dist_man3_MANS += NAME_CONSTRAINTS_new.3
dist_man3_MANS += OBJ_nid2obj.3
dist_man3_MANS += OCSP_CRLID_new.3
290
291
292
293
294
295
296

297
298
299
300
301
302
303
dist_man3_MANS += OPENSSL_load_builtin_modules.3
dist_man3_MANS += OPENSSL_malloc.3
dist_man3_MANS += OPENSSL_sk_new.3
dist_man3_MANS += OpenSSL_add_all_algorithms.3
dist_man3_MANS += PEM_bytes_read_bio.3
dist_man3_MANS += PEM_read.3
dist_man3_MANS += PEM_read_bio_PrivateKey.3

dist_man3_MANS += PEM_write_bio_PKCS7_stream.3
dist_man3_MANS += PKCS12_SAFEBAG_new.3
dist_man3_MANS += PKCS12_create.3
dist_man3_MANS += PKCS12_new.3
dist_man3_MANS += PKCS12_newpass.3
dist_man3_MANS += PKCS12_parse.3
dist_man3_MANS += PKCS5_PBKDF2_HMAC.3







>







315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
dist_man3_MANS += OPENSSL_load_builtin_modules.3
dist_man3_MANS += OPENSSL_malloc.3
dist_man3_MANS += OPENSSL_sk_new.3
dist_man3_MANS += OpenSSL_add_all_algorithms.3
dist_man3_MANS += PEM_bytes_read_bio.3
dist_man3_MANS += PEM_read.3
dist_man3_MANS += PEM_read_bio_PrivateKey.3
dist_man3_MANS += PEM_write_bio_CMS_stream.3
dist_man3_MANS += PEM_write_bio_PKCS7_stream.3
dist_man3_MANS += PKCS12_SAFEBAG_new.3
dist_man3_MANS += PKCS12_create.3
dist_man3_MANS += PKCS12_new.3
dist_man3_MANS += PKCS12_newpass.3
dist_man3_MANS += PKCS12_parse.3
dist_man3_MANS += PKCS5_PBKDF2_HMAC.3
330
331
332
333
334
335
336

337

338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353

354
355
356
357
358
359
360
dist_man3_MANS += RSA_private_encrypt.3
dist_man3_MANS += RSA_public_encrypt.3
dist_man3_MANS += RSA_set_method.3
dist_man3_MANS += RSA_sign.3
dist_man3_MANS += RSA_sign_ASN1_OCTET_STRING.3
dist_man3_MANS += RSA_size.3
dist_man3_MANS += SHA1.3

dist_man3_MANS += SMIME_read_PKCS7.3

dist_man3_MANS += SMIME_write_PKCS7.3
dist_man3_MANS += STACK_OF.3
dist_man3_MANS += SXNET_new.3
dist_man3_MANS += TS_REQ_new.3
dist_man3_MANS += UI_UTIL_read_pw.3
dist_man3_MANS += UI_create_method.3
dist_man3_MANS += UI_get_string_type.3
dist_man3_MANS += UI_new.3
dist_man3_MANS += X25519.3
dist_man3_MANS += X509V3_get_d2i.3
dist_man3_MANS += X509_ALGOR_dup.3
dist_man3_MANS += X509_ATTRIBUTE_new.3
dist_man3_MANS += X509_CINF_new.3
dist_man3_MANS += X509_CRL_get0_by_serial.3
dist_man3_MANS += X509_CRL_new.3
dist_man3_MANS += X509_EXTENSION_set_object.3

dist_man3_MANS += X509_LOOKUP_hash_dir.3
dist_man3_MANS += X509_NAME_ENTRY_get_object.3
dist_man3_MANS += X509_NAME_add_entry_by_txt.3
dist_man3_MANS += X509_NAME_get_index_by_NID.3
dist_man3_MANS += X509_NAME_new.3
dist_man3_MANS += X509_NAME_print_ex.3
dist_man3_MANS += X509_OBJECT_get0_X509.3







>

>
















>







356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
dist_man3_MANS += RSA_private_encrypt.3
dist_man3_MANS += RSA_public_encrypt.3
dist_man3_MANS += RSA_set_method.3
dist_man3_MANS += RSA_sign.3
dist_man3_MANS += RSA_sign_ASN1_OCTET_STRING.3
dist_man3_MANS += RSA_size.3
dist_man3_MANS += SHA1.3
dist_man3_MANS += SMIME_read_CMS.3
dist_man3_MANS += SMIME_read_PKCS7.3
dist_man3_MANS += SMIME_write_CMS.3
dist_man3_MANS += SMIME_write_PKCS7.3
dist_man3_MANS += STACK_OF.3
dist_man3_MANS += SXNET_new.3
dist_man3_MANS += TS_REQ_new.3
dist_man3_MANS += UI_UTIL_read_pw.3
dist_man3_MANS += UI_create_method.3
dist_man3_MANS += UI_get_string_type.3
dist_man3_MANS += UI_new.3
dist_man3_MANS += X25519.3
dist_man3_MANS += X509V3_get_d2i.3
dist_man3_MANS += X509_ALGOR_dup.3
dist_man3_MANS += X509_ATTRIBUTE_new.3
dist_man3_MANS += X509_CINF_new.3
dist_man3_MANS += X509_CRL_get0_by_serial.3
dist_man3_MANS += X509_CRL_new.3
dist_man3_MANS += X509_EXTENSION_set_object.3
dist_man3_MANS += X509_INFO_new.3
dist_man3_MANS += X509_LOOKUP_hash_dir.3
dist_man3_MANS += X509_NAME_ENTRY_get_object.3
dist_man3_MANS += X509_NAME_add_entry_by_txt.3
dist_man3_MANS += X509_NAME_get_index_by_NID.3
dist_man3_MANS += X509_NAME_new.3
dist_man3_MANS += X509_NAME_print_ex.3
dist_man3_MANS += X509_OBJECT_get0_X509.3
371
372
373
374
375
376
377


378
379
380
381

382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397

398
399
400
401
402
403
404
dist_man3_MANS += X509_STORE_set1_param.3
dist_man3_MANS += X509_STORE_set_verify_cb_func.3
dist_man3_MANS += X509_VERIFY_PARAM_set_flags.3
dist_man3_MANS += X509_check_ca.3
dist_man3_MANS += X509_check_host.3
dist_man3_MANS += X509_check_issued.3
dist_man3_MANS += X509_check_private_key.3


dist_man3_MANS += X509_cmp_time.3
dist_man3_MANS += X509_digest.3
dist_man3_MANS += X509_get0_notBefore.3
dist_man3_MANS += X509_get0_signature.3

dist_man3_MANS += X509_get_pubkey.3
dist_man3_MANS += X509_get_serialNumber.3
dist_man3_MANS += X509_get_subject_name.3
dist_man3_MANS += X509_get_version.3
dist_man3_MANS += X509_new.3
dist_man3_MANS += X509_sign.3
dist_man3_MANS += X509_verify_cert.3
dist_man3_MANS += X509v3_get_ext_by_NID.3
dist_man3_MANS += bn_dump.3
dist_man3_MANS += crypto.3
dist_man3_MANS += d2i_ASN1_NULL.3
dist_man3_MANS += d2i_ASN1_OBJECT.3
dist_man3_MANS += d2i_ASN1_OCTET_STRING.3
dist_man3_MANS += d2i_ASN1_SEQUENCE_ANY.3
dist_man3_MANS += d2i_AUTHORITY_KEYID.3
dist_man3_MANS += d2i_BASIC_CONSTRAINTS.3

dist_man3_MANS += d2i_DHparams.3
dist_man3_MANS += d2i_DIST_POINT.3
dist_man3_MANS += d2i_DSAPublicKey.3
dist_man3_MANS += d2i_ECPKParameters.3
dist_man3_MANS += d2i_ESS_SIGNING_CERT.3
dist_man3_MANS += d2i_GENERAL_NAME.3
dist_man3_MANS += d2i_OCSP_REQUEST.3







>
>




>
















>







400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
dist_man3_MANS += X509_STORE_set1_param.3
dist_man3_MANS += X509_STORE_set_verify_cb_func.3
dist_man3_MANS += X509_VERIFY_PARAM_set_flags.3
dist_man3_MANS += X509_check_ca.3
dist_man3_MANS += X509_check_host.3
dist_man3_MANS += X509_check_issued.3
dist_man3_MANS += X509_check_private_key.3
dist_man3_MANS += X509_check_purpose.3
dist_man3_MANS += X509_cmp.3
dist_man3_MANS += X509_cmp_time.3
dist_man3_MANS += X509_digest.3
dist_man3_MANS += X509_get0_notBefore.3
dist_man3_MANS += X509_get0_signature.3
dist_man3_MANS += X509_get1_email.3
dist_man3_MANS += X509_get_pubkey.3
dist_man3_MANS += X509_get_serialNumber.3
dist_man3_MANS += X509_get_subject_name.3
dist_man3_MANS += X509_get_version.3
dist_man3_MANS += X509_new.3
dist_man3_MANS += X509_sign.3
dist_man3_MANS += X509_verify_cert.3
dist_man3_MANS += X509v3_get_ext_by_NID.3
dist_man3_MANS += bn_dump.3
dist_man3_MANS += crypto.3
dist_man3_MANS += d2i_ASN1_NULL.3
dist_man3_MANS += d2i_ASN1_OBJECT.3
dist_man3_MANS += d2i_ASN1_OCTET_STRING.3
dist_man3_MANS += d2i_ASN1_SEQUENCE_ANY.3
dist_man3_MANS += d2i_AUTHORITY_KEYID.3
dist_man3_MANS += d2i_BASIC_CONSTRAINTS.3
dist_man3_MANS += d2i_CMS_ContentInfo.3
dist_man3_MANS += d2i_DHparams.3
dist_man3_MANS += d2i_DIST_POINT.3
dist_man3_MANS += d2i_DSAPublicKey.3
dist_man3_MANS += d2i_ECPKParameters.3
dist_man3_MANS += d2i_ESS_SIGNING_CERT.3
dist_man3_MANS += d2i_GENERAL_NAME.3
dist_man3_MANS += d2i_OCSP_REQUEST.3
420
421
422
423
424
425
426

427
428
429
430
431
432
433
dist_man3_MANS += d2i_X509_EXTENSION.3
dist_man3_MANS += d2i_X509_NAME.3
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 += i2d_PKCS7_bio_stream.3
dist_man3_MANS += lh_new.3
dist_man3_MANS += lh_stats.3
dist_man3_MANS += tls_accept_socket.3
dist_man3_MANS += tls_client.3
dist_man3_MANS += tls_config_ocsp_require_stapling.3
dist_man3_MANS += tls_config_set_protocols.3







>







453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
dist_man3_MANS += d2i_X509_EXTENSION.3
dist_man3_MANS += d2i_X509_NAME.3
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 += i2d_CMS_bio_stream.3
dist_man3_MANS += i2d_PKCS7_bio_stream.3
dist_man3_MANS += lh_new.3
dist_man3_MANS += lh_stats.3
dist_man3_MANS += tls_accept_socket.3
dist_man3_MANS += tls_client.3
dist_man3_MANS += tls_config_ocsp_require_stapling.3
dist_man3_MANS += tls_config_set_protocols.3
441
442
443
444
445
446
447




448
449
450
451
452
453
454

455
456
457



458
459
460
461
462
463
464
dist_man3_MANS += tls_read.3
dist_man5_MANS += openssl.cnf.5
dist_man5_MANS += x509v3.cnf.5
install-data-hook:
	ln -sf "ACCESS_DESCRIPTION_new.3" "$(DESTDIR)$(mandir)/man3/ACCESS_DESCRIPTION_free.3"
	ln -sf "ACCESS_DESCRIPTION_new.3" "$(DESTDIR)$(mandir)/man3/AUTHORITY_INFO_ACCESS_free.3"
	ln -sf "ACCESS_DESCRIPTION_new.3" "$(DESTDIR)$(mandir)/man3/AUTHORITY_INFO_ACCESS_new.3"




	ln -sf "ASN1_INTEGER_get.3" "$(DESTDIR)$(mandir)/man3/ASN1_ENUMERATED_get.3"
	ln -sf "ASN1_INTEGER_get.3" "$(DESTDIR)$(mandir)/man3/ASN1_ENUMERATED_set.3"
	ln -sf "ASN1_INTEGER_get.3" "$(DESTDIR)$(mandir)/man3/ASN1_ENUMERATED_to_BN.3"
	ln -sf "ASN1_INTEGER_get.3" "$(DESTDIR)$(mandir)/man3/ASN1_INTEGER_set.3"
	ln -sf "ASN1_INTEGER_get.3" "$(DESTDIR)$(mandir)/man3/ASN1_INTEGER_to_BN.3"
	ln -sf "ASN1_INTEGER_get.3" "$(DESTDIR)$(mandir)/man3/BN_to_ASN1_ENUMERATED.3"
	ln -sf "ASN1_INTEGER_get.3" "$(DESTDIR)$(mandir)/man3/BN_to_ASN1_INTEGER.3"

	ln -sf "ASN1_OBJECT_new.3" "$(DESTDIR)$(mandir)/man3/ASN1_OBJECT_free.3"
	ln -sf "ASN1_STRING_TABLE_add.3" "$(DESTDIR)$(mandir)/man3/ASN1_STRING_TABLE_cleanup.3"
	ln -sf "ASN1_STRING_TABLE_add.3" "$(DESTDIR)$(mandir)/man3/ASN1_STRING_TABLE_get.3"



	ln -sf "ASN1_STRING_length.3" "$(DESTDIR)$(mandir)/man3/ASN1_STRING_cmp.3"
	ln -sf "ASN1_STRING_length.3" "$(DESTDIR)$(mandir)/man3/ASN1_STRING_data.3"
	ln -sf "ASN1_STRING_length.3" "$(DESTDIR)$(mandir)/man3/ASN1_STRING_dup.3"
	ln -sf "ASN1_STRING_length.3" "$(DESTDIR)$(mandir)/man3/ASN1_STRING_get0_data.3"
	ln -sf "ASN1_STRING_length.3" "$(DESTDIR)$(mandir)/man3/ASN1_STRING_length_set.3"
	ln -sf "ASN1_STRING_length.3" "$(DESTDIR)$(mandir)/man3/ASN1_STRING_set.3"
	ln -sf "ASN1_STRING_length.3" "$(DESTDIR)$(mandir)/man3/ASN1_STRING_to_UTF8.3"







>
>
>
>







>



>
>
>







475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
dist_man3_MANS += tls_read.3
dist_man5_MANS += openssl.cnf.5
dist_man5_MANS += x509v3.cnf.5
install-data-hook:
	ln -sf "ACCESS_DESCRIPTION_new.3" "$(DESTDIR)$(mandir)/man3/ACCESS_DESCRIPTION_free.3"
	ln -sf "ACCESS_DESCRIPTION_new.3" "$(DESTDIR)$(mandir)/man3/AUTHORITY_INFO_ACCESS_free.3"
	ln -sf "ACCESS_DESCRIPTION_new.3" "$(DESTDIR)$(mandir)/man3/AUTHORITY_INFO_ACCESS_new.3"
	ln -sf "AES_encrypt.3" "$(DESTDIR)$(mandir)/man3/AES_cbc_encrypt.3"
	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_INTEGER_get.3" "$(DESTDIR)$(mandir)/man3/ASN1_ENUMERATED_get.3"
	ln -sf "ASN1_INTEGER_get.3" "$(DESTDIR)$(mandir)/man3/ASN1_ENUMERATED_set.3"
	ln -sf "ASN1_INTEGER_get.3" "$(DESTDIR)$(mandir)/man3/ASN1_ENUMERATED_to_BN.3"
	ln -sf "ASN1_INTEGER_get.3" "$(DESTDIR)$(mandir)/man3/ASN1_INTEGER_set.3"
	ln -sf "ASN1_INTEGER_get.3" "$(DESTDIR)$(mandir)/man3/ASN1_INTEGER_to_BN.3"
	ln -sf "ASN1_INTEGER_get.3" "$(DESTDIR)$(mandir)/man3/BN_to_ASN1_ENUMERATED.3"
	ln -sf "ASN1_INTEGER_get.3" "$(DESTDIR)$(mandir)/man3/BN_to_ASN1_INTEGER.3"
	ln -sf "ASN1_INTEGER_get.3" "$(DESTDIR)$(mandir)/man3/i2a_ASN1_INTEGER.3"
	ln -sf "ASN1_OBJECT_new.3" "$(DESTDIR)$(mandir)/man3/ASN1_OBJECT_free.3"
	ln -sf "ASN1_STRING_TABLE_add.3" "$(DESTDIR)$(mandir)/man3/ASN1_STRING_TABLE_cleanup.3"
	ln -sf "ASN1_STRING_TABLE_add.3" "$(DESTDIR)$(mandir)/man3/ASN1_STRING_TABLE_get.3"
	ln -sf "ASN1_STRING_length.3" "$(DESTDIR)$(mandir)/man3/ASN1_OCTET_STRING_cmp.3"
	ln -sf "ASN1_STRING_length.3" "$(DESTDIR)$(mandir)/man3/ASN1_OCTET_STRING_dup.3"
	ln -sf "ASN1_STRING_length.3" "$(DESTDIR)$(mandir)/man3/ASN1_OCTET_STRING_set.3"
	ln -sf "ASN1_STRING_length.3" "$(DESTDIR)$(mandir)/man3/ASN1_STRING_cmp.3"
	ln -sf "ASN1_STRING_length.3" "$(DESTDIR)$(mandir)/man3/ASN1_STRING_data.3"
	ln -sf "ASN1_STRING_length.3" "$(DESTDIR)$(mandir)/man3/ASN1_STRING_dup.3"
	ln -sf "ASN1_STRING_length.3" "$(DESTDIR)$(mandir)/man3/ASN1_STRING_get0_data.3"
	ln -sf "ASN1_STRING_length.3" "$(DESTDIR)$(mandir)/man3/ASN1_STRING_length_set.3"
	ln -sf "ASN1_STRING_length.3" "$(DESTDIR)$(mandir)/man3/ASN1_STRING_set.3"
	ln -sf "ASN1_STRING_length.3" "$(DESTDIR)$(mandir)/man3/ASN1_STRING_to_UTF8.3"
532
533
534
535
536
537
538

539
540
541
542
543
544
545
	ln -sf "ASN1_item_d2i.3" "$(DESTDIR)$(mandir)/man3/ASN1_item_i2d.3"
	ln -sf "ASN1_item_d2i.3" "$(DESTDIR)$(mandir)/man3/ASN1_item_i2d_bio.3"
	ln -sf "ASN1_item_d2i.3" "$(DESTDIR)$(mandir)/man3/ASN1_item_i2d_fp.3"
	ln -sf "ASN1_item_d2i.3" "$(DESTDIR)$(mandir)/man3/ASN1_item_print.3"
	ln -sf "ASN1_item_d2i.3" "$(DESTDIR)$(mandir)/man3/d2i_ASN1_TYPE.3"
	ln -sf "ASN1_item_d2i.3" "$(DESTDIR)$(mandir)/man3/i2d_ASN1_TYPE.3"
	ln -sf "ASN1_item_new.3" "$(DESTDIR)$(mandir)/man3/ASN1_item_free.3"

	ln -sf "ASN1_time_parse.3" "$(DESTDIR)$(mandir)/man3/ASN1_TIME_set_tm.3"
	ln -sf "ASN1_time_parse.3" "$(DESTDIR)$(mandir)/man3/ASN1_time_tm_cmp.3"
	ln -sf "AUTHORITY_KEYID_new.3" "$(DESTDIR)$(mandir)/man3/AUTHORITY_KEYID_free.3"
	ln -sf "BASIC_CONSTRAINTS_new.3" "$(DESTDIR)$(mandir)/man3/BASIC_CONSTRAINTS_free.3"
	ln -sf "BF_set_key.3" "$(DESTDIR)$(mandir)/man3/BF_cbc_encrypt.3"
	ln -sf "BF_set_key.3" "$(DESTDIR)$(mandir)/man3/BF_cfb64_encrypt.3"
	ln -sf "BF_set_key.3" "$(DESTDIR)$(mandir)/man3/BF_decrypt.3"







>







574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
	ln -sf "ASN1_item_d2i.3" "$(DESTDIR)$(mandir)/man3/ASN1_item_i2d.3"
	ln -sf "ASN1_item_d2i.3" "$(DESTDIR)$(mandir)/man3/ASN1_item_i2d_bio.3"
	ln -sf "ASN1_item_d2i.3" "$(DESTDIR)$(mandir)/man3/ASN1_item_i2d_fp.3"
	ln -sf "ASN1_item_d2i.3" "$(DESTDIR)$(mandir)/man3/ASN1_item_print.3"
	ln -sf "ASN1_item_d2i.3" "$(DESTDIR)$(mandir)/man3/d2i_ASN1_TYPE.3"
	ln -sf "ASN1_item_d2i.3" "$(DESTDIR)$(mandir)/man3/i2d_ASN1_TYPE.3"
	ln -sf "ASN1_item_new.3" "$(DESTDIR)$(mandir)/man3/ASN1_item_free.3"
	ln -sf "ASN1_put_object.3" "$(DESTDIR)$(mandir)/man3/ASN1_put_eoc.3"
	ln -sf "ASN1_time_parse.3" "$(DESTDIR)$(mandir)/man3/ASN1_TIME_set_tm.3"
	ln -sf "ASN1_time_parse.3" "$(DESTDIR)$(mandir)/man3/ASN1_time_tm_cmp.3"
	ln -sf "AUTHORITY_KEYID_new.3" "$(DESTDIR)$(mandir)/man3/AUTHORITY_KEYID_free.3"
	ln -sf "BASIC_CONSTRAINTS_new.3" "$(DESTDIR)$(mandir)/man3/BASIC_CONSTRAINTS_free.3"
	ln -sf "BF_set_key.3" "$(DESTDIR)$(mandir)/man3/BF_cbc_encrypt.3"
	ln -sf "BF_set_key.3" "$(DESTDIR)$(mandir)/man3/BF_cfb64_encrypt.3"
	ln -sf "BF_set_key.3" "$(DESTDIR)$(mandir)/man3/BF_decrypt.3"
597
598
599
600
601
602
603



604
605
606
607
608
609
610
	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/ENGINE_get_ex_data.3"
	ln -sf "BIO_get_ex_new_index.3" "$(DESTDIR)$(mandir)/man3/ENGINE_get_ex_new_index.3"
	ln -sf "BIO_get_ex_new_index.3" "$(DESTDIR)$(mandir)/man3/ENGINE_set_ex_data.3"
	ln -sf "BIO_get_ex_new_index.3" "$(DESTDIR)$(mandir)/man3/TYPE_get_ex_data.3"
	ln -sf "BIO_get_ex_new_index.3" "$(DESTDIR)$(mandir)/man3/TYPE_get_ex_new_index.3"
	ln -sf "BIO_get_ex_new_index.3" "$(DESTDIR)$(mandir)/man3/TYPE_set_ex_data.3"
	ln -sf "BIO_get_ex_new_index.3" "$(DESTDIR)$(mandir)/man3/UI_get_ex_data.3"







>
>
>







640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
	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"
	ln -sf "BIO_get_ex_new_index.3" "$(DESTDIR)$(mandir)/man3/ENGINE_get_ex_data.3"
	ln -sf "BIO_get_ex_new_index.3" "$(DESTDIR)$(mandir)/man3/ENGINE_get_ex_new_index.3"
	ln -sf "BIO_get_ex_new_index.3" "$(DESTDIR)$(mandir)/man3/ENGINE_set_ex_data.3"
	ln -sf "BIO_get_ex_new_index.3" "$(DESTDIR)$(mandir)/man3/TYPE_get_ex_data.3"
	ln -sf "BIO_get_ex_new_index.3" "$(DESTDIR)$(mandir)/man3/TYPE_get_ex_new_index.3"
	ln -sf "BIO_get_ex_new_index.3" "$(DESTDIR)$(mandir)/man3/TYPE_set_ex_data.3"
	ln -sf "BIO_get_ex_new_index.3" "$(DESTDIR)$(mandir)/man3/UI_get_ex_data.3"
801
802
803
804
805
806
807

































808
809
810
811
812
813
814
	ln -sf "BN_zero.3" "$(DESTDIR)$(mandir)/man3/BN_set_word.3"
	ln -sf "BN_zero.3" "$(DESTDIR)$(mandir)/man3/BN_value_one.3"
	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 "CONF_modules_free.3" "$(DESTDIR)$(mandir)/man3/CONF_modules_finish.3"
	ln -sf "CONF_modules_free.3" "$(DESTDIR)$(mandir)/man3/CONF_modules_unload.3"
	ln -sf "CONF_modules_load_file.3" "$(DESTDIR)$(mandir)/man3/CONF_modules_load.3"
	ln -sf "CRYPTO_get_mem_functions.3" "$(DESTDIR)$(mandir)/man3/CRYPTO_MEM_LEAK_CB.3"
	ln -sf "CRYPTO_get_mem_functions.3" "$(DESTDIR)$(mandir)/man3/CRYPTO_mem_ctrl.3"
	ln -sf "CRYPTO_get_mem_functions.3" "$(DESTDIR)$(mandir)/man3/CRYPTO_mem_leaks.3"
	ln -sf "CRYPTO_get_mem_functions.3" "$(DESTDIR)$(mandir)/man3/CRYPTO_mem_leaks_cb.3"







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
	ln -sf "BN_zero.3" "$(DESTDIR)$(mandir)/man3/BN_set_word.3"
	ln -sf "BN_zero.3" "$(DESTDIR)$(mandir)/man3/BN_value_one.3"
	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 "CMS_ContentInfo_new.3" "$(DESTDIR)$(mandir)/man3/CMS_ContentInfo_free.3"
	ln -sf "CMS_ContentInfo_new.3" "$(DESTDIR)$(mandir)/man3/CMS_ContentInfo_print_ctx.3"
	ln -sf "CMS_ContentInfo_new.3" "$(DESTDIR)$(mandir)/man3/CMS_ReceiptRequest_free.3"
	ln -sf "CMS_ContentInfo_new.3" "$(DESTDIR)$(mandir)/man3/CMS_ReceiptRequest_new.3"
	ln -sf "CMS_add0_cert.3" "$(DESTDIR)$(mandir)/man3/CMS_add0_crl.3"
	ln -sf "CMS_add0_cert.3" "$(DESTDIR)$(mandir)/man3/CMS_add1_cert.3"
	ln -sf "CMS_add0_cert.3" "$(DESTDIR)$(mandir)/man3/CMS_add1_crl.3"
	ln -sf "CMS_add0_cert.3" "$(DESTDIR)$(mandir)/man3/CMS_get1_certs.3"
	ln -sf "CMS_add0_cert.3" "$(DESTDIR)$(mandir)/man3/CMS_get1_crls.3"
	ln -sf "CMS_add1_recipient_cert.3" "$(DESTDIR)$(mandir)/man3/CMS_add0_recipient_key.3"
	ln -sf "CMS_add1_signer.3" "$(DESTDIR)$(mandir)/man3/CMS_SignerInfo_sign.3"
	ln -sf "CMS_decrypt.3" "$(DESTDIR)$(mandir)/man3/CMS_decrypt_set1_key.3"
	ln -sf "CMS_decrypt.3" "$(DESTDIR)$(mandir)/man3/CMS_decrypt_set1_pkey.3"
	ln -sf "CMS_get0_RecipientInfos.3" "$(DESTDIR)$(mandir)/man3/CMS_RecipientInfo_decrypt.3"
	ln -sf "CMS_get0_RecipientInfos.3" "$(DESTDIR)$(mandir)/man3/CMS_RecipientInfo_encrypt.3"
	ln -sf "CMS_get0_RecipientInfos.3" "$(DESTDIR)$(mandir)/man3/CMS_RecipientInfo_kekri_get0_id.3"
	ln -sf "CMS_get0_RecipientInfos.3" "$(DESTDIR)$(mandir)/man3/CMS_RecipientInfo_kekri_id_cmp.3"
	ln -sf "CMS_get0_RecipientInfos.3" "$(DESTDIR)$(mandir)/man3/CMS_RecipientInfo_ktri_cert_cmp.3"
	ln -sf "CMS_get0_RecipientInfos.3" "$(DESTDIR)$(mandir)/man3/CMS_RecipientInfo_ktri_get0_signer_id.3"
	ln -sf "CMS_get0_RecipientInfos.3" "$(DESTDIR)$(mandir)/man3/CMS_RecipientInfo_set0_key.3"
	ln -sf "CMS_get0_RecipientInfos.3" "$(DESTDIR)$(mandir)/man3/CMS_RecipientInfo_set0_pkey.3"
	ln -sf "CMS_get0_RecipientInfos.3" "$(DESTDIR)$(mandir)/man3/CMS_RecipientInfo_type.3"
	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_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_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"
	ln -sf "CMS_get1_ReceiptRequest.3" "$(DESTDIR)$(mandir)/man3/CMS_add1_ReceiptRequest.3"
	ln -sf "CMS_verify.3" "$(DESTDIR)$(mandir)/man3/CMS_get0_signers.3"
	ln -sf "CONF_modules_free.3" "$(DESTDIR)$(mandir)/man3/CONF_modules_finish.3"
	ln -sf "CONF_modules_free.3" "$(DESTDIR)$(mandir)/man3/CONF_modules_unload.3"
	ln -sf "CONF_modules_load_file.3" "$(DESTDIR)$(mandir)/man3/CONF_modules_load.3"
	ln -sf "CRYPTO_get_mem_functions.3" "$(DESTDIR)$(mandir)/man3/CRYPTO_MEM_LEAK_CB.3"
	ln -sf "CRYPTO_get_mem_functions.3" "$(DESTDIR)$(mandir)/man3/CRYPTO_mem_ctrl.3"
	ln -sf "CRYPTO_get_mem_functions.3" "$(DESTDIR)$(mandir)/man3/CRYPTO_mem_leaks.3"
	ln -sf "CRYPTO_get_mem_functions.3" "$(DESTDIR)$(mandir)/man3/CRYPTO_mem_leaks_cb.3"
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
	ln -sf "CRYPTO_set_ex_data.3" "$(DESTDIR)$(mandir)/man3/CRYPTO_EX_dup.3"
	ln -sf "CRYPTO_set_ex_data.3" "$(DESTDIR)$(mandir)/man3/CRYPTO_EX_free.3"
	ln -sf "CRYPTO_set_ex_data.3" "$(DESTDIR)$(mandir)/man3/CRYPTO_EX_new.3"
	ln -sf "CRYPTO_set_ex_data.3" "$(DESTDIR)$(mandir)/man3/CRYPTO_free_ex_data.3"
	ln -sf "CRYPTO_set_ex_data.3" "$(DESTDIR)$(mandir)/man3/CRYPTO_get_ex_data.3"
	ln -sf "CRYPTO_set_ex_data.3" "$(DESTDIR)$(mandir)/man3/CRYPTO_get_ex_new_index.3"
	ln -sf "CRYPTO_set_ex_data.3" "$(DESTDIR)$(mandir)/man3/CRYPTO_new_ex_data.3"
	ln -sf "CRYPTO_set_locking_callback.3" "$(DESTDIR)$(mandir)/man3/CRYPTO_THREADID_cmp.3"
	ln -sf "CRYPTO_set_locking_callback.3" "$(DESTDIR)$(mandir)/man3/CRYPTO_THREADID_cpy.3"
	ln -sf "CRYPTO_set_locking_callback.3" "$(DESTDIR)$(mandir)/man3/CRYPTO_THREADID_current.3"
	ln -sf "CRYPTO_set_locking_callback.3" "$(DESTDIR)$(mandir)/man3/CRYPTO_THREADID_get_callback.3"
	ln -sf "CRYPTO_set_locking_callback.3" "$(DESTDIR)$(mandir)/man3/CRYPTO_THREADID_hash.3"
	ln -sf "CRYPTO_set_locking_callback.3" "$(DESTDIR)$(mandir)/man3/CRYPTO_THREADID_set_callback.3"
	ln -sf "CRYPTO_set_locking_callback.3" "$(DESTDIR)$(mandir)/man3/CRYPTO_THREADID_set_numeric.3"
	ln -sf "CRYPTO_set_locking_callback.3" "$(DESTDIR)$(mandir)/man3/CRYPTO_THREADID_set_pointer.3"
	ln -sf "CRYPTO_set_locking_callback.3" "$(DESTDIR)$(mandir)/man3/CRYPTO_add.3"
	ln -sf "CRYPTO_set_locking_callback.3" "$(DESTDIR)$(mandir)/man3/CRYPTO_destroy_dynlockid.3"
	ln -sf "CRYPTO_set_locking_callback.3" "$(DESTDIR)$(mandir)/man3/CRYPTO_get_new_dynlockid.3"
	ln -sf "CRYPTO_set_locking_callback.3" "$(DESTDIR)$(mandir)/man3/CRYPTO_lock.3"
	ln -sf "CRYPTO_set_locking_callback.3" "$(DESTDIR)$(mandir)/man3/CRYPTO_num_locks.3"
	ln -sf "CRYPTO_set_locking_callback.3" "$(DESTDIR)$(mandir)/man3/CRYPTO_r_lock.3"
	ln -sf "CRYPTO_set_locking_callback.3" "$(DESTDIR)$(mandir)/man3/CRYPTO_r_unlock.3"
	ln -sf "CRYPTO_set_locking_callback.3" "$(DESTDIR)$(mandir)/man3/CRYPTO_set_dynlock_create_callback.3"
	ln -sf "CRYPTO_set_locking_callback.3" "$(DESTDIR)$(mandir)/man3/CRYPTO_set_dynlock_destroy_callback.3"
	ln -sf "CRYPTO_set_locking_callback.3" "$(DESTDIR)$(mandir)/man3/CRYPTO_set_dynlock_lock_callback.3"
	ln -sf "CRYPTO_set_locking_callback.3" "$(DESTDIR)$(mandir)/man3/CRYPTO_w_lock.3"
	ln -sf "CRYPTO_set_locking_callback.3" "$(DESTDIR)$(mandir)/man3/CRYPTO_w_unlock.3"
	ln -sf "DES_set_key.3" "$(DESTDIR)$(mandir)/man3/DES_cbc_cksum.3"
	ln -sf "DES_set_key.3" "$(DESTDIR)$(mandir)/man3/DES_cfb64_encrypt.3"
	ln -sf "DES_set_key.3" "$(DESTDIR)$(mandir)/man3/DES_cfb_encrypt.3"
	ln -sf "DES_set_key.3" "$(DESTDIR)$(mandir)/man3/DES_crypt.3"
	ln -sf "DES_set_key.3" "$(DESTDIR)$(mandir)/man3/DES_ecb2_encrypt.3"
	ln -sf "DES_set_key.3" "$(DESTDIR)$(mandir)/man3/DES_ecb3_encrypt.3"
	ln -sf "DES_set_key.3" "$(DESTDIR)$(mandir)/man3/DES_ecb_encrypt.3"







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







905
906
907
908
909
910
911




















912
913
914
915
916
917
918
	ln -sf "CRYPTO_set_ex_data.3" "$(DESTDIR)$(mandir)/man3/CRYPTO_EX_dup.3"
	ln -sf "CRYPTO_set_ex_data.3" "$(DESTDIR)$(mandir)/man3/CRYPTO_EX_free.3"
	ln -sf "CRYPTO_set_ex_data.3" "$(DESTDIR)$(mandir)/man3/CRYPTO_EX_new.3"
	ln -sf "CRYPTO_set_ex_data.3" "$(DESTDIR)$(mandir)/man3/CRYPTO_free_ex_data.3"
	ln -sf "CRYPTO_set_ex_data.3" "$(DESTDIR)$(mandir)/man3/CRYPTO_get_ex_data.3"
	ln -sf "CRYPTO_set_ex_data.3" "$(DESTDIR)$(mandir)/man3/CRYPTO_get_ex_new_index.3"
	ln -sf "CRYPTO_set_ex_data.3" "$(DESTDIR)$(mandir)/man3/CRYPTO_new_ex_data.3"




















	ln -sf "DES_set_key.3" "$(DESTDIR)$(mandir)/man3/DES_cbc_cksum.3"
	ln -sf "DES_set_key.3" "$(DESTDIR)$(mandir)/man3/DES_cfb64_encrypt.3"
	ln -sf "DES_set_key.3" "$(DESTDIR)$(mandir)/man3/DES_cfb_encrypt.3"
	ln -sf "DES_set_key.3" "$(DESTDIR)$(mandir)/man3/DES_crypt.3"
	ln -sf "DES_set_key.3" "$(DESTDIR)$(mandir)/man3/DES_ecb2_encrypt.3"
	ln -sf "DES_set_key.3" "$(DESTDIR)$(mandir)/man3/DES_ecb3_encrypt.3"
	ln -sf "DES_set_key.3" "$(DESTDIR)$(mandir)/man3/DES_ecb_encrypt.3"
930
931
932
933
934
935
936

937
938
939
940
941
942
943
	ln -sf "DSA_new.3" "$(DESTDIR)$(mandir)/man3/DSA_up_ref.3"
	ln -sf "DSA_set_method.3" "$(DESTDIR)$(mandir)/man3/DSA_OpenSSL.3"
	ln -sf "DSA_set_method.3" "$(DESTDIR)$(mandir)/man3/DSA_get_default_method.3"
	ln -sf "DSA_set_method.3" "$(DESTDIR)$(mandir)/man3/DSA_new_method.3"
	ln -sf "DSA_set_method.3" "$(DESTDIR)$(mandir)/man3/DSA_set_default_method.3"
	ln -sf "DSA_sign.3" "$(DESTDIR)$(mandir)/man3/DSA_sign_setup.3"
	ln -sf "DSA_sign.3" "$(DESTDIR)$(mandir)/man3/DSA_verify.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_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"







>







989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
	ln -sf "DSA_new.3" "$(DESTDIR)$(mandir)/man3/DSA_up_ref.3"
	ln -sf "DSA_set_method.3" "$(DESTDIR)$(mandir)/man3/DSA_OpenSSL.3"
	ln -sf "DSA_set_method.3" "$(DESTDIR)$(mandir)/man3/DSA_get_default_method.3"
	ln -sf "DSA_set_method.3" "$(DESTDIR)$(mandir)/man3/DSA_new_method.3"
	ln -sf "DSA_set_method.3" "$(DESTDIR)$(mandir)/man3/DSA_set_default_method.3"
	ln -sf "DSA_sign.3" "$(DESTDIR)$(mandir)/man3/DSA_sign_setup.3"
	ln -sf "DSA_sign.3" "$(DESTDIR)$(mandir)/man3/DSA_verify.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_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"
986
987
988
989
990
991
992

















993
994
995
996
997
998
999
	ln -sf "EC_GROUP_new.3" "$(DESTDIR)$(mandir)/man3/EC_GROUP_get_curve_GFp.3"
	ln -sf "EC_GROUP_new.3" "$(DESTDIR)$(mandir)/man3/EC_GROUP_new_by_curve_name.3"
	ln -sf "EC_GROUP_new.3" "$(DESTDIR)$(mandir)/man3/EC_GROUP_new_curve_GF2m.3"
	ln -sf "EC_GROUP_new.3" "$(DESTDIR)$(mandir)/man3/EC_GROUP_new_curve_GFp.3"
	ln -sf "EC_GROUP_new.3" "$(DESTDIR)$(mandir)/man3/EC_GROUP_set_curve_GF2m.3"
	ln -sf "EC_GROUP_new.3" "$(DESTDIR)$(mandir)/man3/EC_GROUP_set_curve_GFp.3"
	ln -sf "EC_GROUP_new.3" "$(DESTDIR)$(mandir)/man3/EC_get_builtin_curves.3"

















	ln -sf "EC_KEY_new.3" "$(DESTDIR)$(mandir)/man3/EC_KEY_check_key.3"
	ln -sf "EC_KEY_new.3" "$(DESTDIR)$(mandir)/man3/EC_KEY_clear_flags.3"
	ln -sf "EC_KEY_new.3" "$(DESTDIR)$(mandir)/man3/EC_KEY_copy.3"
	ln -sf "EC_KEY_new.3" "$(DESTDIR)$(mandir)/man3/EC_KEY_dup.3"
	ln -sf "EC_KEY_new.3" "$(DESTDIR)$(mandir)/man3/EC_KEY_free.3"
	ln -sf "EC_KEY_new.3" "$(DESTDIR)$(mandir)/man3/EC_KEY_generate_key.3"
	ln -sf "EC_KEY_new.3" "$(DESTDIR)$(mandir)/man3/EC_KEY_get0_group.3"







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
	ln -sf "EC_GROUP_new.3" "$(DESTDIR)$(mandir)/man3/EC_GROUP_get_curve_GFp.3"
	ln -sf "EC_GROUP_new.3" "$(DESTDIR)$(mandir)/man3/EC_GROUP_new_by_curve_name.3"
	ln -sf "EC_GROUP_new.3" "$(DESTDIR)$(mandir)/man3/EC_GROUP_new_curve_GF2m.3"
	ln -sf "EC_GROUP_new.3" "$(DESTDIR)$(mandir)/man3/EC_GROUP_new_curve_GFp.3"
	ln -sf "EC_GROUP_new.3" "$(DESTDIR)$(mandir)/man3/EC_GROUP_set_curve_GF2m.3"
	ln -sf "EC_GROUP_new.3" "$(DESTDIR)$(mandir)/man3/EC_GROUP_set_curve_GFp.3"
	ln -sf "EC_GROUP_new.3" "$(DESTDIR)$(mandir)/man3/EC_get_builtin_curves.3"
	ln -sf "EC_KEY_METHOD_new.3" "$(DESTDIR)$(mandir)/man3/EC_KEY_METHOD_free.3"
	ln -sf "EC_KEY_METHOD_new.3" "$(DESTDIR)$(mandir)/man3/EC_KEY_METHOD_get_compute_key.3"
	ln -sf "EC_KEY_METHOD_new.3" "$(DESTDIR)$(mandir)/man3/EC_KEY_METHOD_get_init.3"
	ln -sf "EC_KEY_METHOD_new.3" "$(DESTDIR)$(mandir)/man3/EC_KEY_METHOD_get_keygen.3"
	ln -sf "EC_KEY_METHOD_new.3" "$(DESTDIR)$(mandir)/man3/EC_KEY_METHOD_get_sign.3"
	ln -sf "EC_KEY_METHOD_new.3" "$(DESTDIR)$(mandir)/man3/EC_KEY_METHOD_get_verify.3"
	ln -sf "EC_KEY_METHOD_new.3" "$(DESTDIR)$(mandir)/man3/EC_KEY_METHOD_set_compute_key.3"
	ln -sf "EC_KEY_METHOD_new.3" "$(DESTDIR)$(mandir)/man3/EC_KEY_METHOD_set_init.3"
	ln -sf "EC_KEY_METHOD_new.3" "$(DESTDIR)$(mandir)/man3/EC_KEY_METHOD_set_keygen.3"
	ln -sf "EC_KEY_METHOD_new.3" "$(DESTDIR)$(mandir)/man3/EC_KEY_METHOD_set_sign.3"
	ln -sf "EC_KEY_METHOD_new.3" "$(DESTDIR)$(mandir)/man3/EC_KEY_METHOD_set_verify.3"
	ln -sf "EC_KEY_METHOD_new.3" "$(DESTDIR)$(mandir)/man3/EC_KEY_OpenSSL.3"
	ln -sf "EC_KEY_METHOD_new.3" "$(DESTDIR)$(mandir)/man3/EC_KEY_get_default_method.3"
	ln -sf "EC_KEY_METHOD_new.3" "$(DESTDIR)$(mandir)/man3/EC_KEY_get_method.3"
	ln -sf "EC_KEY_METHOD_new.3" "$(DESTDIR)$(mandir)/man3/EC_KEY_new_method.3"
	ln -sf "EC_KEY_METHOD_new.3" "$(DESTDIR)$(mandir)/man3/EC_KEY_set_default_method.3"
	ln -sf "EC_KEY_METHOD_new.3" "$(DESTDIR)$(mandir)/man3/EC_KEY_set_method.3"
	ln -sf "EC_KEY_new.3" "$(DESTDIR)$(mandir)/man3/EC_KEY_check_key.3"
	ln -sf "EC_KEY_new.3" "$(DESTDIR)$(mandir)/man3/EC_KEY_clear_flags.3"
	ln -sf "EC_KEY_new.3" "$(DESTDIR)$(mandir)/man3/EC_KEY_copy.3"
	ln -sf "EC_KEY_new.3" "$(DESTDIR)$(mandir)/man3/EC_KEY_dup.3"
	ln -sf "EC_KEY_new.3" "$(DESTDIR)$(mandir)/man3/EC_KEY_free.3"
	ln -sf "EC_KEY_new.3" "$(DESTDIR)$(mandir)/man3/EC_KEY_generate_key.3"
	ln -sf "EC_KEY_new.3" "$(DESTDIR)$(mandir)/man3/EC_KEY_get0_group.3"
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
	ln -sf "ERR_get_error.3" "$(DESTDIR)$(mandir)/man3/ERR_peek_error.3"
	ln -sf "ERR_get_error.3" "$(DESTDIR)$(mandir)/man3/ERR_peek_error_line.3"
	ln -sf "ERR_get_error.3" "$(DESTDIR)$(mandir)/man3/ERR_peek_error_line_data.3"
	ln -sf "ERR_get_error.3" "$(DESTDIR)$(mandir)/man3/ERR_peek_last_error.3"
	ln -sf "ERR_get_error.3" "$(DESTDIR)$(mandir)/man3/ERR_peek_last_error_line.3"
	ln -sf "ERR_get_error.3" "$(DESTDIR)$(mandir)/man3/ERR_peek_last_error_line_data.3"
	ln -sf "ERR_load_crypto_strings.3" "$(DESTDIR)$(mandir)/man3/ERR_free_strings.3"
	ln -sf "ERR_load_crypto_strings.3" "$(DESTDIR)$(mandir)/man3/ERR_load_BN_strings.3"
	ln -sf "ERR_load_crypto_strings.3" "$(DESTDIR)$(mandir)/man3/SSL_load_error_strings.3"
	ln -sf "ERR_load_strings.3" "$(DESTDIR)$(mandir)/man3/ERR_PACK.3"
	ln -sf "ERR_load_strings.3" "$(DESTDIR)$(mandir)/man3/ERR_get_next_error_library.3"
	ln -sf "ERR_print_errors.3" "$(DESTDIR)$(mandir)/man3/ERR_print_errors_cb.3"
	ln -sf "ERR_print_errors.3" "$(DESTDIR)$(mandir)/man3/ERR_print_errors_fp.3"
	ln -sf "ERR_put_error.3" "$(DESTDIR)$(mandir)/man3/ERR_add_error_data.3"
	ln -sf "ERR_put_error.3" "$(DESTDIR)$(mandir)/man3/ERR_add_error_vdata.3"







<







1235
1236
1237
1238
1239
1240
1241

1242
1243
1244
1245
1246
1247
1248
	ln -sf "ERR_get_error.3" "$(DESTDIR)$(mandir)/man3/ERR_peek_error.3"
	ln -sf "ERR_get_error.3" "$(DESTDIR)$(mandir)/man3/ERR_peek_error_line.3"
	ln -sf "ERR_get_error.3" "$(DESTDIR)$(mandir)/man3/ERR_peek_error_line_data.3"
	ln -sf "ERR_get_error.3" "$(DESTDIR)$(mandir)/man3/ERR_peek_last_error.3"
	ln -sf "ERR_get_error.3" "$(DESTDIR)$(mandir)/man3/ERR_peek_last_error_line.3"
	ln -sf "ERR_get_error.3" "$(DESTDIR)$(mandir)/man3/ERR_peek_last_error_line_data.3"
	ln -sf "ERR_load_crypto_strings.3" "$(DESTDIR)$(mandir)/man3/ERR_free_strings.3"

	ln -sf "ERR_load_crypto_strings.3" "$(DESTDIR)$(mandir)/man3/SSL_load_error_strings.3"
	ln -sf "ERR_load_strings.3" "$(DESTDIR)$(mandir)/man3/ERR_PACK.3"
	ln -sf "ERR_load_strings.3" "$(DESTDIR)$(mandir)/man3/ERR_get_next_error_library.3"
	ln -sf "ERR_print_errors.3" "$(DESTDIR)$(mandir)/man3/ERR_print_errors_cb.3"
	ln -sf "ERR_print_errors.3" "$(DESTDIR)$(mandir)/man3/ERR_print_errors_fp.3"
	ln -sf "ERR_put_error.3" "$(DESTDIR)$(mandir)/man3/ERR_add_error_data.3"
	ln -sf "ERR_put_error.3" "$(DESTDIR)$(mandir)/man3/ERR_add_error_vdata.3"
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
	ln -sf "EVP_AEAD_CTX_init.3" "$(DESTDIR)$(mandir)/man3/EVP_AEAD_CTX_seal.3"
	ln -sf "EVP_AEAD_CTX_init.3" "$(DESTDIR)$(mandir)/man3/EVP_AEAD_key_length.3"
	ln -sf "EVP_AEAD_CTX_init.3" "$(DESTDIR)$(mandir)/man3/EVP_AEAD_max_overhead.3"
	ln -sf "EVP_AEAD_CTX_init.3" "$(DESTDIR)$(mandir)/man3/EVP_AEAD_max_tag_len.3"
	ln -sf "EVP_AEAD_CTX_init.3" "$(DESTDIR)$(mandir)/man3/EVP_AEAD_nonce_length.3"
	ln -sf "EVP_AEAD_CTX_init.3" "$(DESTDIR)$(mandir)/man3/EVP_aead_aes_128_gcm.3"
	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"
	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_DigestInit.3" "$(DESTDIR)$(mandir)/man3/EVP_DigestFinal.3"
	ln -sf "EVP_DigestInit.3" "$(DESTDIR)$(mandir)/man3/EVP_DigestFinal_ex.3"
	ln -sf "EVP_DigestInit.3" "$(DESTDIR)$(mandir)/man3/EVP_DigestInit_ex.3"
	ln -sf "EVP_DigestInit.3" "$(DESTDIR)$(mandir)/man3/EVP_DigestUpdate.3"
	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"







|
|
|







1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
	ln -sf "EVP_AEAD_CTX_init.3" "$(DESTDIR)$(mandir)/man3/EVP_AEAD_CTX_seal.3"
	ln -sf "EVP_AEAD_CTX_init.3" "$(DESTDIR)$(mandir)/man3/EVP_AEAD_key_length.3"
	ln -sf "EVP_AEAD_CTX_init.3" "$(DESTDIR)$(mandir)/man3/EVP_AEAD_max_overhead.3"
	ln -sf "EVP_AEAD_CTX_init.3" "$(DESTDIR)$(mandir)/man3/EVP_AEAD_max_tag_len.3"
	ln -sf "EVP_AEAD_CTX_init.3" "$(DESTDIR)$(mandir)/man3/EVP_AEAD_nonce_length.3"
	ln -sf "EVP_AEAD_CTX_init.3" "$(DESTDIR)$(mandir)/man3/EVP_aead_aes_128_gcm.3"
	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_DigestInit.3" "$(DESTDIR)$(mandir)/man3/EVP_Digest.3"
	ln -sf "EVP_DigestInit.3" "$(DESTDIR)$(mandir)/man3/EVP_DigestFinal.3"
	ln -sf "EVP_DigestInit.3" "$(DESTDIR)$(mandir)/man3/EVP_DigestFinal_ex.3"
	ln -sf "EVP_DigestInit.3" "$(DESTDIR)$(mandir)/man3/EVP_DigestInit_ex.3"
	ln -sf "EVP_DigestInit.3" "$(DESTDIR)$(mandir)/man3/EVP_DigestUpdate.3"
	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"
1268
1269
1270
1271
1272
1273
1274

1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290

1291
1292
1293
1294

1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316

1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333

1334
1335
1336
1337
1338
1339
1340
	ln -sf "EVP_EncryptInit.3" "$(DESTDIR)$(mandir)/man3/EVP_CIPHER_flags.3"
	ln -sf "EVP_EncryptInit.3" "$(DESTDIR)$(mandir)/man3/EVP_CIPHER_iv_length.3"
	ln -sf "EVP_EncryptInit.3" "$(DESTDIR)$(mandir)/man3/EVP_CIPHER_key_length.3"
	ln -sf "EVP_EncryptInit.3" "$(DESTDIR)$(mandir)/man3/EVP_CIPHER_mode.3"
	ln -sf "EVP_EncryptInit.3" "$(DESTDIR)$(mandir)/man3/EVP_CIPHER_nid.3"
	ln -sf "EVP_EncryptInit.3" "$(DESTDIR)$(mandir)/man3/EVP_CIPHER_param_to_asn1.3"
	ln -sf "EVP_EncryptInit.3" "$(DESTDIR)$(mandir)/man3/EVP_CIPHER_type.3"

	ln -sf "EVP_EncryptInit.3" "$(DESTDIR)$(mandir)/man3/EVP_CipherFinal.3"
	ln -sf "EVP_EncryptInit.3" "$(DESTDIR)$(mandir)/man3/EVP_CipherFinal_ex.3"
	ln -sf "EVP_EncryptInit.3" "$(DESTDIR)$(mandir)/man3/EVP_CipherInit.3"
	ln -sf "EVP_EncryptInit.3" "$(DESTDIR)$(mandir)/man3/EVP_CipherInit_ex.3"
	ln -sf "EVP_EncryptInit.3" "$(DESTDIR)$(mandir)/man3/EVP_CipherUpdate.3"
	ln -sf "EVP_EncryptInit.3" "$(DESTDIR)$(mandir)/man3/EVP_DecryptFinal.3"
	ln -sf "EVP_EncryptInit.3" "$(DESTDIR)$(mandir)/man3/EVP_DecryptFinal_ex.3"
	ln -sf "EVP_EncryptInit.3" "$(DESTDIR)$(mandir)/man3/EVP_DecryptInit.3"
	ln -sf "EVP_EncryptInit.3" "$(DESTDIR)$(mandir)/man3/EVP_DecryptInit_ex.3"
	ln -sf "EVP_EncryptInit.3" "$(DESTDIR)$(mandir)/man3/EVP_DecryptUpdate.3"
	ln -sf "EVP_EncryptInit.3" "$(DESTDIR)$(mandir)/man3/EVP_EncryptFinal.3"
	ln -sf "EVP_EncryptInit.3" "$(DESTDIR)$(mandir)/man3/EVP_EncryptFinal_ex.3"
	ln -sf "EVP_EncryptInit.3" "$(DESTDIR)$(mandir)/man3/EVP_EncryptInit_ex.3"
	ln -sf "EVP_EncryptInit.3" "$(DESTDIR)$(mandir)/man3/EVP_EncryptUpdate.3"
	ln -sf "EVP_EncryptInit.3" "$(DESTDIR)$(mandir)/man3/EVP_bf_cbc.3"
	ln -sf "EVP_EncryptInit.3" "$(DESTDIR)$(mandir)/man3/EVP_bf_cfb.3"

	ln -sf "EVP_EncryptInit.3" "$(DESTDIR)$(mandir)/man3/EVP_bf_ecb.3"
	ln -sf "EVP_EncryptInit.3" "$(DESTDIR)$(mandir)/man3/EVP_bf_ofb.3"
	ln -sf "EVP_EncryptInit.3" "$(DESTDIR)$(mandir)/man3/EVP_cast5_cbc.3"
	ln -sf "EVP_EncryptInit.3" "$(DESTDIR)$(mandir)/man3/EVP_cast5_cfb.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_des_cbc.3"
	ln -sf "EVP_EncryptInit.3" "$(DESTDIR)$(mandir)/man3/EVP_des_cfb.3"
	ln -sf "EVP_EncryptInit.3" "$(DESTDIR)$(mandir)/man3/EVP_des_ecb.3"
	ln -sf "EVP_EncryptInit.3" "$(DESTDIR)$(mandir)/man3/EVP_des_ede.3"
	ln -sf "EVP_EncryptInit.3" "$(DESTDIR)$(mandir)/man3/EVP_des_ede3.3"
	ln -sf "EVP_EncryptInit.3" "$(DESTDIR)$(mandir)/man3/EVP_des_ede3_cbc.3"
	ln -sf "EVP_EncryptInit.3" "$(DESTDIR)$(mandir)/man3/EVP_des_ede3_cfb.3"
	ln -sf "EVP_EncryptInit.3" "$(DESTDIR)$(mandir)/man3/EVP_des_ede3_ofb.3"
	ln -sf "EVP_EncryptInit.3" "$(DESTDIR)$(mandir)/man3/EVP_des_ede_cbc.3"
	ln -sf "EVP_EncryptInit.3" "$(DESTDIR)$(mandir)/man3/EVP_des_ede_cfb.3"
	ln -sf "EVP_EncryptInit.3" "$(DESTDIR)$(mandir)/man3/EVP_des_ede_ofb.3"
	ln -sf "EVP_EncryptInit.3" "$(DESTDIR)$(mandir)/man3/EVP_des_ofb.3"
	ln -sf "EVP_EncryptInit.3" "$(DESTDIR)$(mandir)/man3/EVP_desx_cbc.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"
	ln -sf "EVP_EncryptInit.3" "$(DESTDIR)$(mandir)/man3/EVP_get_cipherbyobj.3"
	ln -sf "EVP_EncryptInit.3" "$(DESTDIR)$(mandir)/man3/EVP_idea_cbc.3"
	ln -sf "EVP_EncryptInit.3" "$(DESTDIR)$(mandir)/man3/EVP_idea_cfb.3"

	ln -sf "EVP_EncryptInit.3" "$(DESTDIR)$(mandir)/man3/EVP_idea_ecb.3"
	ln -sf "EVP_EncryptInit.3" "$(DESTDIR)$(mandir)/man3/EVP_idea_ofb.3"
	ln -sf "EVP_EncryptInit.3" "$(DESTDIR)$(mandir)/man3/EVP_rc2_40_cbc.3"
	ln -sf "EVP_EncryptInit.3" "$(DESTDIR)$(mandir)/man3/EVP_rc2_64_cbc.3"
	ln -sf "EVP_EncryptInit.3" "$(DESTDIR)$(mandir)/man3/EVP_rc2_cbc.3"
	ln -sf "EVP_EncryptInit.3" "$(DESTDIR)$(mandir)/man3/EVP_rc2_cfb.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_EncryptInit.3" "$(DESTDIR)$(mandir)/man3/EVP_rc4.3"
	ln -sf "EVP_EncryptInit.3" "$(DESTDIR)$(mandir)/man3/EVP_rc4_40.3"
	ln -sf "EVP_EncryptInit.3" "$(DESTDIR)$(mandir)/man3/EVP_rc4_hmac_md5.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_PKEY_CTX_ctrl.3" "$(DESTDIR)$(mandir)/man3/EVP_PKEY_CTX_ctrl_str.3"
	ln -sf "EVP_PKEY_CTX_ctrl.3" "$(DESTDIR)$(mandir)/man3/EVP_PKEY_CTX_get_rsa_mgf1_md.3"
	ln -sf "EVP_PKEY_CTX_ctrl.3" "$(DESTDIR)$(mandir)/man3/EVP_PKEY_CTX_get_rsa_padding.3"
	ln -sf "EVP_PKEY_CTX_ctrl.3" "$(DESTDIR)$(mandir)/man3/EVP_PKEY_CTX_get_rsa_pss_saltlen.3"

	ln -sf "EVP_PKEY_CTX_ctrl.3" "$(DESTDIR)$(mandir)/man3/EVP_PKEY_CTX_set_dh_paramgen_generator.3"
	ln -sf "EVP_PKEY_CTX_ctrl.3" "$(DESTDIR)$(mandir)/man3/EVP_PKEY_CTX_set_dh_paramgen_prime_len.3"
	ln -sf "EVP_PKEY_CTX_ctrl.3" "$(DESTDIR)$(mandir)/man3/EVP_PKEY_CTX_set_dsa_paramgen_bits.3"
	ln -sf "EVP_PKEY_CTX_ctrl.3" "$(DESTDIR)$(mandir)/man3/EVP_PKEY_CTX_set_ec_paramgen_curve_nid.3"
	ln -sf "EVP_PKEY_CTX_ctrl.3" "$(DESTDIR)$(mandir)/man3/EVP_PKEY_CTX_set_rsa_keygen_bits.3"
	ln -sf "EVP_PKEY_CTX_ctrl.3" "$(DESTDIR)$(mandir)/man3/EVP_PKEY_CTX_set_rsa_keygen_pubexp.3"
	ln -sf "EVP_PKEY_CTX_ctrl.3" "$(DESTDIR)$(mandir)/man3/EVP_PKEY_CTX_set_rsa_mgf1_md.3"







>
















>




>



<
<
<
<
<
<
<
<
<
<
<
<
<






>






|
|
|
<
<






>







1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376













1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392


1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
	ln -sf "EVP_EncryptInit.3" "$(DESTDIR)$(mandir)/man3/EVP_CIPHER_flags.3"
	ln -sf "EVP_EncryptInit.3" "$(DESTDIR)$(mandir)/man3/EVP_CIPHER_iv_length.3"
	ln -sf "EVP_EncryptInit.3" "$(DESTDIR)$(mandir)/man3/EVP_CIPHER_key_length.3"
	ln -sf "EVP_EncryptInit.3" "$(DESTDIR)$(mandir)/man3/EVP_CIPHER_mode.3"
	ln -sf "EVP_EncryptInit.3" "$(DESTDIR)$(mandir)/man3/EVP_CIPHER_nid.3"
	ln -sf "EVP_EncryptInit.3" "$(DESTDIR)$(mandir)/man3/EVP_CIPHER_param_to_asn1.3"
	ln -sf "EVP_EncryptInit.3" "$(DESTDIR)$(mandir)/man3/EVP_CIPHER_type.3"
	ln -sf "EVP_EncryptInit.3" "$(DESTDIR)$(mandir)/man3/EVP_Cipher.3"
	ln -sf "EVP_EncryptInit.3" "$(DESTDIR)$(mandir)/man3/EVP_CipherFinal.3"
	ln -sf "EVP_EncryptInit.3" "$(DESTDIR)$(mandir)/man3/EVP_CipherFinal_ex.3"
	ln -sf "EVP_EncryptInit.3" "$(DESTDIR)$(mandir)/man3/EVP_CipherInit.3"
	ln -sf "EVP_EncryptInit.3" "$(DESTDIR)$(mandir)/man3/EVP_CipherInit_ex.3"
	ln -sf "EVP_EncryptInit.3" "$(DESTDIR)$(mandir)/man3/EVP_CipherUpdate.3"
	ln -sf "EVP_EncryptInit.3" "$(DESTDIR)$(mandir)/man3/EVP_DecryptFinal.3"
	ln -sf "EVP_EncryptInit.3" "$(DESTDIR)$(mandir)/man3/EVP_DecryptFinal_ex.3"
	ln -sf "EVP_EncryptInit.3" "$(DESTDIR)$(mandir)/man3/EVP_DecryptInit.3"
	ln -sf "EVP_EncryptInit.3" "$(DESTDIR)$(mandir)/man3/EVP_DecryptInit_ex.3"
	ln -sf "EVP_EncryptInit.3" "$(DESTDIR)$(mandir)/man3/EVP_DecryptUpdate.3"
	ln -sf "EVP_EncryptInit.3" "$(DESTDIR)$(mandir)/man3/EVP_EncryptFinal.3"
	ln -sf "EVP_EncryptInit.3" "$(DESTDIR)$(mandir)/man3/EVP_EncryptFinal_ex.3"
	ln -sf "EVP_EncryptInit.3" "$(DESTDIR)$(mandir)/man3/EVP_EncryptInit_ex.3"
	ln -sf "EVP_EncryptInit.3" "$(DESTDIR)$(mandir)/man3/EVP_EncryptUpdate.3"
	ln -sf "EVP_EncryptInit.3" "$(DESTDIR)$(mandir)/man3/EVP_bf_cbc.3"
	ln -sf "EVP_EncryptInit.3" "$(DESTDIR)$(mandir)/man3/EVP_bf_cfb.3"
	ln -sf "EVP_EncryptInit.3" "$(DESTDIR)$(mandir)/man3/EVP_bf_cfb64.3"
	ln -sf "EVP_EncryptInit.3" "$(DESTDIR)$(mandir)/man3/EVP_bf_ecb.3"
	ln -sf "EVP_EncryptInit.3" "$(DESTDIR)$(mandir)/man3/EVP_bf_ofb.3"
	ln -sf "EVP_EncryptInit.3" "$(DESTDIR)$(mandir)/man3/EVP_cast5_cbc.3"
	ln -sf "EVP_EncryptInit.3" "$(DESTDIR)$(mandir)/man3/EVP_cast5_cfb.3"
	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"
	ln -sf "EVP_EncryptInit.3" "$(DESTDIR)$(mandir)/man3/EVP_get_cipherbyobj.3"
	ln -sf "EVP_EncryptInit.3" "$(DESTDIR)$(mandir)/man3/EVP_idea_cbc.3"
	ln -sf "EVP_EncryptInit.3" "$(DESTDIR)$(mandir)/man3/EVP_idea_cfb.3"
	ln -sf "EVP_EncryptInit.3" "$(DESTDIR)$(mandir)/man3/EVP_idea_cfb64.3"
	ln -sf "EVP_EncryptInit.3" "$(DESTDIR)$(mandir)/man3/EVP_idea_ecb.3"
	ln -sf "EVP_EncryptInit.3" "$(DESTDIR)$(mandir)/man3/EVP_idea_ofb.3"
	ln -sf "EVP_EncryptInit.3" "$(DESTDIR)$(mandir)/man3/EVP_rc2_40_cbc.3"
	ln -sf "EVP_EncryptInit.3" "$(DESTDIR)$(mandir)/man3/EVP_rc2_64_cbc.3"
	ln -sf "EVP_EncryptInit.3" "$(DESTDIR)$(mandir)/man3/EVP_rc2_cbc.3"
	ln -sf "EVP_EncryptInit.3" "$(DESTDIR)$(mandir)/man3/EVP_rc2_cfb.3"
	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_OpenInit.3" "$(DESTDIR)$(mandir)/man3/EVP_OpenFinal.3"
	ln -sf "EVP_OpenInit.3" "$(DESTDIR)$(mandir)/man3/EVP_OpenUpdate.3"
	ln -sf "EVP_PKEY_CTX_ctrl.3" "$(DESTDIR)$(mandir)/man3/EVP_PKEY_CTX_ctrl_str.3"
	ln -sf "EVP_PKEY_CTX_ctrl.3" "$(DESTDIR)$(mandir)/man3/EVP_PKEY_CTX_get_rsa_mgf1_md.3"
	ln -sf "EVP_PKEY_CTX_ctrl.3" "$(DESTDIR)$(mandir)/man3/EVP_PKEY_CTX_get_rsa_padding.3"
	ln -sf "EVP_PKEY_CTX_ctrl.3" "$(DESTDIR)$(mandir)/man3/EVP_PKEY_CTX_get_rsa_pss_saltlen.3"
	ln -sf "EVP_PKEY_CTX_ctrl.3" "$(DESTDIR)$(mandir)/man3/EVP_PKEY_CTX_get_signature_md.3"
	ln -sf "EVP_PKEY_CTX_ctrl.3" "$(DESTDIR)$(mandir)/man3/EVP_PKEY_CTX_set_dh_paramgen_generator.3"
	ln -sf "EVP_PKEY_CTX_ctrl.3" "$(DESTDIR)$(mandir)/man3/EVP_PKEY_CTX_set_dh_paramgen_prime_len.3"
	ln -sf "EVP_PKEY_CTX_ctrl.3" "$(DESTDIR)$(mandir)/man3/EVP_PKEY_CTX_set_dsa_paramgen_bits.3"
	ln -sf "EVP_PKEY_CTX_ctrl.3" "$(DESTDIR)$(mandir)/man3/EVP_PKEY_CTX_set_ec_paramgen_curve_nid.3"
	ln -sf "EVP_PKEY_CTX_ctrl.3" "$(DESTDIR)$(mandir)/man3/EVP_PKEY_CTX_set_rsa_keygen_bits.3"
	ln -sf "EVP_PKEY_CTX_ctrl.3" "$(DESTDIR)$(mandir)/man3/EVP_PKEY_CTX_set_rsa_keygen_pubexp.3"
	ln -sf "EVP_PKEY_CTX_ctrl.3" "$(DESTDIR)$(mandir)/man3/EVP_PKEY_CTX_set_rsa_mgf1_md.3"
1393
1394
1395
1396
1397
1398
1399

1400
1401
1402

1403
1404

1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417

1418
1419
1420
1421
1422
1423
1424
	ln -sf "EVP_PKEY_meth_new.3" "$(DESTDIR)$(mandir)/man3/EVP_PKEY_meth_set_verify_recover.3"
	ln -sf "EVP_PKEY_meth_new.3" "$(DESTDIR)$(mandir)/man3/EVP_PKEY_meth_set_verifyctx.3"
	ln -sf "EVP_PKEY_new.3" "$(DESTDIR)$(mandir)/man3/EVP_PKEY_free.3"
	ln -sf "EVP_PKEY_new.3" "$(DESTDIR)$(mandir)/man3/EVP_PKEY_new_mac_key.3"
	ln -sf "EVP_PKEY_new.3" "$(DESTDIR)$(mandir)/man3/EVP_PKEY_up_ref.3"
	ln -sf "EVP_PKEY_print_private.3" "$(DESTDIR)$(mandir)/man3/EVP_PKEY_print_params.3"
	ln -sf "EVP_PKEY_print_private.3" "$(DESTDIR)$(mandir)/man3/EVP_PKEY_print_public.3"

	ln -sf "EVP_PKEY_set1_RSA.3" "$(DESTDIR)$(mandir)/man3/EVP_PKEY_assign_DH.3"
	ln -sf "EVP_PKEY_set1_RSA.3" "$(DESTDIR)$(mandir)/man3/EVP_PKEY_assign_DSA.3"
	ln -sf "EVP_PKEY_set1_RSA.3" "$(DESTDIR)$(mandir)/man3/EVP_PKEY_assign_EC_KEY.3"

	ln -sf "EVP_PKEY_set1_RSA.3" "$(DESTDIR)$(mandir)/man3/EVP_PKEY_assign_RSA.3"
	ln -sf "EVP_PKEY_set1_RSA.3" "$(DESTDIR)$(mandir)/man3/EVP_PKEY_base_id.3"

	ln -sf "EVP_PKEY_set1_RSA.3" "$(DESTDIR)$(mandir)/man3/EVP_PKEY_get0_DH.3"
	ln -sf "EVP_PKEY_set1_RSA.3" "$(DESTDIR)$(mandir)/man3/EVP_PKEY_get0_DSA.3"
	ln -sf "EVP_PKEY_set1_RSA.3" "$(DESTDIR)$(mandir)/man3/EVP_PKEY_get0_EC_KEY.3"
	ln -sf "EVP_PKEY_set1_RSA.3" "$(DESTDIR)$(mandir)/man3/EVP_PKEY_get0_RSA.3"
	ln -sf "EVP_PKEY_set1_RSA.3" "$(DESTDIR)$(mandir)/man3/EVP_PKEY_get0_hmac.3"
	ln -sf "EVP_PKEY_set1_RSA.3" "$(DESTDIR)$(mandir)/man3/EVP_PKEY_get1_DH.3"
	ln -sf "EVP_PKEY_set1_RSA.3" "$(DESTDIR)$(mandir)/man3/EVP_PKEY_get1_DSA.3"
	ln -sf "EVP_PKEY_set1_RSA.3" "$(DESTDIR)$(mandir)/man3/EVP_PKEY_get1_EC_KEY.3"
	ln -sf "EVP_PKEY_set1_RSA.3" "$(DESTDIR)$(mandir)/man3/EVP_PKEY_get1_RSA.3"
	ln -sf "EVP_PKEY_set1_RSA.3" "$(DESTDIR)$(mandir)/man3/EVP_PKEY_id.3"
	ln -sf "EVP_PKEY_set1_RSA.3" "$(DESTDIR)$(mandir)/man3/EVP_PKEY_set1_DH.3"
	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_type.3"
	ln -sf "EVP_PKEY_sign.3" "$(DESTDIR)$(mandir)/man3/EVP_PKEY_sign_init.3"
	ln -sf "EVP_PKEY_verify.3" "$(DESTDIR)$(mandir)/man3/EVP_PKEY_verify_init.3"
	ln -sf "EVP_PKEY_verify_recover.3" "$(DESTDIR)$(mandir)/man3/EVP_PKEY_verify_recover_init.3"
	ln -sf "EVP_SealInit.3" "$(DESTDIR)$(mandir)/man3/EVP_SealFinal.3"
	ln -sf "EVP_SealInit.3" "$(DESTDIR)$(mandir)/man3/EVP_SealUpdate.3"
	ln -sf "EVP_SignInit.3" "$(DESTDIR)$(mandir)/man3/EVP_PKEY_bits.3"







>



>


>













>







1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
	ln -sf "EVP_PKEY_meth_new.3" "$(DESTDIR)$(mandir)/man3/EVP_PKEY_meth_set_verify_recover.3"
	ln -sf "EVP_PKEY_meth_new.3" "$(DESTDIR)$(mandir)/man3/EVP_PKEY_meth_set_verifyctx.3"
	ln -sf "EVP_PKEY_new.3" "$(DESTDIR)$(mandir)/man3/EVP_PKEY_free.3"
	ln -sf "EVP_PKEY_new.3" "$(DESTDIR)$(mandir)/man3/EVP_PKEY_new_mac_key.3"
	ln -sf "EVP_PKEY_new.3" "$(DESTDIR)$(mandir)/man3/EVP_PKEY_up_ref.3"
	ln -sf "EVP_PKEY_print_private.3" "$(DESTDIR)$(mandir)/man3/EVP_PKEY_print_params.3"
	ln -sf "EVP_PKEY_print_private.3" "$(DESTDIR)$(mandir)/man3/EVP_PKEY_print_public.3"
	ln -sf "EVP_PKEY_set1_RSA.3" "$(DESTDIR)$(mandir)/man3/EVP_PKEY_assign.3"
	ln -sf "EVP_PKEY_set1_RSA.3" "$(DESTDIR)$(mandir)/man3/EVP_PKEY_assign_DH.3"
	ln -sf "EVP_PKEY_set1_RSA.3" "$(DESTDIR)$(mandir)/man3/EVP_PKEY_assign_DSA.3"
	ln -sf "EVP_PKEY_set1_RSA.3" "$(DESTDIR)$(mandir)/man3/EVP_PKEY_assign_EC_KEY.3"
	ln -sf "EVP_PKEY_set1_RSA.3" "$(DESTDIR)$(mandir)/man3/EVP_PKEY_assign_GOST.3"
	ln -sf "EVP_PKEY_set1_RSA.3" "$(DESTDIR)$(mandir)/man3/EVP_PKEY_assign_RSA.3"
	ln -sf "EVP_PKEY_set1_RSA.3" "$(DESTDIR)$(mandir)/man3/EVP_PKEY_base_id.3"
	ln -sf "EVP_PKEY_set1_RSA.3" "$(DESTDIR)$(mandir)/man3/EVP_PKEY_get0.3"
	ln -sf "EVP_PKEY_set1_RSA.3" "$(DESTDIR)$(mandir)/man3/EVP_PKEY_get0_DH.3"
	ln -sf "EVP_PKEY_set1_RSA.3" "$(DESTDIR)$(mandir)/man3/EVP_PKEY_get0_DSA.3"
	ln -sf "EVP_PKEY_set1_RSA.3" "$(DESTDIR)$(mandir)/man3/EVP_PKEY_get0_EC_KEY.3"
	ln -sf "EVP_PKEY_set1_RSA.3" "$(DESTDIR)$(mandir)/man3/EVP_PKEY_get0_RSA.3"
	ln -sf "EVP_PKEY_set1_RSA.3" "$(DESTDIR)$(mandir)/man3/EVP_PKEY_get0_hmac.3"
	ln -sf "EVP_PKEY_set1_RSA.3" "$(DESTDIR)$(mandir)/man3/EVP_PKEY_get1_DH.3"
	ln -sf "EVP_PKEY_set1_RSA.3" "$(DESTDIR)$(mandir)/man3/EVP_PKEY_get1_DSA.3"
	ln -sf "EVP_PKEY_set1_RSA.3" "$(DESTDIR)$(mandir)/man3/EVP_PKEY_get1_EC_KEY.3"
	ln -sf "EVP_PKEY_set1_RSA.3" "$(DESTDIR)$(mandir)/man3/EVP_PKEY_get1_RSA.3"
	ln -sf "EVP_PKEY_set1_RSA.3" "$(DESTDIR)$(mandir)/man3/EVP_PKEY_id.3"
	ln -sf "EVP_PKEY_set1_RSA.3" "$(DESTDIR)$(mandir)/man3/EVP_PKEY_set1_DH.3"
	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_type.3"
	ln -sf "EVP_PKEY_sign.3" "$(DESTDIR)$(mandir)/man3/EVP_PKEY_sign_init.3"
	ln -sf "EVP_PKEY_verify.3" "$(DESTDIR)$(mandir)/man3/EVP_PKEY_verify_init.3"
	ln -sf "EVP_PKEY_verify_recover.3" "$(DESTDIR)$(mandir)/man3/EVP_PKEY_verify_recover_init.3"
	ln -sf "EVP_SealInit.3" "$(DESTDIR)$(mandir)/man3/EVP_SealFinal.3"
	ln -sf "EVP_SealInit.3" "$(DESTDIR)$(mandir)/man3/EVP_SealUpdate.3"
	ln -sf "EVP_SignInit.3" "$(DESTDIR)$(mandir)/man3/EVP_PKEY_bits.3"
1461
1462
1463
1464
1465
1466
1467











































1468
1469
1470
1471
1472
1473
1474
	ln -sf "EVP_aes_128_cbc.3" "$(DESTDIR)$(mandir)/man3/EVP_aes_256_cfb8.3"
	ln -sf "EVP_aes_128_cbc.3" "$(DESTDIR)$(mandir)/man3/EVP_aes_256_ctr.3"
	ln -sf "EVP_aes_128_cbc.3" "$(DESTDIR)$(mandir)/man3/EVP_aes_256_ecb.3"
	ln -sf "EVP_aes_128_cbc.3" "$(DESTDIR)$(mandir)/man3/EVP_aes_256_gcm.3"
	ln -sf "EVP_aes_128_cbc.3" "$(DESTDIR)$(mandir)/man3/EVP_aes_256_ofb.3"
	ln -sf "EVP_aes_128_cbc.3" "$(DESTDIR)$(mandir)/man3/EVP_aes_256_wrap.3"
	ln -sf "EVP_aes_128_cbc.3" "$(DESTDIR)$(mandir)/man3/EVP_aes_256_xts.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"
	ln -sf "EVP_sm4_cbc.3" "$(DESTDIR)$(mandir)/man3/EVP_sm4_ecb.3"
	ln -sf "EVP_sm4_cbc.3" "$(DESTDIR)$(mandir)/man3/EVP_sm4_ofb.3"
	ln -sf "EXTENDED_KEY_USAGE_new.3" "$(DESTDIR)$(mandir)/man3/EXTENDED_KEY_USAGE_free.3"
	ln -sf "GENERAL_NAME_new.3" "$(DESTDIR)$(mandir)/man3/EDIPARTYNAME_free.3"







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
	ln -sf "EVP_aes_128_cbc.3" "$(DESTDIR)$(mandir)/man3/EVP_aes_256_cfb8.3"
	ln -sf "EVP_aes_128_cbc.3" "$(DESTDIR)$(mandir)/man3/EVP_aes_256_ctr.3"
	ln -sf "EVP_aes_128_cbc.3" "$(DESTDIR)$(mandir)/man3/EVP_aes_256_ecb.3"
	ln -sf "EVP_aes_128_cbc.3" "$(DESTDIR)$(mandir)/man3/EVP_aes_256_gcm.3"
	ln -sf "EVP_aes_128_cbc.3" "$(DESTDIR)$(mandir)/man3/EVP_aes_256_ofb.3"
	ln -sf "EVP_aes_128_cbc.3" "$(DESTDIR)$(mandir)/man3/EVP_aes_256_wrap.3"
	ln -sf "EVP_aes_128_cbc.3" "$(DESTDIR)$(mandir)/man3/EVP_aes_256_xts.3"
	ln -sf "EVP_camellia_128_cbc.3" "$(DESTDIR)$(mandir)/man3/EVP_camellia_128_cfb.3"
	ln -sf "EVP_camellia_128_cbc.3" "$(DESTDIR)$(mandir)/man3/EVP_camellia_128_cfb1.3"
	ln -sf "EVP_camellia_128_cbc.3" "$(DESTDIR)$(mandir)/man3/EVP_camellia_128_cfb128.3"
	ln -sf "EVP_camellia_128_cbc.3" "$(DESTDIR)$(mandir)/man3/EVP_camellia_128_cfb8.3"
	ln -sf "EVP_camellia_128_cbc.3" "$(DESTDIR)$(mandir)/man3/EVP_camellia_128_ecb.3"
	ln -sf "EVP_camellia_128_cbc.3" "$(DESTDIR)$(mandir)/man3/EVP_camellia_128_ofb.3"
	ln -sf "EVP_camellia_128_cbc.3" "$(DESTDIR)$(mandir)/man3/EVP_camellia_192_cbc.3"
	ln -sf "EVP_camellia_128_cbc.3" "$(DESTDIR)$(mandir)/man3/EVP_camellia_192_cfb.3"
	ln -sf "EVP_camellia_128_cbc.3" "$(DESTDIR)$(mandir)/man3/EVP_camellia_192_cfb1.3"
	ln -sf "EVP_camellia_128_cbc.3" "$(DESTDIR)$(mandir)/man3/EVP_camellia_192_cfb128.3"
	ln -sf "EVP_camellia_128_cbc.3" "$(DESTDIR)$(mandir)/man3/EVP_camellia_192_cfb8.3"
	ln -sf "EVP_camellia_128_cbc.3" "$(DESTDIR)$(mandir)/man3/EVP_camellia_192_ecb.3"
	ln -sf "EVP_camellia_128_cbc.3" "$(DESTDIR)$(mandir)/man3/EVP_camellia_192_ofb.3"
	ln -sf "EVP_camellia_128_cbc.3" "$(DESTDIR)$(mandir)/man3/EVP_camellia_256_cbc.3"
	ln -sf "EVP_camellia_128_cbc.3" "$(DESTDIR)$(mandir)/man3/EVP_camellia_256_cfb.3"
	ln -sf "EVP_camellia_128_cbc.3" "$(DESTDIR)$(mandir)/man3/EVP_camellia_256_cfb1.3"
	ln -sf "EVP_camellia_128_cbc.3" "$(DESTDIR)$(mandir)/man3/EVP_camellia_256_cfb128.3"
	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_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"
	ln -sf "EVP_des_cbc.3" "$(DESTDIR)$(mandir)/man3/EVP_des_cfb8.3"
	ln -sf "EVP_des_cbc.3" "$(DESTDIR)$(mandir)/man3/EVP_des_ecb.3"
	ln -sf "EVP_des_cbc.3" "$(DESTDIR)$(mandir)/man3/EVP_des_ede.3"
	ln -sf "EVP_des_cbc.3" "$(DESTDIR)$(mandir)/man3/EVP_des_ede3.3"
	ln -sf "EVP_des_cbc.3" "$(DESTDIR)$(mandir)/man3/EVP_des_ede3_cbc.3"
	ln -sf "EVP_des_cbc.3" "$(DESTDIR)$(mandir)/man3/EVP_des_ede3_cfb.3"
	ln -sf "EVP_des_cbc.3" "$(DESTDIR)$(mandir)/man3/EVP_des_ede3_cfb1.3"
	ln -sf "EVP_des_cbc.3" "$(DESTDIR)$(mandir)/man3/EVP_des_ede3_cfb64.3"
	ln -sf "EVP_des_cbc.3" "$(DESTDIR)$(mandir)/man3/EVP_des_ede3_cfb8.3"
	ln -sf "EVP_des_cbc.3" "$(DESTDIR)$(mandir)/man3/EVP_des_ede3_ecb.3"
	ln -sf "EVP_des_cbc.3" "$(DESTDIR)$(mandir)/man3/EVP_des_ede3_ofb.3"
	ln -sf "EVP_des_cbc.3" "$(DESTDIR)$(mandir)/man3/EVP_des_ede_cbc.3"
	ln -sf "EVP_des_cbc.3" "$(DESTDIR)$(mandir)/man3/EVP_des_ede_cfb.3"
	ln -sf "EVP_des_cbc.3" "$(DESTDIR)$(mandir)/man3/EVP_des_ede_cfb64.3"
	ln -sf "EVP_des_cbc.3" "$(DESTDIR)$(mandir)/man3/EVP_des_ede_ecb.3"
	ln -sf "EVP_des_cbc.3" "$(DESTDIR)$(mandir)/man3/EVP_des_ede_ofb.3"
	ln -sf "EVP_des_cbc.3" "$(DESTDIR)$(mandir)/man3/EVP_des_ofb.3"
	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_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"
	ln -sf "EVP_sm4_cbc.3" "$(DESTDIR)$(mandir)/man3/EVP_sm4_ecb.3"
	ln -sf "EVP_sm4_cbc.3" "$(DESTDIR)$(mandir)/man3/EVP_sm4_ofb.3"
	ln -sf "EXTENDED_KEY_USAGE_new.3" "$(DESTDIR)$(mandir)/man3/EXTENDED_KEY_USAGE_free.3"
	ln -sf "GENERAL_NAME_new.3" "$(DESTDIR)$(mandir)/man3/EDIPARTYNAME_free.3"
1543
1544
1545
1546
1547
1548
1549

1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567

1568
1569
1570

1571
1572
1573
1574
1575
1576
1577
	ln -sf "OCSP_resp_find_status.3" "$(DESTDIR)$(mandir)/man3/OCSP_CERTSTATUS_new.3"
	ln -sf "OCSP_resp_find_status.3" "$(DESTDIR)$(mandir)/man3/OCSP_REVOKEDINFO_free.3"
	ln -sf "OCSP_resp_find_status.3" "$(DESTDIR)$(mandir)/man3/OCSP_REVOKEDINFO_new.3"
	ln -sf "OCSP_resp_find_status.3" "$(DESTDIR)$(mandir)/man3/OCSP_SINGLERESP_free.3"
	ln -sf "OCSP_resp_find_status.3" "$(DESTDIR)$(mandir)/man3/OCSP_SINGLERESP_get0_id.3"
	ln -sf "OCSP_resp_find_status.3" "$(DESTDIR)$(mandir)/man3/OCSP_SINGLERESP_new.3"
	ln -sf "OCSP_resp_find_status.3" "$(DESTDIR)$(mandir)/man3/OCSP_basic_verify.3"

	ln -sf "OCSP_resp_find_status.3" "$(DESTDIR)$(mandir)/man3/OCSP_check_validity.3"
	ln -sf "OCSP_resp_find_status.3" "$(DESTDIR)$(mandir)/man3/OCSP_resp_count.3"
	ln -sf "OCSP_resp_find_status.3" "$(DESTDIR)$(mandir)/man3/OCSP_resp_find.3"
	ln -sf "OCSP_resp_find_status.3" "$(DESTDIR)$(mandir)/man3/OCSP_resp_get0.3"
	ln -sf "OCSP_resp_find_status.3" "$(DESTDIR)$(mandir)/man3/OCSP_single_get0_status.3"
	ln -sf "OCSP_response_status.3" "$(DESTDIR)$(mandir)/man3/OCSP_BASICRESP_free.3"
	ln -sf "OCSP_response_status.3" "$(DESTDIR)$(mandir)/man3/OCSP_BASICRESP_new.3"
	ln -sf "OCSP_response_status.3" "$(DESTDIR)$(mandir)/man3/OCSP_RESPBYTES_free.3"
	ln -sf "OCSP_response_status.3" "$(DESTDIR)$(mandir)/man3/OCSP_RESPBYTES_new.3"
	ln -sf "OCSP_response_status.3" "$(DESTDIR)$(mandir)/man3/OCSP_RESPDATA_free.3"
	ln -sf "OCSP_response_status.3" "$(DESTDIR)$(mandir)/man3/OCSP_RESPDATA_new.3"
	ln -sf "OCSP_response_status.3" "$(DESTDIR)$(mandir)/man3/OCSP_RESPID_free.3"
	ln -sf "OCSP_response_status.3" "$(DESTDIR)$(mandir)/man3/OCSP_RESPID_new.3"
	ln -sf "OCSP_response_status.3" "$(DESTDIR)$(mandir)/man3/OCSP_RESPONSE_free.3"
	ln -sf "OCSP_response_status.3" "$(DESTDIR)$(mandir)/man3/OCSP_RESPONSE_new.3"
	ln -sf "OCSP_response_status.3" "$(DESTDIR)$(mandir)/man3/OCSP_basic_sign.3"
	ln -sf "OCSP_response_status.3" "$(DESTDIR)$(mandir)/man3/OCSP_response_create.3"
	ln -sf "OCSP_response_status.3" "$(DESTDIR)$(mandir)/man3/OCSP_response_get1_basic.3"

	ln -sf "OCSP_sendreq_new.3" "$(DESTDIR)$(mandir)/man3/OCSP_REQ_CTX_add1_header.3"
	ln -sf "OCSP_sendreq_new.3" "$(DESTDIR)$(mandir)/man3/OCSP_REQ_CTX_free.3"
	ln -sf "OCSP_sendreq_new.3" "$(DESTDIR)$(mandir)/man3/OCSP_REQ_CTX_set1_req.3"

	ln -sf "OCSP_sendreq_new.3" "$(DESTDIR)$(mandir)/man3/OCSP_sendreq_bio.3"
	ln -sf "OCSP_sendreq_new.3" "$(DESTDIR)$(mandir)/man3/OCSP_sendreq_nbio.3"
	ln -sf "OPENSSL_VERSION_NUMBER.3" "$(DESTDIR)$(mandir)/man3/LIBRESSL_VERSION_NUMBER.3"
	ln -sf "OPENSSL_VERSION_NUMBER.3" "$(DESTDIR)$(mandir)/man3/LIBRESSL_VERSION_TEXT.3"
	ln -sf "OPENSSL_VERSION_NUMBER.3" "$(DESTDIR)$(mandir)/man3/OPENSSL_VERSION_TEXT.3"
	ln -sf "OPENSSL_VERSION_NUMBER.3" "$(DESTDIR)$(mandir)/man3/OpenSSL_version.3"
	ln -sf "OPENSSL_VERSION_NUMBER.3" "$(DESTDIR)$(mandir)/man3/OpenSSL_version_num.3"







>


















>



>







1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
	ln -sf "OCSP_resp_find_status.3" "$(DESTDIR)$(mandir)/man3/OCSP_CERTSTATUS_new.3"
	ln -sf "OCSP_resp_find_status.3" "$(DESTDIR)$(mandir)/man3/OCSP_REVOKEDINFO_free.3"
	ln -sf "OCSP_resp_find_status.3" "$(DESTDIR)$(mandir)/man3/OCSP_REVOKEDINFO_new.3"
	ln -sf "OCSP_resp_find_status.3" "$(DESTDIR)$(mandir)/man3/OCSP_SINGLERESP_free.3"
	ln -sf "OCSP_resp_find_status.3" "$(DESTDIR)$(mandir)/man3/OCSP_SINGLERESP_get0_id.3"
	ln -sf "OCSP_resp_find_status.3" "$(DESTDIR)$(mandir)/man3/OCSP_SINGLERESP_new.3"
	ln -sf "OCSP_resp_find_status.3" "$(DESTDIR)$(mandir)/man3/OCSP_basic_verify.3"
	ln -sf "OCSP_resp_find_status.3" "$(DESTDIR)$(mandir)/man3/OCSP_cert_status_str.3"
	ln -sf "OCSP_resp_find_status.3" "$(DESTDIR)$(mandir)/man3/OCSP_check_validity.3"
	ln -sf "OCSP_resp_find_status.3" "$(DESTDIR)$(mandir)/man3/OCSP_resp_count.3"
	ln -sf "OCSP_resp_find_status.3" "$(DESTDIR)$(mandir)/man3/OCSP_resp_find.3"
	ln -sf "OCSP_resp_find_status.3" "$(DESTDIR)$(mandir)/man3/OCSP_resp_get0.3"
	ln -sf "OCSP_resp_find_status.3" "$(DESTDIR)$(mandir)/man3/OCSP_single_get0_status.3"
	ln -sf "OCSP_response_status.3" "$(DESTDIR)$(mandir)/man3/OCSP_BASICRESP_free.3"
	ln -sf "OCSP_response_status.3" "$(DESTDIR)$(mandir)/man3/OCSP_BASICRESP_new.3"
	ln -sf "OCSP_response_status.3" "$(DESTDIR)$(mandir)/man3/OCSP_RESPBYTES_free.3"
	ln -sf "OCSP_response_status.3" "$(DESTDIR)$(mandir)/man3/OCSP_RESPBYTES_new.3"
	ln -sf "OCSP_response_status.3" "$(DESTDIR)$(mandir)/man3/OCSP_RESPDATA_free.3"
	ln -sf "OCSP_response_status.3" "$(DESTDIR)$(mandir)/man3/OCSP_RESPDATA_new.3"
	ln -sf "OCSP_response_status.3" "$(DESTDIR)$(mandir)/man3/OCSP_RESPID_free.3"
	ln -sf "OCSP_response_status.3" "$(DESTDIR)$(mandir)/man3/OCSP_RESPID_new.3"
	ln -sf "OCSP_response_status.3" "$(DESTDIR)$(mandir)/man3/OCSP_RESPONSE_free.3"
	ln -sf "OCSP_response_status.3" "$(DESTDIR)$(mandir)/man3/OCSP_RESPONSE_new.3"
	ln -sf "OCSP_response_status.3" "$(DESTDIR)$(mandir)/man3/OCSP_basic_sign.3"
	ln -sf "OCSP_response_status.3" "$(DESTDIR)$(mandir)/man3/OCSP_response_create.3"
	ln -sf "OCSP_response_status.3" "$(DESTDIR)$(mandir)/man3/OCSP_response_get1_basic.3"
	ln -sf "OCSP_response_status.3" "$(DESTDIR)$(mandir)/man3/OCSP_response_status_str.3"
	ln -sf "OCSP_sendreq_new.3" "$(DESTDIR)$(mandir)/man3/OCSP_REQ_CTX_add1_header.3"
	ln -sf "OCSP_sendreq_new.3" "$(DESTDIR)$(mandir)/man3/OCSP_REQ_CTX_free.3"
	ln -sf "OCSP_sendreq_new.3" "$(DESTDIR)$(mandir)/man3/OCSP_REQ_CTX_set1_req.3"
	ln -sf "OCSP_sendreq_new.3" "$(DESTDIR)$(mandir)/man3/OCSP_parse_url.3"
	ln -sf "OCSP_sendreq_new.3" "$(DESTDIR)$(mandir)/man3/OCSP_sendreq_bio.3"
	ln -sf "OCSP_sendreq_new.3" "$(DESTDIR)$(mandir)/man3/OCSP_sendreq_nbio.3"
	ln -sf "OPENSSL_VERSION_NUMBER.3" "$(DESTDIR)$(mandir)/man3/LIBRESSL_VERSION_NUMBER.3"
	ln -sf "OPENSSL_VERSION_NUMBER.3" "$(DESTDIR)$(mandir)/man3/LIBRESSL_VERSION_TEXT.3"
	ln -sf "OPENSSL_VERSION_NUMBER.3" "$(DESTDIR)$(mandir)/man3/OPENSSL_VERSION_TEXT.3"
	ln -sf "OPENSSL_VERSION_NUMBER.3" "$(DESTDIR)$(mandir)/man3/OpenSSL_version.3"
	ln -sf "OPENSSL_VERSION_NUMBER.3" "$(DESTDIR)$(mandir)/man3/OpenSSL_version_num.3"
1700
1701
1702
1703
1704
1705
1706

1707
1708
1709
1710
1711
1712
1713
	ln -sf "PEM_read_bio_PrivateKey.3" "$(DESTDIR)$(mandir)/man3/PEM_write_bio_RSAPublicKey.3"
	ln -sf "PEM_read_bio_PrivateKey.3" "$(DESTDIR)$(mandir)/man3/PEM_write_bio_RSA_PUBKEY.3"
	ln -sf "PEM_read_bio_PrivateKey.3" "$(DESTDIR)$(mandir)/man3/PEM_write_bio_X509.3"
	ln -sf "PEM_read_bio_PrivateKey.3" "$(DESTDIR)$(mandir)/man3/PEM_write_bio_X509_AUX.3"
	ln -sf "PEM_read_bio_PrivateKey.3" "$(DESTDIR)$(mandir)/man3/PEM_write_bio_X509_CRL.3"
	ln -sf "PEM_read_bio_PrivateKey.3" "$(DESTDIR)$(mandir)/man3/PEM_write_bio_X509_REQ.3"
	ln -sf "PEM_read_bio_PrivateKey.3" "$(DESTDIR)$(mandir)/man3/PEM_write_bio_X509_REQ_NEW.3"

	ln -sf "PKCS12_SAFEBAG_new.3" "$(DESTDIR)$(mandir)/man3/PKCS12_BAGS_free.3"
	ln -sf "PKCS12_SAFEBAG_new.3" "$(DESTDIR)$(mandir)/man3/PKCS12_BAGS_new.3"
	ln -sf "PKCS12_SAFEBAG_new.3" "$(DESTDIR)$(mandir)/man3/PKCS12_SAFEBAG_free.3"
	ln -sf "PKCS12_new.3" "$(DESTDIR)$(mandir)/man3/PKCS12_MAC_DATA_free.3"
	ln -sf "PKCS12_new.3" "$(DESTDIR)$(mandir)/man3/PKCS12_MAC_DATA_new.3"
	ln -sf "PKCS12_new.3" "$(DESTDIR)$(mandir)/man3/PKCS12_free.3"
	ln -sf "PKCS5_PBKDF2_HMAC.3" "$(DESTDIR)$(mandir)/man3/PKCS5_PBKDF2_HMAC_SHA1.3"







>







1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
	ln -sf "PEM_read_bio_PrivateKey.3" "$(DESTDIR)$(mandir)/man3/PEM_write_bio_RSAPublicKey.3"
	ln -sf "PEM_read_bio_PrivateKey.3" "$(DESTDIR)$(mandir)/man3/PEM_write_bio_RSA_PUBKEY.3"
	ln -sf "PEM_read_bio_PrivateKey.3" "$(DESTDIR)$(mandir)/man3/PEM_write_bio_X509.3"
	ln -sf "PEM_read_bio_PrivateKey.3" "$(DESTDIR)$(mandir)/man3/PEM_write_bio_X509_AUX.3"
	ln -sf "PEM_read_bio_PrivateKey.3" "$(DESTDIR)$(mandir)/man3/PEM_write_bio_X509_CRL.3"
	ln -sf "PEM_read_bio_PrivateKey.3" "$(DESTDIR)$(mandir)/man3/PEM_write_bio_X509_REQ.3"
	ln -sf "PEM_read_bio_PrivateKey.3" "$(DESTDIR)$(mandir)/man3/PEM_write_bio_X509_REQ_NEW.3"
	ln -sf "PEM_read_bio_PrivateKey.3" "$(DESTDIR)$(mandir)/man3/pem_password_cb.3"
	ln -sf "PKCS12_SAFEBAG_new.3" "$(DESTDIR)$(mandir)/man3/PKCS12_BAGS_free.3"
	ln -sf "PKCS12_SAFEBAG_new.3" "$(DESTDIR)$(mandir)/man3/PKCS12_BAGS_new.3"
	ln -sf "PKCS12_SAFEBAG_new.3" "$(DESTDIR)$(mandir)/man3/PKCS12_SAFEBAG_free.3"
	ln -sf "PKCS12_new.3" "$(DESTDIR)$(mandir)/man3/PKCS12_MAC_DATA_free.3"
	ln -sf "PKCS12_new.3" "$(DESTDIR)$(mandir)/man3/PKCS12_MAC_DATA_new.3"
	ln -sf "PKCS12_new.3" "$(DESTDIR)$(mandir)/man3/PKCS12_free.3"
	ln -sf "PKCS5_PBKDF2_HMAC.3" "$(DESTDIR)$(mandir)/man3/PKCS5_PBKDF2_HMAC_SHA1.3"
1776
1777
1778
1779
1780
1781
1782



1783











1784

1785




1786
1787






1788
1789
1790
1791
1792
1793
1794
	ln -sf "RSA_get_ex_new_index.3" "$(DESTDIR)$(mandir)/man3/CRYPTO_EX_dup.3"
	ln -sf "RSA_get_ex_new_index.3" "$(DESTDIR)$(mandir)/man3/CRYPTO_EX_free.3"
	ln -sf "RSA_get_ex_new_index.3" "$(DESTDIR)$(mandir)/man3/CRYPTO_EX_new.3"
	ln -sf "RSA_get_ex_new_index.3" "$(DESTDIR)$(mandir)/man3/RSA_get_ex_data.3"
	ln -sf "RSA_get_ex_new_index.3" "$(DESTDIR)$(mandir)/man3/RSA_set_ex_data.3"
	ln -sf "RSA_meth_new.3" "$(DESTDIR)$(mandir)/man3/RSA_meth_dup.3"
	ln -sf "RSA_meth_new.3" "$(DESTDIR)$(mandir)/man3/RSA_meth_free.3"



	ln -sf "RSA_meth_new.3" "$(DESTDIR)$(mandir)/man3/RSA_meth_get_finish.3"











	ln -sf "RSA_meth_new.3" "$(DESTDIR)$(mandir)/man3/RSA_meth_set1_name.3"

	ln -sf "RSA_meth_new.3" "$(DESTDIR)$(mandir)/man3/RSA_meth_set_finish.3"




	ln -sf "RSA_meth_new.3" "$(DESTDIR)$(mandir)/man3/RSA_meth_set_priv_dec.3"
	ln -sf "RSA_meth_new.3" "$(DESTDIR)$(mandir)/man3/RSA_meth_set_priv_enc.3"






	ln -sf "RSA_new.3" "$(DESTDIR)$(mandir)/man3/RSA_free.3"
	ln -sf "RSA_new.3" "$(DESTDIR)$(mandir)/man3/RSA_up_ref.3"
	ln -sf "RSA_padding_add_PKCS1_type_1.3" "$(DESTDIR)$(mandir)/man3/RSA_padding_add_PKCS1_OAEP.3"
	ln -sf "RSA_padding_add_PKCS1_type_1.3" "$(DESTDIR)$(mandir)/man3/RSA_padding_add_PKCS1_type_2.3"
	ln -sf "RSA_padding_add_PKCS1_type_1.3" "$(DESTDIR)$(mandir)/man3/RSA_padding_add_none.3"
	ln -sf "RSA_padding_add_PKCS1_type_1.3" "$(DESTDIR)$(mandir)/man3/RSA_padding_check_PKCS1_OAEP.3"
	ln -sf "RSA_padding_add_PKCS1_type_1.3" "$(DESTDIR)$(mandir)/man3/RSA_padding_check_PKCS1_type_1.3"







>
>
>

>
>
>
>
>
>
>
>
>
>
>

>

>
>
>
>


>
>
>
>
>
>







1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
	ln -sf "RSA_get_ex_new_index.3" "$(DESTDIR)$(mandir)/man3/CRYPTO_EX_dup.3"
	ln -sf "RSA_get_ex_new_index.3" "$(DESTDIR)$(mandir)/man3/CRYPTO_EX_free.3"
	ln -sf "RSA_get_ex_new_index.3" "$(DESTDIR)$(mandir)/man3/CRYPTO_EX_new.3"
	ln -sf "RSA_get_ex_new_index.3" "$(DESTDIR)$(mandir)/man3/RSA_get_ex_data.3"
	ln -sf "RSA_get_ex_new_index.3" "$(DESTDIR)$(mandir)/man3/RSA_set_ex_data.3"
	ln -sf "RSA_meth_new.3" "$(DESTDIR)$(mandir)/man3/RSA_meth_dup.3"
	ln -sf "RSA_meth_new.3" "$(DESTDIR)$(mandir)/man3/RSA_meth_free.3"
	ln -sf "RSA_meth_new.3" "$(DESTDIR)$(mandir)/man3/RSA_meth_get0_app_data.3"
	ln -sf "RSA_meth_new.3" "$(DESTDIR)$(mandir)/man3/RSA_meth_get0_name.3"
	ln -sf "RSA_meth_new.3" "$(DESTDIR)$(mandir)/man3/RSA_meth_get_bn_mod_exp.3"
	ln -sf "RSA_meth_new.3" "$(DESTDIR)$(mandir)/man3/RSA_meth_get_finish.3"
	ln -sf "RSA_meth_new.3" "$(DESTDIR)$(mandir)/man3/RSA_meth_get_flags.3"
	ln -sf "RSA_meth_new.3" "$(DESTDIR)$(mandir)/man3/RSA_meth_get_init.3"
	ln -sf "RSA_meth_new.3" "$(DESTDIR)$(mandir)/man3/RSA_meth_get_keygen.3"
	ln -sf "RSA_meth_new.3" "$(DESTDIR)$(mandir)/man3/RSA_meth_get_mod_exp.3"
	ln -sf "RSA_meth_new.3" "$(DESTDIR)$(mandir)/man3/RSA_meth_get_priv_dec.3"
	ln -sf "RSA_meth_new.3" "$(DESTDIR)$(mandir)/man3/RSA_meth_get_priv_enc.3"
	ln -sf "RSA_meth_new.3" "$(DESTDIR)$(mandir)/man3/RSA_meth_get_pub_dec.3"
	ln -sf "RSA_meth_new.3" "$(DESTDIR)$(mandir)/man3/RSA_meth_get_pub_enc.3"
	ln -sf "RSA_meth_new.3" "$(DESTDIR)$(mandir)/man3/RSA_meth_get_sign.3"
	ln -sf "RSA_meth_new.3" "$(DESTDIR)$(mandir)/man3/RSA_meth_get_verify.3"
	ln -sf "RSA_meth_new.3" "$(DESTDIR)$(mandir)/man3/RSA_meth_set0_app_data.3"
	ln -sf "RSA_meth_new.3" "$(DESTDIR)$(mandir)/man3/RSA_meth_set1_name.3"
	ln -sf "RSA_meth_new.3" "$(DESTDIR)$(mandir)/man3/RSA_meth_set_bn_mod_exp.3"
	ln -sf "RSA_meth_new.3" "$(DESTDIR)$(mandir)/man3/RSA_meth_set_finish.3"
	ln -sf "RSA_meth_new.3" "$(DESTDIR)$(mandir)/man3/RSA_meth_set_flags.3"
	ln -sf "RSA_meth_new.3" "$(DESTDIR)$(mandir)/man3/RSA_meth_set_init.3"
	ln -sf "RSA_meth_new.3" "$(DESTDIR)$(mandir)/man3/RSA_meth_set_keygen.3"
	ln -sf "RSA_meth_new.3" "$(DESTDIR)$(mandir)/man3/RSA_meth_set_mod_exp.3"
	ln -sf "RSA_meth_new.3" "$(DESTDIR)$(mandir)/man3/RSA_meth_set_priv_dec.3"
	ln -sf "RSA_meth_new.3" "$(DESTDIR)$(mandir)/man3/RSA_meth_set_priv_enc.3"
	ln -sf "RSA_meth_new.3" "$(DESTDIR)$(mandir)/man3/RSA_meth_set_pub_dec.3"
	ln -sf "RSA_meth_new.3" "$(DESTDIR)$(mandir)/man3/RSA_meth_set_pub_enc.3"
	ln -sf "RSA_meth_new.3" "$(DESTDIR)$(mandir)/man3/RSA_meth_set_sign.3"
	ln -sf "RSA_meth_new.3" "$(DESTDIR)$(mandir)/man3/RSA_meth_set_verify.3"
	ln -sf "RSA_new.3" "$(DESTDIR)$(mandir)/man3/RSAPrivateKey_dup.3"
	ln -sf "RSA_new.3" "$(DESTDIR)$(mandir)/man3/RSAPublicKey_dup.3"
	ln -sf "RSA_new.3" "$(DESTDIR)$(mandir)/man3/RSA_free.3"
	ln -sf "RSA_new.3" "$(DESTDIR)$(mandir)/man3/RSA_up_ref.3"
	ln -sf "RSA_padding_add_PKCS1_type_1.3" "$(DESTDIR)$(mandir)/man3/RSA_padding_add_PKCS1_OAEP.3"
	ln -sf "RSA_padding_add_PKCS1_type_1.3" "$(DESTDIR)$(mandir)/man3/RSA_padding_add_PKCS1_type_2.3"
	ln -sf "RSA_padding_add_PKCS1_type_1.3" "$(DESTDIR)$(mandir)/man3/RSA_padding_add_none.3"
	ln -sf "RSA_padding_add_PKCS1_type_1.3" "$(DESTDIR)$(mandir)/man3/RSA_padding_check_PKCS1_OAEP.3"
	ln -sf "RSA_padding_add_PKCS1_type_1.3" "$(DESTDIR)$(mandir)/man3/RSA_padding_check_PKCS1_type_1.3"
1837
1838
1839
1840
1841
1842
1843











1844

1845
1846
1847
1848
1849
1850
1851
	ln -sf "SSL_CIPHER_get_name.3" "$(DESTDIR)$(mandir)/man3/SSL_CIPHER_get_cipher_nid.3"
	ln -sf "SSL_CIPHER_get_name.3" "$(DESTDIR)$(mandir)/man3/SSL_CIPHER_get_digest_nid.3"
	ln -sf "SSL_CIPHER_get_name.3" "$(DESTDIR)$(mandir)/man3/SSL_CIPHER_get_id.3"
	ln -sf "SSL_CIPHER_get_name.3" "$(DESTDIR)$(mandir)/man3/SSL_CIPHER_get_kx_nid.3"
	ln -sf "SSL_CIPHER_get_name.3" "$(DESTDIR)$(mandir)/man3/SSL_CIPHER_get_version.3"
	ln -sf "SSL_CIPHER_get_name.3" "$(DESTDIR)$(mandir)/man3/SSL_CIPHER_is_aead.3"
	ln -sf "SSL_COMP_add_compression_method.3" "$(DESTDIR)$(mandir)/man3/SSL_COMP_get_compression_methods.3"











	ln -sf "SSL_CTX_add_extra_chain_cert.3" "$(DESTDIR)$(mandir)/man3/SSL_CTX_clear_extra_chain_certs.3"

	ln -sf "SSL_CTX_add_session.3" "$(DESTDIR)$(mandir)/man3/SSL_CTX_remove_session.3"
	ln -sf "SSL_CTX_ctrl.3" "$(DESTDIR)$(mandir)/man3/SSL_CTX_callback_ctrl.3"
	ln -sf "SSL_CTX_ctrl.3" "$(DESTDIR)$(mandir)/man3/SSL_callback_ctrl.3"
	ln -sf "SSL_CTX_ctrl.3" "$(DESTDIR)$(mandir)/man3/SSL_ctrl.3"
	ln -sf "SSL_CTX_get_ex_new_index.3" "$(DESTDIR)$(mandir)/man3/SSL_CTX_get_ex_data.3"
	ln -sf "SSL_CTX_get_ex_new_index.3" "$(DESTDIR)$(mandir)/man3/SSL_CTX_set_ex_data.3"
	ln -sf "SSL_CTX_get_verify_mode.3" "$(DESTDIR)$(mandir)/man3/SSL_CTX_get_verify_callback.3"







>
>
>
>
>
>
>
>
>
>
>

>







1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
	ln -sf "SSL_CIPHER_get_name.3" "$(DESTDIR)$(mandir)/man3/SSL_CIPHER_get_cipher_nid.3"
	ln -sf "SSL_CIPHER_get_name.3" "$(DESTDIR)$(mandir)/man3/SSL_CIPHER_get_digest_nid.3"
	ln -sf "SSL_CIPHER_get_name.3" "$(DESTDIR)$(mandir)/man3/SSL_CIPHER_get_id.3"
	ln -sf "SSL_CIPHER_get_name.3" "$(DESTDIR)$(mandir)/man3/SSL_CIPHER_get_kx_nid.3"
	ln -sf "SSL_CIPHER_get_name.3" "$(DESTDIR)$(mandir)/man3/SSL_CIPHER_get_version.3"
	ln -sf "SSL_CIPHER_get_name.3" "$(DESTDIR)$(mandir)/man3/SSL_CIPHER_is_aead.3"
	ln -sf "SSL_COMP_add_compression_method.3" "$(DESTDIR)$(mandir)/man3/SSL_COMP_get_compression_methods.3"
	ln -sf "SSL_CTX_add1_chain_cert.3" "$(DESTDIR)$(mandir)/man3/SSL_CTX_add0_chain_cert.3"
	ln -sf "SSL_CTX_add1_chain_cert.3" "$(DESTDIR)$(mandir)/man3/SSL_CTX_clear_chain_certs.3"
	ln -sf "SSL_CTX_add1_chain_cert.3" "$(DESTDIR)$(mandir)/man3/SSL_CTX_get0_chain_certs.3"
	ln -sf "SSL_CTX_add1_chain_cert.3" "$(DESTDIR)$(mandir)/man3/SSL_CTX_set0_chain.3"
	ln -sf "SSL_CTX_add1_chain_cert.3" "$(DESTDIR)$(mandir)/man3/SSL_CTX_set1_chain.3"
	ln -sf "SSL_CTX_add1_chain_cert.3" "$(DESTDIR)$(mandir)/man3/SSL_add0_chain_cert.3"
	ln -sf "SSL_CTX_add1_chain_cert.3" "$(DESTDIR)$(mandir)/man3/SSL_add1_chain_cert.3"
	ln -sf "SSL_CTX_add1_chain_cert.3" "$(DESTDIR)$(mandir)/man3/SSL_clear_chain_certs.3"
	ln -sf "SSL_CTX_add1_chain_cert.3" "$(DESTDIR)$(mandir)/man3/SSL_get0_chain_certs.3"
	ln -sf "SSL_CTX_add1_chain_cert.3" "$(DESTDIR)$(mandir)/man3/SSL_set0_chain.3"
	ln -sf "SSL_CTX_add1_chain_cert.3" "$(DESTDIR)$(mandir)/man3/SSL_set1_chain.3"
	ln -sf "SSL_CTX_add_extra_chain_cert.3" "$(DESTDIR)$(mandir)/man3/SSL_CTX_clear_extra_chain_certs.3"
	ln -sf "SSL_CTX_add_extra_chain_cert.3" "$(DESTDIR)$(mandir)/man3/SSL_CTX_get_extra_chain_certs.3"
	ln -sf "SSL_CTX_add_session.3" "$(DESTDIR)$(mandir)/man3/SSL_CTX_remove_session.3"
	ln -sf "SSL_CTX_ctrl.3" "$(DESTDIR)$(mandir)/man3/SSL_CTX_callback_ctrl.3"
	ln -sf "SSL_CTX_ctrl.3" "$(DESTDIR)$(mandir)/man3/SSL_callback_ctrl.3"
	ln -sf "SSL_CTX_ctrl.3" "$(DESTDIR)$(mandir)/man3/SSL_ctrl.3"
	ln -sf "SSL_CTX_get_ex_new_index.3" "$(DESTDIR)$(mandir)/man3/SSL_CTX_get_ex_data.3"
	ln -sf "SSL_CTX_get_ex_new_index.3" "$(DESTDIR)$(mandir)/man3/SSL_CTX_set_ex_data.3"
	ln -sf "SSL_CTX_get_verify_mode.3" "$(DESTDIR)$(mandir)/man3/SSL_CTX_get_verify_callback.3"
1930
1931
1932
1933
1934
1935
1936

1937

1938
1939
1940
1941
1942
1943
1944
	ln -sf "SSL_CTX_set_min_proto_version.3" "$(DESTDIR)$(mandir)/man3/SSL_CTX_get_max_proto_version.3"
	ln -sf "SSL_CTX_set_min_proto_version.3" "$(DESTDIR)$(mandir)/man3/SSL_CTX_get_min_proto_version.3"
	ln -sf "SSL_CTX_set_min_proto_version.3" "$(DESTDIR)$(mandir)/man3/SSL_CTX_set_max_proto_version.3"
	ln -sf "SSL_CTX_set_min_proto_version.3" "$(DESTDIR)$(mandir)/man3/SSL_get_max_proto_version.3"
	ln -sf "SSL_CTX_set_min_proto_version.3" "$(DESTDIR)$(mandir)/man3/SSL_get_min_proto_version.3"
	ln -sf "SSL_CTX_set_min_proto_version.3" "$(DESTDIR)$(mandir)/man3/SSL_set_max_proto_version.3"
	ln -sf "SSL_CTX_set_min_proto_version.3" "$(DESTDIR)$(mandir)/man3/SSL_set_min_proto_version.3"

	ln -sf "SSL_CTX_set_mode.3" "$(DESTDIR)$(mandir)/man3/SSL_CTX_get_mode.3"

	ln -sf "SSL_CTX_set_mode.3" "$(DESTDIR)$(mandir)/man3/SSL_get_mode.3"
	ln -sf "SSL_CTX_set_mode.3" "$(DESTDIR)$(mandir)/man3/SSL_set_mode.3"
	ln -sf "SSL_CTX_set_msg_callback.3" "$(DESTDIR)$(mandir)/man3/SSL_CTX_set_msg_callback_arg.3"
	ln -sf "SSL_CTX_set_msg_callback.3" "$(DESTDIR)$(mandir)/man3/SSL_set_msg_callback.3"
	ln -sf "SSL_CTX_set_msg_callback.3" "$(DESTDIR)$(mandir)/man3/SSL_set_msg_callback_arg.3"
	ln -sf "SSL_CTX_set_options.3" "$(DESTDIR)$(mandir)/man3/SSL_CTX_clear_options.3"
	ln -sf "SSL_CTX_set_options.3" "$(DESTDIR)$(mandir)/man3/SSL_CTX_get_options.3"







>

>







2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
	ln -sf "SSL_CTX_set_min_proto_version.3" "$(DESTDIR)$(mandir)/man3/SSL_CTX_get_max_proto_version.3"
	ln -sf "SSL_CTX_set_min_proto_version.3" "$(DESTDIR)$(mandir)/man3/SSL_CTX_get_min_proto_version.3"
	ln -sf "SSL_CTX_set_min_proto_version.3" "$(DESTDIR)$(mandir)/man3/SSL_CTX_set_max_proto_version.3"
	ln -sf "SSL_CTX_set_min_proto_version.3" "$(DESTDIR)$(mandir)/man3/SSL_get_max_proto_version.3"
	ln -sf "SSL_CTX_set_min_proto_version.3" "$(DESTDIR)$(mandir)/man3/SSL_get_min_proto_version.3"
	ln -sf "SSL_CTX_set_min_proto_version.3" "$(DESTDIR)$(mandir)/man3/SSL_set_max_proto_version.3"
	ln -sf "SSL_CTX_set_min_proto_version.3" "$(DESTDIR)$(mandir)/man3/SSL_set_min_proto_version.3"
	ln -sf "SSL_CTX_set_mode.3" "$(DESTDIR)$(mandir)/man3/SSL_CTX_clear_mode.3"
	ln -sf "SSL_CTX_set_mode.3" "$(DESTDIR)$(mandir)/man3/SSL_CTX_get_mode.3"
	ln -sf "SSL_CTX_set_mode.3" "$(DESTDIR)$(mandir)/man3/SSL_clear_mode.3"
	ln -sf "SSL_CTX_set_mode.3" "$(DESTDIR)$(mandir)/man3/SSL_get_mode.3"
	ln -sf "SSL_CTX_set_mode.3" "$(DESTDIR)$(mandir)/man3/SSL_set_mode.3"
	ln -sf "SSL_CTX_set_msg_callback.3" "$(DESTDIR)$(mandir)/man3/SSL_CTX_set_msg_callback_arg.3"
	ln -sf "SSL_CTX_set_msg_callback.3" "$(DESTDIR)$(mandir)/man3/SSL_set_msg_callback.3"
	ln -sf "SSL_CTX_set_msg_callback.3" "$(DESTDIR)$(mandir)/man3/SSL_set_msg_callback_arg.3"
	ln -sf "SSL_CTX_set_options.3" "$(DESTDIR)$(mandir)/man3/SSL_CTX_clear_options.3"
	ln -sf "SSL_CTX_set_options.3" "$(DESTDIR)$(mandir)/man3/SSL_CTX_get_options.3"
2179
2180
2181
2182
2183
2184
2185

2186
2187
2188
2189
2190
2191
2192
	ln -sf "X509_EXTENSION_set_object.3" "$(DESTDIR)$(mandir)/man3/X509_EXTENSION_free.3"
	ln -sf "X509_EXTENSION_set_object.3" "$(DESTDIR)$(mandir)/man3/X509_EXTENSION_get_critical.3"
	ln -sf "X509_EXTENSION_set_object.3" "$(DESTDIR)$(mandir)/man3/X509_EXTENSION_get_data.3"
	ln -sf "X509_EXTENSION_set_object.3" "$(DESTDIR)$(mandir)/man3/X509_EXTENSION_get_object.3"
	ln -sf "X509_EXTENSION_set_object.3" "$(DESTDIR)$(mandir)/man3/X509_EXTENSION_new.3"
	ln -sf "X509_EXTENSION_set_object.3" "$(DESTDIR)$(mandir)/man3/X509_EXTENSION_set_critical.3"
	ln -sf "X509_EXTENSION_set_object.3" "$(DESTDIR)$(mandir)/man3/X509_EXTENSION_set_data.3"

	ln -sf "X509_LOOKUP_hash_dir.3" "$(DESTDIR)$(mandir)/man3/X509_LOOKUP_file.3"
	ln -sf "X509_LOOKUP_hash_dir.3" "$(DESTDIR)$(mandir)/man3/X509_load_cert_crl_file.3"
	ln -sf "X509_LOOKUP_hash_dir.3" "$(DESTDIR)$(mandir)/man3/X509_load_cert_file.3"
	ln -sf "X509_LOOKUP_hash_dir.3" "$(DESTDIR)$(mandir)/man3/X509_load_crl_file.3"
	ln -sf "X509_NAME_ENTRY_get_object.3" "$(DESTDIR)$(mandir)/man3/X509_NAME_ENTRY_create_by_NID.3"
	ln -sf "X509_NAME_ENTRY_get_object.3" "$(DESTDIR)$(mandir)/man3/X509_NAME_ENTRY_create_by_OBJ.3"
	ln -sf "X509_NAME_ENTRY_get_object.3" "$(DESTDIR)$(mandir)/man3/X509_NAME_ENTRY_create_by_txt.3"







>







2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
	ln -sf "X509_EXTENSION_set_object.3" "$(DESTDIR)$(mandir)/man3/X509_EXTENSION_free.3"
	ln -sf "X509_EXTENSION_set_object.3" "$(DESTDIR)$(mandir)/man3/X509_EXTENSION_get_critical.3"
	ln -sf "X509_EXTENSION_set_object.3" "$(DESTDIR)$(mandir)/man3/X509_EXTENSION_get_data.3"
	ln -sf "X509_EXTENSION_set_object.3" "$(DESTDIR)$(mandir)/man3/X509_EXTENSION_get_object.3"
	ln -sf "X509_EXTENSION_set_object.3" "$(DESTDIR)$(mandir)/man3/X509_EXTENSION_new.3"
	ln -sf "X509_EXTENSION_set_object.3" "$(DESTDIR)$(mandir)/man3/X509_EXTENSION_set_critical.3"
	ln -sf "X509_EXTENSION_set_object.3" "$(DESTDIR)$(mandir)/man3/X509_EXTENSION_set_data.3"
	ln -sf "X509_INFO_new.3" "$(DESTDIR)$(mandir)/man3/X509_INFO_free.3"
	ln -sf "X509_LOOKUP_hash_dir.3" "$(DESTDIR)$(mandir)/man3/X509_LOOKUP_file.3"
	ln -sf "X509_LOOKUP_hash_dir.3" "$(DESTDIR)$(mandir)/man3/X509_load_cert_crl_file.3"
	ln -sf "X509_LOOKUP_hash_dir.3" "$(DESTDIR)$(mandir)/man3/X509_load_cert_file.3"
	ln -sf "X509_LOOKUP_hash_dir.3" "$(DESTDIR)$(mandir)/man3/X509_load_crl_file.3"
	ln -sf "X509_NAME_ENTRY_get_object.3" "$(DESTDIR)$(mandir)/man3/X509_NAME_ENTRY_create_by_NID.3"
	ln -sf "X509_NAME_ENTRY_get_object.3" "$(DESTDIR)$(mandir)/man3/X509_NAME_ENTRY_create_by_OBJ.3"
	ln -sf "X509_NAME_ENTRY_get_object.3" "$(DESTDIR)$(mandir)/man3/X509_NAME_ENTRY_create_by_txt.3"
2300
2301
2302
2303
2304
2305
2306






2307
2308
2309
2310
2311
2312
2313
	ln -sf "X509_VERIFY_PARAM_set_flags.3" "$(DESTDIR)$(mandir)/man3/X509_VERIFY_PARAM_set_time.3"
	ln -sf "X509_VERIFY_PARAM_set_flags.3" "$(DESTDIR)$(mandir)/man3/X509_VERIFY_PARAM_set_trust.3"
	ln -sf "X509_VERIFY_PARAM_set_flags.3" "$(DESTDIR)$(mandir)/man3/X509_VERIFY_PARAM_table_cleanup.3"
	ln -sf "X509_check_host.3" "$(DESTDIR)$(mandir)/man3/X509_check_email.3"
	ln -sf "X509_check_host.3" "$(DESTDIR)$(mandir)/man3/X509_check_ip.3"
	ln -sf "X509_check_host.3" "$(DESTDIR)$(mandir)/man3/X509_check_ip_asc.3"
	ln -sf "X509_check_private_key.3" "$(DESTDIR)$(mandir)/man3/X509_REQ_check_private_key.3"






	ln -sf "X509_cmp_time.3" "$(DESTDIR)$(mandir)/man3/X509_cmp_current_time.3"
	ln -sf "X509_cmp_time.3" "$(DESTDIR)$(mandir)/man3/X509_time_adj.3"
	ln -sf "X509_cmp_time.3" "$(DESTDIR)$(mandir)/man3/X509_time_adj_ex.3"
	ln -sf "X509_digest.3" "$(DESTDIR)$(mandir)/man3/PKCS7_ISSUER_AND_SERIAL_digest.3"
	ln -sf "X509_digest.3" "$(DESTDIR)$(mandir)/man3/X509_CRL_digest.3"
	ln -sf "X509_digest.3" "$(DESTDIR)$(mandir)/man3/X509_NAME_digest.3"
	ln -sf "X509_digest.3" "$(DESTDIR)$(mandir)/man3/X509_REQ_digest.3"







>
>
>
>
>
>







2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
	ln -sf "X509_VERIFY_PARAM_set_flags.3" "$(DESTDIR)$(mandir)/man3/X509_VERIFY_PARAM_set_time.3"
	ln -sf "X509_VERIFY_PARAM_set_flags.3" "$(DESTDIR)$(mandir)/man3/X509_VERIFY_PARAM_set_trust.3"
	ln -sf "X509_VERIFY_PARAM_set_flags.3" "$(DESTDIR)$(mandir)/man3/X509_VERIFY_PARAM_table_cleanup.3"
	ln -sf "X509_check_host.3" "$(DESTDIR)$(mandir)/man3/X509_check_email.3"
	ln -sf "X509_check_host.3" "$(DESTDIR)$(mandir)/man3/X509_check_ip.3"
	ln -sf "X509_check_host.3" "$(DESTDIR)$(mandir)/man3/X509_check_ip_asc.3"
	ln -sf "X509_check_private_key.3" "$(DESTDIR)$(mandir)/man3/X509_REQ_check_private_key.3"
	ln -sf "X509_cmp.3" "$(DESTDIR)$(mandir)/man3/X509_CRL_cmp.3"
	ln -sf "X509_cmp.3" "$(DESTDIR)$(mandir)/man3/X509_CRL_match.3"
	ln -sf "X509_cmp.3" "$(DESTDIR)$(mandir)/man3/X509_NAME_cmp.3"
	ln -sf "X509_cmp.3" "$(DESTDIR)$(mandir)/man3/X509_issuer_and_serial_cmp.3"
	ln -sf "X509_cmp.3" "$(DESTDIR)$(mandir)/man3/X509_issuer_name_cmp.3"
	ln -sf "X509_cmp.3" "$(DESTDIR)$(mandir)/man3/X509_subject_name_cmp.3"
	ln -sf "X509_cmp_time.3" "$(DESTDIR)$(mandir)/man3/X509_cmp_current_time.3"
	ln -sf "X509_cmp_time.3" "$(DESTDIR)$(mandir)/man3/X509_time_adj.3"
	ln -sf "X509_cmp_time.3" "$(DESTDIR)$(mandir)/man3/X509_time_adj_ex.3"
	ln -sf "X509_digest.3" "$(DESTDIR)$(mandir)/man3/PKCS7_ISSUER_AND_SERIAL_digest.3"
	ln -sf "X509_digest.3" "$(DESTDIR)$(mandir)/man3/X509_CRL_digest.3"
	ln -sf "X509_digest.3" "$(DESTDIR)$(mandir)/man3/X509_NAME_digest.3"
	ln -sf "X509_digest.3" "$(DESTDIR)$(mandir)/man3/X509_REQ_digest.3"
2323
2324
2325
2326
2327
2328
2329


2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348

2349
2350
2351
2352
2353
2354
2355
	ln -sf "X509_get0_notBefore.3" "$(DESTDIR)$(mandir)/man3/X509_set1_notBefore.3"
	ln -sf "X509_get0_signature.3" "$(DESTDIR)$(mandir)/man3/X509_CRL_get0_signature.3"
	ln -sf "X509_get0_signature.3" "$(DESTDIR)$(mandir)/man3/X509_CRL_get_signature_nid.3"
	ln -sf "X509_get0_signature.3" "$(DESTDIR)$(mandir)/man3/X509_REQ_get0_signature.3"
	ln -sf "X509_get0_signature.3" "$(DESTDIR)$(mandir)/man3/X509_REQ_get_signature_nid.3"
	ln -sf "X509_get0_signature.3" "$(DESTDIR)$(mandir)/man3/X509_get0_tbs_sigalg.3"
	ln -sf "X509_get0_signature.3" "$(DESTDIR)$(mandir)/man3/X509_get_signature_nid.3"


	ln -sf "X509_get_pubkey.3" "$(DESTDIR)$(mandir)/man3/X509_REQ_get_pubkey.3"
	ln -sf "X509_get_pubkey.3" "$(DESTDIR)$(mandir)/man3/X509_REQ_set_pubkey.3"
	ln -sf "X509_get_pubkey.3" "$(DESTDIR)$(mandir)/man3/X509_get0_pubkey.3"
	ln -sf "X509_get_pubkey.3" "$(DESTDIR)$(mandir)/man3/X509_get_X509_PUBKEY.3"
	ln -sf "X509_get_pubkey.3" "$(DESTDIR)$(mandir)/man3/X509_set_pubkey.3"
	ln -sf "X509_get_serialNumber.3" "$(DESTDIR)$(mandir)/man3/X509_set_serialNumber.3"
	ln -sf "X509_get_subject_name.3" "$(DESTDIR)$(mandir)/man3/X509_CRL_get_issuer.3"
	ln -sf "X509_get_subject_name.3" "$(DESTDIR)$(mandir)/man3/X509_CRL_set_issuer_name.3"
	ln -sf "X509_get_subject_name.3" "$(DESTDIR)$(mandir)/man3/X509_REQ_get_subject_name.3"
	ln -sf "X509_get_subject_name.3" "$(DESTDIR)$(mandir)/man3/X509_REQ_set_subject_name.3"
	ln -sf "X509_get_subject_name.3" "$(DESTDIR)$(mandir)/man3/X509_get_issuer_name.3"
	ln -sf "X509_get_subject_name.3" "$(DESTDIR)$(mandir)/man3/X509_set_issuer_name.3"
	ln -sf "X509_get_subject_name.3" "$(DESTDIR)$(mandir)/man3/X509_set_subject_name.3"
	ln -sf "X509_get_version.3" "$(DESTDIR)$(mandir)/man3/X509_CRL_get_version.3"
	ln -sf "X509_get_version.3" "$(DESTDIR)$(mandir)/man3/X509_CRL_set_version.3"
	ln -sf "X509_get_version.3" "$(DESTDIR)$(mandir)/man3/X509_REQ_get_version.3"
	ln -sf "X509_get_version.3" "$(DESTDIR)$(mandir)/man3/X509_REQ_set_version.3"
	ln -sf "X509_get_version.3" "$(DESTDIR)$(mandir)/man3/X509_set_version.3"
	ln -sf "X509_new.3" "$(DESTDIR)$(mandir)/man3/X509_chain_up_ref.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_sign.3" "$(DESTDIR)$(mandir)/man3/X509_CRL_sign.3"
	ln -sf "X509_sign.3" "$(DESTDIR)$(mandir)/man3/X509_CRL_sign_ctx.3"
	ln -sf "X509_sign.3" "$(DESTDIR)$(mandir)/man3/X509_CRL_verify.3"
	ln -sf "X509_sign.3" "$(DESTDIR)$(mandir)/man3/X509_REQ_sign.3"
	ln -sf "X509_sign.3" "$(DESTDIR)$(mandir)/man3/X509_REQ_sign_ctx.3"







>
>



















>







2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
	ln -sf "X509_get0_notBefore.3" "$(DESTDIR)$(mandir)/man3/X509_set1_notBefore.3"
	ln -sf "X509_get0_signature.3" "$(DESTDIR)$(mandir)/man3/X509_CRL_get0_signature.3"
	ln -sf "X509_get0_signature.3" "$(DESTDIR)$(mandir)/man3/X509_CRL_get_signature_nid.3"
	ln -sf "X509_get0_signature.3" "$(DESTDIR)$(mandir)/man3/X509_REQ_get0_signature.3"
	ln -sf "X509_get0_signature.3" "$(DESTDIR)$(mandir)/man3/X509_REQ_get_signature_nid.3"
	ln -sf "X509_get0_signature.3" "$(DESTDIR)$(mandir)/man3/X509_get0_tbs_sigalg.3"
	ln -sf "X509_get0_signature.3" "$(DESTDIR)$(mandir)/man3/X509_get_signature_nid.3"
	ln -sf "X509_get1_email.3" "$(DESTDIR)$(mandir)/man3/X509_email_free.3"
	ln -sf "X509_get1_email.3" "$(DESTDIR)$(mandir)/man3/X509_get1_ocsp.3"
	ln -sf "X509_get_pubkey.3" "$(DESTDIR)$(mandir)/man3/X509_REQ_get_pubkey.3"
	ln -sf "X509_get_pubkey.3" "$(DESTDIR)$(mandir)/man3/X509_REQ_set_pubkey.3"
	ln -sf "X509_get_pubkey.3" "$(DESTDIR)$(mandir)/man3/X509_get0_pubkey.3"
	ln -sf "X509_get_pubkey.3" "$(DESTDIR)$(mandir)/man3/X509_get_X509_PUBKEY.3"
	ln -sf "X509_get_pubkey.3" "$(DESTDIR)$(mandir)/man3/X509_set_pubkey.3"
	ln -sf "X509_get_serialNumber.3" "$(DESTDIR)$(mandir)/man3/X509_set_serialNumber.3"
	ln -sf "X509_get_subject_name.3" "$(DESTDIR)$(mandir)/man3/X509_CRL_get_issuer.3"
	ln -sf "X509_get_subject_name.3" "$(DESTDIR)$(mandir)/man3/X509_CRL_set_issuer_name.3"
	ln -sf "X509_get_subject_name.3" "$(DESTDIR)$(mandir)/man3/X509_REQ_get_subject_name.3"
	ln -sf "X509_get_subject_name.3" "$(DESTDIR)$(mandir)/man3/X509_REQ_set_subject_name.3"
	ln -sf "X509_get_subject_name.3" "$(DESTDIR)$(mandir)/man3/X509_get_issuer_name.3"
	ln -sf "X509_get_subject_name.3" "$(DESTDIR)$(mandir)/man3/X509_set_issuer_name.3"
	ln -sf "X509_get_subject_name.3" "$(DESTDIR)$(mandir)/man3/X509_set_subject_name.3"
	ln -sf "X509_get_version.3" "$(DESTDIR)$(mandir)/man3/X509_CRL_get_version.3"
	ln -sf "X509_get_version.3" "$(DESTDIR)$(mandir)/man3/X509_CRL_set_version.3"
	ln -sf "X509_get_version.3" "$(DESTDIR)$(mandir)/man3/X509_REQ_get_version.3"
	ln -sf "X509_get_version.3" "$(DESTDIR)$(mandir)/man3/X509_REQ_set_version.3"
	ln -sf "X509_get_version.3" "$(DESTDIR)$(mandir)/man3/X509_set_version.3"
	ln -sf "X509_new.3" "$(DESTDIR)$(mandir)/man3/X509_chain_up_ref.3"
	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_sign.3" "$(DESTDIR)$(mandir)/man3/X509_CRL_sign.3"
	ln -sf "X509_sign.3" "$(DESTDIR)$(mandir)/man3/X509_CRL_sign_ctx.3"
	ln -sf "X509_sign.3" "$(DESTDIR)$(mandir)/man3/X509_CRL_verify.3"
	ln -sf "X509_sign.3" "$(DESTDIR)$(mandir)/man3/X509_REQ_sign.3"
	ln -sf "X509_sign.3" "$(DESTDIR)$(mandir)/man3/X509_REQ_sign_ctx.3"
2454
2455
2456
2457
2458
2459
2460





2461
2462
2463
2464
2465
2466
2467
	ln -sf "d2i_ASN1_SEQUENCE_ANY.3" "$(DESTDIR)$(mandir)/man3/d2i_ASN1_SET_ANY.3"
	ln -sf "d2i_ASN1_SEQUENCE_ANY.3" "$(DESTDIR)$(mandir)/man3/i2d_ASN1_SEQUENCE_ANY.3"
	ln -sf "d2i_ASN1_SEQUENCE_ANY.3" "$(DESTDIR)$(mandir)/man3/i2d_ASN1_SET_ANY.3"
	ln -sf "d2i_AUTHORITY_KEYID.3" "$(DESTDIR)$(mandir)/man3/i2d_AUTHORITY_KEYID.3"
	ln -sf "d2i_BASIC_CONSTRAINTS.3" "$(DESTDIR)$(mandir)/man3/d2i_EXTENDED_KEY_USAGE.3"
	ln -sf "d2i_BASIC_CONSTRAINTS.3" "$(DESTDIR)$(mandir)/man3/i2d_BASIC_CONSTRAINTS.3"
	ln -sf "d2i_BASIC_CONSTRAINTS.3" "$(DESTDIR)$(mandir)/man3/i2d_EXTENDED_KEY_USAGE.3"





	ln -sf "d2i_DHparams.3" "$(DESTDIR)$(mandir)/man3/i2d_DHparams.3"
	ln -sf "d2i_DIST_POINT.3" "$(DESTDIR)$(mandir)/man3/d2i_ACCESS_DESCRIPTION.3"
	ln -sf "d2i_DIST_POINT.3" "$(DESTDIR)$(mandir)/man3/d2i_AUTHORITY_INFO_ACCESS.3"
	ln -sf "d2i_DIST_POINT.3" "$(DESTDIR)$(mandir)/man3/d2i_CRL_DIST_POINTS.3"
	ln -sf "d2i_DIST_POINT.3" "$(DESTDIR)$(mandir)/man3/d2i_DIST_POINT_NAME.3"
	ln -sf "d2i_DIST_POINT.3" "$(DESTDIR)$(mandir)/man3/d2i_ISSUING_DIST_POINT.3"
	ln -sf "d2i_DIST_POINT.3" "$(DESTDIR)$(mandir)/man3/i2d_ACCESS_DESCRIPTION.3"







>
>
>
>
>







2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
	ln -sf "d2i_ASN1_SEQUENCE_ANY.3" "$(DESTDIR)$(mandir)/man3/d2i_ASN1_SET_ANY.3"
	ln -sf "d2i_ASN1_SEQUENCE_ANY.3" "$(DESTDIR)$(mandir)/man3/i2d_ASN1_SEQUENCE_ANY.3"
	ln -sf "d2i_ASN1_SEQUENCE_ANY.3" "$(DESTDIR)$(mandir)/man3/i2d_ASN1_SET_ANY.3"
	ln -sf "d2i_AUTHORITY_KEYID.3" "$(DESTDIR)$(mandir)/man3/i2d_AUTHORITY_KEYID.3"
	ln -sf "d2i_BASIC_CONSTRAINTS.3" "$(DESTDIR)$(mandir)/man3/d2i_EXTENDED_KEY_USAGE.3"
	ln -sf "d2i_BASIC_CONSTRAINTS.3" "$(DESTDIR)$(mandir)/man3/i2d_BASIC_CONSTRAINTS.3"
	ln -sf "d2i_BASIC_CONSTRAINTS.3" "$(DESTDIR)$(mandir)/man3/i2d_EXTENDED_KEY_USAGE.3"
	ln -sf "d2i_CMS_ContentInfo.3" "$(DESTDIR)$(mandir)/man3/d2i_CMS_ReceiptRequest.3"
	ln -sf "d2i_CMS_ContentInfo.3" "$(DESTDIR)$(mandir)/man3/d2i_CMS_bio.3"
	ln -sf "d2i_CMS_ContentInfo.3" "$(DESTDIR)$(mandir)/man3/i2d_CMS_ContentInfo.3"
	ln -sf "d2i_CMS_ContentInfo.3" "$(DESTDIR)$(mandir)/man3/i2d_CMS_ReceiptRequest.3"
	ln -sf "d2i_CMS_ContentInfo.3" "$(DESTDIR)$(mandir)/man3/i2d_CMS_bio.3"
	ln -sf "d2i_DHparams.3" "$(DESTDIR)$(mandir)/man3/i2d_DHparams.3"
	ln -sf "d2i_DIST_POINT.3" "$(DESTDIR)$(mandir)/man3/d2i_ACCESS_DESCRIPTION.3"
	ln -sf "d2i_DIST_POINT.3" "$(DESTDIR)$(mandir)/man3/d2i_AUTHORITY_INFO_ACCESS.3"
	ln -sf "d2i_DIST_POINT.3" "$(DESTDIR)$(mandir)/man3/d2i_CRL_DIST_POINTS.3"
	ln -sf "d2i_DIST_POINT.3" "$(DESTDIR)$(mandir)/man3/d2i_DIST_POINT_NAME.3"
	ln -sf "d2i_DIST_POINT.3" "$(DESTDIR)$(mandir)/man3/d2i_ISSUING_DIST_POINT.3"
	ln -sf "d2i_DIST_POINT.3" "$(DESTDIR)$(mandir)/man3/i2d_ACCESS_DESCRIPTION.3"
2838
2839
2840
2841
2842
2843
2844




2845
2846
2847
2848
2849
2850
2851

2852
2853
2854



2855
2856
2857
2858
2859
2860
2861
	ln -sf "tls_read.3" "$(DESTDIR)$(mandir)/man3/tls_reset.3"
	ln -sf "tls_read.3" "$(DESTDIR)$(mandir)/man3/tls_write.3"

uninstall-local:
	-rm -f "$(DESTDIR)$(mandir)/man3/ACCESS_DESCRIPTION_free.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/AUTHORITY_INFO_ACCESS_free.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/AUTHORITY_INFO_ACCESS_new.3"




	-rm -f "$(DESTDIR)$(mandir)/man3/ASN1_ENUMERATED_get.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/ASN1_ENUMERATED_set.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/ASN1_ENUMERATED_to_BN.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/ASN1_INTEGER_set.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/ASN1_INTEGER_to_BN.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/BN_to_ASN1_ENUMERATED.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/BN_to_ASN1_INTEGER.3"

	-rm -f "$(DESTDIR)$(mandir)/man3/ASN1_OBJECT_free.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/ASN1_STRING_TABLE_cleanup.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/ASN1_STRING_TABLE_get.3"



	-rm -f "$(DESTDIR)$(mandir)/man3/ASN1_STRING_cmp.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/ASN1_STRING_data.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/ASN1_STRING_dup.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/ASN1_STRING_get0_data.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/ASN1_STRING_length_set.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/ASN1_STRING_set.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/ASN1_STRING_to_UTF8.3"







>
>
>
>







>



>
>
>







3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
	ln -sf "tls_read.3" "$(DESTDIR)$(mandir)/man3/tls_reset.3"
	ln -sf "tls_read.3" "$(DESTDIR)$(mandir)/man3/tls_write.3"

uninstall-local:
	-rm -f "$(DESTDIR)$(mandir)/man3/ACCESS_DESCRIPTION_free.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/AUTHORITY_INFO_ACCESS_free.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/AUTHORITY_INFO_ACCESS_new.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/AES_cbc_encrypt.3"
	-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_ENUMERATED_get.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/ASN1_ENUMERATED_set.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/ASN1_ENUMERATED_to_BN.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/ASN1_INTEGER_set.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/ASN1_INTEGER_to_BN.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/BN_to_ASN1_ENUMERATED.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/BN_to_ASN1_INTEGER.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/i2a_ASN1_INTEGER.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/ASN1_OBJECT_free.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/ASN1_STRING_TABLE_cleanup.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/ASN1_STRING_TABLE_get.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/ASN1_OCTET_STRING_cmp.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/ASN1_OCTET_STRING_dup.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/ASN1_OCTET_STRING_set.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/ASN1_STRING_cmp.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/ASN1_STRING_data.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/ASN1_STRING_dup.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/ASN1_STRING_get0_data.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/ASN1_STRING_length_set.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/ASN1_STRING_set.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/ASN1_STRING_to_UTF8.3"
2929
2930
2931
2932
2933
2934
2935

2936
2937
2938
2939
2940
2941
2942
	-rm -f "$(DESTDIR)$(mandir)/man3/ASN1_item_i2d.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/ASN1_item_i2d_bio.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/ASN1_item_i2d_fp.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/ASN1_item_print.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/d2i_ASN1_TYPE.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/i2d_ASN1_TYPE.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/ASN1_item_free.3"

	-rm -f "$(DESTDIR)$(mandir)/man3/ASN1_TIME_set_tm.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/ASN1_time_tm_cmp.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/AUTHORITY_KEYID_free.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/BASIC_CONSTRAINTS_free.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/BF_cbc_encrypt.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/BF_cfb64_encrypt.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/BF_decrypt.3"







>







3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
	-rm -f "$(DESTDIR)$(mandir)/man3/ASN1_item_i2d.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/ASN1_item_i2d_bio.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/ASN1_item_i2d_fp.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/ASN1_item_print.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/d2i_ASN1_TYPE.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/i2d_ASN1_TYPE.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/ASN1_item_free.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/ASN1_put_eoc.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/ASN1_TIME_set_tm.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/ASN1_time_tm_cmp.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/AUTHORITY_KEYID_free.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/BASIC_CONSTRAINTS_free.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/BF_cbc_encrypt.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/BF_cfb64_encrypt.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/BF_decrypt.3"
2994
2995
2996
2997
2998
2999
3000



3001
3002
3003
3004
3005
3006
3007
	-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/ENGINE_get_ex_data.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/ENGINE_get_ex_new_index.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/ENGINE_set_ex_data.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/TYPE_get_ex_data.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/TYPE_get_ex_new_index.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/TYPE_set_ex_data.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/UI_get_ex_data.3"







>
>
>







3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
	-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"
	-rm -f "$(DESTDIR)$(mandir)/man3/ENGINE_get_ex_data.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/ENGINE_get_ex_new_index.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/ENGINE_set_ex_data.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/TYPE_get_ex_data.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/TYPE_get_ex_new_index.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/TYPE_set_ex_data.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/UI_get_ex_data.3"
3198
3199
3200
3201
3202
3203
3204

































3205
3206
3207
3208
3209
3210
3211
	-rm -f "$(DESTDIR)$(mandir)/man3/BN_set_word.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/BN_value_one.3"
	-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/CONF_modules_finish.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/CONF_modules_unload.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/CONF_modules_load.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/CRYPTO_MEM_LEAK_CB.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/CRYPTO_mem_ctrl.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/CRYPTO_mem_leaks.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/CRYPTO_mem_leaks_cb.3"







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
	-rm -f "$(DESTDIR)$(mandir)/man3/BN_set_word.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/BN_value_one.3"
	-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/CMS_ContentInfo_free.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/CMS_ContentInfo_print_ctx.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/CMS_ReceiptRequest_free.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/CMS_ReceiptRequest_new.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/CMS_add0_crl.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/CMS_add1_cert.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/CMS_add1_crl.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/CMS_get1_certs.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/CMS_get1_crls.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/CMS_add0_recipient_key.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/CMS_SignerInfo_sign.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/CMS_decrypt_set1_key.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/CMS_decrypt_set1_pkey.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/CMS_RecipientInfo_decrypt.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/CMS_RecipientInfo_encrypt.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/CMS_RecipientInfo_kekri_get0_id.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/CMS_RecipientInfo_kekri_id_cmp.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/CMS_RecipientInfo_ktri_cert_cmp.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/CMS_RecipientInfo_ktri_get0_signer_id.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/CMS_RecipientInfo_set0_key.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/CMS_RecipientInfo_set0_pkey.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/CMS_RecipientInfo_type.3"
	-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_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_set1_eContentType.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/CMS_ReceiptRequest_create0.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/CMS_ReceiptRequest_get0_values.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/CMS_add1_ReceiptRequest.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/CMS_get0_signers.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/CONF_modules_finish.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/CONF_modules_unload.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/CONF_modules_load.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/CRYPTO_MEM_LEAK_CB.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/CRYPTO_mem_ctrl.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/CRYPTO_mem_leaks.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/CRYPTO_mem_leaks_cb.3"
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
	-rm -f "$(DESTDIR)$(mandir)/man3/CRYPTO_EX_dup.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/CRYPTO_EX_free.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/CRYPTO_EX_new.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/CRYPTO_free_ex_data.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/CRYPTO_get_ex_data.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/CRYPTO_get_ex_new_index.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/CRYPTO_new_ex_data.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/CRYPTO_THREADID_cmp.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/CRYPTO_THREADID_cpy.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/CRYPTO_THREADID_current.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/CRYPTO_THREADID_get_callback.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/CRYPTO_THREADID_hash.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/CRYPTO_THREADID_set_callback.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/CRYPTO_THREADID_set_numeric.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/CRYPTO_THREADID_set_pointer.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/CRYPTO_add.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/CRYPTO_destroy_dynlockid.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/CRYPTO_get_new_dynlockid.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/CRYPTO_lock.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/CRYPTO_num_locks.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/CRYPTO_r_lock.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/CRYPTO_r_unlock.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/CRYPTO_set_dynlock_create_callback.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/CRYPTO_set_dynlock_destroy_callback.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/CRYPTO_set_dynlock_lock_callback.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/CRYPTO_w_lock.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/CRYPTO_w_unlock.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/DES_cbc_cksum.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/DES_cfb64_encrypt.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/DES_cfb_encrypt.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/DES_crypt.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/DES_ecb2_encrypt.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/DES_ecb3_encrypt.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/DES_ecb_encrypt.3"







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







3439
3440
3441
3442
3443
3444
3445




















3446
3447
3448
3449
3450
3451
3452
	-rm -f "$(DESTDIR)$(mandir)/man3/CRYPTO_EX_dup.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/CRYPTO_EX_free.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/CRYPTO_EX_new.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/CRYPTO_free_ex_data.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/CRYPTO_get_ex_data.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/CRYPTO_get_ex_new_index.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/CRYPTO_new_ex_data.3"




















	-rm -f "$(DESTDIR)$(mandir)/man3/DES_cbc_cksum.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/DES_cfb64_encrypt.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/DES_cfb_encrypt.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/DES_crypt.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/DES_ecb2_encrypt.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/DES_ecb3_encrypt.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/DES_ecb_encrypt.3"
3327
3328
3329
3330
3331
3332
3333

3334
3335
3336
3337
3338
3339
3340
	-rm -f "$(DESTDIR)$(mandir)/man3/DSA_up_ref.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/DSA_OpenSSL.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/DSA_get_default_method.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/DSA_new_method.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/DSA_set_default_method.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/DSA_sign_setup.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/DSA_verify.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_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"







>







3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
	-rm -f "$(DESTDIR)$(mandir)/man3/DSA_up_ref.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/DSA_OpenSSL.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/DSA_get_default_method.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/DSA_new_method.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/DSA_set_default_method.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/DSA_sign_setup.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/DSA_verify.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_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"
3383
3384
3385
3386
3387
3388
3389

















3390
3391
3392
3393
3394
3395
3396
	-rm -f "$(DESTDIR)$(mandir)/man3/EC_GROUP_get_curve_GFp.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EC_GROUP_new_by_curve_name.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EC_GROUP_new_curve_GF2m.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EC_GROUP_new_curve_GFp.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EC_GROUP_set_curve_GF2m.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EC_GROUP_set_curve_GFp.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EC_get_builtin_curves.3"

















	-rm -f "$(DESTDIR)$(mandir)/man3/EC_KEY_check_key.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EC_KEY_clear_flags.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EC_KEY_copy.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EC_KEY_dup.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EC_KEY_free.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EC_KEY_generate_key.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EC_KEY_get0_group.3"







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
	-rm -f "$(DESTDIR)$(mandir)/man3/EC_GROUP_get_curve_GFp.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EC_GROUP_new_by_curve_name.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EC_GROUP_new_curve_GF2m.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EC_GROUP_new_curve_GFp.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EC_GROUP_set_curve_GF2m.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EC_GROUP_set_curve_GFp.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EC_get_builtin_curves.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EC_KEY_METHOD_free.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EC_KEY_METHOD_get_compute_key.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EC_KEY_METHOD_get_init.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EC_KEY_METHOD_get_keygen.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EC_KEY_METHOD_get_sign.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EC_KEY_METHOD_get_verify.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EC_KEY_METHOD_set_compute_key.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EC_KEY_METHOD_set_init.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EC_KEY_METHOD_set_keygen.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EC_KEY_METHOD_set_sign.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EC_KEY_METHOD_set_verify.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EC_KEY_OpenSSL.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EC_KEY_get_default_method.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EC_KEY_get_method.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EC_KEY_new_method.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EC_KEY_set_default_method.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EC_KEY_set_method.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EC_KEY_check_key.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EC_KEY_clear_flags.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EC_KEY_copy.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EC_KEY_dup.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EC_KEY_free.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EC_KEY_generate_key.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EC_KEY_get0_group.3"
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
	-rm -f "$(DESTDIR)$(mandir)/man3/ERR_peek_error.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/ERR_peek_error_line.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/ERR_peek_error_line_data.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/ERR_peek_last_error.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/ERR_peek_last_error_line.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/ERR_peek_last_error_line_data.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/ERR_free_strings.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/ERR_load_BN_strings.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/SSL_load_error_strings.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/ERR_PACK.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/ERR_get_next_error_library.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/ERR_print_errors_cb.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/ERR_print_errors_fp.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/ERR_add_error_data.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/ERR_add_error_vdata.3"







<







3769
3770
3771
3772
3773
3774
3775

3776
3777
3778
3779
3780
3781
3782
	-rm -f "$(DESTDIR)$(mandir)/man3/ERR_peek_error.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/ERR_peek_error_line.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/ERR_peek_error_line_data.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/ERR_peek_last_error.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/ERR_peek_last_error_line.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/ERR_peek_last_error_line_data.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/ERR_free_strings.3"

	-rm -f "$(DESTDIR)$(mandir)/man3/SSL_load_error_strings.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/ERR_PACK.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/ERR_get_next_error_library.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/ERR_print_errors_cb.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/ERR_print_errors_fp.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/ERR_add_error_data.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/ERR_add_error_vdata.3"
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_AEAD_CTX_seal.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_AEAD_key_length.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_AEAD_max_overhead.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_AEAD_max_tag_len.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_AEAD_nonce_length.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_aead_aes_128_gcm.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_aead_aes_256_gcm.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_aead_chacha20_poly1305"
	-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_DigestFinal.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_DigestFinal_ex.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_DigestInit_ex.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_DigestUpdate.3"
	-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"







|
|
|







3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_AEAD_CTX_seal.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_AEAD_key_length.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_AEAD_max_overhead.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_AEAD_max_tag_len.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_AEAD_nonce_length.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_aead_aes_128_gcm.3"
	-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_Digest.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_DigestFinal.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_DigestFinal_ex.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_DigestInit_ex.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_DigestUpdate.3"
	-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"
3665
3666
3667
3668
3669
3670
3671

3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687

3688
3689
3690
3691

3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713

3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730

3731
3732
3733
3734
3735
3736
3737
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_CIPHER_flags.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_CIPHER_iv_length.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_CIPHER_key_length.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_CIPHER_mode.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_CIPHER_nid.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_CIPHER_param_to_asn1.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_CIPHER_type.3"

	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_CipherFinal.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_CipherFinal_ex.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_CipherInit.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_CipherInit_ex.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_CipherUpdate.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_DecryptFinal.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_DecryptFinal_ex.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_DecryptInit.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_DecryptInit_ex.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_DecryptUpdate.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_EncryptFinal.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_EncryptFinal_ex.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_EncryptInit_ex.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_EncryptUpdate.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_bf_cbc.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_bf_cfb.3"

	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_bf_ecb.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_bf_ofb.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_cast5_cbc.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_cast5_cfb.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_des_cbc.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_des_cfb.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_des_ecb.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_des_ede.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_des_ede3.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_des_ede3_cbc.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_des_ede3_cfb.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_des_ede3_ofb.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_des_ede_cbc.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_des_ede_cfb.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_des_ede_ofb.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_des_ofb.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_desx_cbc.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"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_get_cipherbyobj.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_idea_cbc.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_idea_cfb.3"

	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_idea_ecb.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_idea_ofb.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_rc2_40_cbc.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_rc2_64_cbc.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_rc2_cbc.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_rc2_cfb.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_rc4.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_OpenFinal.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_OpenUpdate.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_PKEY_CTX_ctrl_str.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_PKEY_CTX_get_rsa_mgf1_md.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_PKEY_CTX_get_rsa_padding.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_PKEY_CTX_get_rsa_pss_saltlen.3"

	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_PKEY_CTX_set_dh_paramgen_generator.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_PKEY_CTX_set_dh_paramgen_prime_len.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_PKEY_CTX_set_dsa_paramgen_bits.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_PKEY_CTX_set_ec_paramgen_curve_nid.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_PKEY_CTX_set_rsa_keygen_bits.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_PKEY_CTX_set_rsa_keygen_pubexp.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_PKEY_CTX_set_rsa_mgf1_md.3"







>
















>




>



<
<
<
<
<
<
<
<
<
<
<
<
<






>






|
|
<
<
|






>







3878
3879
3880
3881
3882
3883
3884
3885
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
3901
3902
3903
3904
3905
3906
3907
3908
3909
3910













3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925


3926
3927
3928
3929
3930
3931
3932
3933
3934
3935
3936
3937
3938
3939
3940
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_CIPHER_flags.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_CIPHER_iv_length.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_CIPHER_key_length.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_CIPHER_mode.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_CIPHER_nid.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_CIPHER_param_to_asn1.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_CIPHER_type.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_Cipher.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_CipherFinal.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_CipherFinal_ex.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_CipherInit.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_CipherInit_ex.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_CipherUpdate.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_DecryptFinal.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_DecryptFinal_ex.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_DecryptInit.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_DecryptInit_ex.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_DecryptUpdate.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_EncryptFinal.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_EncryptFinal_ex.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_EncryptInit_ex.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_EncryptUpdate.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_bf_cbc.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_bf_cfb.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_bf_cfb64.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_bf_ecb.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_bf_ofb.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_cast5_cbc.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_cast5_cfb.3"
	-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"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_get_cipherbyobj.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_idea_cbc.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_idea_cfb.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_idea_cfb64.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_idea_ecb.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_idea_ofb.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_rc2_40_cbc.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_rc2_64_cbc.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_rc2_cbc.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_rc2_cfb.3"
	-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_OpenFinal.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_OpenUpdate.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_PKEY_CTX_ctrl_str.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_PKEY_CTX_get_rsa_mgf1_md.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_PKEY_CTX_get_rsa_padding.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_PKEY_CTX_get_rsa_pss_saltlen.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_PKEY_CTX_get_signature_md.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_PKEY_CTX_set_dh_paramgen_generator.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_PKEY_CTX_set_dh_paramgen_prime_len.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_PKEY_CTX_set_dsa_paramgen_bits.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_PKEY_CTX_set_ec_paramgen_curve_nid.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_PKEY_CTX_set_rsa_keygen_bits.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_PKEY_CTX_set_rsa_keygen_pubexp.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_PKEY_CTX_set_rsa_mgf1_md.3"
3790
3791
3792
3793
3794
3795
3796

3797
3798
3799

3800
3801

3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814

3815
3816
3817
3818
3819
3820
3821
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_PKEY_meth_set_verify_recover.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_PKEY_meth_set_verifyctx.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_PKEY_free.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_PKEY_new_mac_key.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_PKEY_up_ref.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_PKEY_print_params.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_PKEY_print_public.3"

	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_PKEY_assign_DH.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_PKEY_assign_DSA.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_PKEY_assign_EC_KEY.3"

	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_PKEY_assign_RSA.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_PKEY_base_id.3"

	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_PKEY_get0_DH.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_PKEY_get0_DSA.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_PKEY_get0_EC_KEY.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_PKEY_get0_RSA.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_PKEY_get0_hmac.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_PKEY_get1_DH.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_PKEY_get1_DSA.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_PKEY_get1_EC_KEY.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_PKEY_get1_RSA.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_PKEY_id.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_PKEY_set1_DH.3"
	-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_type.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_PKEY_sign_init.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_PKEY_verify_init.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_PKEY_verify_recover_init.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_SealFinal.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_SealUpdate.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_PKEY_bits.3"







>



>


>













>







3993
3994
3995
3996
3997
3998
3999
4000
4001
4002
4003
4004
4005
4006
4007
4008
4009
4010
4011
4012
4013
4014
4015
4016
4017
4018
4019
4020
4021
4022
4023
4024
4025
4026
4027
4028
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_PKEY_meth_set_verify_recover.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_PKEY_meth_set_verifyctx.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_PKEY_free.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_PKEY_new_mac_key.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_PKEY_up_ref.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_PKEY_print_params.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_PKEY_print_public.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_PKEY_assign.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_PKEY_assign_DH.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_PKEY_assign_DSA.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_PKEY_assign_EC_KEY.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_PKEY_assign_GOST.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_PKEY_assign_RSA.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_PKEY_base_id.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_PKEY_get0.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_PKEY_get0_DH.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_PKEY_get0_DSA.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_PKEY_get0_EC_KEY.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_PKEY_get0_RSA.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_PKEY_get0_hmac.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_PKEY_get1_DH.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_PKEY_get1_DSA.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_PKEY_get1_EC_KEY.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_PKEY_get1_RSA.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_PKEY_id.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_PKEY_set1_DH.3"
	-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_type.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_PKEY_sign_init.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_PKEY_verify_init.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_PKEY_verify_recover_init.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_SealFinal.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_SealUpdate.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_PKEY_bits.3"
3858
3859
3860
3861
3862
3863
3864











































3865
3866
3867
3868
3869
3870
3871
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_aes_256_cfb8.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_aes_256_ctr.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_aes_256_ecb.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_aes_256_gcm.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_aes_256_ofb.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_aes_256_wrap.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_aes_256_xts.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"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_sm4_ecb.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_sm4_ofb.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EXTENDED_KEY_USAGE_free.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EDIPARTYNAME_free.3"







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







4065
4066
4067
4068
4069
4070
4071
4072
4073
4074
4075
4076
4077
4078
4079
4080
4081
4082
4083
4084
4085
4086
4087
4088
4089
4090
4091
4092
4093
4094
4095
4096
4097
4098
4099
4100
4101
4102
4103
4104
4105
4106
4107
4108
4109
4110
4111
4112
4113
4114
4115
4116
4117
4118
4119
4120
4121
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_aes_256_cfb8.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_aes_256_ctr.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_aes_256_ecb.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_aes_256_gcm.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_aes_256_ofb.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_aes_256_wrap.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_aes_256_xts.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_camellia_128_cfb.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_camellia_128_cfb1.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_camellia_128_cfb128.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_camellia_128_cfb8.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_camellia_128_ecb.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_camellia_128_ofb.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_camellia_192_cbc.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_camellia_192_cfb.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_camellia_192_cfb1.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_camellia_192_cfb128.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_camellia_192_cfb8.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_camellia_192_ecb.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_camellia_192_ofb.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_camellia_256_cbc.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_camellia_256_cfb.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_camellia_256_cfb1.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_camellia_256_cfb128.3"
	-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_des_cfb.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_des_cfb1.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_des_cfb64.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_des_cfb8.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_des_ecb.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_des_ede.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_des_ede3.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_des_ede3_cbc.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_des_ede3_cfb.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_des_ede3_cfb1.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_des_ede3_cfb64.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_des_ede3_cfb8.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_des_ede3_ecb.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_des_ede3_ofb.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_des_ede_cbc.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_des_ede_cfb.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_des_ede_cfb64.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_des_ede_ecb.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_des_ede_ofb.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_des_ofb.3"
	-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_sm4_cfb.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_sm4_cfb128.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_sm4_ctr.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_sm4_ecb.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_sm4_ofb.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EXTENDED_KEY_USAGE_free.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EDIPARTYNAME_free.3"
3940
3941
3942
3943
3944
3945
3946

3947
3948
3949
3950
3951
3952
3953
3954
3955
3956
3957
3958
3959
3960
3961
3962
3963
3964

3965
3966
3967

3968
3969
3970
3971
3972
3973
3974
	-rm -f "$(DESTDIR)$(mandir)/man3/OCSP_CERTSTATUS_new.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/OCSP_REVOKEDINFO_free.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/OCSP_REVOKEDINFO_new.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/OCSP_SINGLERESP_free.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/OCSP_SINGLERESP_get0_id.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/OCSP_SINGLERESP_new.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/OCSP_basic_verify.3"

	-rm -f "$(DESTDIR)$(mandir)/man3/OCSP_check_validity.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/OCSP_resp_count.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/OCSP_resp_find.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/OCSP_resp_get0.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/OCSP_single_get0_status.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/OCSP_BASICRESP_free.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/OCSP_BASICRESP_new.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/OCSP_RESPBYTES_free.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/OCSP_RESPBYTES_new.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/OCSP_RESPDATA_free.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/OCSP_RESPDATA_new.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/OCSP_RESPID_free.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/OCSP_RESPID_new.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/OCSP_RESPONSE_free.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/OCSP_RESPONSE_new.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/OCSP_basic_sign.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/OCSP_response_create.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/OCSP_response_get1_basic.3"

	-rm -f "$(DESTDIR)$(mandir)/man3/OCSP_REQ_CTX_add1_header.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/OCSP_REQ_CTX_free.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/OCSP_REQ_CTX_set1_req.3"

	-rm -f "$(DESTDIR)$(mandir)/man3/OCSP_sendreq_bio.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/OCSP_sendreq_nbio.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/LIBRESSL_VERSION_NUMBER.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/LIBRESSL_VERSION_TEXT.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/OPENSSL_VERSION_TEXT.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/OpenSSL_version.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/OpenSSL_version_num.3"







>


















>



>







4190
4191
4192
4193
4194
4195
4196
4197
4198
4199
4200
4201
4202
4203
4204
4205
4206
4207
4208
4209
4210
4211
4212
4213
4214
4215
4216
4217
4218
4219
4220
4221
4222
4223
4224
4225
4226
4227
	-rm -f "$(DESTDIR)$(mandir)/man3/OCSP_CERTSTATUS_new.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/OCSP_REVOKEDINFO_free.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/OCSP_REVOKEDINFO_new.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/OCSP_SINGLERESP_free.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/OCSP_SINGLERESP_get0_id.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/OCSP_SINGLERESP_new.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/OCSP_basic_verify.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/OCSP_cert_status_str.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/OCSP_check_validity.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/OCSP_resp_count.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/OCSP_resp_find.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/OCSP_resp_get0.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/OCSP_single_get0_status.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/OCSP_BASICRESP_free.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/OCSP_BASICRESP_new.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/OCSP_RESPBYTES_free.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/OCSP_RESPBYTES_new.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/OCSP_RESPDATA_free.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/OCSP_RESPDATA_new.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/OCSP_RESPID_free.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/OCSP_RESPID_new.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/OCSP_RESPONSE_free.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/OCSP_RESPONSE_new.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/OCSP_basic_sign.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/OCSP_response_create.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/OCSP_response_get1_basic.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/OCSP_response_status_str.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/OCSP_REQ_CTX_add1_header.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/OCSP_REQ_CTX_free.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/OCSP_REQ_CTX_set1_req.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/OCSP_parse_url.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/OCSP_sendreq_bio.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/OCSP_sendreq_nbio.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/LIBRESSL_VERSION_NUMBER.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/LIBRESSL_VERSION_TEXT.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/OPENSSL_VERSION_TEXT.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/OpenSSL_version.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/OpenSSL_version_num.3"
4097
4098
4099
4100
4101
4102
4103

4104
4105
4106
4107
4108
4109
4110
	-rm -f "$(DESTDIR)$(mandir)/man3/PEM_write_bio_RSAPublicKey.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/PEM_write_bio_RSA_PUBKEY.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/PEM_write_bio_X509.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/PEM_write_bio_X509_AUX.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/PEM_write_bio_X509_CRL.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/PEM_write_bio_X509_REQ.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/PEM_write_bio_X509_REQ_NEW.3"

	-rm -f "$(DESTDIR)$(mandir)/man3/PKCS12_BAGS_free.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/PKCS12_BAGS_new.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/PKCS12_SAFEBAG_free.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/PKCS12_MAC_DATA_free.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/PKCS12_MAC_DATA_new.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/PKCS12_free.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/PKCS5_PBKDF2_HMAC_SHA1.3"







>







4350
4351
4352
4353
4354
4355
4356
4357
4358
4359
4360
4361
4362
4363
4364
	-rm -f "$(DESTDIR)$(mandir)/man3/PEM_write_bio_RSAPublicKey.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/PEM_write_bio_RSA_PUBKEY.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/PEM_write_bio_X509.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/PEM_write_bio_X509_AUX.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/PEM_write_bio_X509_CRL.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/PEM_write_bio_X509_REQ.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/PEM_write_bio_X509_REQ_NEW.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/pem_password_cb.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/PKCS12_BAGS_free.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/PKCS12_BAGS_new.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/PKCS12_SAFEBAG_free.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/PKCS12_MAC_DATA_free.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/PKCS12_MAC_DATA_new.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/PKCS12_free.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/PKCS5_PBKDF2_HMAC_SHA1.3"
4173
4174
4175
4176
4177
4178
4179



4180











4181

4182




4183
4184






4185
4186
4187
4188
4189
4190
4191
	-rm -f "$(DESTDIR)$(mandir)/man3/CRYPTO_EX_dup.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/CRYPTO_EX_free.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/CRYPTO_EX_new.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/RSA_get_ex_data.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/RSA_set_ex_data.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/RSA_meth_dup.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/RSA_meth_free.3"



	-rm -f "$(DESTDIR)$(mandir)/man3/RSA_meth_get_finish.3"











	-rm -f "$(DESTDIR)$(mandir)/man3/RSA_meth_set1_name.3"

	-rm -f "$(DESTDIR)$(mandir)/man3/RSA_meth_set_finish.3"




	-rm -f "$(DESTDIR)$(mandir)/man3/RSA_meth_set_priv_dec.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/RSA_meth_set_priv_enc.3"






	-rm -f "$(DESTDIR)$(mandir)/man3/RSA_free.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/RSA_up_ref.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/RSA_padding_add_PKCS1_OAEP.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/RSA_padding_add_PKCS1_type_2.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/RSA_padding_add_none.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/RSA_padding_check_PKCS1_OAEP.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/RSA_padding_check_PKCS1_type_1.3"







>
>
>

>
>
>
>
>
>
>
>
>
>
>

>

>
>
>
>


>
>
>
>
>
>







4427
4428
4429
4430
4431
4432
4433
4434
4435
4436
4437
4438
4439
4440
4441
4442
4443
4444
4445
4446
4447
4448
4449
4450
4451
4452
4453
4454
4455
4456
4457
4458
4459
4460
4461
4462
4463
4464
4465
4466
4467
4468
4469
4470
	-rm -f "$(DESTDIR)$(mandir)/man3/CRYPTO_EX_dup.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/CRYPTO_EX_free.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/CRYPTO_EX_new.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/RSA_get_ex_data.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/RSA_set_ex_data.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/RSA_meth_dup.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/RSA_meth_free.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/RSA_meth_get0_app_data.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/RSA_meth_get0_name.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/RSA_meth_get_bn_mod_exp.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/RSA_meth_get_finish.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/RSA_meth_get_flags.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/RSA_meth_get_init.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/RSA_meth_get_keygen.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/RSA_meth_get_mod_exp.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/RSA_meth_get_priv_dec.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/RSA_meth_get_priv_enc.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/RSA_meth_get_pub_dec.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/RSA_meth_get_pub_enc.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/RSA_meth_get_sign.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/RSA_meth_get_verify.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/RSA_meth_set0_app_data.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/RSA_meth_set1_name.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/RSA_meth_set_bn_mod_exp.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/RSA_meth_set_finish.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/RSA_meth_set_flags.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/RSA_meth_set_init.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/RSA_meth_set_keygen.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/RSA_meth_set_mod_exp.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/RSA_meth_set_priv_dec.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/RSA_meth_set_priv_enc.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/RSA_meth_set_pub_dec.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/RSA_meth_set_pub_enc.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/RSA_meth_set_sign.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/RSA_meth_set_verify.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/RSAPrivateKey_dup.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/RSAPublicKey_dup.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/RSA_free.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/RSA_up_ref.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/RSA_padding_add_PKCS1_OAEP.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/RSA_padding_add_PKCS1_type_2.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/RSA_padding_add_none.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/RSA_padding_check_PKCS1_OAEP.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/RSA_padding_check_PKCS1_type_1.3"
4234
4235
4236
4237
4238
4239
4240











4241

4242
4243
4244
4245
4246
4247
4248
	-rm -f "$(DESTDIR)$(mandir)/man3/SSL_CIPHER_get_cipher_nid.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/SSL_CIPHER_get_digest_nid.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/SSL_CIPHER_get_id.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/SSL_CIPHER_get_kx_nid.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/SSL_CIPHER_get_version.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/SSL_CIPHER_is_aead.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/SSL_COMP_get_compression_methods.3"











	-rm -f "$(DESTDIR)$(mandir)/man3/SSL_CTX_clear_extra_chain_certs.3"

	-rm -f "$(DESTDIR)$(mandir)/man3/SSL_CTX_remove_session.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/SSL_CTX_callback_ctrl.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/SSL_callback_ctrl.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/SSL_ctrl.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/SSL_CTX_get_ex_data.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/SSL_CTX_set_ex_data.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/SSL_CTX_get_verify_callback.3"







>
>
>
>
>
>
>
>
>
>
>

>







4513
4514
4515
4516
4517
4518
4519
4520
4521
4522
4523
4524
4525
4526
4527
4528
4529
4530
4531
4532
4533
4534
4535
4536
4537
4538
4539
	-rm -f "$(DESTDIR)$(mandir)/man3/SSL_CIPHER_get_cipher_nid.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/SSL_CIPHER_get_digest_nid.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/SSL_CIPHER_get_id.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/SSL_CIPHER_get_kx_nid.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/SSL_CIPHER_get_version.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/SSL_CIPHER_is_aead.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/SSL_COMP_get_compression_methods.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/SSL_CTX_add0_chain_cert.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/SSL_CTX_clear_chain_certs.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/SSL_CTX_get0_chain_certs.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/SSL_CTX_set0_chain.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/SSL_CTX_set1_chain.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/SSL_add0_chain_cert.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/SSL_add1_chain_cert.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/SSL_clear_chain_certs.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/SSL_get0_chain_certs.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/SSL_set0_chain.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/SSL_set1_chain.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/SSL_CTX_clear_extra_chain_certs.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/SSL_CTX_get_extra_chain_certs.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/SSL_CTX_remove_session.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/SSL_CTX_callback_ctrl.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/SSL_callback_ctrl.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/SSL_ctrl.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/SSL_CTX_get_ex_data.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/SSL_CTX_set_ex_data.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/SSL_CTX_get_verify_callback.3"
4327
4328
4329
4330
4331
4332
4333

4334

4335
4336
4337
4338
4339
4340
4341
	-rm -f "$(DESTDIR)$(mandir)/man3/SSL_CTX_get_max_proto_version.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/SSL_CTX_get_min_proto_version.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/SSL_CTX_set_max_proto_version.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/SSL_get_max_proto_version.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/SSL_get_min_proto_version.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/SSL_set_max_proto_version.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/SSL_set_min_proto_version.3"

	-rm -f "$(DESTDIR)$(mandir)/man3/SSL_CTX_get_mode.3"

	-rm -f "$(DESTDIR)$(mandir)/man3/SSL_get_mode.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/SSL_set_mode.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/SSL_CTX_set_msg_callback_arg.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/SSL_set_msg_callback.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/SSL_set_msg_callback_arg.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/SSL_CTX_clear_options.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/SSL_CTX_get_options.3"







>

>







4618
4619
4620
4621
4622
4623
4624
4625
4626
4627
4628
4629
4630
4631
4632
4633
4634
	-rm -f "$(DESTDIR)$(mandir)/man3/SSL_CTX_get_max_proto_version.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/SSL_CTX_get_min_proto_version.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/SSL_CTX_set_max_proto_version.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/SSL_get_max_proto_version.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/SSL_get_min_proto_version.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/SSL_set_max_proto_version.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/SSL_set_min_proto_version.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/SSL_CTX_clear_mode.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/SSL_CTX_get_mode.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/SSL_clear_mode.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/SSL_get_mode.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/SSL_set_mode.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/SSL_CTX_set_msg_callback_arg.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/SSL_set_msg_callback.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/SSL_set_msg_callback_arg.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/SSL_CTX_clear_options.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/SSL_CTX_get_options.3"
4576
4577
4578
4579
4580
4581
4582

4583
4584
4585
4586
4587
4588
4589
	-rm -f "$(DESTDIR)$(mandir)/man3/X509_EXTENSION_free.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/X509_EXTENSION_get_critical.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/X509_EXTENSION_get_data.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/X509_EXTENSION_get_object.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/X509_EXTENSION_new.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/X509_EXTENSION_set_critical.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/X509_EXTENSION_set_data.3"

	-rm -f "$(DESTDIR)$(mandir)/man3/X509_LOOKUP_file.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/X509_load_cert_crl_file.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/X509_load_cert_file.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/X509_load_crl_file.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/X509_NAME_ENTRY_create_by_NID.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/X509_NAME_ENTRY_create_by_OBJ.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/X509_NAME_ENTRY_create_by_txt.3"







>







4869
4870
4871
4872
4873
4874
4875
4876
4877
4878
4879
4880
4881
4882
4883
	-rm -f "$(DESTDIR)$(mandir)/man3/X509_EXTENSION_free.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/X509_EXTENSION_get_critical.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/X509_EXTENSION_get_data.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/X509_EXTENSION_get_object.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/X509_EXTENSION_new.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/X509_EXTENSION_set_critical.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/X509_EXTENSION_set_data.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/X509_INFO_free.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/X509_LOOKUP_file.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/X509_load_cert_crl_file.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/X509_load_cert_file.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/X509_load_crl_file.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/X509_NAME_ENTRY_create_by_NID.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/X509_NAME_ENTRY_create_by_OBJ.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/X509_NAME_ENTRY_create_by_txt.3"
4697
4698
4699
4700
4701
4702
4703






4704
4705
4706
4707
4708
4709
4710
	-rm -f "$(DESTDIR)$(mandir)/man3/X509_VERIFY_PARAM_set_time.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/X509_VERIFY_PARAM_set_trust.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/X509_VERIFY_PARAM_table_cleanup.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/X509_check_email.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/X509_check_ip.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/X509_check_ip_asc.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/X509_REQ_check_private_key.3"






	-rm -f "$(DESTDIR)$(mandir)/man3/X509_cmp_current_time.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/X509_time_adj.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/X509_time_adj_ex.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/PKCS7_ISSUER_AND_SERIAL_digest.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/X509_CRL_digest.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/X509_NAME_digest.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/X509_REQ_digest.3"







>
>
>
>
>
>







4991
4992
4993
4994
4995
4996
4997
4998
4999
5000
5001
5002
5003
5004
5005
5006
5007
5008
5009
5010
	-rm -f "$(DESTDIR)$(mandir)/man3/X509_VERIFY_PARAM_set_time.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/X509_VERIFY_PARAM_set_trust.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/X509_VERIFY_PARAM_table_cleanup.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/X509_check_email.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/X509_check_ip.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/X509_check_ip_asc.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/X509_REQ_check_private_key.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/X509_CRL_cmp.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/X509_CRL_match.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/X509_NAME_cmp.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/X509_issuer_and_serial_cmp.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/X509_issuer_name_cmp.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/X509_subject_name_cmp.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/X509_cmp_current_time.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/X509_time_adj.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/X509_time_adj_ex.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/PKCS7_ISSUER_AND_SERIAL_digest.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/X509_CRL_digest.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/X509_NAME_digest.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/X509_REQ_digest.3"
4720
4721
4722
4723
4724
4725
4726


4727
4728
4729
4730
4731
4732
4733
4734
4735
4736
4737
4738
4739
4740
4741
4742
4743
4744
4745

4746
4747
4748
4749
4750
4751
4752
	-rm -f "$(DESTDIR)$(mandir)/man3/X509_set1_notBefore.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/X509_CRL_get0_signature.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/X509_CRL_get_signature_nid.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/X509_REQ_get0_signature.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/X509_REQ_get_signature_nid.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/X509_get0_tbs_sigalg.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/X509_get_signature_nid.3"


	-rm -f "$(DESTDIR)$(mandir)/man3/X509_REQ_get_pubkey.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/X509_REQ_set_pubkey.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/X509_get0_pubkey.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/X509_get_X509_PUBKEY.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/X509_set_pubkey.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/X509_set_serialNumber.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/X509_CRL_get_issuer.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/X509_CRL_set_issuer_name.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/X509_REQ_get_subject_name.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/X509_REQ_set_subject_name.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/X509_get_issuer_name.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/X509_set_issuer_name.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/X509_set_subject_name.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/X509_CRL_get_version.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/X509_CRL_set_version.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/X509_REQ_get_version.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/X509_REQ_set_version.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/X509_set_version.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/X509_chain_up_ref.3"

	-rm -f "$(DESTDIR)$(mandir)/man3/X509_free.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/X509_up_ref.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/X509_CRL_sign.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/X509_CRL_sign_ctx.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/X509_CRL_verify.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/X509_REQ_sign.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/X509_REQ_sign_ctx.3"







>
>



















>







5020
5021
5022
5023
5024
5025
5026
5027
5028
5029
5030
5031
5032
5033
5034
5035
5036
5037
5038
5039
5040
5041
5042
5043
5044
5045
5046
5047
5048
5049
5050
5051
5052
5053
5054
5055
	-rm -f "$(DESTDIR)$(mandir)/man3/X509_set1_notBefore.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/X509_CRL_get0_signature.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/X509_CRL_get_signature_nid.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/X509_REQ_get0_signature.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/X509_REQ_get_signature_nid.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/X509_get0_tbs_sigalg.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/X509_get_signature_nid.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/X509_email_free.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/X509_get1_ocsp.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/X509_REQ_get_pubkey.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/X509_REQ_set_pubkey.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/X509_get0_pubkey.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/X509_get_X509_PUBKEY.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/X509_set_pubkey.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/X509_set_serialNumber.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/X509_CRL_get_issuer.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/X509_CRL_set_issuer_name.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/X509_REQ_get_subject_name.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/X509_REQ_set_subject_name.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/X509_get_issuer_name.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/X509_set_issuer_name.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/X509_set_subject_name.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/X509_CRL_get_version.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/X509_CRL_set_version.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/X509_REQ_get_version.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/X509_REQ_set_version.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/X509_set_version.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/X509_chain_up_ref.3"
	-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_CRL_sign.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/X509_CRL_sign_ctx.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/X509_CRL_verify.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/X509_REQ_sign.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/X509_REQ_sign_ctx.3"
4851
4852
4853
4854
4855
4856
4857





4858
4859
4860
4861
4862
4863
4864
	-rm -f "$(DESTDIR)$(mandir)/man3/d2i_ASN1_SET_ANY.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/i2d_ASN1_SEQUENCE_ANY.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/i2d_ASN1_SET_ANY.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/i2d_AUTHORITY_KEYID.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/d2i_EXTENDED_KEY_USAGE.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/i2d_BASIC_CONSTRAINTS.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/i2d_EXTENDED_KEY_USAGE.3"





	-rm -f "$(DESTDIR)$(mandir)/man3/i2d_DHparams.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/d2i_ACCESS_DESCRIPTION.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/d2i_AUTHORITY_INFO_ACCESS.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/d2i_CRL_DIST_POINTS.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/d2i_DIST_POINT_NAME.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/d2i_ISSUING_DIST_POINT.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/i2d_ACCESS_DESCRIPTION.3"







>
>
>
>
>







5154
5155
5156
5157
5158
5159
5160
5161
5162
5163
5164
5165
5166
5167
5168
5169
5170
5171
5172
	-rm -f "$(DESTDIR)$(mandir)/man3/d2i_ASN1_SET_ANY.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/i2d_ASN1_SEQUENCE_ANY.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/i2d_ASN1_SET_ANY.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/i2d_AUTHORITY_KEYID.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/d2i_EXTENDED_KEY_USAGE.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/i2d_BASIC_CONSTRAINTS.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/i2d_EXTENDED_KEY_USAGE.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/d2i_CMS_ReceiptRequest.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/d2i_CMS_bio.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/i2d_CMS_ContentInfo.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/i2d_CMS_ReceiptRequest.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/i2d_CMS_bio.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/i2d_DHparams.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/d2i_ACCESS_DESCRIPTION.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/d2i_AUTHORITY_INFO_ACCESS.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/d2i_CRL_DIST_POINTS.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/d2i_DIST_POINT_NAME.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/d2i_ISSUING_DIST_POINT.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/i2d_ACCESS_DESCRIPTION.3"
Changes to jni/libressl/man/Makefile.in.
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
man5dir = $(mandir)/man5
NROFF = nroff
MANS = $(dist_man3_MANS) $(dist_man5_MANS)
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
am__DIST_COMMON = $(dist_man3_MANS) $(dist_man5_MANS) \
	$(srcdir)/Makefile.in
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = true
AMTAR = @AMTAR@
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AR = @AR@
AUTOCONF = true
AUTOHEADER = true
AUTOMAKE = true
AWK = @AWK@
CC = @CC@
CCAS = @CCAS@
CCASDEPMODE = @CCASDEPMODE@
CCASFLAGS = @CCASFLAGS@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@







|



|
|
|







153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
man5dir = $(mandir)/man5
NROFF = nroff
MANS = $(dist_man3_MANS) $(dist_man5_MANS)
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
am__DIST_COMMON = $(dist_man3_MANS) $(dist_man5_MANS) \
	$(srcdir)/Makefile.in
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AR = @AR@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
CC = @CC@
CCAS = @CCAS@
CCASDEPMODE = @CCASDEPMODE@
CCASFLAGS = @CCASFLAGS@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
327
328
329
330
331
332
333
334
335
336
337
338

339
340
341
342
343
344
345
346
347
348
349
350
351






352
353
354
355
356
357
358
359
360
361

362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381

382
383
384
385
386
387
388
389
390
391

392
393
394
395
396
397
398
399
400
401
402
403

404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419

420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435

436
437
438
439
440
441
442
443
	SSL_load_client_CA_file.3 SSL_new.3 SSL_num_renegotiations.3 \
	SSL_pending.3 SSL_read.3 SSL_renegotiate.3 SSL_rstate_string.3 \
	SSL_session_reused.3 SSL_set1_param.3 SSL_set_bio.3 \
	SSL_set_connect_state.3 SSL_set_fd.3 \
	SSL_set_max_send_fragment.3 SSL_set_session.3 \
	SSL_set_shutdown.3 SSL_set_tmp_ecdh.3 SSL_set_verify_result.3 \
	SSL_shutdown.3 SSL_state_string.3 SSL_want.3 SSL_write.3 \
	d2i_SSL_SESSION.3 ssl.3 ACCESS_DESCRIPTION_new.3 \
	ASN1_INTEGER_get.3 ASN1_OBJECT_new.3 ASN1_STRING_TABLE_add.3 \
	ASN1_STRING_length.3 ASN1_STRING_new.3 ASN1_STRING_print_ex.3 \
	ASN1_TIME_set.3 ASN1_TYPE_get.3 ASN1_generate_nconf.3 \
	ASN1_item_d2i.3 ASN1_item_new.3 ASN1_time_parse.3 \

	AUTHORITY_KEYID_new.3 BASIC_CONSTRAINTS_new.3 BF_set_key.3 \
	BIO_ctrl.3 BIO_f_base64.3 BIO_f_buffer.3 BIO_f_cipher.3 \
	BIO_f_md.3 BIO_f_null.3 BIO_find_type.3 BIO_get_data.3 \
	BIO_get_ex_new_index.3 BIO_meth_new.3 BIO_new.3 BIO_printf.3 \
	BIO_push.3 BIO_read.3 BIO_s_accept.3 BIO_s_bio.3 \
	BIO_s_connect.3 BIO_s_fd.3 BIO_s_file.3 BIO_s_mem.3 \
	BIO_s_null.3 BIO_s_socket.3 BIO_set_callback.3 \
	BIO_should_retry.3 BN_BLINDING_new.3 BN_CTX_new.3 \
	BN_CTX_start.3 BN_add.3 BN_add_word.3 BN_bn2bin.3 BN_cmp.3 \
	BN_copy.3 BN_generate_prime.3 BN_get0_nist_prime_521.3 \
	BN_mod_inverse.3 BN_mod_mul_montgomery.3 \
	BN_mod_mul_reciprocal.3 BN_new.3 BN_num_bytes.3 BN_rand.3 \
	BN_set_bit.3 BN_set_flags.3 BN_set_negative.3 BN_swap.3 \






	BN_zero.3 BUF_MEM_new.3 CONF_modules_free.3 \
	CONF_modules_load_file.3 CRYPTO_get_mem_functions.3 \
	CRYPTO_lock.3 CRYPTO_set_ex_data.3 DES_set_key.3 \
	DH_generate_key.3 DH_generate_parameters.3 DH_get0_pqg.3 \
	DH_get_ex_new_index.3 DH_new.3 DH_set_method.3 DH_size.3 \
	DIST_POINT_new.3 DSA_SIG_new.3 DSA_do_sign.3 DSA_dup_DH.3 \
	DSA_generate_key.3 DSA_generate_parameters.3 DSA_get0_pqg.3 \
	DSA_get_ex_new_index.3 DSA_meth_new.3 DSA_new.3 \
	DSA_set_method.3 DSA_sign.3 DSA_size.3 ECDSA_SIG_new.3 \
	EC_GFp_simple_method.3 EC_GROUP_copy.3 EC_GROUP_new.3 \

	EC_KEY_new.3 EC_POINT_add.3 EC_POINT_new.3 ENGINE_add.3 \
	ENGINE_ctrl.3 ENGINE_get_default_RSA.3 ENGINE_init.3 \
	ENGINE_new.3 ENGINE_register_RSA.3 ENGINE_register_all_RSA.3 \
	ENGINE_set_RSA.3 ENGINE_set_default.3 ENGINE_set_flags.3 \
	ENGINE_unregister_RSA.3 ERR.3 ERR_GET_LIB.3 \
	ERR_asprintf_error_data.3 ERR_clear_error.3 ERR_error_string.3 \
	ERR_get_error.3 ERR_load_crypto_strings.3 ERR_load_strings.3 \
	ERR_print_errors.3 ERR_put_error.3 ERR_remove_state.3 \
	ERR_set_mark.3 ESS_SIGNING_CERT_new.3 EVP_AEAD_CTX_init.3 \
	EVP_BytesToKey.3 EVP_DigestInit.3 EVP_DigestSignInit.3 \
	EVP_DigestVerifyInit.3 EVP_EncodeInit.3 EVP_EncryptInit.3 \
	EVP_OpenInit.3 EVP_PKEY_CTX_ctrl.3 EVP_PKEY_CTX_new.3 \
	EVP_PKEY_asn1_get_count.3 EVP_PKEY_asn1_new.3 EVP_PKEY_cmp.3 \
	EVP_PKEY_decrypt.3 EVP_PKEY_derive.3 EVP_PKEY_encrypt.3 \
	EVP_PKEY_get_default_digest_nid.3 EVP_PKEY_keygen.3 \
	EVP_PKEY_meth_get0_info.3 EVP_PKEY_meth_new.3 EVP_PKEY_new.3 \
	EVP_PKEY_print_private.3 EVP_PKEY_set1_RSA.3 EVP_PKEY_sign.3 \
	EVP_PKEY_verify.3 EVP_PKEY_verify_recover.3 EVP_SealInit.3 \
	EVP_SignInit.3 EVP_VerifyInit.3 EVP_aes_128_cbc.3 \
	EVP_camellia_128_cbc.3 EVP_des_cbc.3 EVP_rc4.3 EVP_sm4_cbc.3 \

	EXTENDED_KEY_USAGE_new.3 GENERAL_NAME_new.3 HMAC.3 MD5.3 \
	NAME_CONSTRAINTS_new.3 OBJ_nid2obj.3 OCSP_CRLID_new.3 \
	OCSP_REQUEST_new.3 OCSP_SERVICELOC_new.3 OCSP_cert_to_id.3 \
	OCSP_request_add1_nonce.3 OCSP_resp_find_status.3 \
	OCSP_response_status.3 OCSP_sendreq_new.3 \
	OPENSSL_VERSION_NUMBER.3 OPENSSL_cleanse.3 OPENSSL_config.3 \
	OPENSSL_init_crypto.3 OPENSSL_load_builtin_modules.3 \
	OPENSSL_malloc.3 OPENSSL_sk_new.3 OpenSSL_add_all_algorithms.3 \
	PEM_bytes_read_bio.3 PEM_read.3 PEM_read_bio_PrivateKey.3 \
	PEM_write_bio_PKCS7_stream.3 PKCS12_SAFEBAG_new.3 \

	PKCS12_create.3 PKCS12_new.3 PKCS12_newpass.3 PKCS12_parse.3 \
	PKCS5_PBKDF2_HMAC.3 PKCS7_decrypt.3 PKCS7_encrypt.3 \
	PKCS7_new.3 PKCS7_sign.3 PKCS7_sign_add_signer.3 \
	PKCS7_verify.3 PKCS8_PRIV_KEY_INFO_new.3 \
	PKEY_USAGE_PERIOD_new.3 POLICYINFO_new.3 PROXY_POLICY_new.3 \
	RAND_add.3 RAND_bytes.3 RAND_load_file.3 \
	RAND_set_rand_method.3 RC4.3 RIPEMD160.3 RSA_PSS_PARAMS_new.3 \
	RSA_blinding_on.3 RSA_check_key.3 RSA_generate_key.3 \
	RSA_get0_key.3 RSA_get_ex_new_index.3 RSA_meth_new.3 RSA_new.3 \
	RSA_padding_add_PKCS1_type_1.3 RSA_print.3 \
	RSA_private_encrypt.3 RSA_public_encrypt.3 RSA_set_method.3 \
	RSA_sign.3 RSA_sign_ASN1_OCTET_STRING.3 RSA_size.3 SHA1.3 \

	SMIME_read_PKCS7.3 SMIME_write_PKCS7.3 STACK_OF.3 SXNET_new.3 \
	TS_REQ_new.3 UI_UTIL_read_pw.3 UI_create_method.3 \
	UI_get_string_type.3 UI_new.3 X25519.3 X509V3_get_d2i.3 \
	X509_ALGOR_dup.3 X509_ATTRIBUTE_new.3 X509_CINF_new.3 \
	X509_CRL_get0_by_serial.3 X509_CRL_new.3 \
	X509_EXTENSION_set_object.3 X509_LOOKUP_hash_dir.3 \
	X509_NAME_ENTRY_get_object.3 X509_NAME_add_entry_by_txt.3 \
	X509_NAME_get_index_by_NID.3 X509_NAME_new.3 \
	X509_NAME_print_ex.3 X509_OBJECT_get0_X509.3 X509_PUBKEY_new.3 \
	X509_REQ_new.3 X509_REVOKED_new.3 X509_SIG_new.3 \
	X509_STORE_CTX_get_error.3 X509_STORE_CTX_get_ex_new_index.3 \
	X509_STORE_CTX_new.3 X509_STORE_CTX_set_verify_cb.3 \
	X509_STORE_load_locations.3 X509_STORE_new.3 \
	X509_STORE_set1_param.3 X509_STORE_set_verify_cb_func.3 \
	X509_VERIFY_PARAM_set_flags.3 X509_check_ca.3 \
	X509_check_host.3 X509_check_issued.3 X509_check_private_key.3 \

	X509_cmp_time.3 X509_digest.3 X509_get0_notBefore.3 \
	X509_get0_signature.3 X509_get_pubkey.3 \
	X509_get_serialNumber.3 X509_get_subject_name.3 \
	X509_get_version.3 X509_new.3 X509_sign.3 X509_verify_cert.3 \
	X509v3_get_ext_by_NID.3 bn_dump.3 crypto.3 d2i_ASN1_NULL.3 \
	d2i_ASN1_OBJECT.3 d2i_ASN1_OCTET_STRING.3 \
	d2i_ASN1_SEQUENCE_ANY.3 d2i_AUTHORITY_KEYID.3 \
	d2i_BASIC_CONSTRAINTS.3 d2i_DHparams.3 d2i_DIST_POINT.3 \
	d2i_DSAPublicKey.3 d2i_ECPKParameters.3 d2i_ESS_SIGNING_CERT.3 \
	d2i_GENERAL_NAME.3 d2i_OCSP_REQUEST.3 d2i_OCSP_RESPONSE.3 \
	d2i_PKCS12.3 d2i_PKCS7.3 d2i_PKCS8PrivateKey_bio.3 \
	d2i_PKCS8_PRIV_KEY_INFO.3 d2i_PKEY_USAGE_PERIOD.3 \
	d2i_POLICYINFO.3 d2i_PROXY_POLICY.3 d2i_PrivateKey.3 \
	d2i_RSAPublicKey.3 d2i_TS_REQ.3 d2i_X509.3 d2i_X509_ALGOR.3 \
	d2i_X509_ATTRIBUTE.3 d2i_X509_CRL.3 d2i_X509_EXTENSION.3 \
	d2i_X509_NAME.3 d2i_X509_REQ.3 d2i_X509_SIG.3 des_read_pw.3 \

	evp.3 get_rfc3526_prime_8192.3 i2d_PKCS7_bio_stream.3 lh_new.3 \
	lh_stats.3 tls_accept_socket.3 tls_client.3 \
	tls_config_ocsp_require_stapling.3 tls_config_set_protocols.3 \
	tls_config_set_session_id.3 tls_config_verify.3 \
	tls_conn_version.3 tls_connect.3 tls_init.3 tls_load_file.3 \
	tls_ocsp_process_response.3 tls_read.3
dist_man5_MANS = openssl.cnf.5 x509v3.cnf.5
all: all-am







|



|
>
|
|
|
|
|
|
|
|
|
|
|
|
|
>
>
>
>
>
>
|

|
|
|
|
|
|
|
|
>
|
|
|
















|
>
|
|
|






|
>
|
|
|
|
|
<
|
|
|
|
|
|
>
|




|
|
|
|
|
|
|
|
|
|
|
>

|





|
|
|
|
|
|
|
|
|
>
|







327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406

407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
	SSL_load_client_CA_file.3 SSL_new.3 SSL_num_renegotiations.3 \
	SSL_pending.3 SSL_read.3 SSL_renegotiate.3 SSL_rstate_string.3 \
	SSL_session_reused.3 SSL_set1_param.3 SSL_set_bio.3 \
	SSL_set_connect_state.3 SSL_set_fd.3 \
	SSL_set_max_send_fragment.3 SSL_set_session.3 \
	SSL_set_shutdown.3 SSL_set_tmp_ecdh.3 SSL_set_verify_result.3 \
	SSL_shutdown.3 SSL_state_string.3 SSL_want.3 SSL_write.3 \
	d2i_SSL_SESSION.3 ssl.3 ACCESS_DESCRIPTION_new.3 AES_encrypt.3 \
	ASN1_INTEGER_get.3 ASN1_OBJECT_new.3 ASN1_STRING_TABLE_add.3 \
	ASN1_STRING_length.3 ASN1_STRING_new.3 ASN1_STRING_print_ex.3 \
	ASN1_TIME_set.3 ASN1_TYPE_get.3 ASN1_generate_nconf.3 \
	ASN1_item_d2i.3 ASN1_item_new.3 ASN1_put_object.3 \
	ASN1_time_parse.3 AUTHORITY_KEYID_new.3 \
	BASIC_CONSTRAINTS_new.3 BF_set_key.3 BIO_ctrl.3 BIO_f_base64.3 \
	BIO_f_buffer.3 BIO_f_cipher.3 BIO_f_md.3 BIO_f_null.3 \
	BIO_find_type.3 BIO_get_data.3 BIO_get_ex_new_index.3 \
	BIO_meth_new.3 BIO_new.3 BIO_new_CMS.3 BIO_printf.3 BIO_push.3 \
	BIO_read.3 BIO_s_accept.3 BIO_s_bio.3 BIO_s_connect.3 \
	BIO_s_fd.3 BIO_s_file.3 BIO_s_mem.3 BIO_s_null.3 \
	BIO_s_socket.3 BIO_set_callback.3 BIO_should_retry.3 \
	BN_BLINDING_new.3 BN_CTX_new.3 BN_CTX_start.3 BN_add.3 \
	BN_add_word.3 BN_bn2bin.3 BN_cmp.3 BN_copy.3 \
	BN_generate_prime.3 BN_get0_nist_prime_521.3 BN_mod_inverse.3 \
	BN_mod_mul_montgomery.3 BN_mod_mul_reciprocal.3 BN_new.3 \
	BN_num_bytes.3 BN_rand.3 BN_set_bit.3 BN_set_flags.3 \
	BN_set_negative.3 BN_swap.3 BN_zero.3 BUF_MEM_new.3 \
	CMS_ContentInfo_new.3 CMS_add0_cert.3 \
	CMS_add1_recipient_cert.3 CMS_add1_signer.3 CMS_compress.3 \
	CMS_decrypt.3 CMS_encrypt.3 CMS_final.3 \
	CMS_get0_RecipientInfos.3 CMS_get0_SignerInfos.3 \
	CMS_get0_type.3 CMS_get1_ReceiptRequest.3 CMS_sign.3 \
	CMS_sign_receipt.3 CMS_uncompress.3 CMS_verify.3 \
	CMS_verify_receipt.3 CONF_modules_free.3 \
	CONF_modules_load_file.3 CRYPTO_get_mem_functions.3 \
	CRYPTO_lock.3 CRYPTO_memcmp.3 CRYPTO_set_ex_data.3 \
	DES_set_key.3 DH_generate_key.3 DH_generate_parameters.3 \
	DH_get0_pqg.3 DH_get_ex_new_index.3 DH_new.3 DH_set_method.3 \
	DH_size.3 DIST_POINT_new.3 DSA_SIG_new.3 DSA_do_sign.3 \
	DSA_dup_DH.3 DSA_generate_key.3 DSA_generate_parameters.3 \
	DSA_get0_pqg.3 DSA_get_ex_new_index.3 DSA_meth_new.3 DSA_new.3 \
	DSA_set_method.3 DSA_sign.3 DSA_size.3 ECDH_compute_key.3 \
	ECDSA_SIG_new.3 EC_GFp_simple_method.3 EC_GROUP_copy.3 \
	EC_GROUP_new.3 EC_KEY_METHOD_new.3 EC_KEY_new.3 EC_POINT_add.3 \
	EC_POINT_new.3 ENGINE_add.3 ENGINE_ctrl.3 \
	ENGINE_get_default_RSA.3 ENGINE_init.3 ENGINE_new.3 \
	ENGINE_register_RSA.3 ENGINE_register_all_RSA.3 \
	ENGINE_set_RSA.3 ENGINE_set_default.3 ENGINE_set_flags.3 \
	ENGINE_unregister_RSA.3 ERR.3 ERR_GET_LIB.3 \
	ERR_asprintf_error_data.3 ERR_clear_error.3 ERR_error_string.3 \
	ERR_get_error.3 ERR_load_crypto_strings.3 ERR_load_strings.3 \
	ERR_print_errors.3 ERR_put_error.3 ERR_remove_state.3 \
	ERR_set_mark.3 ESS_SIGNING_CERT_new.3 EVP_AEAD_CTX_init.3 \
	EVP_BytesToKey.3 EVP_DigestInit.3 EVP_DigestSignInit.3 \
	EVP_DigestVerifyInit.3 EVP_EncodeInit.3 EVP_EncryptInit.3 \
	EVP_OpenInit.3 EVP_PKEY_CTX_ctrl.3 EVP_PKEY_CTX_new.3 \
	EVP_PKEY_asn1_get_count.3 EVP_PKEY_asn1_new.3 EVP_PKEY_cmp.3 \
	EVP_PKEY_decrypt.3 EVP_PKEY_derive.3 EVP_PKEY_encrypt.3 \
	EVP_PKEY_get_default_digest_nid.3 EVP_PKEY_keygen.3 \
	EVP_PKEY_meth_get0_info.3 EVP_PKEY_meth_new.3 EVP_PKEY_new.3 \
	EVP_PKEY_print_private.3 EVP_PKEY_set1_RSA.3 EVP_PKEY_sign.3 \
	EVP_PKEY_verify.3 EVP_PKEY_verify_recover.3 EVP_SealInit.3 \
	EVP_SignInit.3 EVP_VerifyInit.3 EVP_aes_128_cbc.3 \
	EVP_camellia_128_cbc.3 EVP_des_cbc.3 EVP_rc4.3 EVP_sm3.3 \
	EVP_sm4_cbc.3 EVP_whirlpool.3 EXTENDED_KEY_USAGE_new.3 \
	GENERAL_NAME_new.3 HMAC.3 MD5.3 NAME_CONSTRAINTS_new.3 \
	OBJ_nid2obj.3 OCSP_CRLID_new.3 OCSP_REQUEST_new.3 \
	OCSP_SERVICELOC_new.3 OCSP_cert_to_id.3 \
	OCSP_request_add1_nonce.3 OCSP_resp_find_status.3 \
	OCSP_response_status.3 OCSP_sendreq_new.3 \
	OPENSSL_VERSION_NUMBER.3 OPENSSL_cleanse.3 OPENSSL_config.3 \
	OPENSSL_init_crypto.3 OPENSSL_load_builtin_modules.3 \
	OPENSSL_malloc.3 OPENSSL_sk_new.3 OpenSSL_add_all_algorithms.3 \
	PEM_bytes_read_bio.3 PEM_read.3 PEM_read_bio_PrivateKey.3 \
	PEM_write_bio_CMS_stream.3 PEM_write_bio_PKCS7_stream.3 \
	PKCS12_SAFEBAG_new.3 PKCS12_create.3 PKCS12_new.3 \
	PKCS12_newpass.3 PKCS12_parse.3 PKCS5_PBKDF2_HMAC.3 \
	PKCS7_decrypt.3 PKCS7_encrypt.3 PKCS7_new.3 PKCS7_sign.3 \
	PKCS7_sign_add_signer.3 PKCS7_verify.3 \
	PKCS8_PRIV_KEY_INFO_new.3 PKEY_USAGE_PERIOD_new.3 \
	POLICYINFO_new.3 PROXY_POLICY_new.3 RAND_add.3 RAND_bytes.3 \

	RAND_load_file.3 RAND_set_rand_method.3 RC4.3 RIPEMD160.3 \
	RSA_PSS_PARAMS_new.3 RSA_blinding_on.3 RSA_check_key.3 \
	RSA_generate_key.3 RSA_get0_key.3 RSA_get_ex_new_index.3 \
	RSA_meth_new.3 RSA_new.3 RSA_padding_add_PKCS1_type_1.3 \
	RSA_print.3 RSA_private_encrypt.3 RSA_public_encrypt.3 \
	RSA_set_method.3 RSA_sign.3 RSA_sign_ASN1_OCTET_STRING.3 \
	RSA_size.3 SHA1.3 SMIME_read_CMS.3 SMIME_read_PKCS7.3 \
	SMIME_write_CMS.3 SMIME_write_PKCS7.3 STACK_OF.3 SXNET_new.3 \
	TS_REQ_new.3 UI_UTIL_read_pw.3 UI_create_method.3 \
	UI_get_string_type.3 UI_new.3 X25519.3 X509V3_get_d2i.3 \
	X509_ALGOR_dup.3 X509_ATTRIBUTE_new.3 X509_CINF_new.3 \
	X509_CRL_get0_by_serial.3 X509_CRL_new.3 \
	X509_EXTENSION_set_object.3 X509_INFO_new.3 \
	X509_LOOKUP_hash_dir.3 X509_NAME_ENTRY_get_object.3 \
	X509_NAME_add_entry_by_txt.3 X509_NAME_get_index_by_NID.3 \
	X509_NAME_new.3 X509_NAME_print_ex.3 X509_OBJECT_get0_X509.3 \
	X509_PUBKEY_new.3 X509_REQ_new.3 X509_REVOKED_new.3 \
	X509_SIG_new.3 X509_STORE_CTX_get_error.3 \
	X509_STORE_CTX_get_ex_new_index.3 X509_STORE_CTX_new.3 \
	X509_STORE_CTX_set_verify_cb.3 X509_STORE_load_locations.3 \
	X509_STORE_new.3 X509_STORE_set1_param.3 \
	X509_STORE_set_verify_cb_func.3 X509_VERIFY_PARAM_set_flags.3 \
	X509_check_ca.3 X509_check_host.3 X509_check_issued.3 \
	X509_check_private_key.3 X509_check_purpose.3 X509_cmp.3 \
	X509_cmp_time.3 X509_digest.3 X509_get0_notBefore.3 \
	X509_get0_signature.3 X509_get1_email.3 X509_get_pubkey.3 \
	X509_get_serialNumber.3 X509_get_subject_name.3 \
	X509_get_version.3 X509_new.3 X509_sign.3 X509_verify_cert.3 \
	X509v3_get_ext_by_NID.3 bn_dump.3 crypto.3 d2i_ASN1_NULL.3 \
	d2i_ASN1_OBJECT.3 d2i_ASN1_OCTET_STRING.3 \
	d2i_ASN1_SEQUENCE_ANY.3 d2i_AUTHORITY_KEYID.3 \
	d2i_BASIC_CONSTRAINTS.3 d2i_CMS_ContentInfo.3 d2i_DHparams.3 \
	d2i_DIST_POINT.3 d2i_DSAPublicKey.3 d2i_ECPKParameters.3 \
	d2i_ESS_SIGNING_CERT.3 d2i_GENERAL_NAME.3 d2i_OCSP_REQUEST.3 \
	d2i_OCSP_RESPONSE.3 d2i_PKCS12.3 d2i_PKCS7.3 \
	d2i_PKCS8PrivateKey_bio.3 d2i_PKCS8_PRIV_KEY_INFO.3 \
	d2i_PKEY_USAGE_PERIOD.3 d2i_POLICYINFO.3 d2i_PROXY_POLICY.3 \
	d2i_PrivateKey.3 d2i_RSAPublicKey.3 d2i_TS_REQ.3 d2i_X509.3 \
	d2i_X509_ALGOR.3 d2i_X509_ATTRIBUTE.3 d2i_X509_CRL.3 \
	d2i_X509_EXTENSION.3 d2i_X509_NAME.3 d2i_X509_REQ.3 \
	d2i_X509_SIG.3 des_read_pw.3 evp.3 get_rfc3526_prime_8192.3 \
	i2d_CMS_bio_stream.3 i2d_PKCS7_bio_stream.3 lh_new.3 \
	lh_stats.3 tls_accept_socket.3 tls_client.3 \
	tls_config_ocsp_require_stapling.3 tls_config_set_protocols.3 \
	tls_config_set_session_id.3 tls_config_verify.3 \
	tls_conn_version.3 tls_connect.3 tls_init.3 tls_load_file.3 \
	tls_ocsp_process_response.3 tls_read.3
dist_man5_MANS = openssl.cnf.5 x509v3.cnf.5
all: all-am
724
725
726
727
728
729
730




731
732
733
734
735
736
737

738
739
740



741
742
743
744
745
746
747

.PRECIOUS: Makefile

install-data-hook:
	ln -sf "ACCESS_DESCRIPTION_new.3" "$(DESTDIR)$(mandir)/man3/ACCESS_DESCRIPTION_free.3"
	ln -sf "ACCESS_DESCRIPTION_new.3" "$(DESTDIR)$(mandir)/man3/AUTHORITY_INFO_ACCESS_free.3"
	ln -sf "ACCESS_DESCRIPTION_new.3" "$(DESTDIR)$(mandir)/man3/AUTHORITY_INFO_ACCESS_new.3"




	ln -sf "ASN1_INTEGER_get.3" "$(DESTDIR)$(mandir)/man3/ASN1_ENUMERATED_get.3"
	ln -sf "ASN1_INTEGER_get.3" "$(DESTDIR)$(mandir)/man3/ASN1_ENUMERATED_set.3"
	ln -sf "ASN1_INTEGER_get.3" "$(DESTDIR)$(mandir)/man3/ASN1_ENUMERATED_to_BN.3"
	ln -sf "ASN1_INTEGER_get.3" "$(DESTDIR)$(mandir)/man3/ASN1_INTEGER_set.3"
	ln -sf "ASN1_INTEGER_get.3" "$(DESTDIR)$(mandir)/man3/ASN1_INTEGER_to_BN.3"
	ln -sf "ASN1_INTEGER_get.3" "$(DESTDIR)$(mandir)/man3/BN_to_ASN1_ENUMERATED.3"
	ln -sf "ASN1_INTEGER_get.3" "$(DESTDIR)$(mandir)/man3/BN_to_ASN1_INTEGER.3"

	ln -sf "ASN1_OBJECT_new.3" "$(DESTDIR)$(mandir)/man3/ASN1_OBJECT_free.3"
	ln -sf "ASN1_STRING_TABLE_add.3" "$(DESTDIR)$(mandir)/man3/ASN1_STRING_TABLE_cleanup.3"
	ln -sf "ASN1_STRING_TABLE_add.3" "$(DESTDIR)$(mandir)/man3/ASN1_STRING_TABLE_get.3"



	ln -sf "ASN1_STRING_length.3" "$(DESTDIR)$(mandir)/man3/ASN1_STRING_cmp.3"
	ln -sf "ASN1_STRING_length.3" "$(DESTDIR)$(mandir)/man3/ASN1_STRING_data.3"
	ln -sf "ASN1_STRING_length.3" "$(DESTDIR)$(mandir)/man3/ASN1_STRING_dup.3"
	ln -sf "ASN1_STRING_length.3" "$(DESTDIR)$(mandir)/man3/ASN1_STRING_get0_data.3"
	ln -sf "ASN1_STRING_length.3" "$(DESTDIR)$(mandir)/man3/ASN1_STRING_length_set.3"
	ln -sf "ASN1_STRING_length.3" "$(DESTDIR)$(mandir)/man3/ASN1_STRING_set.3"
	ln -sf "ASN1_STRING_length.3" "$(DESTDIR)$(mandir)/man3/ASN1_STRING_to_UTF8.3"







>
>
>
>







>



>
>
>







736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767

.PRECIOUS: Makefile

install-data-hook:
	ln -sf "ACCESS_DESCRIPTION_new.3" "$(DESTDIR)$(mandir)/man3/ACCESS_DESCRIPTION_free.3"
	ln -sf "ACCESS_DESCRIPTION_new.3" "$(DESTDIR)$(mandir)/man3/AUTHORITY_INFO_ACCESS_free.3"
	ln -sf "ACCESS_DESCRIPTION_new.3" "$(DESTDIR)$(mandir)/man3/AUTHORITY_INFO_ACCESS_new.3"
	ln -sf "AES_encrypt.3" "$(DESTDIR)$(mandir)/man3/AES_cbc_encrypt.3"
	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_INTEGER_get.3" "$(DESTDIR)$(mandir)/man3/ASN1_ENUMERATED_get.3"
	ln -sf "ASN1_INTEGER_get.3" "$(DESTDIR)$(mandir)/man3/ASN1_ENUMERATED_set.3"
	ln -sf "ASN1_INTEGER_get.3" "$(DESTDIR)$(mandir)/man3/ASN1_ENUMERATED_to_BN.3"
	ln -sf "ASN1_INTEGER_get.3" "$(DESTDIR)$(mandir)/man3/ASN1_INTEGER_set.3"
	ln -sf "ASN1_INTEGER_get.3" "$(DESTDIR)$(mandir)/man3/ASN1_INTEGER_to_BN.3"
	ln -sf "ASN1_INTEGER_get.3" "$(DESTDIR)$(mandir)/man3/BN_to_ASN1_ENUMERATED.3"
	ln -sf "ASN1_INTEGER_get.3" "$(DESTDIR)$(mandir)/man3/BN_to_ASN1_INTEGER.3"
	ln -sf "ASN1_INTEGER_get.3" "$(DESTDIR)$(mandir)/man3/i2a_ASN1_INTEGER.3"
	ln -sf "ASN1_OBJECT_new.3" "$(DESTDIR)$(mandir)/man3/ASN1_OBJECT_free.3"
	ln -sf "ASN1_STRING_TABLE_add.3" "$(DESTDIR)$(mandir)/man3/ASN1_STRING_TABLE_cleanup.3"
	ln -sf "ASN1_STRING_TABLE_add.3" "$(DESTDIR)$(mandir)/man3/ASN1_STRING_TABLE_get.3"
	ln -sf "ASN1_STRING_length.3" "$(DESTDIR)$(mandir)/man3/ASN1_OCTET_STRING_cmp.3"
	ln -sf "ASN1_STRING_length.3" "$(DESTDIR)$(mandir)/man3/ASN1_OCTET_STRING_dup.3"
	ln -sf "ASN1_STRING_length.3" "$(DESTDIR)$(mandir)/man3/ASN1_OCTET_STRING_set.3"
	ln -sf "ASN1_STRING_length.3" "$(DESTDIR)$(mandir)/man3/ASN1_STRING_cmp.3"
	ln -sf "ASN1_STRING_length.3" "$(DESTDIR)$(mandir)/man3/ASN1_STRING_data.3"
	ln -sf "ASN1_STRING_length.3" "$(DESTDIR)$(mandir)/man3/ASN1_STRING_dup.3"
	ln -sf "ASN1_STRING_length.3" "$(DESTDIR)$(mandir)/man3/ASN1_STRING_get0_data.3"
	ln -sf "ASN1_STRING_length.3" "$(DESTDIR)$(mandir)/man3/ASN1_STRING_length_set.3"
	ln -sf "ASN1_STRING_length.3" "$(DESTDIR)$(mandir)/man3/ASN1_STRING_set.3"
	ln -sf "ASN1_STRING_length.3" "$(DESTDIR)$(mandir)/man3/ASN1_STRING_to_UTF8.3"
815
816
817
818
819
820
821

822
823
824
825
826
827
828
	ln -sf "ASN1_item_d2i.3" "$(DESTDIR)$(mandir)/man3/ASN1_item_i2d.3"
	ln -sf "ASN1_item_d2i.3" "$(DESTDIR)$(mandir)/man3/ASN1_item_i2d_bio.3"
	ln -sf "ASN1_item_d2i.3" "$(DESTDIR)$(mandir)/man3/ASN1_item_i2d_fp.3"
	ln -sf "ASN1_item_d2i.3" "$(DESTDIR)$(mandir)/man3/ASN1_item_print.3"
	ln -sf "ASN1_item_d2i.3" "$(DESTDIR)$(mandir)/man3/d2i_ASN1_TYPE.3"
	ln -sf "ASN1_item_d2i.3" "$(DESTDIR)$(mandir)/man3/i2d_ASN1_TYPE.3"
	ln -sf "ASN1_item_new.3" "$(DESTDIR)$(mandir)/man3/ASN1_item_free.3"

	ln -sf "ASN1_time_parse.3" "$(DESTDIR)$(mandir)/man3/ASN1_TIME_set_tm.3"
	ln -sf "ASN1_time_parse.3" "$(DESTDIR)$(mandir)/man3/ASN1_time_tm_cmp.3"
	ln -sf "AUTHORITY_KEYID_new.3" "$(DESTDIR)$(mandir)/man3/AUTHORITY_KEYID_free.3"
	ln -sf "BASIC_CONSTRAINTS_new.3" "$(DESTDIR)$(mandir)/man3/BASIC_CONSTRAINTS_free.3"
	ln -sf "BF_set_key.3" "$(DESTDIR)$(mandir)/man3/BF_cbc_encrypt.3"
	ln -sf "BF_set_key.3" "$(DESTDIR)$(mandir)/man3/BF_cfb64_encrypt.3"
	ln -sf "BF_set_key.3" "$(DESTDIR)$(mandir)/man3/BF_decrypt.3"







>







835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
	ln -sf "ASN1_item_d2i.3" "$(DESTDIR)$(mandir)/man3/ASN1_item_i2d.3"
	ln -sf "ASN1_item_d2i.3" "$(DESTDIR)$(mandir)/man3/ASN1_item_i2d_bio.3"
	ln -sf "ASN1_item_d2i.3" "$(DESTDIR)$(mandir)/man3/ASN1_item_i2d_fp.3"
	ln -sf "ASN1_item_d2i.3" "$(DESTDIR)$(mandir)/man3/ASN1_item_print.3"
	ln -sf "ASN1_item_d2i.3" "$(DESTDIR)$(mandir)/man3/d2i_ASN1_TYPE.3"
	ln -sf "ASN1_item_d2i.3" "$(DESTDIR)$(mandir)/man3/i2d_ASN1_TYPE.3"
	ln -sf "ASN1_item_new.3" "$(DESTDIR)$(mandir)/man3/ASN1_item_free.3"
	ln -sf "ASN1_put_object.3" "$(DESTDIR)$(mandir)/man3/ASN1_put_eoc.3"
	ln -sf "ASN1_time_parse.3" "$(DESTDIR)$(mandir)/man3/ASN1_TIME_set_tm.3"
	ln -sf "ASN1_time_parse.3" "$(DESTDIR)$(mandir)/man3/ASN1_time_tm_cmp.3"
	ln -sf "AUTHORITY_KEYID_new.3" "$(DESTDIR)$(mandir)/man3/AUTHORITY_KEYID_free.3"
	ln -sf "BASIC_CONSTRAINTS_new.3" "$(DESTDIR)$(mandir)/man3/BASIC_CONSTRAINTS_free.3"
	ln -sf "BF_set_key.3" "$(DESTDIR)$(mandir)/man3/BF_cbc_encrypt.3"
	ln -sf "BF_set_key.3" "$(DESTDIR)$(mandir)/man3/BF_cfb64_encrypt.3"
	ln -sf "BF_set_key.3" "$(DESTDIR)$(mandir)/man3/BF_decrypt.3"
880
881
882
883
884
885
886



887
888
889
890
891
892
893
	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/ENGINE_get_ex_data.3"
	ln -sf "BIO_get_ex_new_index.3" "$(DESTDIR)$(mandir)/man3/ENGINE_get_ex_new_index.3"
	ln -sf "BIO_get_ex_new_index.3" "$(DESTDIR)$(mandir)/man3/ENGINE_set_ex_data.3"
	ln -sf "BIO_get_ex_new_index.3" "$(DESTDIR)$(mandir)/man3/TYPE_get_ex_data.3"
	ln -sf "BIO_get_ex_new_index.3" "$(DESTDIR)$(mandir)/man3/TYPE_get_ex_new_index.3"
	ln -sf "BIO_get_ex_new_index.3" "$(DESTDIR)$(mandir)/man3/TYPE_set_ex_data.3"
	ln -sf "BIO_get_ex_new_index.3" "$(DESTDIR)$(mandir)/man3/UI_get_ex_data.3"







>
>
>







901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
	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"
	ln -sf "BIO_get_ex_new_index.3" "$(DESTDIR)$(mandir)/man3/ENGINE_get_ex_data.3"
	ln -sf "BIO_get_ex_new_index.3" "$(DESTDIR)$(mandir)/man3/ENGINE_get_ex_new_index.3"
	ln -sf "BIO_get_ex_new_index.3" "$(DESTDIR)$(mandir)/man3/ENGINE_set_ex_data.3"
	ln -sf "BIO_get_ex_new_index.3" "$(DESTDIR)$(mandir)/man3/TYPE_get_ex_data.3"
	ln -sf "BIO_get_ex_new_index.3" "$(DESTDIR)$(mandir)/man3/TYPE_get_ex_new_index.3"
	ln -sf "BIO_get_ex_new_index.3" "$(DESTDIR)$(mandir)/man3/TYPE_set_ex_data.3"
	ln -sf "BIO_get_ex_new_index.3" "$(DESTDIR)$(mandir)/man3/UI_get_ex_data.3"
1084
1085
1086
1087
1088
1089
1090

































1091
1092
1093
1094
1095
1096
1097
	ln -sf "BN_zero.3" "$(DESTDIR)$(mandir)/man3/BN_set_word.3"
	ln -sf "BN_zero.3" "$(DESTDIR)$(mandir)/man3/BN_value_one.3"
	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 "CONF_modules_free.3" "$(DESTDIR)$(mandir)/man3/CONF_modules_finish.3"
	ln -sf "CONF_modules_free.3" "$(DESTDIR)$(mandir)/man3/CONF_modules_unload.3"
	ln -sf "CONF_modules_load_file.3" "$(DESTDIR)$(mandir)/man3/CONF_modules_load.3"
	ln -sf "CRYPTO_get_mem_functions.3" "$(DESTDIR)$(mandir)/man3/CRYPTO_MEM_LEAK_CB.3"
	ln -sf "CRYPTO_get_mem_functions.3" "$(DESTDIR)$(mandir)/man3/CRYPTO_mem_ctrl.3"
	ln -sf "CRYPTO_get_mem_functions.3" "$(DESTDIR)$(mandir)/man3/CRYPTO_mem_leaks.3"
	ln -sf "CRYPTO_get_mem_functions.3" "$(DESTDIR)$(mandir)/man3/CRYPTO_mem_leaks_cb.3"







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
	ln -sf "BN_zero.3" "$(DESTDIR)$(mandir)/man3/BN_set_word.3"
	ln -sf "BN_zero.3" "$(DESTDIR)$(mandir)/man3/BN_value_one.3"
	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 "CMS_ContentInfo_new.3" "$(DESTDIR)$(mandir)/man3/CMS_ContentInfo_free.3"
	ln -sf "CMS_ContentInfo_new.3" "$(DESTDIR)$(mandir)/man3/CMS_ContentInfo_print_ctx.3"
	ln -sf "CMS_ContentInfo_new.3" "$(DESTDIR)$(mandir)/man3/CMS_ReceiptRequest_free.3"
	ln -sf "CMS_ContentInfo_new.3" "$(DESTDIR)$(mandir)/man3/CMS_ReceiptRequest_new.3"
	ln -sf "CMS_add0_cert.3" "$(DESTDIR)$(mandir)/man3/CMS_add0_crl.3"
	ln -sf "CMS_add0_cert.3" "$(DESTDIR)$(mandir)/man3/CMS_add1_cert.3"
	ln -sf "CMS_add0_cert.3" "$(DESTDIR)$(mandir)/man3/CMS_add1_crl.3"
	ln -sf "CMS_add0_cert.3" "$(DESTDIR)$(mandir)/man3/CMS_get1_certs.3"
	ln -sf "CMS_add0_cert.3" "$(DESTDIR)$(mandir)/man3/CMS_get1_crls.3"
	ln -sf "CMS_add1_recipient_cert.3" "$(DESTDIR)$(mandir)/man3/CMS_add0_recipient_key.3"
	ln -sf "CMS_add1_signer.3" "$(DESTDIR)$(mandir)/man3/CMS_SignerInfo_sign.3"
	ln -sf "CMS_decrypt.3" "$(DESTDIR)$(mandir)/man3/CMS_decrypt_set1_key.3"
	ln -sf "CMS_decrypt.3" "$(DESTDIR)$(mandir)/man3/CMS_decrypt_set1_pkey.3"
	ln -sf "CMS_get0_RecipientInfos.3" "$(DESTDIR)$(mandir)/man3/CMS_RecipientInfo_decrypt.3"
	ln -sf "CMS_get0_RecipientInfos.3" "$(DESTDIR)$(mandir)/man3/CMS_RecipientInfo_encrypt.3"
	ln -sf "CMS_get0_RecipientInfos.3" "$(DESTDIR)$(mandir)/man3/CMS_RecipientInfo_kekri_get0_id.3"
	ln -sf "CMS_get0_RecipientInfos.3" "$(DESTDIR)$(mandir)/man3/CMS_RecipientInfo_kekri_id_cmp.3"
	ln -sf "CMS_get0_RecipientInfos.3" "$(DESTDIR)$(mandir)/man3/CMS_RecipientInfo_ktri_cert_cmp.3"
	ln -sf "CMS_get0_RecipientInfos.3" "$(DESTDIR)$(mandir)/man3/CMS_RecipientInfo_ktri_get0_signer_id.3"
	ln -sf "CMS_get0_RecipientInfos.3" "$(DESTDIR)$(mandir)/man3/CMS_RecipientInfo_set0_key.3"
	ln -sf "CMS_get0_RecipientInfos.3" "$(DESTDIR)$(mandir)/man3/CMS_RecipientInfo_set0_pkey.3"
	ln -sf "CMS_get0_RecipientInfos.3" "$(DESTDIR)$(mandir)/man3/CMS_RecipientInfo_type.3"
	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_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_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"
	ln -sf "CMS_get1_ReceiptRequest.3" "$(DESTDIR)$(mandir)/man3/CMS_add1_ReceiptRequest.3"
	ln -sf "CMS_verify.3" "$(DESTDIR)$(mandir)/man3/CMS_get0_signers.3"
	ln -sf "CONF_modules_free.3" "$(DESTDIR)$(mandir)/man3/CONF_modules_finish.3"
	ln -sf "CONF_modules_free.3" "$(DESTDIR)$(mandir)/man3/CONF_modules_unload.3"
	ln -sf "CONF_modules_load_file.3" "$(DESTDIR)$(mandir)/man3/CONF_modules_load.3"
	ln -sf "CRYPTO_get_mem_functions.3" "$(DESTDIR)$(mandir)/man3/CRYPTO_MEM_LEAK_CB.3"
	ln -sf "CRYPTO_get_mem_functions.3" "$(DESTDIR)$(mandir)/man3/CRYPTO_mem_ctrl.3"
	ln -sf "CRYPTO_get_mem_functions.3" "$(DESTDIR)$(mandir)/man3/CRYPTO_mem_leaks.3"
	ln -sf "CRYPTO_get_mem_functions.3" "$(DESTDIR)$(mandir)/man3/CRYPTO_mem_leaks_cb.3"
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
	ln -sf "CRYPTO_set_ex_data.3" "$(DESTDIR)$(mandir)/man3/CRYPTO_EX_dup.3"
	ln -sf "CRYPTO_set_ex_data.3" "$(DESTDIR)$(mandir)/man3/CRYPTO_EX_free.3"
	ln -sf "CRYPTO_set_ex_data.3" "$(DESTDIR)$(mandir)/man3/CRYPTO_EX_new.3"
	ln -sf "CRYPTO_set_ex_data.3" "$(DESTDIR)$(mandir)/man3/CRYPTO_free_ex_data.3"
	ln -sf "CRYPTO_set_ex_data.3" "$(DESTDIR)$(mandir)/man3/CRYPTO_get_ex_data.3"
	ln -sf "CRYPTO_set_ex_data.3" "$(DESTDIR)$(mandir)/man3/CRYPTO_get_ex_new_index.3"
	ln -sf "CRYPTO_set_ex_data.3" "$(DESTDIR)$(mandir)/man3/CRYPTO_new_ex_data.3"
	ln -sf "CRYPTO_set_locking_callback.3" "$(DESTDIR)$(mandir)/man3/CRYPTO_THREADID_cmp.3"
	ln -sf "CRYPTO_set_locking_callback.3" "$(DESTDIR)$(mandir)/man3/CRYPTO_THREADID_cpy.3"
	ln -sf "CRYPTO_set_locking_callback.3" "$(DESTDIR)$(mandir)/man3/CRYPTO_THREADID_current.3"
	ln -sf "CRYPTO_set_locking_callback.3" "$(DESTDIR)$(mandir)/man3/CRYPTO_THREADID_get_callback.3"
	ln -sf "CRYPTO_set_locking_callback.3" "$(DESTDIR)$(mandir)/man3/CRYPTO_THREADID_hash.3"
	ln -sf "CRYPTO_set_locking_callback.3" "$(DESTDIR)$(mandir)/man3/CRYPTO_THREADID_set_callback.3"
	ln -sf "CRYPTO_set_locking_callback.3" "$(DESTDIR)$(mandir)/man3/CRYPTO_THREADID_set_numeric.3"
	ln -sf "CRYPTO_set_locking_callback.3" "$(DESTDIR)$(mandir)/man3/CRYPTO_THREADID_set_pointer.3"
	ln -sf "CRYPTO_set_locking_callback.3" "$(DESTDIR)$(mandir)/man3/CRYPTO_add.3"
	ln -sf "CRYPTO_set_locking_callback.3" "$(DESTDIR)$(mandir)/man3/CRYPTO_destroy_dynlockid.3"
	ln -sf "CRYPTO_set_locking_callback.3" "$(DESTDIR)$(mandir)/man3/CRYPTO_get_new_dynlockid.3"
	ln -sf "CRYPTO_set_locking_callback.3" "$(DESTDIR)$(mandir)/man3/CRYPTO_lock.3"
	ln -sf "CRYPTO_set_locking_callback.3" "$(DESTDIR)$(mandir)/man3/CRYPTO_num_locks.3"
	ln -sf "CRYPTO_set_locking_callback.3" "$(DESTDIR)$(mandir)/man3/CRYPTO_r_lock.3"
	ln -sf "CRYPTO_set_locking_callback.3" "$(DESTDIR)$(mandir)/man3/CRYPTO_r_unlock.3"
	ln -sf "CRYPTO_set_locking_callback.3" "$(DESTDIR)$(mandir)/man3/CRYPTO_set_dynlock_create_callback.3"
	ln -sf "CRYPTO_set_locking_callback.3" "$(DESTDIR)$(mandir)/man3/CRYPTO_set_dynlock_destroy_callback.3"
	ln -sf "CRYPTO_set_locking_callback.3" "$(DESTDIR)$(mandir)/man3/CRYPTO_set_dynlock_lock_callback.3"
	ln -sf "CRYPTO_set_locking_callback.3" "$(DESTDIR)$(mandir)/man3/CRYPTO_w_lock.3"
	ln -sf "CRYPTO_set_locking_callback.3" "$(DESTDIR)$(mandir)/man3/CRYPTO_w_unlock.3"
	ln -sf "DES_set_key.3" "$(DESTDIR)$(mandir)/man3/DES_cbc_cksum.3"
	ln -sf "DES_set_key.3" "$(DESTDIR)$(mandir)/man3/DES_cfb64_encrypt.3"
	ln -sf "DES_set_key.3" "$(DESTDIR)$(mandir)/man3/DES_cfb_encrypt.3"
	ln -sf "DES_set_key.3" "$(DESTDIR)$(mandir)/man3/DES_crypt.3"
	ln -sf "DES_set_key.3" "$(DESTDIR)$(mandir)/man3/DES_ecb2_encrypt.3"
	ln -sf "DES_set_key.3" "$(DESTDIR)$(mandir)/man3/DES_ecb3_encrypt.3"
	ln -sf "DES_set_key.3" "$(DESTDIR)$(mandir)/man3/DES_ecb_encrypt.3"







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







1166
1167
1168
1169
1170
1171
1172




















1173
1174
1175
1176
1177
1178
1179
	ln -sf "CRYPTO_set_ex_data.3" "$(DESTDIR)$(mandir)/man3/CRYPTO_EX_dup.3"
	ln -sf "CRYPTO_set_ex_data.3" "$(DESTDIR)$(mandir)/man3/CRYPTO_EX_free.3"
	ln -sf "CRYPTO_set_ex_data.3" "$(DESTDIR)$(mandir)/man3/CRYPTO_EX_new.3"
	ln -sf "CRYPTO_set_ex_data.3" "$(DESTDIR)$(mandir)/man3/CRYPTO_free_ex_data.3"
	ln -sf "CRYPTO_set_ex_data.3" "$(DESTDIR)$(mandir)/man3/CRYPTO_get_ex_data.3"
	ln -sf "CRYPTO_set_ex_data.3" "$(DESTDIR)$(mandir)/man3/CRYPTO_get_ex_new_index.3"
	ln -sf "CRYPTO_set_ex_data.3" "$(DESTDIR)$(mandir)/man3/CRYPTO_new_ex_data.3"




















	ln -sf "DES_set_key.3" "$(DESTDIR)$(mandir)/man3/DES_cbc_cksum.3"
	ln -sf "DES_set_key.3" "$(DESTDIR)$(mandir)/man3/DES_cfb64_encrypt.3"
	ln -sf "DES_set_key.3" "$(DESTDIR)$(mandir)/man3/DES_cfb_encrypt.3"
	ln -sf "DES_set_key.3" "$(DESTDIR)$(mandir)/man3/DES_crypt.3"
	ln -sf "DES_set_key.3" "$(DESTDIR)$(mandir)/man3/DES_ecb2_encrypt.3"
	ln -sf "DES_set_key.3" "$(DESTDIR)$(mandir)/man3/DES_ecb3_encrypt.3"
	ln -sf "DES_set_key.3" "$(DESTDIR)$(mandir)/man3/DES_ecb_encrypt.3"
1213
1214
1215
1216
1217
1218
1219

1220
1221
1222
1223
1224
1225
1226
	ln -sf "DSA_new.3" "$(DESTDIR)$(mandir)/man3/DSA_up_ref.3"
	ln -sf "DSA_set_method.3" "$(DESTDIR)$(mandir)/man3/DSA_OpenSSL.3"
	ln -sf "DSA_set_method.3" "$(DESTDIR)$(mandir)/man3/DSA_get_default_method.3"
	ln -sf "DSA_set_method.3" "$(DESTDIR)$(mandir)/man3/DSA_new_method.3"
	ln -sf "DSA_set_method.3" "$(DESTDIR)$(mandir)/man3/DSA_set_default_method.3"
	ln -sf "DSA_sign.3" "$(DESTDIR)$(mandir)/man3/DSA_sign_setup.3"
	ln -sf "DSA_sign.3" "$(DESTDIR)$(mandir)/man3/DSA_verify.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_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"







>







1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
	ln -sf "DSA_new.3" "$(DESTDIR)$(mandir)/man3/DSA_up_ref.3"
	ln -sf "DSA_set_method.3" "$(DESTDIR)$(mandir)/man3/DSA_OpenSSL.3"
	ln -sf "DSA_set_method.3" "$(DESTDIR)$(mandir)/man3/DSA_get_default_method.3"
	ln -sf "DSA_set_method.3" "$(DESTDIR)$(mandir)/man3/DSA_new_method.3"
	ln -sf "DSA_set_method.3" "$(DESTDIR)$(mandir)/man3/DSA_set_default_method.3"
	ln -sf "DSA_sign.3" "$(DESTDIR)$(mandir)/man3/DSA_sign_setup.3"
	ln -sf "DSA_sign.3" "$(DESTDIR)$(mandir)/man3/DSA_verify.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_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"
1269
1270
1271
1272
1273
1274
1275

















1276
1277
1278
1279
1280
1281
1282
	ln -sf "EC_GROUP_new.3" "$(DESTDIR)$(mandir)/man3/EC_GROUP_get_curve_GFp.3"
	ln -sf "EC_GROUP_new.3" "$(DESTDIR)$(mandir)/man3/EC_GROUP_new_by_curve_name.3"
	ln -sf "EC_GROUP_new.3" "$(DESTDIR)$(mandir)/man3/EC_GROUP_new_curve_GF2m.3"
	ln -sf "EC_GROUP_new.3" "$(DESTDIR)$(mandir)/man3/EC_GROUP_new_curve_GFp.3"
	ln -sf "EC_GROUP_new.3" "$(DESTDIR)$(mandir)/man3/EC_GROUP_set_curve_GF2m.3"
	ln -sf "EC_GROUP_new.3" "$(DESTDIR)$(mandir)/man3/EC_GROUP_set_curve_GFp.3"
	ln -sf "EC_GROUP_new.3" "$(DESTDIR)$(mandir)/man3/EC_get_builtin_curves.3"

















	ln -sf "EC_KEY_new.3" "$(DESTDIR)$(mandir)/man3/EC_KEY_check_key.3"
	ln -sf "EC_KEY_new.3" "$(DESTDIR)$(mandir)/man3/EC_KEY_clear_flags.3"
	ln -sf "EC_KEY_new.3" "$(DESTDIR)$(mandir)/man3/EC_KEY_copy.3"
	ln -sf "EC_KEY_new.3" "$(DESTDIR)$(mandir)/man3/EC_KEY_dup.3"
	ln -sf "EC_KEY_new.3" "$(DESTDIR)$(mandir)/man3/EC_KEY_free.3"
	ln -sf "EC_KEY_new.3" "$(DESTDIR)$(mandir)/man3/EC_KEY_generate_key.3"
	ln -sf "EC_KEY_new.3" "$(DESTDIR)$(mandir)/man3/EC_KEY_get0_group.3"







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
	ln -sf "EC_GROUP_new.3" "$(DESTDIR)$(mandir)/man3/EC_GROUP_get_curve_GFp.3"
	ln -sf "EC_GROUP_new.3" "$(DESTDIR)$(mandir)/man3/EC_GROUP_new_by_curve_name.3"
	ln -sf "EC_GROUP_new.3" "$(DESTDIR)$(mandir)/man3/EC_GROUP_new_curve_GF2m.3"
	ln -sf "EC_GROUP_new.3" "$(DESTDIR)$(mandir)/man3/EC_GROUP_new_curve_GFp.3"
	ln -sf "EC_GROUP_new.3" "$(DESTDIR)$(mandir)/man3/EC_GROUP_set_curve_GF2m.3"
	ln -sf "EC_GROUP_new.3" "$(DESTDIR)$(mandir)/man3/EC_GROUP_set_curve_GFp.3"
	ln -sf "EC_GROUP_new.3" "$(DESTDIR)$(mandir)/man3/EC_get_builtin_curves.3"
	ln -sf "EC_KEY_METHOD_new.3" "$(DESTDIR)$(mandir)/man3/EC_KEY_METHOD_free.3"
	ln -sf "EC_KEY_METHOD_new.3" "$(DESTDIR)$(mandir)/man3/EC_KEY_METHOD_get_compute_key.3"
	ln -sf "EC_KEY_METHOD_new.3" "$(DESTDIR)$(mandir)/man3/EC_KEY_METHOD_get_init.3"
	ln -sf "EC_KEY_METHOD_new.3" "$(DESTDIR)$(mandir)/man3/EC_KEY_METHOD_get_keygen.3"
	ln -sf "EC_KEY_METHOD_new.3" "$(DESTDIR)$(mandir)/man3/EC_KEY_METHOD_get_sign.3"
	ln -sf "EC_KEY_METHOD_new.3" "$(DESTDIR)$(mandir)/man3/EC_KEY_METHOD_get_verify.3"
	ln -sf "EC_KEY_METHOD_new.3" "$(DESTDIR)$(mandir)/man3/EC_KEY_METHOD_set_compute_key.3"
	ln -sf "EC_KEY_METHOD_new.3" "$(DESTDIR)$(mandir)/man3/EC_KEY_METHOD_set_init.3"
	ln -sf "EC_KEY_METHOD_new.3" "$(DESTDIR)$(mandir)/man3/EC_KEY_METHOD_set_keygen.3"
	ln -sf "EC_KEY_METHOD_new.3" "$(DESTDIR)$(mandir)/man3/EC_KEY_METHOD_set_sign.3"
	ln -sf "EC_KEY_METHOD_new.3" "$(DESTDIR)$(mandir)/man3/EC_KEY_METHOD_set_verify.3"
	ln -sf "EC_KEY_METHOD_new.3" "$(DESTDIR)$(mandir)/man3/EC_KEY_OpenSSL.3"
	ln -sf "EC_KEY_METHOD_new.3" "$(DESTDIR)$(mandir)/man3/EC_KEY_get_default_method.3"
	ln -sf "EC_KEY_METHOD_new.3" "$(DESTDIR)$(mandir)/man3/EC_KEY_get_method.3"
	ln -sf "EC_KEY_METHOD_new.3" "$(DESTDIR)$(mandir)/man3/EC_KEY_new_method.3"
	ln -sf "EC_KEY_METHOD_new.3" "$(DESTDIR)$(mandir)/man3/EC_KEY_set_default_method.3"
	ln -sf "EC_KEY_METHOD_new.3" "$(DESTDIR)$(mandir)/man3/EC_KEY_set_method.3"
	ln -sf "EC_KEY_new.3" "$(DESTDIR)$(mandir)/man3/EC_KEY_check_key.3"
	ln -sf "EC_KEY_new.3" "$(DESTDIR)$(mandir)/man3/EC_KEY_clear_flags.3"
	ln -sf "EC_KEY_new.3" "$(DESTDIR)$(mandir)/man3/EC_KEY_copy.3"
	ln -sf "EC_KEY_new.3" "$(DESTDIR)$(mandir)/man3/EC_KEY_dup.3"
	ln -sf "EC_KEY_new.3" "$(DESTDIR)$(mandir)/man3/EC_KEY_free.3"
	ln -sf "EC_KEY_new.3" "$(DESTDIR)$(mandir)/man3/EC_KEY_generate_key.3"
	ln -sf "EC_KEY_new.3" "$(DESTDIR)$(mandir)/man3/EC_KEY_get0_group.3"
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
	ln -sf "ERR_get_error.3" "$(DESTDIR)$(mandir)/man3/ERR_peek_error.3"
	ln -sf "ERR_get_error.3" "$(DESTDIR)$(mandir)/man3/ERR_peek_error_line.3"
	ln -sf "ERR_get_error.3" "$(DESTDIR)$(mandir)/man3/ERR_peek_error_line_data.3"
	ln -sf "ERR_get_error.3" "$(DESTDIR)$(mandir)/man3/ERR_peek_last_error.3"
	ln -sf "ERR_get_error.3" "$(DESTDIR)$(mandir)/man3/ERR_peek_last_error_line.3"
	ln -sf "ERR_get_error.3" "$(DESTDIR)$(mandir)/man3/ERR_peek_last_error_line_data.3"
	ln -sf "ERR_load_crypto_strings.3" "$(DESTDIR)$(mandir)/man3/ERR_free_strings.3"
	ln -sf "ERR_load_crypto_strings.3" "$(DESTDIR)$(mandir)/man3/ERR_load_BN_strings.3"
	ln -sf "ERR_load_crypto_strings.3" "$(DESTDIR)$(mandir)/man3/SSL_load_error_strings.3"
	ln -sf "ERR_load_strings.3" "$(DESTDIR)$(mandir)/man3/ERR_PACK.3"
	ln -sf "ERR_load_strings.3" "$(DESTDIR)$(mandir)/man3/ERR_get_next_error_library.3"
	ln -sf "ERR_print_errors.3" "$(DESTDIR)$(mandir)/man3/ERR_print_errors_cb.3"
	ln -sf "ERR_print_errors.3" "$(DESTDIR)$(mandir)/man3/ERR_print_errors_fp.3"
	ln -sf "ERR_put_error.3" "$(DESTDIR)$(mandir)/man3/ERR_add_error_data.3"
	ln -sf "ERR_put_error.3" "$(DESTDIR)$(mandir)/man3/ERR_add_error_vdata.3"







<







1496
1497
1498
1499
1500
1501
1502

1503
1504
1505
1506
1507
1508
1509
	ln -sf "ERR_get_error.3" "$(DESTDIR)$(mandir)/man3/ERR_peek_error.3"
	ln -sf "ERR_get_error.3" "$(DESTDIR)$(mandir)/man3/ERR_peek_error_line.3"
	ln -sf "ERR_get_error.3" "$(DESTDIR)$(mandir)/man3/ERR_peek_error_line_data.3"
	ln -sf "ERR_get_error.3" "$(DESTDIR)$(mandir)/man3/ERR_peek_last_error.3"
	ln -sf "ERR_get_error.3" "$(DESTDIR)$(mandir)/man3/ERR_peek_last_error_line.3"
	ln -sf "ERR_get_error.3" "$(DESTDIR)$(mandir)/man3/ERR_peek_last_error_line_data.3"
	ln -sf "ERR_load_crypto_strings.3" "$(DESTDIR)$(mandir)/man3/ERR_free_strings.3"

	ln -sf "ERR_load_crypto_strings.3" "$(DESTDIR)$(mandir)/man3/SSL_load_error_strings.3"
	ln -sf "ERR_load_strings.3" "$(DESTDIR)$(mandir)/man3/ERR_PACK.3"
	ln -sf "ERR_load_strings.3" "$(DESTDIR)$(mandir)/man3/ERR_get_next_error_library.3"
	ln -sf "ERR_print_errors.3" "$(DESTDIR)$(mandir)/man3/ERR_print_errors_cb.3"
	ln -sf "ERR_print_errors.3" "$(DESTDIR)$(mandir)/man3/ERR_print_errors_fp.3"
	ln -sf "ERR_put_error.3" "$(DESTDIR)$(mandir)/man3/ERR_add_error_data.3"
	ln -sf "ERR_put_error.3" "$(DESTDIR)$(mandir)/man3/ERR_add_error_vdata.3"
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
	ln -sf "EVP_AEAD_CTX_init.3" "$(DESTDIR)$(mandir)/man3/EVP_AEAD_CTX_seal.3"
	ln -sf "EVP_AEAD_CTX_init.3" "$(DESTDIR)$(mandir)/man3/EVP_AEAD_key_length.3"
	ln -sf "EVP_AEAD_CTX_init.3" "$(DESTDIR)$(mandir)/man3/EVP_AEAD_max_overhead.3"
	ln -sf "EVP_AEAD_CTX_init.3" "$(DESTDIR)$(mandir)/man3/EVP_AEAD_max_tag_len.3"
	ln -sf "EVP_AEAD_CTX_init.3" "$(DESTDIR)$(mandir)/man3/EVP_AEAD_nonce_length.3"
	ln -sf "EVP_AEAD_CTX_init.3" "$(DESTDIR)$(mandir)/man3/EVP_aead_aes_128_gcm.3"
	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"
	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_DigestInit.3" "$(DESTDIR)$(mandir)/man3/EVP_DigestFinal.3"
	ln -sf "EVP_DigestInit.3" "$(DESTDIR)$(mandir)/man3/EVP_DigestFinal_ex.3"
	ln -sf "EVP_DigestInit.3" "$(DESTDIR)$(mandir)/man3/EVP_DigestInit_ex.3"
	ln -sf "EVP_DigestInit.3" "$(DESTDIR)$(mandir)/man3/EVP_DigestUpdate.3"
	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"







|
|
|







1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
	ln -sf "EVP_AEAD_CTX_init.3" "$(DESTDIR)$(mandir)/man3/EVP_AEAD_CTX_seal.3"
	ln -sf "EVP_AEAD_CTX_init.3" "$(DESTDIR)$(mandir)/man3/EVP_AEAD_key_length.3"
	ln -sf "EVP_AEAD_CTX_init.3" "$(DESTDIR)$(mandir)/man3/EVP_AEAD_max_overhead.3"
	ln -sf "EVP_AEAD_CTX_init.3" "$(DESTDIR)$(mandir)/man3/EVP_AEAD_max_tag_len.3"
	ln -sf "EVP_AEAD_CTX_init.3" "$(DESTDIR)$(mandir)/man3/EVP_AEAD_nonce_length.3"
	ln -sf "EVP_AEAD_CTX_init.3" "$(DESTDIR)$(mandir)/man3/EVP_aead_aes_128_gcm.3"
	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_DigestInit.3" "$(DESTDIR)$(mandir)/man3/EVP_Digest.3"
	ln -sf "EVP_DigestInit.3" "$(DESTDIR)$(mandir)/man3/EVP_DigestFinal.3"
	ln -sf "EVP_DigestInit.3" "$(DESTDIR)$(mandir)/man3/EVP_DigestFinal_ex.3"
	ln -sf "EVP_DigestInit.3" "$(DESTDIR)$(mandir)/man3/EVP_DigestInit_ex.3"
	ln -sf "EVP_DigestInit.3" "$(DESTDIR)$(mandir)/man3/EVP_DigestUpdate.3"
	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"
1551
1552
1553
1554
1555
1556
1557

1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573

1574
1575
1576
1577

1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599

1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616

1617
1618
1619
1620
1621
1622
1623
	ln -sf "EVP_EncryptInit.3" "$(DESTDIR)$(mandir)/man3/EVP_CIPHER_flags.3"
	ln -sf "EVP_EncryptInit.3" "$(DESTDIR)$(mandir)/man3/EVP_CIPHER_iv_length.3"
	ln -sf "EVP_EncryptInit.3" "$(DESTDIR)$(mandir)/man3/EVP_CIPHER_key_length.3"
	ln -sf "EVP_EncryptInit.3" "$(DESTDIR)$(mandir)/man3/EVP_CIPHER_mode.3"
	ln -sf "EVP_EncryptInit.3" "$(DESTDIR)$(mandir)/man3/EVP_CIPHER_nid.3"
	ln -sf "EVP_EncryptInit.3" "$(DESTDIR)$(mandir)/man3/EVP_CIPHER_param_to_asn1.3"
	ln -sf "EVP_EncryptInit.3" "$(DESTDIR)$(mandir)/man3/EVP_CIPHER_type.3"

	ln -sf "EVP_EncryptInit.3" "$(DESTDIR)$(mandir)/man3/EVP_CipherFinal.3"
	ln -sf "EVP_EncryptInit.3" "$(DESTDIR)$(mandir)/man3/EVP_CipherFinal_ex.3"
	ln -sf "EVP_EncryptInit.3" "$(DESTDIR)$(mandir)/man3/EVP_CipherInit.3"
	ln -sf "EVP_EncryptInit.3" "$(DESTDIR)$(mandir)/man3/EVP_CipherInit_ex.3"
	ln -sf "EVP_EncryptInit.3" "$(DESTDIR)$(mandir)/man3/EVP_CipherUpdate.3"
	ln -sf "EVP_EncryptInit.3" "$(DESTDIR)$(mandir)/man3/EVP_DecryptFinal.3"
	ln -sf "EVP_EncryptInit.3" "$(DESTDIR)$(mandir)/man3/EVP_DecryptFinal_ex.3"
	ln -sf "EVP_EncryptInit.3" "$(DESTDIR)$(mandir)/man3/EVP_DecryptInit.3"
	ln -sf "EVP_EncryptInit.3" "$(DESTDIR)$(mandir)/man3/EVP_DecryptInit_ex.3"
	ln -sf "EVP_EncryptInit.3" "$(DESTDIR)$(mandir)/man3/EVP_DecryptUpdate.3"
	ln -sf "EVP_EncryptInit.3" "$(DESTDIR)$(mandir)/man3/EVP_EncryptFinal.3"
	ln -sf "EVP_EncryptInit.3" "$(DESTDIR)$(mandir)/man3/EVP_EncryptFinal_ex.3"
	ln -sf "EVP_EncryptInit.3" "$(DESTDIR)$(mandir)/man3/EVP_EncryptInit_ex.3"
	ln -sf "EVP_EncryptInit.3" "$(DESTDIR)$(mandir)/man3/EVP_EncryptUpdate.3"
	ln -sf "EVP_EncryptInit.3" "$(DESTDIR)$(mandir)/man3/EVP_bf_cbc.3"
	ln -sf "EVP_EncryptInit.3" "$(DESTDIR)$(mandir)/man3/EVP_bf_cfb.3"

	ln -sf "EVP_EncryptInit.3" "$(DESTDIR)$(mandir)/man3/EVP_bf_ecb.3"
	ln -sf "EVP_EncryptInit.3" "$(DESTDIR)$(mandir)/man3/EVP_bf_ofb.3"
	ln -sf "EVP_EncryptInit.3" "$(DESTDIR)$(mandir)/man3/EVP_cast5_cbc.3"
	ln -sf "EVP_EncryptInit.3" "$(DESTDIR)$(mandir)/man3/EVP_cast5_cfb.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_des_cbc.3"
	ln -sf "EVP_EncryptInit.3" "$(DESTDIR)$(mandir)/man3/EVP_des_cfb.3"
	ln -sf "EVP_EncryptInit.3" "$(DESTDIR)$(mandir)/man3/EVP_des_ecb.3"
	ln -sf "EVP_EncryptInit.3" "$(DESTDIR)$(mandir)/man3/EVP_des_ede.3"
	ln -sf "EVP_EncryptInit.3" "$(DESTDIR)$(mandir)/man3/EVP_des_ede3.3"
	ln -sf "EVP_EncryptInit.3" "$(DESTDIR)$(mandir)/man3/EVP_des_ede3_cbc.3"
	ln -sf "EVP_EncryptInit.3" "$(DESTDIR)$(mandir)/man3/EVP_des_ede3_cfb.3"
	ln -sf "EVP_EncryptInit.3" "$(DESTDIR)$(mandir)/man3/EVP_des_ede3_ofb.3"
	ln -sf "EVP_EncryptInit.3" "$(DESTDIR)$(mandir)/man3/EVP_des_ede_cbc.3"
	ln -sf "EVP_EncryptInit.3" "$(DESTDIR)$(mandir)/man3/EVP_des_ede_cfb.3"
	ln -sf "EVP_EncryptInit.3" "$(DESTDIR)$(mandir)/man3/EVP_des_ede_ofb.3"
	ln -sf "EVP_EncryptInit.3" "$(DESTDIR)$(mandir)/man3/EVP_des_ofb.3"
	ln -sf "EVP_EncryptInit.3" "$(DESTDIR)$(mandir)/man3/EVP_desx_cbc.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"
	ln -sf "EVP_EncryptInit.3" "$(DESTDIR)$(mandir)/man3/EVP_get_cipherbyobj.3"
	ln -sf "EVP_EncryptInit.3" "$(DESTDIR)$(mandir)/man3/EVP_idea_cbc.3"
	ln -sf "EVP_EncryptInit.3" "$(DESTDIR)$(mandir)/man3/EVP_idea_cfb.3"

	ln -sf "EVP_EncryptInit.3" "$(DESTDIR)$(mandir)/man3/EVP_idea_ecb.3"
	ln -sf "EVP_EncryptInit.3" "$(DESTDIR)$(mandir)/man3/EVP_idea_ofb.3"
	ln -sf "EVP_EncryptInit.3" "$(DESTDIR)$(mandir)/man3/EVP_rc2_40_cbc.3"
	ln -sf "EVP_EncryptInit.3" "$(DESTDIR)$(mandir)/man3/EVP_rc2_64_cbc.3"
	ln -sf "EVP_EncryptInit.3" "$(DESTDIR)$(mandir)/man3/EVP_rc2_cbc.3"
	ln -sf "EVP_EncryptInit.3" "$(DESTDIR)$(mandir)/man3/EVP_rc2_cfb.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_EncryptInit.3" "$(DESTDIR)$(mandir)/man3/EVP_rc4.3"
	ln -sf "EVP_EncryptInit.3" "$(DESTDIR)$(mandir)/man3/EVP_rc4_40.3"
	ln -sf "EVP_EncryptInit.3" "$(DESTDIR)$(mandir)/man3/EVP_rc4_hmac_md5.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_PKEY_CTX_ctrl.3" "$(DESTDIR)$(mandir)/man3/EVP_PKEY_CTX_ctrl_str.3"
	ln -sf "EVP_PKEY_CTX_ctrl.3" "$(DESTDIR)$(mandir)/man3/EVP_PKEY_CTX_get_rsa_mgf1_md.3"
	ln -sf "EVP_PKEY_CTX_ctrl.3" "$(DESTDIR)$(mandir)/man3/EVP_PKEY_CTX_get_rsa_padding.3"
	ln -sf "EVP_PKEY_CTX_ctrl.3" "$(DESTDIR)$(mandir)/man3/EVP_PKEY_CTX_get_rsa_pss_saltlen.3"

	ln -sf "EVP_PKEY_CTX_ctrl.3" "$(DESTDIR)$(mandir)/man3/EVP_PKEY_CTX_set_dh_paramgen_generator.3"
	ln -sf "EVP_PKEY_CTX_ctrl.3" "$(DESTDIR)$(mandir)/man3/EVP_PKEY_CTX_set_dh_paramgen_prime_len.3"
	ln -sf "EVP_PKEY_CTX_ctrl.3" "$(DESTDIR)$(mandir)/man3/EVP_PKEY_CTX_set_dsa_paramgen_bits.3"
	ln -sf "EVP_PKEY_CTX_ctrl.3" "$(DESTDIR)$(mandir)/man3/EVP_PKEY_CTX_set_ec_paramgen_curve_nid.3"
	ln -sf "EVP_PKEY_CTX_ctrl.3" "$(DESTDIR)$(mandir)/man3/EVP_PKEY_CTX_set_rsa_keygen_bits.3"
	ln -sf "EVP_PKEY_CTX_ctrl.3" "$(DESTDIR)$(mandir)/man3/EVP_PKEY_CTX_set_rsa_keygen_pubexp.3"
	ln -sf "EVP_PKEY_CTX_ctrl.3" "$(DESTDIR)$(mandir)/man3/EVP_PKEY_CTX_set_rsa_mgf1_md.3"







>
















>




>



<
<
<
<
<
<
<
<
<
<
<
<
<






>






|
|
|
<
<






>







1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637













1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653


1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
	ln -sf "EVP_EncryptInit.3" "$(DESTDIR)$(mandir)/man3/EVP_CIPHER_flags.3"
	ln -sf "EVP_EncryptInit.3" "$(DESTDIR)$(mandir)/man3/EVP_CIPHER_iv_length.3"
	ln -sf "EVP_EncryptInit.3" "$(DESTDIR)$(mandir)/man3/EVP_CIPHER_key_length.3"
	ln -sf "EVP_EncryptInit.3" "$(DESTDIR)$(mandir)/man3/EVP_CIPHER_mode.3"
	ln -sf "EVP_EncryptInit.3" "$(DESTDIR)$(mandir)/man3/EVP_CIPHER_nid.3"
	ln -sf "EVP_EncryptInit.3" "$(DESTDIR)$(mandir)/man3/EVP_CIPHER_param_to_asn1.3"
	ln -sf "EVP_EncryptInit.3" "$(DESTDIR)$(mandir)/man3/EVP_CIPHER_type.3"
	ln -sf "EVP_EncryptInit.3" "$(DESTDIR)$(mandir)/man3/EVP_Cipher.3"
	ln -sf "EVP_EncryptInit.3" "$(DESTDIR)$(mandir)/man3/EVP_CipherFinal.3"
	ln -sf "EVP_EncryptInit.3" "$(DESTDIR)$(mandir)/man3/EVP_CipherFinal_ex.3"
	ln -sf "EVP_EncryptInit.3" "$(DESTDIR)$(mandir)/man3/EVP_CipherInit.3"
	ln -sf "EVP_EncryptInit.3" "$(DESTDIR)$(mandir)/man3/EVP_CipherInit_ex.3"
	ln -sf "EVP_EncryptInit.3" "$(DESTDIR)$(mandir)/man3/EVP_CipherUpdate.3"
	ln -sf "EVP_EncryptInit.3" "$(DESTDIR)$(mandir)/man3/EVP_DecryptFinal.3"
	ln -sf "EVP_EncryptInit.3" "$(DESTDIR)$(mandir)/man3/EVP_DecryptFinal_ex.3"
	ln -sf "EVP_EncryptInit.3" "$(DESTDIR)$(mandir)/man3/EVP_DecryptInit.3"
	ln -sf "EVP_EncryptInit.3" "$(DESTDIR)$(mandir)/man3/EVP_DecryptInit_ex.3"
	ln -sf "EVP_EncryptInit.3" "$(DESTDIR)$(mandir)/man3/EVP_DecryptUpdate.3"
	ln -sf "EVP_EncryptInit.3" "$(DESTDIR)$(mandir)/man3/EVP_EncryptFinal.3"
	ln -sf "EVP_EncryptInit.3" "$(DESTDIR)$(mandir)/man3/EVP_EncryptFinal_ex.3"
	ln -sf "EVP_EncryptInit.3" "$(DESTDIR)$(mandir)/man3/EVP_EncryptInit_ex.3"
	ln -sf "EVP_EncryptInit.3" "$(DESTDIR)$(mandir)/man3/EVP_EncryptUpdate.3"
	ln -sf "EVP_EncryptInit.3" "$(DESTDIR)$(mandir)/man3/EVP_bf_cbc.3"
	ln -sf "EVP_EncryptInit.3" "$(DESTDIR)$(mandir)/man3/EVP_bf_cfb.3"
	ln -sf "EVP_EncryptInit.3" "$(DESTDIR)$(mandir)/man3/EVP_bf_cfb64.3"
	ln -sf "EVP_EncryptInit.3" "$(DESTDIR)$(mandir)/man3/EVP_bf_ecb.3"
	ln -sf "EVP_EncryptInit.3" "$(DESTDIR)$(mandir)/man3/EVP_bf_ofb.3"
	ln -sf "EVP_EncryptInit.3" "$(DESTDIR)$(mandir)/man3/EVP_cast5_cbc.3"
	ln -sf "EVP_EncryptInit.3" "$(DESTDIR)$(mandir)/man3/EVP_cast5_cfb.3"
	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"
	ln -sf "EVP_EncryptInit.3" "$(DESTDIR)$(mandir)/man3/EVP_get_cipherbyobj.3"
	ln -sf "EVP_EncryptInit.3" "$(DESTDIR)$(mandir)/man3/EVP_idea_cbc.3"
	ln -sf "EVP_EncryptInit.3" "$(DESTDIR)$(mandir)/man3/EVP_idea_cfb.3"
	ln -sf "EVP_EncryptInit.3" "$(DESTDIR)$(mandir)/man3/EVP_idea_cfb64.3"
	ln -sf "EVP_EncryptInit.3" "$(DESTDIR)$(mandir)/man3/EVP_idea_ecb.3"
	ln -sf "EVP_EncryptInit.3" "$(DESTDIR)$(mandir)/man3/EVP_idea_ofb.3"
	ln -sf "EVP_EncryptInit.3" "$(DESTDIR)$(mandir)/man3/EVP_rc2_40_cbc.3"
	ln -sf "EVP_EncryptInit.3" "$(DESTDIR)$(mandir)/man3/EVP_rc2_64_cbc.3"
	ln -sf "EVP_EncryptInit.3" "$(DESTDIR)$(mandir)/man3/EVP_rc2_cbc.3"
	ln -sf "EVP_EncryptInit.3" "$(DESTDIR)$(mandir)/man3/EVP_rc2_cfb.3"
	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_OpenInit.3" "$(DESTDIR)$(mandir)/man3/EVP_OpenFinal.3"
	ln -sf "EVP_OpenInit.3" "$(DESTDIR)$(mandir)/man3/EVP_OpenUpdate.3"
	ln -sf "EVP_PKEY_CTX_ctrl.3" "$(DESTDIR)$(mandir)/man3/EVP_PKEY_CTX_ctrl_str.3"
	ln -sf "EVP_PKEY_CTX_ctrl.3" "$(DESTDIR)$(mandir)/man3/EVP_PKEY_CTX_get_rsa_mgf1_md.3"
	ln -sf "EVP_PKEY_CTX_ctrl.3" "$(DESTDIR)$(mandir)/man3/EVP_PKEY_CTX_get_rsa_padding.3"
	ln -sf "EVP_PKEY_CTX_ctrl.3" "$(DESTDIR)$(mandir)/man3/EVP_PKEY_CTX_get_rsa_pss_saltlen.3"
	ln -sf "EVP_PKEY_CTX_ctrl.3" "$(DESTDIR)$(mandir)/man3/EVP_PKEY_CTX_get_signature_md.3"
	ln -sf "EVP_PKEY_CTX_ctrl.3" "$(DESTDIR)$(mandir)/man3/EVP_PKEY_CTX_set_dh_paramgen_generator.3"
	ln -sf "EVP_PKEY_CTX_ctrl.3" "$(DESTDIR)$(mandir)/man3/EVP_PKEY_CTX_set_dh_paramgen_prime_len.3"
	ln -sf "EVP_PKEY_CTX_ctrl.3" "$(DESTDIR)$(mandir)/man3/EVP_PKEY_CTX_set_dsa_paramgen_bits.3"
	ln -sf "EVP_PKEY_CTX_ctrl.3" "$(DESTDIR)$(mandir)/man3/EVP_PKEY_CTX_set_ec_paramgen_curve_nid.3"
	ln -sf "EVP_PKEY_CTX_ctrl.3" "$(DESTDIR)$(mandir)/man3/EVP_PKEY_CTX_set_rsa_keygen_bits.3"
	ln -sf "EVP_PKEY_CTX_ctrl.3" "$(DESTDIR)$(mandir)/man3/EVP_PKEY_CTX_set_rsa_keygen_pubexp.3"
	ln -sf "EVP_PKEY_CTX_ctrl.3" "$(DESTDIR)$(mandir)/man3/EVP_PKEY_CTX_set_rsa_mgf1_md.3"
1676
1677
1678
1679
1680
1681
1682

1683
1684
1685

1686
1687

1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700

1701
1702
1703
1704
1705
1706
1707
	ln -sf "EVP_PKEY_meth_new.3" "$(DESTDIR)$(mandir)/man3/EVP_PKEY_meth_set_verify_recover.3"
	ln -sf "EVP_PKEY_meth_new.3" "$(DESTDIR)$(mandir)/man3/EVP_PKEY_meth_set_verifyctx.3"
	ln -sf "EVP_PKEY_new.3" "$(DESTDIR)$(mandir)/man3/EVP_PKEY_free.3"
	ln -sf "EVP_PKEY_new.3" "$(DESTDIR)$(mandir)/man3/EVP_PKEY_new_mac_key.3"
	ln -sf "EVP_PKEY_new.3" "$(DESTDIR)$(mandir)/man3/EVP_PKEY_up_ref.3"
	ln -sf "EVP_PKEY_print_private.3" "$(DESTDIR)$(mandir)/man3/EVP_PKEY_print_params.3"
	ln -sf "EVP_PKEY_print_private.3" "$(DESTDIR)$(mandir)/man3/EVP_PKEY_print_public.3"

	ln -sf "EVP_PKEY_set1_RSA.3" "$(DESTDIR)$(mandir)/man3/EVP_PKEY_assign_DH.3"
	ln -sf "EVP_PKEY_set1_RSA.3" "$(DESTDIR)$(mandir)/man3/EVP_PKEY_assign_DSA.3"
	ln -sf "EVP_PKEY_set1_RSA.3" "$(DESTDIR)$(mandir)/man3/EVP_PKEY_assign_EC_KEY.3"

	ln -sf "EVP_PKEY_set1_RSA.3" "$(DESTDIR)$(mandir)/man3/EVP_PKEY_assign_RSA.3"
	ln -sf "EVP_PKEY_set1_RSA.3" "$(DESTDIR)$(mandir)/man3/EVP_PKEY_base_id.3"

	ln -sf "EVP_PKEY_set1_RSA.3" "$(DESTDIR)$(mandir)/man3/EVP_PKEY_get0_DH.3"
	ln -sf "EVP_PKEY_set1_RSA.3" "$(DESTDIR)$(mandir)/man3/EVP_PKEY_get0_DSA.3"
	ln -sf "EVP_PKEY_set1_RSA.3" "$(DESTDIR)$(mandir)/man3/EVP_PKEY_get0_EC_KEY.3"
	ln -sf "EVP_PKEY_set1_RSA.3" "$(DESTDIR)$(mandir)/man3/EVP_PKEY_get0_RSA.3"
	ln -sf "EVP_PKEY_set1_RSA.3" "$(DESTDIR)$(mandir)/man3/EVP_PKEY_get0_hmac.3"
	ln -sf "EVP_PKEY_set1_RSA.3" "$(DESTDIR)$(mandir)/man3/EVP_PKEY_get1_DH.3"
	ln -sf "EVP_PKEY_set1_RSA.3" "$(DESTDIR)$(mandir)/man3/EVP_PKEY_get1_DSA.3"
	ln -sf "EVP_PKEY_set1_RSA.3" "$(DESTDIR)$(mandir)/man3/EVP_PKEY_get1_EC_KEY.3"
	ln -sf "EVP_PKEY_set1_RSA.3" "$(DESTDIR)$(mandir)/man3/EVP_PKEY_get1_RSA.3"
	ln -sf "EVP_PKEY_set1_RSA.3" "$(DESTDIR)$(mandir)/man3/EVP_PKEY_id.3"
	ln -sf "EVP_PKEY_set1_RSA.3" "$(DESTDIR)$(mandir)/man3/EVP_PKEY_set1_DH.3"
	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_type.3"
	ln -sf "EVP_PKEY_sign.3" "$(DESTDIR)$(mandir)/man3/EVP_PKEY_sign_init.3"
	ln -sf "EVP_PKEY_verify.3" "$(DESTDIR)$(mandir)/man3/EVP_PKEY_verify_init.3"
	ln -sf "EVP_PKEY_verify_recover.3" "$(DESTDIR)$(mandir)/man3/EVP_PKEY_verify_recover_init.3"
	ln -sf "EVP_SealInit.3" "$(DESTDIR)$(mandir)/man3/EVP_SealFinal.3"
	ln -sf "EVP_SealInit.3" "$(DESTDIR)$(mandir)/man3/EVP_SealUpdate.3"
	ln -sf "EVP_SignInit.3" "$(DESTDIR)$(mandir)/man3/EVP_PKEY_bits.3"







>



>


>













>







1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
	ln -sf "EVP_PKEY_meth_new.3" "$(DESTDIR)$(mandir)/man3/EVP_PKEY_meth_set_verify_recover.3"
	ln -sf "EVP_PKEY_meth_new.3" "$(DESTDIR)$(mandir)/man3/EVP_PKEY_meth_set_verifyctx.3"
	ln -sf "EVP_PKEY_new.3" "$(DESTDIR)$(mandir)/man3/EVP_PKEY_free.3"
	ln -sf "EVP_PKEY_new.3" "$(DESTDIR)$(mandir)/man3/EVP_PKEY_new_mac_key.3"
	ln -sf "EVP_PKEY_new.3" "$(DESTDIR)$(mandir)/man3/EVP_PKEY_up_ref.3"
	ln -sf "EVP_PKEY_print_private.3" "$(DESTDIR)$(mandir)/man3/EVP_PKEY_print_params.3"
	ln -sf "EVP_PKEY_print_private.3" "$(DESTDIR)$(mandir)/man3/EVP_PKEY_print_public.3"
	ln -sf "EVP_PKEY_set1_RSA.3" "$(DESTDIR)$(mandir)/man3/EVP_PKEY_assign.3"
	ln -sf "EVP_PKEY_set1_RSA.3" "$(DESTDIR)$(mandir)/man3/EVP_PKEY_assign_DH.3"
	ln -sf "EVP_PKEY_set1_RSA.3" "$(DESTDIR)$(mandir)/man3/EVP_PKEY_assign_DSA.3"
	ln -sf "EVP_PKEY_set1_RSA.3" "$(DESTDIR)$(mandir)/man3/EVP_PKEY_assign_EC_KEY.3"
	ln -sf "EVP_PKEY_set1_RSA.3" "$(DESTDIR)$(mandir)/man3/EVP_PKEY_assign_GOST.3"
	ln -sf "EVP_PKEY_set1_RSA.3" "$(DESTDIR)$(mandir)/man3/EVP_PKEY_assign_RSA.3"
	ln -sf "EVP_PKEY_set1_RSA.3" "$(DESTDIR)$(mandir)/man3/EVP_PKEY_base_id.3"
	ln -sf "EVP_PKEY_set1_RSA.3" "$(DESTDIR)$(mandir)/man3/EVP_PKEY_get0.3"
	ln -sf "EVP_PKEY_set1_RSA.3" "$(DESTDIR)$(mandir)/man3/EVP_PKEY_get0_DH.3"
	ln -sf "EVP_PKEY_set1_RSA.3" "$(DESTDIR)$(mandir)/man3/EVP_PKEY_get0_DSA.3"
	ln -sf "EVP_PKEY_set1_RSA.3" "$(DESTDIR)$(mandir)/man3/EVP_PKEY_get0_EC_KEY.3"
	ln -sf "EVP_PKEY_set1_RSA.3" "$(DESTDIR)$(mandir)/man3/EVP_PKEY_get0_RSA.3"
	ln -sf "EVP_PKEY_set1_RSA.3" "$(DESTDIR)$(mandir)/man3/EVP_PKEY_get0_hmac.3"
	ln -sf "EVP_PKEY_set1_RSA.3" "$(DESTDIR)$(mandir)/man3/EVP_PKEY_get1_DH.3"
	ln -sf "EVP_PKEY_set1_RSA.3" "$(DESTDIR)$(mandir)/man3/EVP_PKEY_get1_DSA.3"
	ln -sf "EVP_PKEY_set1_RSA.3" "$(DESTDIR)$(mandir)/man3/EVP_PKEY_get1_EC_KEY.3"
	ln -sf "EVP_PKEY_set1_RSA.3" "$(DESTDIR)$(mandir)/man3/EVP_PKEY_get1_RSA.3"
	ln -sf "EVP_PKEY_set1_RSA.3" "$(DESTDIR)$(mandir)/man3/EVP_PKEY_id.3"
	ln -sf "EVP_PKEY_set1_RSA.3" "$(DESTDIR)$(mandir)/man3/EVP_PKEY_set1_DH.3"
	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_type.3"
	ln -sf "EVP_PKEY_sign.3" "$(DESTDIR)$(mandir)/man3/EVP_PKEY_sign_init.3"
	ln -sf "EVP_PKEY_verify.3" "$(DESTDIR)$(mandir)/man3/EVP_PKEY_verify_init.3"
	ln -sf "EVP_PKEY_verify_recover.3" "$(DESTDIR)$(mandir)/man3/EVP_PKEY_verify_recover_init.3"
	ln -sf "EVP_SealInit.3" "$(DESTDIR)$(mandir)/man3/EVP_SealFinal.3"
	ln -sf "EVP_SealInit.3" "$(DESTDIR)$(mandir)/man3/EVP_SealUpdate.3"
	ln -sf "EVP_SignInit.3" "$(DESTDIR)$(mandir)/man3/EVP_PKEY_bits.3"
1744
1745
1746
1747
1748
1749
1750











































1751
1752
1753
1754
1755
1756
1757
	ln -sf "EVP_aes_128_cbc.3" "$(DESTDIR)$(mandir)/man3/EVP_aes_256_cfb8.3"
	ln -sf "EVP_aes_128_cbc.3" "$(DESTDIR)$(mandir)/man3/EVP_aes_256_ctr.3"
	ln -sf "EVP_aes_128_cbc.3" "$(DESTDIR)$(mandir)/man3/EVP_aes_256_ecb.3"
	ln -sf "EVP_aes_128_cbc.3" "$(DESTDIR)$(mandir)/man3/EVP_aes_256_gcm.3"
	ln -sf "EVP_aes_128_cbc.3" "$(DESTDIR)$(mandir)/man3/EVP_aes_256_ofb.3"
	ln -sf "EVP_aes_128_cbc.3" "$(DESTDIR)$(mandir)/man3/EVP_aes_256_wrap.3"
	ln -sf "EVP_aes_128_cbc.3" "$(DESTDIR)$(mandir)/man3/EVP_aes_256_xts.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"
	ln -sf "EVP_sm4_cbc.3" "$(DESTDIR)$(mandir)/man3/EVP_sm4_ecb.3"
	ln -sf "EVP_sm4_cbc.3" "$(DESTDIR)$(mandir)/man3/EVP_sm4_ofb.3"
	ln -sf "EXTENDED_KEY_USAGE_new.3" "$(DESTDIR)$(mandir)/man3/EXTENDED_KEY_USAGE_free.3"
	ln -sf "GENERAL_NAME_new.3" "$(DESTDIR)$(mandir)/man3/EDIPARTYNAME_free.3"







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
	ln -sf "EVP_aes_128_cbc.3" "$(DESTDIR)$(mandir)/man3/EVP_aes_256_cfb8.3"
	ln -sf "EVP_aes_128_cbc.3" "$(DESTDIR)$(mandir)/man3/EVP_aes_256_ctr.3"
	ln -sf "EVP_aes_128_cbc.3" "$(DESTDIR)$(mandir)/man3/EVP_aes_256_ecb.3"
	ln -sf "EVP_aes_128_cbc.3" "$(DESTDIR)$(mandir)/man3/EVP_aes_256_gcm.3"
	ln -sf "EVP_aes_128_cbc.3" "$(DESTDIR)$(mandir)/man3/EVP_aes_256_ofb.3"
	ln -sf "EVP_aes_128_cbc.3" "$(DESTDIR)$(mandir)/man3/EVP_aes_256_wrap.3"
	ln -sf "EVP_aes_128_cbc.3" "$(DESTDIR)$(mandir)/man3/EVP_aes_256_xts.3"
	ln -sf "EVP_camellia_128_cbc.3" "$(DESTDIR)$(mandir)/man3/EVP_camellia_128_cfb.3"
	ln -sf "EVP_camellia_128_cbc.3" "$(DESTDIR)$(mandir)/man3/EVP_camellia_128_cfb1.3"
	ln -sf "EVP_camellia_128_cbc.3" "$(DESTDIR)$(mandir)/man3/EVP_camellia_128_cfb128.3"
	ln -sf "EVP_camellia_128_cbc.3" "$(DESTDIR)$(mandir)/man3/EVP_camellia_128_cfb8.3"
	ln -sf "EVP_camellia_128_cbc.3" "$(DESTDIR)$(mandir)/man3/EVP_camellia_128_ecb.3"
	ln -sf "EVP_camellia_128_cbc.3" "$(DESTDIR)$(mandir)/man3/EVP_camellia_128_ofb.3"
	ln -sf "EVP_camellia_128_cbc.3" "$(DESTDIR)$(mandir)/man3/EVP_camellia_192_cbc.3"
	ln -sf "EVP_camellia_128_cbc.3" "$(DESTDIR)$(mandir)/man3/EVP_camellia_192_cfb.3"
	ln -sf "EVP_camellia_128_cbc.3" "$(DESTDIR)$(mandir)/man3/EVP_camellia_192_cfb1.3"
	ln -sf "EVP_camellia_128_cbc.3" "$(DESTDIR)$(mandir)/man3/EVP_camellia_192_cfb128.3"
	ln -sf "EVP_camellia_128_cbc.3" "$(DESTDIR)$(mandir)/man3/EVP_camellia_192_cfb8.3"
	ln -sf "EVP_camellia_128_cbc.3" "$(DESTDIR)$(mandir)/man3/EVP_camellia_192_ecb.3"
	ln -sf "EVP_camellia_128_cbc.3" "$(DESTDIR)$(mandir)/man3/EVP_camellia_192_ofb.3"
	ln -sf "EVP_camellia_128_cbc.3" "$(DESTDIR)$(mandir)/man3/EVP_camellia_256_cbc.3"
	ln -sf "EVP_camellia_128_cbc.3" "$(DESTDIR)$(mandir)/man3/EVP_camellia_256_cfb.3"
	ln -sf "EVP_camellia_128_cbc.3" "$(DESTDIR)$(mandir)/man3/EVP_camellia_256_cfb1.3"
	ln -sf "EVP_camellia_128_cbc.3" "$(DESTDIR)$(mandir)/man3/EVP_camellia_256_cfb128.3"
	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_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"
	ln -sf "EVP_des_cbc.3" "$(DESTDIR)$(mandir)/man3/EVP_des_cfb8.3"
	ln -sf "EVP_des_cbc.3" "$(DESTDIR)$(mandir)/man3/EVP_des_ecb.3"
	ln -sf "EVP_des_cbc.3" "$(DESTDIR)$(mandir)/man3/EVP_des_ede.3"
	ln -sf "EVP_des_cbc.3" "$(DESTDIR)$(mandir)/man3/EVP_des_ede3.3"
	ln -sf "EVP_des_cbc.3" "$(DESTDIR)$(mandir)/man3/EVP_des_ede3_cbc.3"
	ln -sf "EVP_des_cbc.3" "$(DESTDIR)$(mandir)/man3/EVP_des_ede3_cfb.3"
	ln -sf "EVP_des_cbc.3" "$(DESTDIR)$(mandir)/man3/EVP_des_ede3_cfb1.3"
	ln -sf "EVP_des_cbc.3" "$(DESTDIR)$(mandir)/man3/EVP_des_ede3_cfb64.3"
	ln -sf "EVP_des_cbc.3" "$(DESTDIR)$(mandir)/man3/EVP_des_ede3_cfb8.3"
	ln -sf "EVP_des_cbc.3" "$(DESTDIR)$(mandir)/man3/EVP_des_ede3_ecb.3"
	ln -sf "EVP_des_cbc.3" "$(DESTDIR)$(mandir)/man3/EVP_des_ede3_ofb.3"
	ln -sf "EVP_des_cbc.3" "$(DESTDIR)$(mandir)/man3/EVP_des_ede_cbc.3"
	ln -sf "EVP_des_cbc.3" "$(DESTDIR)$(mandir)/man3/EVP_des_ede_cfb.3"
	ln -sf "EVP_des_cbc.3" "$(DESTDIR)$(mandir)/man3/EVP_des_ede_cfb64.3"
	ln -sf "EVP_des_cbc.3" "$(DESTDIR)$(mandir)/man3/EVP_des_ede_ecb.3"
	ln -sf "EVP_des_cbc.3" "$(DESTDIR)$(mandir)/man3/EVP_des_ede_ofb.3"
	ln -sf "EVP_des_cbc.3" "$(DESTDIR)$(mandir)/man3/EVP_des_ofb.3"
	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_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"
	ln -sf "EVP_sm4_cbc.3" "$(DESTDIR)$(mandir)/man3/EVP_sm4_ecb.3"
	ln -sf "EVP_sm4_cbc.3" "$(DESTDIR)$(mandir)/man3/EVP_sm4_ofb.3"
	ln -sf "EXTENDED_KEY_USAGE_new.3" "$(DESTDIR)$(mandir)/man3/EXTENDED_KEY_USAGE_free.3"
	ln -sf "GENERAL_NAME_new.3" "$(DESTDIR)$(mandir)/man3/EDIPARTYNAME_free.3"
1826
1827
1828
1829
1830
1831
1832

1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850

1851
1852
1853

1854
1855
1856
1857
1858
1859
1860
	ln -sf "OCSP_resp_find_status.3" "$(DESTDIR)$(mandir)/man3/OCSP_CERTSTATUS_new.3"
	ln -sf "OCSP_resp_find_status.3" "$(DESTDIR)$(mandir)/man3/OCSP_REVOKEDINFO_free.3"
	ln -sf "OCSP_resp_find_status.3" "$(DESTDIR)$(mandir)/man3/OCSP_REVOKEDINFO_new.3"
	ln -sf "OCSP_resp_find_status.3" "$(DESTDIR)$(mandir)/man3/OCSP_SINGLERESP_free.3"
	ln -sf "OCSP_resp_find_status.3" "$(DESTDIR)$(mandir)/man3/OCSP_SINGLERESP_get0_id.3"
	ln -sf "OCSP_resp_find_status.3" "$(DESTDIR)$(mandir)/man3/OCSP_SINGLERESP_new.3"
	ln -sf "OCSP_resp_find_status.3" "$(DESTDIR)$(mandir)/man3/OCSP_basic_verify.3"

	ln -sf "OCSP_resp_find_status.3" "$(DESTDIR)$(mandir)/man3/OCSP_check_validity.3"
	ln -sf "OCSP_resp_find_status.3" "$(DESTDIR)$(mandir)/man3/OCSP_resp_count.3"
	ln -sf "OCSP_resp_find_status.3" "$(DESTDIR)$(mandir)/man3/OCSP_resp_find.3"
	ln -sf "OCSP_resp_find_status.3" "$(DESTDIR)$(mandir)/man3/OCSP_resp_get0.3"
	ln -sf "OCSP_resp_find_status.3" "$(DESTDIR)$(mandir)/man3/OCSP_single_get0_status.3"
	ln -sf "OCSP_response_status.3" "$(DESTDIR)$(mandir)/man3/OCSP_BASICRESP_free.3"
	ln -sf "OCSP_response_status.3" "$(DESTDIR)$(mandir)/man3/OCSP_BASICRESP_new.3"
	ln -sf "OCSP_response_status.3" "$(DESTDIR)$(mandir)/man3/OCSP_RESPBYTES_free.3"
	ln -sf "OCSP_response_status.3" "$(DESTDIR)$(mandir)/man3/OCSP_RESPBYTES_new.3"
	ln -sf "OCSP_response_status.3" "$(DESTDIR)$(mandir)/man3/OCSP_RESPDATA_free.3"
	ln -sf "OCSP_response_status.3" "$(DESTDIR)$(mandir)/man3/OCSP_RESPDATA_new.3"
	ln -sf "OCSP_response_status.3" "$(DESTDIR)$(mandir)/man3/OCSP_RESPID_free.3"
	ln -sf "OCSP_response_status.3" "$(DESTDIR)$(mandir)/man3/OCSP_RESPID_new.3"
	ln -sf "OCSP_response_status.3" "$(DESTDIR)$(mandir)/man3/OCSP_RESPONSE_free.3"
	ln -sf "OCSP_response_status.3" "$(DESTDIR)$(mandir)/man3/OCSP_RESPONSE_new.3"
	ln -sf "OCSP_response_status.3" "$(DESTDIR)$(mandir)/man3/OCSP_basic_sign.3"
	ln -sf "OCSP_response_status.3" "$(DESTDIR)$(mandir)/man3/OCSP_response_create.3"
	ln -sf "OCSP_response_status.3" "$(DESTDIR)$(mandir)/man3/OCSP_response_get1_basic.3"

	ln -sf "OCSP_sendreq_new.3" "$(DESTDIR)$(mandir)/man3/OCSP_REQ_CTX_add1_header.3"
	ln -sf "OCSP_sendreq_new.3" "$(DESTDIR)$(mandir)/man3/OCSP_REQ_CTX_free.3"
	ln -sf "OCSP_sendreq_new.3" "$(DESTDIR)$(mandir)/man3/OCSP_REQ_CTX_set1_req.3"

	ln -sf "OCSP_sendreq_new.3" "$(DESTDIR)$(mandir)/man3/OCSP_sendreq_bio.3"
	ln -sf "OCSP_sendreq_new.3" "$(DESTDIR)$(mandir)/man3/OCSP_sendreq_nbio.3"
	ln -sf "OPENSSL_VERSION_NUMBER.3" "$(DESTDIR)$(mandir)/man3/LIBRESSL_VERSION_NUMBER.3"
	ln -sf "OPENSSL_VERSION_NUMBER.3" "$(DESTDIR)$(mandir)/man3/LIBRESSL_VERSION_TEXT.3"
	ln -sf "OPENSSL_VERSION_NUMBER.3" "$(DESTDIR)$(mandir)/man3/OPENSSL_VERSION_TEXT.3"
	ln -sf "OPENSSL_VERSION_NUMBER.3" "$(DESTDIR)$(mandir)/man3/OpenSSL_version.3"
	ln -sf "OPENSSL_VERSION_NUMBER.3" "$(DESTDIR)$(mandir)/man3/OpenSSL_version_num.3"







>


















>



>







1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
	ln -sf "OCSP_resp_find_status.3" "$(DESTDIR)$(mandir)/man3/OCSP_CERTSTATUS_new.3"
	ln -sf "OCSP_resp_find_status.3" "$(DESTDIR)$(mandir)/man3/OCSP_REVOKEDINFO_free.3"
	ln -sf "OCSP_resp_find_status.3" "$(DESTDIR)$(mandir)/man3/OCSP_REVOKEDINFO_new.3"
	ln -sf "OCSP_resp_find_status.3" "$(DESTDIR)$(mandir)/man3/OCSP_SINGLERESP_free.3"
	ln -sf "OCSP_resp_find_status.3" "$(DESTDIR)$(mandir)/man3/OCSP_SINGLERESP_get0_id.3"
	ln -sf "OCSP_resp_find_status.3" "$(DESTDIR)$(mandir)/man3/OCSP_SINGLERESP_new.3"
	ln -sf "OCSP_resp_find_status.3" "$(DESTDIR)$(mandir)/man3/OCSP_basic_verify.3"
	ln -sf "OCSP_resp_find_status.3" "$(DESTDIR)$(mandir)/man3/OCSP_cert_status_str.3"
	ln -sf "OCSP_resp_find_status.3" "$(DESTDIR)$(mandir)/man3/OCSP_check_validity.3"
	ln -sf "OCSP_resp_find_status.3" "$(DESTDIR)$(mandir)/man3/OCSP_resp_count.3"
	ln -sf "OCSP_resp_find_status.3" "$(DESTDIR)$(mandir)/man3/OCSP_resp_find.3"
	ln -sf "OCSP_resp_find_status.3" "$(DESTDIR)$(mandir)/man3/OCSP_resp_get0.3"
	ln -sf "OCSP_resp_find_status.3" "$(DESTDIR)$(mandir)/man3/OCSP_single_get0_status.3"
	ln -sf "OCSP_response_status.3" "$(DESTDIR)$(mandir)/man3/OCSP_BASICRESP_free.3"
	ln -sf "OCSP_response_status.3" "$(DESTDIR)$(mandir)/man3/OCSP_BASICRESP_new.3"
	ln -sf "OCSP_response_status.3" "$(DESTDIR)$(mandir)/man3/OCSP_RESPBYTES_free.3"
	ln -sf "OCSP_response_status.3" "$(DESTDIR)$(mandir)/man3/OCSP_RESPBYTES_new.3"
	ln -sf "OCSP_response_status.3" "$(DESTDIR)$(mandir)/man3/OCSP_RESPDATA_free.3"
	ln -sf "OCSP_response_status.3" "$(DESTDIR)$(mandir)/man3/OCSP_RESPDATA_new.3"
	ln -sf "OCSP_response_status.3" "$(DESTDIR)$(mandir)/man3/OCSP_RESPID_free.3"
	ln -sf "OCSP_response_status.3" "$(DESTDIR)$(mandir)/man3/OCSP_RESPID_new.3"
	ln -sf "OCSP_response_status.3" "$(DESTDIR)$(mandir)/man3/OCSP_RESPONSE_free.3"
	ln -sf "OCSP_response_status.3" "$(DESTDIR)$(mandir)/man3/OCSP_RESPONSE_new.3"
	ln -sf "OCSP_response_status.3" "$(DESTDIR)$(mandir)/man3/OCSP_basic_sign.3"
	ln -sf "OCSP_response_status.3" "$(DESTDIR)$(mandir)/man3/OCSP_response_create.3"
	ln -sf "OCSP_response_status.3" "$(DESTDIR)$(mandir)/man3/OCSP_response_get1_basic.3"
	ln -sf "OCSP_response_status.3" "$(DESTDIR)$(mandir)/man3/OCSP_response_status_str.3"
	ln -sf "OCSP_sendreq_new.3" "$(DESTDIR)$(mandir)/man3/OCSP_REQ_CTX_add1_header.3"
	ln -sf "OCSP_sendreq_new.3" "$(DESTDIR)$(mandir)/man3/OCSP_REQ_CTX_free.3"
	ln -sf "OCSP_sendreq_new.3" "$(DESTDIR)$(mandir)/man3/OCSP_REQ_CTX_set1_req.3"
	ln -sf "OCSP_sendreq_new.3" "$(DESTDIR)$(mandir)/man3/OCSP_parse_url.3"
	ln -sf "OCSP_sendreq_new.3" "$(DESTDIR)$(mandir)/man3/OCSP_sendreq_bio.3"
	ln -sf "OCSP_sendreq_new.3" "$(DESTDIR)$(mandir)/man3/OCSP_sendreq_nbio.3"
	ln -sf "OPENSSL_VERSION_NUMBER.3" "$(DESTDIR)$(mandir)/man3/LIBRESSL_VERSION_NUMBER.3"
	ln -sf "OPENSSL_VERSION_NUMBER.3" "$(DESTDIR)$(mandir)/man3/LIBRESSL_VERSION_TEXT.3"
	ln -sf "OPENSSL_VERSION_NUMBER.3" "$(DESTDIR)$(mandir)/man3/OPENSSL_VERSION_TEXT.3"
	ln -sf "OPENSSL_VERSION_NUMBER.3" "$(DESTDIR)$(mandir)/man3/OpenSSL_version.3"
	ln -sf "OPENSSL_VERSION_NUMBER.3" "$(DESTDIR)$(mandir)/man3/OpenSSL_version_num.3"
1983
1984
1985
1986
1987
1988
1989

1990
1991
1992
1993
1994
1995
1996
	ln -sf "PEM_read_bio_PrivateKey.3" "$(DESTDIR)$(mandir)/man3/PEM_write_bio_RSAPublicKey.3"
	ln -sf "PEM_read_bio_PrivateKey.3" "$(DESTDIR)$(mandir)/man3/PEM_write_bio_RSA_PUBKEY.3"
	ln -sf "PEM_read_bio_PrivateKey.3" "$(DESTDIR)$(mandir)/man3/PEM_write_bio_X509.3"
	ln -sf "PEM_read_bio_PrivateKey.3" "$(DESTDIR)$(mandir)/man3/PEM_write_bio_X509_AUX.3"
	ln -sf "PEM_read_bio_PrivateKey.3" "$(DESTDIR)$(mandir)/man3/PEM_write_bio_X509_CRL.3"
	ln -sf "PEM_read_bio_PrivateKey.3" "$(DESTDIR)$(mandir)/man3/PEM_write_bio_X509_REQ.3"
	ln -sf "PEM_read_bio_PrivateKey.3" "$(DESTDIR)$(mandir)/man3/PEM_write_bio_X509_REQ_NEW.3"

	ln -sf "PKCS12_SAFEBAG_new.3" "$(DESTDIR)$(mandir)/man3/PKCS12_BAGS_free.3"
	ln -sf "PKCS12_SAFEBAG_new.3" "$(DESTDIR)$(mandir)/man3/PKCS12_BAGS_new.3"
	ln -sf "PKCS12_SAFEBAG_new.3" "$(DESTDIR)$(mandir)/man3/PKCS12_SAFEBAG_free.3"
	ln -sf "PKCS12_new.3" "$(DESTDIR)$(mandir)/man3/PKCS12_MAC_DATA_free.3"
	ln -sf "PKCS12_new.3" "$(DESTDIR)$(mandir)/man3/PKCS12_MAC_DATA_new.3"
	ln -sf "PKCS12_new.3" "$(DESTDIR)$(mandir)/man3/PKCS12_free.3"
	ln -sf "PKCS5_PBKDF2_HMAC.3" "$(DESTDIR)$(mandir)/man3/PKCS5_PBKDF2_HMAC_SHA1.3"







>







2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
	ln -sf "PEM_read_bio_PrivateKey.3" "$(DESTDIR)$(mandir)/man3/PEM_write_bio_RSAPublicKey.3"
	ln -sf "PEM_read_bio_PrivateKey.3" "$(DESTDIR)$(mandir)/man3/PEM_write_bio_RSA_PUBKEY.3"
	ln -sf "PEM_read_bio_PrivateKey.3" "$(DESTDIR)$(mandir)/man3/PEM_write_bio_X509.3"
	ln -sf "PEM_read_bio_PrivateKey.3" "$(DESTDIR)$(mandir)/man3/PEM_write_bio_X509_AUX.3"
	ln -sf "PEM_read_bio_PrivateKey.3" "$(DESTDIR)$(mandir)/man3/PEM_write_bio_X509_CRL.3"
	ln -sf "PEM_read_bio_PrivateKey.3" "$(DESTDIR)$(mandir)/man3/PEM_write_bio_X509_REQ.3"
	ln -sf "PEM_read_bio_PrivateKey.3" "$(DESTDIR)$(mandir)/man3/PEM_write_bio_X509_REQ_NEW.3"
	ln -sf "PEM_read_bio_PrivateKey.3" "$(DESTDIR)$(mandir)/man3/pem_password_cb.3"
	ln -sf "PKCS12_SAFEBAG_new.3" "$(DESTDIR)$(mandir)/man3/PKCS12_BAGS_free.3"
	ln -sf "PKCS12_SAFEBAG_new.3" "$(DESTDIR)$(mandir)/man3/PKCS12_BAGS_new.3"
	ln -sf "PKCS12_SAFEBAG_new.3" "$(DESTDIR)$(mandir)/man3/PKCS12_SAFEBAG_free.3"
	ln -sf "PKCS12_new.3" "$(DESTDIR)$(mandir)/man3/PKCS12_MAC_DATA_free.3"
	ln -sf "PKCS12_new.3" "$(DESTDIR)$(mandir)/man3/PKCS12_MAC_DATA_new.3"
	ln -sf "PKCS12_new.3" "$(DESTDIR)$(mandir)/man3/PKCS12_free.3"
	ln -sf "PKCS5_PBKDF2_HMAC.3" "$(DESTDIR)$(mandir)/man3/PKCS5_PBKDF2_HMAC_SHA1.3"
2059
2060
2061
2062
2063
2064
2065



2066











2067

2068




2069
2070






2071
2072
2073
2074
2075
2076
2077
	ln -sf "RSA_get_ex_new_index.3" "$(DESTDIR)$(mandir)/man3/CRYPTO_EX_dup.3"
	ln -sf "RSA_get_ex_new_index.3" "$(DESTDIR)$(mandir)/man3/CRYPTO_EX_free.3"
	ln -sf "RSA_get_ex_new_index.3" "$(DESTDIR)$(mandir)/man3/CRYPTO_EX_new.3"
	ln -sf "RSA_get_ex_new_index.3" "$(DESTDIR)$(mandir)/man3/RSA_get_ex_data.3"
	ln -sf "RSA_get_ex_new_index.3" "$(DESTDIR)$(mandir)/man3/RSA_set_ex_data.3"
	ln -sf "RSA_meth_new.3" "$(DESTDIR)$(mandir)/man3/RSA_meth_dup.3"
	ln -sf "RSA_meth_new.3" "$(DESTDIR)$(mandir)/man3/RSA_meth_free.3"



	ln -sf "RSA_meth_new.3" "$(DESTDIR)$(mandir)/man3/RSA_meth_get_finish.3"











	ln -sf "RSA_meth_new.3" "$(DESTDIR)$(mandir)/man3/RSA_meth_set1_name.3"

	ln -sf "RSA_meth_new.3" "$(DESTDIR)$(mandir)/man3/RSA_meth_set_finish.3"




	ln -sf "RSA_meth_new.3" "$(DESTDIR)$(mandir)/man3/RSA_meth_set_priv_dec.3"
	ln -sf "RSA_meth_new.3" "$(DESTDIR)$(mandir)/man3/RSA_meth_set_priv_enc.3"






	ln -sf "RSA_new.3" "$(DESTDIR)$(mandir)/man3/RSA_free.3"
	ln -sf "RSA_new.3" "$(DESTDIR)$(mandir)/man3/RSA_up_ref.3"
	ln -sf "RSA_padding_add_PKCS1_type_1.3" "$(DESTDIR)$(mandir)/man3/RSA_padding_add_PKCS1_OAEP.3"
	ln -sf "RSA_padding_add_PKCS1_type_1.3" "$(DESTDIR)$(mandir)/man3/RSA_padding_add_PKCS1_type_2.3"
	ln -sf "RSA_padding_add_PKCS1_type_1.3" "$(DESTDIR)$(mandir)/man3/RSA_padding_add_none.3"
	ln -sf "RSA_padding_add_PKCS1_type_1.3" "$(DESTDIR)$(mandir)/man3/RSA_padding_check_PKCS1_OAEP.3"
	ln -sf "RSA_padding_add_PKCS1_type_1.3" "$(DESTDIR)$(mandir)/man3/RSA_padding_check_PKCS1_type_1.3"







>
>
>

>
>
>
>
>
>
>
>
>
>
>

>

>
>
>
>


>
>
>
>
>
>







2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
	ln -sf "RSA_get_ex_new_index.3" "$(DESTDIR)$(mandir)/man3/CRYPTO_EX_dup.3"
	ln -sf "RSA_get_ex_new_index.3" "$(DESTDIR)$(mandir)/man3/CRYPTO_EX_free.3"
	ln -sf "RSA_get_ex_new_index.3" "$(DESTDIR)$(mandir)/man3/CRYPTO_EX_new.3"
	ln -sf "RSA_get_ex_new_index.3" "$(DESTDIR)$(mandir)/man3/RSA_get_ex_data.3"
	ln -sf "RSA_get_ex_new_index.3" "$(DESTDIR)$(mandir)/man3/RSA_set_ex_data.3"
	ln -sf "RSA_meth_new.3" "$(DESTDIR)$(mandir)/man3/RSA_meth_dup.3"
	ln -sf "RSA_meth_new.3" "$(DESTDIR)$(mandir)/man3/RSA_meth_free.3"
	ln -sf "RSA_meth_new.3" "$(DESTDIR)$(mandir)/man3/RSA_meth_get0_app_data.3"
	ln -sf "RSA_meth_new.3" "$(DESTDIR)$(mandir)/man3/RSA_meth_get0_name.3"
	ln -sf "RSA_meth_new.3" "$(DESTDIR)$(mandir)/man3/RSA_meth_get_bn_mod_exp.3"
	ln -sf "RSA_meth_new.3" "$(DESTDIR)$(mandir)/man3/RSA_meth_get_finish.3"
	ln -sf "RSA_meth_new.3" "$(DESTDIR)$(mandir)/man3/RSA_meth_get_flags.3"
	ln -sf "RSA_meth_new.3" "$(DESTDIR)$(mandir)/man3/RSA_meth_get_init.3"
	ln -sf "RSA_meth_new.3" "$(DESTDIR)$(mandir)/man3/RSA_meth_get_keygen.3"
	ln -sf "RSA_meth_new.3" "$(DESTDIR)$(mandir)/man3/RSA_meth_get_mod_exp.3"
	ln -sf "RSA_meth_new.3" "$(DESTDIR)$(mandir)/man3/RSA_meth_get_priv_dec.3"
	ln -sf "RSA_meth_new.3" "$(DESTDIR)$(mandir)/man3/RSA_meth_get_priv_enc.3"
	ln -sf "RSA_meth_new.3" "$(DESTDIR)$(mandir)/man3/RSA_meth_get_pub_dec.3"
	ln -sf "RSA_meth_new.3" "$(DESTDIR)$(mandir)/man3/RSA_meth_get_pub_enc.3"
	ln -sf "RSA_meth_new.3" "$(DESTDIR)$(mandir)/man3/RSA_meth_get_sign.3"
	ln -sf "RSA_meth_new.3" "$(DESTDIR)$(mandir)/man3/RSA_meth_get_verify.3"
	ln -sf "RSA_meth_new.3" "$(DESTDIR)$(mandir)/man3/RSA_meth_set0_app_data.3"
	ln -sf "RSA_meth_new.3" "$(DESTDIR)$(mandir)/man3/RSA_meth_set1_name.3"
	ln -sf "RSA_meth_new.3" "$(DESTDIR)$(mandir)/man3/RSA_meth_set_bn_mod_exp.3"
	ln -sf "RSA_meth_new.3" "$(DESTDIR)$(mandir)/man3/RSA_meth_set_finish.3"
	ln -sf "RSA_meth_new.3" "$(DESTDIR)$(mandir)/man3/RSA_meth_set_flags.3"
	ln -sf "RSA_meth_new.3" "$(DESTDIR)$(mandir)/man3/RSA_meth_set_init.3"
	ln -sf "RSA_meth_new.3" "$(DESTDIR)$(mandir)/man3/RSA_meth_set_keygen.3"
	ln -sf "RSA_meth_new.3" "$(DESTDIR)$(mandir)/man3/RSA_meth_set_mod_exp.3"
	ln -sf "RSA_meth_new.3" "$(DESTDIR)$(mandir)/man3/RSA_meth_set_priv_dec.3"
	ln -sf "RSA_meth_new.3" "$(DESTDIR)$(mandir)/man3/RSA_meth_set_priv_enc.3"
	ln -sf "RSA_meth_new.3" "$(DESTDIR)$(mandir)/man3/RSA_meth_set_pub_dec.3"
	ln -sf "RSA_meth_new.3" "$(DESTDIR)$(mandir)/man3/RSA_meth_set_pub_enc.3"
	ln -sf "RSA_meth_new.3" "$(DESTDIR)$(mandir)/man3/RSA_meth_set_sign.3"
	ln -sf "RSA_meth_new.3" "$(DESTDIR)$(mandir)/man3/RSA_meth_set_verify.3"
	ln -sf "RSA_new.3" "$(DESTDIR)$(mandir)/man3/RSAPrivateKey_dup.3"
	ln -sf "RSA_new.3" "$(DESTDIR)$(mandir)/man3/RSAPublicKey_dup.3"
	ln -sf "RSA_new.3" "$(DESTDIR)$(mandir)/man3/RSA_free.3"
	ln -sf "RSA_new.3" "$(DESTDIR)$(mandir)/man3/RSA_up_ref.3"
	ln -sf "RSA_padding_add_PKCS1_type_1.3" "$(DESTDIR)$(mandir)/man3/RSA_padding_add_PKCS1_OAEP.3"
	ln -sf "RSA_padding_add_PKCS1_type_1.3" "$(DESTDIR)$(mandir)/man3/RSA_padding_add_PKCS1_type_2.3"
	ln -sf "RSA_padding_add_PKCS1_type_1.3" "$(DESTDIR)$(mandir)/man3/RSA_padding_add_none.3"
	ln -sf "RSA_padding_add_PKCS1_type_1.3" "$(DESTDIR)$(mandir)/man3/RSA_padding_check_PKCS1_OAEP.3"
	ln -sf "RSA_padding_add_PKCS1_type_1.3" "$(DESTDIR)$(mandir)/man3/RSA_padding_check_PKCS1_type_1.3"
2120
2121
2122
2123
2124
2125
2126











2127

2128
2129
2130
2131
2132
2133
2134
	ln -sf "SSL_CIPHER_get_name.3" "$(DESTDIR)$(mandir)/man3/SSL_CIPHER_get_cipher_nid.3"
	ln -sf "SSL_CIPHER_get_name.3" "$(DESTDIR)$(mandir)/man3/SSL_CIPHER_get_digest_nid.3"
	ln -sf "SSL_CIPHER_get_name.3" "$(DESTDIR)$(mandir)/man3/SSL_CIPHER_get_id.3"
	ln -sf "SSL_CIPHER_get_name.3" "$(DESTDIR)$(mandir)/man3/SSL_CIPHER_get_kx_nid.3"
	ln -sf "SSL_CIPHER_get_name.3" "$(DESTDIR)$(mandir)/man3/SSL_CIPHER_get_version.3"
	ln -sf "SSL_CIPHER_get_name.3" "$(DESTDIR)$(mandir)/man3/SSL_CIPHER_is_aead.3"
	ln -sf "SSL_COMP_add_compression_method.3" "$(DESTDIR)$(mandir)/man3/SSL_COMP_get_compression_methods.3"











	ln -sf "SSL_CTX_add_extra_chain_cert.3" "$(DESTDIR)$(mandir)/man3/SSL_CTX_clear_extra_chain_certs.3"

	ln -sf "SSL_CTX_add_session.3" "$(DESTDIR)$(mandir)/man3/SSL_CTX_remove_session.3"
	ln -sf "SSL_CTX_ctrl.3" "$(DESTDIR)$(mandir)/man3/SSL_CTX_callback_ctrl.3"
	ln -sf "SSL_CTX_ctrl.3" "$(DESTDIR)$(mandir)/man3/SSL_callback_ctrl.3"
	ln -sf "SSL_CTX_ctrl.3" "$(DESTDIR)$(mandir)/man3/SSL_ctrl.3"
	ln -sf "SSL_CTX_get_ex_new_index.3" "$(DESTDIR)$(mandir)/man3/SSL_CTX_get_ex_data.3"
	ln -sf "SSL_CTX_get_ex_new_index.3" "$(DESTDIR)$(mandir)/man3/SSL_CTX_set_ex_data.3"
	ln -sf "SSL_CTX_get_verify_mode.3" "$(DESTDIR)$(mandir)/man3/SSL_CTX_get_verify_callback.3"







>
>
>
>
>
>
>
>
>
>
>

>







2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
	ln -sf "SSL_CIPHER_get_name.3" "$(DESTDIR)$(mandir)/man3/SSL_CIPHER_get_cipher_nid.3"
	ln -sf "SSL_CIPHER_get_name.3" "$(DESTDIR)$(mandir)/man3/SSL_CIPHER_get_digest_nid.3"
	ln -sf "SSL_CIPHER_get_name.3" "$(DESTDIR)$(mandir)/man3/SSL_CIPHER_get_id.3"
	ln -sf "SSL_CIPHER_get_name.3" "$(DESTDIR)$(mandir)/man3/SSL_CIPHER_get_kx_nid.3"
	ln -sf "SSL_CIPHER_get_name.3" "$(DESTDIR)$(mandir)/man3/SSL_CIPHER_get_version.3"
	ln -sf "SSL_CIPHER_get_name.3" "$(DESTDIR)$(mandir)/man3/SSL_CIPHER_is_aead.3"
	ln -sf "SSL_COMP_add_compression_method.3" "$(DESTDIR)$(mandir)/man3/SSL_COMP_get_compression_methods.3"
	ln -sf "SSL_CTX_add1_chain_cert.3" "$(DESTDIR)$(mandir)/man3/SSL_CTX_add0_chain_cert.3"
	ln -sf "SSL_CTX_add1_chain_cert.3" "$(DESTDIR)$(mandir)/man3/SSL_CTX_clear_chain_certs.3"
	ln -sf "SSL_CTX_add1_chain_cert.3" "$(DESTDIR)$(mandir)/man3/SSL_CTX_get0_chain_certs.3"
	ln -sf "SSL_CTX_add1_chain_cert.3" "$(DESTDIR)$(mandir)/man3/SSL_CTX_set0_chain.3"
	ln -sf "SSL_CTX_add1_chain_cert.3" "$(DESTDIR)$(mandir)/man3/SSL_CTX_set1_chain.3"
	ln -sf "SSL_CTX_add1_chain_cert.3" "$(DESTDIR)$(mandir)/man3/SSL_add0_chain_cert.3"
	ln -sf "SSL_CTX_add1_chain_cert.3" "$(DESTDIR)$(mandir)/man3/SSL_add1_chain_cert.3"
	ln -sf "SSL_CTX_add1_chain_cert.3" "$(DESTDIR)$(mandir)/man3/SSL_clear_chain_certs.3"
	ln -sf "SSL_CTX_add1_chain_cert.3" "$(DESTDIR)$(mandir)/man3/SSL_get0_chain_certs.3"
	ln -sf "SSL_CTX_add1_chain_cert.3" "$(DESTDIR)$(mandir)/man3/SSL_set0_chain.3"
	ln -sf "SSL_CTX_add1_chain_cert.3" "$(DESTDIR)$(mandir)/man3/SSL_set1_chain.3"
	ln -sf "SSL_CTX_add_extra_chain_cert.3" "$(DESTDIR)$(mandir)/man3/SSL_CTX_clear_extra_chain_certs.3"
	ln -sf "SSL_CTX_add_extra_chain_cert.3" "$(DESTDIR)$(mandir)/man3/SSL_CTX_get_extra_chain_certs.3"
	ln -sf "SSL_CTX_add_session.3" "$(DESTDIR)$(mandir)/man3/SSL_CTX_remove_session.3"
	ln -sf "SSL_CTX_ctrl.3" "$(DESTDIR)$(mandir)/man3/SSL_CTX_callback_ctrl.3"
	ln -sf "SSL_CTX_ctrl.3" "$(DESTDIR)$(mandir)/man3/SSL_callback_ctrl.3"
	ln -sf "SSL_CTX_ctrl.3" "$(DESTDIR)$(mandir)/man3/SSL_ctrl.3"
	ln -sf "SSL_CTX_get_ex_new_index.3" "$(DESTDIR)$(mandir)/man3/SSL_CTX_get_ex_data.3"
	ln -sf "SSL_CTX_get_ex_new_index.3" "$(DESTDIR)$(mandir)/man3/SSL_CTX_set_ex_data.3"
	ln -sf "SSL_CTX_get_verify_mode.3" "$(DESTDIR)$(mandir)/man3/SSL_CTX_get_verify_callback.3"
2213
2214
2215
2216
2217
2218
2219

2220

2221
2222
2223
2224
2225
2226
2227
	ln -sf "SSL_CTX_set_min_proto_version.3" "$(DESTDIR)$(mandir)/man3/SSL_CTX_get_max_proto_version.3"
	ln -sf "SSL_CTX_set_min_proto_version.3" "$(DESTDIR)$(mandir)/man3/SSL_CTX_get_min_proto_version.3"
	ln -sf "SSL_CTX_set_min_proto_version.3" "$(DESTDIR)$(mandir)/man3/SSL_CTX_set_max_proto_version.3"
	ln -sf "SSL_CTX_set_min_proto_version.3" "$(DESTDIR)$(mandir)/man3/SSL_get_max_proto_version.3"
	ln -sf "SSL_CTX_set_min_proto_version.3" "$(DESTDIR)$(mandir)/man3/SSL_get_min_proto_version.3"
	ln -sf "SSL_CTX_set_min_proto_version.3" "$(DESTDIR)$(mandir)/man3/SSL_set_max_proto_version.3"
	ln -sf "SSL_CTX_set_min_proto_version.3" "$(DESTDIR)$(mandir)/man3/SSL_set_min_proto_version.3"

	ln -sf "SSL_CTX_set_mode.3" "$(DESTDIR)$(mandir)/man3/SSL_CTX_get_mode.3"

	ln -sf "SSL_CTX_set_mode.3" "$(DESTDIR)$(mandir)/man3/SSL_get_mode.3"
	ln -sf "SSL_CTX_set_mode.3" "$(DESTDIR)$(mandir)/man3/SSL_set_mode.3"
	ln -sf "SSL_CTX_set_msg_callback.3" "$(DESTDIR)$(mandir)/man3/SSL_CTX_set_msg_callback_arg.3"
	ln -sf "SSL_CTX_set_msg_callback.3" "$(DESTDIR)$(mandir)/man3/SSL_set_msg_callback.3"
	ln -sf "SSL_CTX_set_msg_callback.3" "$(DESTDIR)$(mandir)/man3/SSL_set_msg_callback_arg.3"
	ln -sf "SSL_CTX_set_options.3" "$(DESTDIR)$(mandir)/man3/SSL_CTX_clear_options.3"
	ln -sf "SSL_CTX_set_options.3" "$(DESTDIR)$(mandir)/man3/SSL_CTX_get_options.3"







>

>







2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
	ln -sf "SSL_CTX_set_min_proto_version.3" "$(DESTDIR)$(mandir)/man3/SSL_CTX_get_max_proto_version.3"
	ln -sf "SSL_CTX_set_min_proto_version.3" "$(DESTDIR)$(mandir)/man3/SSL_CTX_get_min_proto_version.3"
	ln -sf "SSL_CTX_set_min_proto_version.3" "$(DESTDIR)$(mandir)/man3/SSL_CTX_set_max_proto_version.3"
	ln -sf "SSL_CTX_set_min_proto_version.3" "$(DESTDIR)$(mandir)/man3/SSL_get_max_proto_version.3"
	ln -sf "SSL_CTX_set_min_proto_version.3" "$(DESTDIR)$(mandir)/man3/SSL_get_min_proto_version.3"
	ln -sf "SSL_CTX_set_min_proto_version.3" "$(DESTDIR)$(mandir)/man3/SSL_set_max_proto_version.3"
	ln -sf "SSL_CTX_set_min_proto_version.3" "$(DESTDIR)$(mandir)/man3/SSL_set_min_proto_version.3"
	ln -sf "SSL_CTX_set_mode.3" "$(DESTDIR)$(mandir)/man3/SSL_CTX_clear_mode.3"
	ln -sf "SSL_CTX_set_mode.3" "$(DESTDIR)$(mandir)/man3/SSL_CTX_get_mode.3"
	ln -sf "SSL_CTX_set_mode.3" "$(DESTDIR)$(mandir)/man3/SSL_clear_mode.3"
	ln -sf "SSL_CTX_set_mode.3" "$(DESTDIR)$(mandir)/man3/SSL_get_mode.3"
	ln -sf "SSL_CTX_set_mode.3" "$(DESTDIR)$(mandir)/man3/SSL_set_mode.3"
	ln -sf "SSL_CTX_set_msg_callback.3" "$(DESTDIR)$(mandir)/man3/SSL_CTX_set_msg_callback_arg.3"
	ln -sf "SSL_CTX_set_msg_callback.3" "$(DESTDIR)$(mandir)/man3/SSL_set_msg_callback.3"
	ln -sf "SSL_CTX_set_msg_callback.3" "$(DESTDIR)$(mandir)/man3/SSL_set_msg_callback_arg.3"
	ln -sf "SSL_CTX_set_options.3" "$(DESTDIR)$(mandir)/man3/SSL_CTX_clear_options.3"
	ln -sf "SSL_CTX_set_options.3" "$(DESTDIR)$(mandir)/man3/SSL_CTX_get_options.3"
2462
2463
2464
2465
2466
2467
2468

2469
2470
2471
2472
2473
2474
2475
	ln -sf "X509_EXTENSION_set_object.3" "$(DESTDIR)$(mandir)/man3/X509_EXTENSION_free.3"
	ln -sf "X509_EXTENSION_set_object.3" "$(DESTDIR)$(mandir)/man3/X509_EXTENSION_get_critical.3"
	ln -sf "X509_EXTENSION_set_object.3" "$(DESTDIR)$(mandir)/man3/X509_EXTENSION_get_data.3"
	ln -sf "X509_EXTENSION_set_object.3" "$(DESTDIR)$(mandir)/man3/X509_EXTENSION_get_object.3"
	ln -sf "X509_EXTENSION_set_object.3" "$(DESTDIR)$(mandir)/man3/X509_EXTENSION_new.3"
	ln -sf "X509_EXTENSION_set_object.3" "$(DESTDIR)$(mandir)/man3/X509_EXTENSION_set_critical.3"
	ln -sf "X509_EXTENSION_set_object.3" "$(DESTDIR)$(mandir)/man3/X509_EXTENSION_set_data.3"

	ln -sf "X509_LOOKUP_hash_dir.3" "$(DESTDIR)$(mandir)/man3/X509_LOOKUP_file.3"
	ln -sf "X509_LOOKUP_hash_dir.3" "$(DESTDIR)$(mandir)/man3/X509_load_cert_crl_file.3"
	ln -sf "X509_LOOKUP_hash_dir.3" "$(DESTDIR)$(mandir)/man3/X509_load_cert_file.3"
	ln -sf "X509_LOOKUP_hash_dir.3" "$(DESTDIR)$(mandir)/man3/X509_load_crl_file.3"
	ln -sf "X509_NAME_ENTRY_get_object.3" "$(DESTDIR)$(mandir)/man3/X509_NAME_ENTRY_create_by_NID.3"
	ln -sf "X509_NAME_ENTRY_get_object.3" "$(DESTDIR)$(mandir)/man3/X509_NAME_ENTRY_create_by_OBJ.3"
	ln -sf "X509_NAME_ENTRY_get_object.3" "$(DESTDIR)$(mandir)/man3/X509_NAME_ENTRY_create_by_txt.3"







>







2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
	ln -sf "X509_EXTENSION_set_object.3" "$(DESTDIR)$(mandir)/man3/X509_EXTENSION_free.3"
	ln -sf "X509_EXTENSION_set_object.3" "$(DESTDIR)$(mandir)/man3/X509_EXTENSION_get_critical.3"
	ln -sf "X509_EXTENSION_set_object.3" "$(DESTDIR)$(mandir)/man3/X509_EXTENSION_get_data.3"
	ln -sf "X509_EXTENSION_set_object.3" "$(DESTDIR)$(mandir)/man3/X509_EXTENSION_get_object.3"
	ln -sf "X509_EXTENSION_set_object.3" "$(DESTDIR)$(mandir)/man3/X509_EXTENSION_new.3"
	ln -sf "X509_EXTENSION_set_object.3" "$(DESTDIR)$(mandir)/man3/X509_EXTENSION_set_critical.3"
	ln -sf "X509_EXTENSION_set_object.3" "$(DESTDIR)$(mandir)/man3/X509_EXTENSION_set_data.3"
	ln -sf "X509_INFO_new.3" "$(DESTDIR)$(mandir)/man3/X509_INFO_free.3"
	ln -sf "X509_LOOKUP_hash_dir.3" "$(DESTDIR)$(mandir)/man3/X509_LOOKUP_file.3"
	ln -sf "X509_LOOKUP_hash_dir.3" "$(DESTDIR)$(mandir)/man3/X509_load_cert_crl_file.3"
	ln -sf "X509_LOOKUP_hash_dir.3" "$(DESTDIR)$(mandir)/man3/X509_load_cert_file.3"
	ln -sf "X509_LOOKUP_hash_dir.3" "$(DESTDIR)$(mandir)/man3/X509_load_crl_file.3"
	ln -sf "X509_NAME_ENTRY_get_object.3" "$(DESTDIR)$(mandir)/man3/X509_NAME_ENTRY_create_by_NID.3"
	ln -sf "X509_NAME_ENTRY_get_object.3" "$(DESTDIR)$(mandir)/man3/X509_NAME_ENTRY_create_by_OBJ.3"
	ln -sf "X509_NAME_ENTRY_get_object.3" "$(DESTDIR)$(mandir)/man3/X509_NAME_ENTRY_create_by_txt.3"
2583
2584
2585
2586
2587
2588
2589






2590
2591
2592
2593
2594
2595
2596
	ln -sf "X509_VERIFY_PARAM_set_flags.3" "$(DESTDIR)$(mandir)/man3/X509_VERIFY_PARAM_set_time.3"
	ln -sf "X509_VERIFY_PARAM_set_flags.3" "$(DESTDIR)$(mandir)/man3/X509_VERIFY_PARAM_set_trust.3"
	ln -sf "X509_VERIFY_PARAM_set_flags.3" "$(DESTDIR)$(mandir)/man3/X509_VERIFY_PARAM_table_cleanup.3"
	ln -sf "X509_check_host.3" "$(DESTDIR)$(mandir)/man3/X509_check_email.3"
	ln -sf "X509_check_host.3" "$(DESTDIR)$(mandir)/man3/X509_check_ip.3"
	ln -sf "X509_check_host.3" "$(DESTDIR)$(mandir)/man3/X509_check_ip_asc.3"
	ln -sf "X509_check_private_key.3" "$(DESTDIR)$(mandir)/man3/X509_REQ_check_private_key.3"






	ln -sf "X509_cmp_time.3" "$(DESTDIR)$(mandir)/man3/X509_cmp_current_time.3"
	ln -sf "X509_cmp_time.3" "$(DESTDIR)$(mandir)/man3/X509_time_adj.3"
	ln -sf "X509_cmp_time.3" "$(DESTDIR)$(mandir)/man3/X509_time_adj_ex.3"
	ln -sf "X509_digest.3" "$(DESTDIR)$(mandir)/man3/PKCS7_ISSUER_AND_SERIAL_digest.3"
	ln -sf "X509_digest.3" "$(DESTDIR)$(mandir)/man3/X509_CRL_digest.3"
	ln -sf "X509_digest.3" "$(DESTDIR)$(mandir)/man3/X509_NAME_digest.3"
	ln -sf "X509_digest.3" "$(DESTDIR)$(mandir)/man3/X509_REQ_digest.3"







>
>
>
>
>
>







2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
	ln -sf "X509_VERIFY_PARAM_set_flags.3" "$(DESTDIR)$(mandir)/man3/X509_VERIFY_PARAM_set_time.3"
	ln -sf "X509_VERIFY_PARAM_set_flags.3" "$(DESTDIR)$(mandir)/man3/X509_VERIFY_PARAM_set_trust.3"
	ln -sf "X509_VERIFY_PARAM_set_flags.3" "$(DESTDIR)$(mandir)/man3/X509_VERIFY_PARAM_table_cleanup.3"
	ln -sf "X509_check_host.3" "$(DESTDIR)$(mandir)/man3/X509_check_email.3"
	ln -sf "X509_check_host.3" "$(DESTDIR)$(mandir)/man3/X509_check_ip.3"
	ln -sf "X509_check_host.3" "$(DESTDIR)$(mandir)/man3/X509_check_ip_asc.3"
	ln -sf "X509_check_private_key.3" "$(DESTDIR)$(mandir)/man3/X509_REQ_check_private_key.3"
	ln -sf "X509_cmp.3" "$(DESTDIR)$(mandir)/man3/X509_CRL_cmp.3"
	ln -sf "X509_cmp.3" "$(DESTDIR)$(mandir)/man3/X509_CRL_match.3"
	ln -sf "X509_cmp.3" "$(DESTDIR)$(mandir)/man3/X509_NAME_cmp.3"
	ln -sf "X509_cmp.3" "$(DESTDIR)$(mandir)/man3/X509_issuer_and_serial_cmp.3"
	ln -sf "X509_cmp.3" "$(DESTDIR)$(mandir)/man3/X509_issuer_name_cmp.3"
	ln -sf "X509_cmp.3" "$(DESTDIR)$(mandir)/man3/X509_subject_name_cmp.3"
	ln -sf "X509_cmp_time.3" "$(DESTDIR)$(mandir)/man3/X509_cmp_current_time.3"
	ln -sf "X509_cmp_time.3" "$(DESTDIR)$(mandir)/man3/X509_time_adj.3"
	ln -sf "X509_cmp_time.3" "$(DESTDIR)$(mandir)/man3/X509_time_adj_ex.3"
	ln -sf "X509_digest.3" "$(DESTDIR)$(mandir)/man3/PKCS7_ISSUER_AND_SERIAL_digest.3"
	ln -sf "X509_digest.3" "$(DESTDIR)$(mandir)/man3/X509_CRL_digest.3"
	ln -sf "X509_digest.3" "$(DESTDIR)$(mandir)/man3/X509_NAME_digest.3"
	ln -sf "X509_digest.3" "$(DESTDIR)$(mandir)/man3/X509_REQ_digest.3"
2606
2607
2608
2609
2610
2611
2612


2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631

2632
2633
2634
2635
2636
2637
2638
	ln -sf "X509_get0_notBefore.3" "$(DESTDIR)$(mandir)/man3/X509_set1_notBefore.3"
	ln -sf "X509_get0_signature.3" "$(DESTDIR)$(mandir)/man3/X509_CRL_get0_signature.3"
	ln -sf "X509_get0_signature.3" "$(DESTDIR)$(mandir)/man3/X509_CRL_get_signature_nid.3"
	ln -sf "X509_get0_signature.3" "$(DESTDIR)$(mandir)/man3/X509_REQ_get0_signature.3"
	ln -sf "X509_get0_signature.3" "$(DESTDIR)$(mandir)/man3/X509_REQ_get_signature_nid.3"
	ln -sf "X509_get0_signature.3" "$(DESTDIR)$(mandir)/man3/X509_get0_tbs_sigalg.3"
	ln -sf "X509_get0_signature.3" "$(DESTDIR)$(mandir)/man3/X509_get_signature_nid.3"


	ln -sf "X509_get_pubkey.3" "$(DESTDIR)$(mandir)/man3/X509_REQ_get_pubkey.3"
	ln -sf "X509_get_pubkey.3" "$(DESTDIR)$(mandir)/man3/X509_REQ_set_pubkey.3"
	ln -sf "X509_get_pubkey.3" "$(DESTDIR)$(mandir)/man3/X509_get0_pubkey.3"
	ln -sf "X509_get_pubkey.3" "$(DESTDIR)$(mandir)/man3/X509_get_X509_PUBKEY.3"
	ln -sf "X509_get_pubkey.3" "$(DESTDIR)$(mandir)/man3/X509_set_pubkey.3"
	ln -sf "X509_get_serialNumber.3" "$(DESTDIR)$(mandir)/man3/X509_set_serialNumber.3"
	ln -sf "X509_get_subject_name.3" "$(DESTDIR)$(mandir)/man3/X509_CRL_get_issuer.3"
	ln -sf "X509_get_subject_name.3" "$(DESTDIR)$(mandir)/man3/X509_CRL_set_issuer_name.3"
	ln -sf "X509_get_subject_name.3" "$(DESTDIR)$(mandir)/man3/X509_REQ_get_subject_name.3"
	ln -sf "X509_get_subject_name.3" "$(DESTDIR)$(mandir)/man3/X509_REQ_set_subject_name.3"
	ln -sf "X509_get_subject_name.3" "$(DESTDIR)$(mandir)/man3/X509_get_issuer_name.3"
	ln -sf "X509_get_subject_name.3" "$(DESTDIR)$(mandir)/man3/X509_set_issuer_name.3"
	ln -sf "X509_get_subject_name.3" "$(DESTDIR)$(mandir)/man3/X509_set_subject_name.3"
	ln -sf "X509_get_version.3" "$(DESTDIR)$(mandir)/man3/X509_CRL_get_version.3"
	ln -sf "X509_get_version.3" "$(DESTDIR)$(mandir)/man3/X509_CRL_set_version.3"
	ln -sf "X509_get_version.3" "$(DESTDIR)$(mandir)/man3/X509_REQ_get_version.3"
	ln -sf "X509_get_version.3" "$(DESTDIR)$(mandir)/man3/X509_REQ_set_version.3"
	ln -sf "X509_get_version.3" "$(DESTDIR)$(mandir)/man3/X509_set_version.3"
	ln -sf "X509_new.3" "$(DESTDIR)$(mandir)/man3/X509_chain_up_ref.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_sign.3" "$(DESTDIR)$(mandir)/man3/X509_CRL_sign.3"
	ln -sf "X509_sign.3" "$(DESTDIR)$(mandir)/man3/X509_CRL_sign_ctx.3"
	ln -sf "X509_sign.3" "$(DESTDIR)$(mandir)/man3/X509_CRL_verify.3"
	ln -sf "X509_sign.3" "$(DESTDIR)$(mandir)/man3/X509_REQ_sign.3"
	ln -sf "X509_sign.3" "$(DESTDIR)$(mandir)/man3/X509_REQ_sign_ctx.3"







>
>



















>







2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
	ln -sf "X509_get0_notBefore.3" "$(DESTDIR)$(mandir)/man3/X509_set1_notBefore.3"
	ln -sf "X509_get0_signature.3" "$(DESTDIR)$(mandir)/man3/X509_CRL_get0_signature.3"
	ln -sf "X509_get0_signature.3" "$(DESTDIR)$(mandir)/man3/X509_CRL_get_signature_nid.3"
	ln -sf "X509_get0_signature.3" "$(DESTDIR)$(mandir)/man3/X509_REQ_get0_signature.3"
	ln -sf "X509_get0_signature.3" "$(DESTDIR)$(mandir)/man3/X509_REQ_get_signature_nid.3"
	ln -sf "X509_get0_signature.3" "$(DESTDIR)$(mandir)/man3/X509_get0_tbs_sigalg.3"
	ln -sf "X509_get0_signature.3" "$(DESTDIR)$(mandir)/man3/X509_get_signature_nid.3"
	ln -sf "X509_get1_email.3" "$(DESTDIR)$(mandir)/man3/X509_email_free.3"
	ln -sf "X509_get1_email.3" "$(DESTDIR)$(mandir)/man3/X509_get1_ocsp.3"
	ln -sf "X509_get_pubkey.3" "$(DESTDIR)$(mandir)/man3/X509_REQ_get_pubkey.3"
	ln -sf "X509_get_pubkey.3" "$(DESTDIR)$(mandir)/man3/X509_REQ_set_pubkey.3"
	ln -sf "X509_get_pubkey.3" "$(DESTDIR)$(mandir)/man3/X509_get0_pubkey.3"
	ln -sf "X509_get_pubkey.3" "$(DESTDIR)$(mandir)/man3/X509_get_X509_PUBKEY.3"
	ln -sf "X509_get_pubkey.3" "$(DESTDIR)$(mandir)/man3/X509_set_pubkey.3"
	ln -sf "X509_get_serialNumber.3" "$(DESTDIR)$(mandir)/man3/X509_set_serialNumber.3"
	ln -sf "X509_get_subject_name.3" "$(DESTDIR)$(mandir)/man3/X509_CRL_get_issuer.3"
	ln -sf "X509_get_subject_name.3" "$(DESTDIR)$(mandir)/man3/X509_CRL_set_issuer_name.3"
	ln -sf "X509_get_subject_name.3" "$(DESTDIR)$(mandir)/man3/X509_REQ_get_subject_name.3"
	ln -sf "X509_get_subject_name.3" "$(DESTDIR)$(mandir)/man3/X509_REQ_set_subject_name.3"
	ln -sf "X509_get_subject_name.3" "$(DESTDIR)$(mandir)/man3/X509_get_issuer_name.3"
	ln -sf "X509_get_subject_name.3" "$(DESTDIR)$(mandir)/man3/X509_set_issuer_name.3"
	ln -sf "X509_get_subject_name.3" "$(DESTDIR)$(mandir)/man3/X509_set_subject_name.3"
	ln -sf "X509_get_version.3" "$(DESTDIR)$(mandir)/man3/X509_CRL_get_version.3"
	ln -sf "X509_get_version.3" "$(DESTDIR)$(mandir)/man3/X509_CRL_set_version.3"
	ln -sf "X509_get_version.3" "$(DESTDIR)$(mandir)/man3/X509_REQ_get_version.3"
	ln -sf "X509_get_version.3" "$(DESTDIR)$(mandir)/man3/X509_REQ_set_version.3"
	ln -sf "X509_get_version.3" "$(DESTDIR)$(mandir)/man3/X509_set_version.3"
	ln -sf "X509_new.3" "$(DESTDIR)$(mandir)/man3/X509_chain_up_ref.3"
	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_sign.3" "$(DESTDIR)$(mandir)/man3/X509_CRL_sign.3"
	ln -sf "X509_sign.3" "$(DESTDIR)$(mandir)/man3/X509_CRL_sign_ctx.3"
	ln -sf "X509_sign.3" "$(DESTDIR)$(mandir)/man3/X509_CRL_verify.3"
	ln -sf "X509_sign.3" "$(DESTDIR)$(mandir)/man3/X509_REQ_sign.3"
	ln -sf "X509_sign.3" "$(DESTDIR)$(mandir)/man3/X509_REQ_sign_ctx.3"
2737
2738
2739
2740
2741
2742
2743





2744
2745
2746
2747
2748
2749
2750
	ln -sf "d2i_ASN1_SEQUENCE_ANY.3" "$(DESTDIR)$(mandir)/man3/d2i_ASN1_SET_ANY.3"
	ln -sf "d2i_ASN1_SEQUENCE_ANY.3" "$(DESTDIR)$(mandir)/man3/i2d_ASN1_SEQUENCE_ANY.3"
	ln -sf "d2i_ASN1_SEQUENCE_ANY.3" "$(DESTDIR)$(mandir)/man3/i2d_ASN1_SET_ANY.3"
	ln -sf "d2i_AUTHORITY_KEYID.3" "$(DESTDIR)$(mandir)/man3/i2d_AUTHORITY_KEYID.3"
	ln -sf "d2i_BASIC_CONSTRAINTS.3" "$(DESTDIR)$(mandir)/man3/d2i_EXTENDED_KEY_USAGE.3"
	ln -sf "d2i_BASIC_CONSTRAINTS.3" "$(DESTDIR)$(mandir)/man3/i2d_BASIC_CONSTRAINTS.3"
	ln -sf "d2i_BASIC_CONSTRAINTS.3" "$(DESTDIR)$(mandir)/man3/i2d_EXTENDED_KEY_USAGE.3"





	ln -sf "d2i_DHparams.3" "$(DESTDIR)$(mandir)/man3/i2d_DHparams.3"
	ln -sf "d2i_DIST_POINT.3" "$(DESTDIR)$(mandir)/man3/d2i_ACCESS_DESCRIPTION.3"
	ln -sf "d2i_DIST_POINT.3" "$(DESTDIR)$(mandir)/man3/d2i_AUTHORITY_INFO_ACCESS.3"
	ln -sf "d2i_DIST_POINT.3" "$(DESTDIR)$(mandir)/man3/d2i_CRL_DIST_POINTS.3"
	ln -sf "d2i_DIST_POINT.3" "$(DESTDIR)$(mandir)/man3/d2i_DIST_POINT_NAME.3"
	ln -sf "d2i_DIST_POINT.3" "$(DESTDIR)$(mandir)/man3/d2i_ISSUING_DIST_POINT.3"
	ln -sf "d2i_DIST_POINT.3" "$(DESTDIR)$(mandir)/man3/i2d_ACCESS_DESCRIPTION.3"







>
>
>
>
>







2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
	ln -sf "d2i_ASN1_SEQUENCE_ANY.3" "$(DESTDIR)$(mandir)/man3/d2i_ASN1_SET_ANY.3"
	ln -sf "d2i_ASN1_SEQUENCE_ANY.3" "$(DESTDIR)$(mandir)/man3/i2d_ASN1_SEQUENCE_ANY.3"
	ln -sf "d2i_ASN1_SEQUENCE_ANY.3" "$(DESTDIR)$(mandir)/man3/i2d_ASN1_SET_ANY.3"
	ln -sf "d2i_AUTHORITY_KEYID.3" "$(DESTDIR)$(mandir)/man3/i2d_AUTHORITY_KEYID.3"
	ln -sf "d2i_BASIC_CONSTRAINTS.3" "$(DESTDIR)$(mandir)/man3/d2i_EXTENDED_KEY_USAGE.3"
	ln -sf "d2i_BASIC_CONSTRAINTS.3" "$(DESTDIR)$(mandir)/man3/i2d_BASIC_CONSTRAINTS.3"
	ln -sf "d2i_BASIC_CONSTRAINTS.3" "$(DESTDIR)$(mandir)/man3/i2d_EXTENDED_KEY_USAGE.3"
	ln -sf "d2i_CMS_ContentInfo.3" "$(DESTDIR)$(mandir)/man3/d2i_CMS_ReceiptRequest.3"
	ln -sf "d2i_CMS_ContentInfo.3" "$(DESTDIR)$(mandir)/man3/d2i_CMS_bio.3"
	ln -sf "d2i_CMS_ContentInfo.3" "$(DESTDIR)$(mandir)/man3/i2d_CMS_ContentInfo.3"
	ln -sf "d2i_CMS_ContentInfo.3" "$(DESTDIR)$(mandir)/man3/i2d_CMS_ReceiptRequest.3"
	ln -sf "d2i_CMS_ContentInfo.3" "$(DESTDIR)$(mandir)/man3/i2d_CMS_bio.3"
	ln -sf "d2i_DHparams.3" "$(DESTDIR)$(mandir)/man3/i2d_DHparams.3"
	ln -sf "d2i_DIST_POINT.3" "$(DESTDIR)$(mandir)/man3/d2i_ACCESS_DESCRIPTION.3"
	ln -sf "d2i_DIST_POINT.3" "$(DESTDIR)$(mandir)/man3/d2i_AUTHORITY_INFO_ACCESS.3"
	ln -sf "d2i_DIST_POINT.3" "$(DESTDIR)$(mandir)/man3/d2i_CRL_DIST_POINTS.3"
	ln -sf "d2i_DIST_POINT.3" "$(DESTDIR)$(mandir)/man3/d2i_DIST_POINT_NAME.3"
	ln -sf "d2i_DIST_POINT.3" "$(DESTDIR)$(mandir)/man3/d2i_ISSUING_DIST_POINT.3"
	ln -sf "d2i_DIST_POINT.3" "$(DESTDIR)$(mandir)/man3/i2d_ACCESS_DESCRIPTION.3"
3121
3122
3123
3124
3125
3126
3127




3128
3129
3130
3131
3132
3133
3134

3135
3136
3137



3138
3139
3140
3141
3142
3143
3144
	ln -sf "tls_read.3" "$(DESTDIR)$(mandir)/man3/tls_reset.3"
	ln -sf "tls_read.3" "$(DESTDIR)$(mandir)/man3/tls_write.3"

uninstall-local:
	-rm -f "$(DESTDIR)$(mandir)/man3/ACCESS_DESCRIPTION_free.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/AUTHORITY_INFO_ACCESS_free.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/AUTHORITY_INFO_ACCESS_new.3"




	-rm -f "$(DESTDIR)$(mandir)/man3/ASN1_ENUMERATED_get.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/ASN1_ENUMERATED_set.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/ASN1_ENUMERATED_to_BN.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/ASN1_INTEGER_set.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/ASN1_INTEGER_to_BN.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/BN_to_ASN1_ENUMERATED.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/BN_to_ASN1_INTEGER.3"

	-rm -f "$(DESTDIR)$(mandir)/man3/ASN1_OBJECT_free.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/ASN1_STRING_TABLE_cleanup.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/ASN1_STRING_TABLE_get.3"



	-rm -f "$(DESTDIR)$(mandir)/man3/ASN1_STRING_cmp.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/ASN1_STRING_data.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/ASN1_STRING_dup.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/ASN1_STRING_get0_data.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/ASN1_STRING_length_set.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/ASN1_STRING_set.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/ASN1_STRING_to_UTF8.3"







>
>
>
>







>



>
>
>







3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
	ln -sf "tls_read.3" "$(DESTDIR)$(mandir)/man3/tls_reset.3"
	ln -sf "tls_read.3" "$(DESTDIR)$(mandir)/man3/tls_write.3"

uninstall-local:
	-rm -f "$(DESTDIR)$(mandir)/man3/ACCESS_DESCRIPTION_free.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/AUTHORITY_INFO_ACCESS_free.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/AUTHORITY_INFO_ACCESS_new.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/AES_cbc_encrypt.3"
	-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_ENUMERATED_get.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/ASN1_ENUMERATED_set.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/ASN1_ENUMERATED_to_BN.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/ASN1_INTEGER_set.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/ASN1_INTEGER_to_BN.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/BN_to_ASN1_ENUMERATED.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/BN_to_ASN1_INTEGER.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/i2a_ASN1_INTEGER.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/ASN1_OBJECT_free.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/ASN1_STRING_TABLE_cleanup.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/ASN1_STRING_TABLE_get.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/ASN1_OCTET_STRING_cmp.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/ASN1_OCTET_STRING_dup.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/ASN1_OCTET_STRING_set.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/ASN1_STRING_cmp.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/ASN1_STRING_data.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/ASN1_STRING_dup.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/ASN1_STRING_get0_data.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/ASN1_STRING_length_set.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/ASN1_STRING_set.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/ASN1_STRING_to_UTF8.3"
3212
3213
3214
3215
3216
3217
3218

3219
3220
3221
3222
3223
3224
3225
	-rm -f "$(DESTDIR)$(mandir)/man3/ASN1_item_i2d.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/ASN1_item_i2d_bio.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/ASN1_item_i2d_fp.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/ASN1_item_print.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/d2i_ASN1_TYPE.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/i2d_ASN1_TYPE.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/ASN1_item_free.3"

	-rm -f "$(DESTDIR)$(mandir)/man3/ASN1_TIME_set_tm.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/ASN1_time_tm_cmp.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/AUTHORITY_KEYID_free.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/BASIC_CONSTRAINTS_free.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/BF_cbc_encrypt.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/BF_cfb64_encrypt.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/BF_decrypt.3"







>







3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
	-rm -f "$(DESTDIR)$(mandir)/man3/ASN1_item_i2d.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/ASN1_item_i2d_bio.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/ASN1_item_i2d_fp.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/ASN1_item_print.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/d2i_ASN1_TYPE.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/i2d_ASN1_TYPE.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/ASN1_item_free.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/ASN1_put_eoc.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/ASN1_TIME_set_tm.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/ASN1_time_tm_cmp.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/AUTHORITY_KEYID_free.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/BASIC_CONSTRAINTS_free.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/BF_cbc_encrypt.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/BF_cfb64_encrypt.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/BF_decrypt.3"
3277
3278
3279
3280
3281
3282
3283



3284
3285
3286
3287
3288
3289
3290
	-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/ENGINE_get_ex_data.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/ENGINE_get_ex_new_index.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/ENGINE_set_ex_data.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/TYPE_get_ex_data.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/TYPE_get_ex_new_index.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/TYPE_set_ex_data.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/UI_get_ex_data.3"







>
>
>







3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
	-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"
	-rm -f "$(DESTDIR)$(mandir)/man3/ENGINE_get_ex_data.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/ENGINE_get_ex_new_index.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/ENGINE_set_ex_data.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/TYPE_get_ex_data.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/TYPE_get_ex_new_index.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/TYPE_set_ex_data.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/UI_get_ex_data.3"
3481
3482
3483
3484
3485
3486
3487

































3488
3489
3490
3491
3492
3493
3494
	-rm -f "$(DESTDIR)$(mandir)/man3/BN_set_word.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/BN_value_one.3"
	-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/CONF_modules_finish.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/CONF_modules_unload.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/CONF_modules_load.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/CRYPTO_MEM_LEAK_CB.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/CRYPTO_mem_ctrl.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/CRYPTO_mem_leaks.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/CRYPTO_mem_leaks_cb.3"







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
	-rm -f "$(DESTDIR)$(mandir)/man3/BN_set_word.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/BN_value_one.3"
	-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/CMS_ContentInfo_free.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/CMS_ContentInfo_print_ctx.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/CMS_ReceiptRequest_free.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/CMS_ReceiptRequest_new.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/CMS_add0_crl.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/CMS_add1_cert.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/CMS_add1_crl.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/CMS_get1_certs.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/CMS_get1_crls.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/CMS_add0_recipient_key.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/CMS_SignerInfo_sign.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/CMS_decrypt_set1_key.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/CMS_decrypt_set1_pkey.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/CMS_RecipientInfo_decrypt.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/CMS_RecipientInfo_encrypt.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/CMS_RecipientInfo_kekri_get0_id.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/CMS_RecipientInfo_kekri_id_cmp.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/CMS_RecipientInfo_ktri_cert_cmp.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/CMS_RecipientInfo_ktri_get0_signer_id.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/CMS_RecipientInfo_set0_key.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/CMS_RecipientInfo_set0_pkey.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/CMS_RecipientInfo_type.3"
	-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_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_set1_eContentType.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/CMS_ReceiptRequest_create0.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/CMS_ReceiptRequest_get0_values.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/CMS_add1_ReceiptRequest.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/CMS_get0_signers.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/CONF_modules_finish.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/CONF_modules_unload.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/CONF_modules_load.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/CRYPTO_MEM_LEAK_CB.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/CRYPTO_mem_ctrl.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/CRYPTO_mem_leaks.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/CRYPTO_mem_leaks_cb.3"
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
	-rm -f "$(DESTDIR)$(mandir)/man3/CRYPTO_EX_dup.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/CRYPTO_EX_free.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/CRYPTO_EX_new.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/CRYPTO_free_ex_data.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/CRYPTO_get_ex_data.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/CRYPTO_get_ex_new_index.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/CRYPTO_new_ex_data.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/CRYPTO_THREADID_cmp.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/CRYPTO_THREADID_cpy.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/CRYPTO_THREADID_current.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/CRYPTO_THREADID_get_callback.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/CRYPTO_THREADID_hash.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/CRYPTO_THREADID_set_callback.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/CRYPTO_THREADID_set_numeric.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/CRYPTO_THREADID_set_pointer.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/CRYPTO_add.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/CRYPTO_destroy_dynlockid.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/CRYPTO_get_new_dynlockid.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/CRYPTO_lock.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/CRYPTO_num_locks.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/CRYPTO_r_lock.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/CRYPTO_r_unlock.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/CRYPTO_set_dynlock_create_callback.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/CRYPTO_set_dynlock_destroy_callback.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/CRYPTO_set_dynlock_lock_callback.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/CRYPTO_w_lock.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/CRYPTO_w_unlock.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/DES_cbc_cksum.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/DES_cfb64_encrypt.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/DES_cfb_encrypt.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/DES_crypt.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/DES_ecb2_encrypt.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/DES_ecb3_encrypt.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/DES_ecb_encrypt.3"







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







3700
3701
3702
3703
3704
3705
3706




















3707
3708
3709
3710
3711
3712
3713
	-rm -f "$(DESTDIR)$(mandir)/man3/CRYPTO_EX_dup.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/CRYPTO_EX_free.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/CRYPTO_EX_new.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/CRYPTO_free_ex_data.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/CRYPTO_get_ex_data.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/CRYPTO_get_ex_new_index.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/CRYPTO_new_ex_data.3"




















	-rm -f "$(DESTDIR)$(mandir)/man3/DES_cbc_cksum.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/DES_cfb64_encrypt.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/DES_cfb_encrypt.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/DES_crypt.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/DES_ecb2_encrypt.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/DES_ecb3_encrypt.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/DES_ecb_encrypt.3"
3610
3611
3612
3613
3614
3615
3616

3617
3618
3619
3620
3621
3622
3623
	-rm -f "$(DESTDIR)$(mandir)/man3/DSA_up_ref.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/DSA_OpenSSL.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/DSA_get_default_method.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/DSA_new_method.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/DSA_set_default_method.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/DSA_sign_setup.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/DSA_verify.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_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"







>







3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
	-rm -f "$(DESTDIR)$(mandir)/man3/DSA_up_ref.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/DSA_OpenSSL.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/DSA_get_default_method.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/DSA_new_method.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/DSA_set_default_method.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/DSA_sign_setup.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/DSA_verify.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_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"
3666
3667
3668
3669
3670
3671
3672

















3673
3674
3675
3676
3677
3678
3679
	-rm -f "$(DESTDIR)$(mandir)/man3/EC_GROUP_get_curve_GFp.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EC_GROUP_new_by_curve_name.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EC_GROUP_new_curve_GF2m.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EC_GROUP_new_curve_GFp.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EC_GROUP_set_curve_GF2m.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EC_GROUP_set_curve_GFp.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EC_get_builtin_curves.3"

















	-rm -f "$(DESTDIR)$(mandir)/man3/EC_KEY_check_key.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EC_KEY_clear_flags.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EC_KEY_copy.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EC_KEY_dup.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EC_KEY_free.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EC_KEY_generate_key.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EC_KEY_get0_group.3"







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
3869
3870
3871
	-rm -f "$(DESTDIR)$(mandir)/man3/EC_GROUP_get_curve_GFp.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EC_GROUP_new_by_curve_name.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EC_GROUP_new_curve_GF2m.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EC_GROUP_new_curve_GFp.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EC_GROUP_set_curve_GF2m.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EC_GROUP_set_curve_GFp.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EC_get_builtin_curves.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EC_KEY_METHOD_free.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EC_KEY_METHOD_get_compute_key.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EC_KEY_METHOD_get_init.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EC_KEY_METHOD_get_keygen.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EC_KEY_METHOD_get_sign.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EC_KEY_METHOD_get_verify.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EC_KEY_METHOD_set_compute_key.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EC_KEY_METHOD_set_init.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EC_KEY_METHOD_set_keygen.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EC_KEY_METHOD_set_sign.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EC_KEY_METHOD_set_verify.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EC_KEY_OpenSSL.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EC_KEY_get_default_method.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EC_KEY_get_method.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EC_KEY_new_method.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EC_KEY_set_default_method.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EC_KEY_set_method.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EC_KEY_check_key.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EC_KEY_clear_flags.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EC_KEY_copy.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EC_KEY_dup.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EC_KEY_free.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EC_KEY_generate_key.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EC_KEY_get0_group.3"
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
	-rm -f "$(DESTDIR)$(mandir)/man3/ERR_peek_error.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/ERR_peek_error_line.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/ERR_peek_error_line_data.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/ERR_peek_last_error.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/ERR_peek_last_error_line.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/ERR_peek_last_error_line_data.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/ERR_free_strings.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/ERR_load_BN_strings.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/SSL_load_error_strings.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/ERR_PACK.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/ERR_get_next_error_library.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/ERR_print_errors_cb.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/ERR_print_errors_fp.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/ERR_add_error_data.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/ERR_add_error_vdata.3"







<







4030
4031
4032
4033
4034
4035
4036

4037
4038
4039
4040
4041
4042
4043
	-rm -f "$(DESTDIR)$(mandir)/man3/ERR_peek_error.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/ERR_peek_error_line.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/ERR_peek_error_line_data.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/ERR_peek_last_error.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/ERR_peek_last_error_line.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/ERR_peek_last_error_line_data.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/ERR_free_strings.3"

	-rm -f "$(DESTDIR)$(mandir)/man3/SSL_load_error_strings.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/ERR_PACK.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/ERR_get_next_error_library.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/ERR_print_errors_cb.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/ERR_print_errors_fp.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/ERR_add_error_data.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/ERR_add_error_vdata.3"
3862
3863
3864
3865
3866
3867
3868
3869
3870
3871
3872
3873
3874
3875
3876
3877
3878
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_AEAD_CTX_seal.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_AEAD_key_length.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_AEAD_max_overhead.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_AEAD_max_tag_len.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_AEAD_nonce_length.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_aead_aes_128_gcm.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_aead_aes_256_gcm.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_aead_chacha20_poly1305"
	-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_DigestFinal.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_DigestFinal_ex.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_DigestInit_ex.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_DigestUpdate.3"
	-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"







|
|
|







4053
4054
4055
4056
4057
4058
4059
4060
4061
4062
4063
4064
4065
4066
4067
4068
4069
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_AEAD_CTX_seal.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_AEAD_key_length.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_AEAD_max_overhead.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_AEAD_max_tag_len.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_AEAD_nonce_length.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_aead_aes_128_gcm.3"
	-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_Digest.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_DigestFinal.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_DigestFinal_ex.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_DigestInit_ex.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_DigestUpdate.3"
	-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"
3948
3949
3950
3951
3952
3953
3954

3955
3956
3957
3958
3959
3960
3961
3962
3963
3964
3965
3966
3967
3968
3969
3970

3971
3972
3973
3974

3975
3976
3977
3978
3979
3980
3981
3982
3983
3984
3985
3986
3987
3988
3989
3990
3991
3992
3993
3994
3995
3996

3997
3998
3999
4000
4001
4002
4003
4004
4005
4006
4007
4008
4009
4010
4011
4012
4013

4014
4015
4016
4017
4018
4019
4020
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_CIPHER_flags.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_CIPHER_iv_length.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_CIPHER_key_length.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_CIPHER_mode.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_CIPHER_nid.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_CIPHER_param_to_asn1.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_CIPHER_type.3"

	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_CipherFinal.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_CipherFinal_ex.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_CipherInit.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_CipherInit_ex.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_CipherUpdate.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_DecryptFinal.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_DecryptFinal_ex.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_DecryptInit.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_DecryptInit_ex.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_DecryptUpdate.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_EncryptFinal.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_EncryptFinal_ex.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_EncryptInit_ex.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_EncryptUpdate.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_bf_cbc.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_bf_cfb.3"

	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_bf_ecb.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_bf_ofb.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_cast5_cbc.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_cast5_cfb.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_des_cbc.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_des_cfb.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_des_ecb.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_des_ede.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_des_ede3.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_des_ede3_cbc.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_des_ede3_cfb.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_des_ede3_ofb.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_des_ede_cbc.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_des_ede_cfb.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_des_ede_ofb.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_des_ofb.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_desx_cbc.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"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_get_cipherbyobj.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_idea_cbc.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_idea_cfb.3"

	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_idea_ecb.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_idea_ofb.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_rc2_40_cbc.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_rc2_64_cbc.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_rc2_cbc.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_rc2_cfb.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_rc4.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_OpenFinal.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_OpenUpdate.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_PKEY_CTX_ctrl_str.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_PKEY_CTX_get_rsa_mgf1_md.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_PKEY_CTX_get_rsa_padding.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_PKEY_CTX_get_rsa_pss_saltlen.3"

	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_PKEY_CTX_set_dh_paramgen_generator.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_PKEY_CTX_set_dh_paramgen_prime_len.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_PKEY_CTX_set_dsa_paramgen_bits.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_PKEY_CTX_set_ec_paramgen_curve_nid.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_PKEY_CTX_set_rsa_keygen_bits.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_PKEY_CTX_set_rsa_keygen_pubexp.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_PKEY_CTX_set_rsa_mgf1_md.3"







>
















>




>



<
<
<
<
<
<
<
<
<
<
<
<
<






>






|
|
<
<
|






>







4139
4140
4141
4142
4143
4144
4145
4146
4147
4148
4149
4150
4151
4152
4153
4154
4155
4156
4157
4158
4159
4160
4161
4162
4163
4164
4165
4166
4167
4168
4169
4170
4171













4172
4173
4174
4175
4176
4177
4178
4179
4180
4181
4182
4183
4184
4185
4186


4187
4188
4189
4190
4191
4192
4193
4194
4195
4196
4197
4198
4199
4200
4201
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_CIPHER_flags.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_CIPHER_iv_length.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_CIPHER_key_length.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_CIPHER_mode.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_CIPHER_nid.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_CIPHER_param_to_asn1.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_CIPHER_type.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_Cipher.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_CipherFinal.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_CipherFinal_ex.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_CipherInit.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_CipherInit_ex.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_CipherUpdate.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_DecryptFinal.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_DecryptFinal_ex.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_DecryptInit.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_DecryptInit_ex.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_DecryptUpdate.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_EncryptFinal.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_EncryptFinal_ex.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_EncryptInit_ex.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_EncryptUpdate.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_bf_cbc.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_bf_cfb.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_bf_cfb64.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_bf_ecb.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_bf_ofb.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_cast5_cbc.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_cast5_cfb.3"
	-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"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_get_cipherbyobj.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_idea_cbc.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_idea_cfb.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_idea_cfb64.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_idea_ecb.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_idea_ofb.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_rc2_40_cbc.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_rc2_64_cbc.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_rc2_cbc.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_rc2_cfb.3"
	-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_OpenFinal.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_OpenUpdate.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_PKEY_CTX_ctrl_str.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_PKEY_CTX_get_rsa_mgf1_md.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_PKEY_CTX_get_rsa_padding.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_PKEY_CTX_get_rsa_pss_saltlen.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_PKEY_CTX_get_signature_md.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_PKEY_CTX_set_dh_paramgen_generator.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_PKEY_CTX_set_dh_paramgen_prime_len.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_PKEY_CTX_set_dsa_paramgen_bits.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_PKEY_CTX_set_ec_paramgen_curve_nid.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_PKEY_CTX_set_rsa_keygen_bits.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_PKEY_CTX_set_rsa_keygen_pubexp.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_PKEY_CTX_set_rsa_mgf1_md.3"
4073
4074
4075
4076
4077
4078
4079

4080
4081
4082

4083
4084

4085
4086
4087
4088
4089
4090
4091
4092
4093
4094
4095
4096
4097

4098
4099
4100
4101
4102
4103
4104
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_PKEY_meth_set_verify_recover.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_PKEY_meth_set_verifyctx.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_PKEY_free.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_PKEY_new_mac_key.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_PKEY_up_ref.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_PKEY_print_params.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_PKEY_print_public.3"

	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_PKEY_assign_DH.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_PKEY_assign_DSA.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_PKEY_assign_EC_KEY.3"

	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_PKEY_assign_RSA.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_PKEY_base_id.3"

	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_PKEY_get0_DH.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_PKEY_get0_DSA.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_PKEY_get0_EC_KEY.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_PKEY_get0_RSA.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_PKEY_get0_hmac.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_PKEY_get1_DH.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_PKEY_get1_DSA.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_PKEY_get1_EC_KEY.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_PKEY_get1_RSA.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_PKEY_id.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_PKEY_set1_DH.3"
	-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_type.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_PKEY_sign_init.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_PKEY_verify_init.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_PKEY_verify_recover_init.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_SealFinal.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_SealUpdate.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_PKEY_bits.3"







>



>


>













>







4254
4255
4256
4257
4258
4259
4260
4261
4262
4263
4264
4265
4266
4267
4268
4269
4270
4271
4272
4273
4274
4275
4276
4277
4278
4279
4280
4281
4282
4283
4284
4285
4286
4287
4288
4289
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_PKEY_meth_set_verify_recover.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_PKEY_meth_set_verifyctx.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_PKEY_free.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_PKEY_new_mac_key.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_PKEY_up_ref.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_PKEY_print_params.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_PKEY_print_public.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_PKEY_assign.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_PKEY_assign_DH.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_PKEY_assign_DSA.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_PKEY_assign_EC_KEY.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_PKEY_assign_GOST.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_PKEY_assign_RSA.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_PKEY_base_id.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_PKEY_get0.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_PKEY_get0_DH.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_PKEY_get0_DSA.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_PKEY_get0_EC_KEY.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_PKEY_get0_RSA.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_PKEY_get0_hmac.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_PKEY_get1_DH.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_PKEY_get1_DSA.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_PKEY_get1_EC_KEY.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_PKEY_get1_RSA.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_PKEY_id.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_PKEY_set1_DH.3"
	-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_type.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_PKEY_sign_init.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_PKEY_verify_init.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_PKEY_verify_recover_init.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_SealFinal.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_SealUpdate.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_PKEY_bits.3"
4141
4142
4143
4144
4145
4146
4147











































4148
4149
4150
4151
4152
4153
4154
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_aes_256_cfb8.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_aes_256_ctr.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_aes_256_ecb.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_aes_256_gcm.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_aes_256_ofb.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_aes_256_wrap.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_aes_256_xts.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"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_sm4_ecb.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_sm4_ofb.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EXTENDED_KEY_USAGE_free.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EDIPARTYNAME_free.3"







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







4326
4327
4328
4329
4330
4331
4332
4333
4334
4335
4336
4337
4338
4339
4340
4341
4342
4343
4344
4345
4346
4347
4348
4349
4350
4351
4352
4353
4354
4355
4356
4357
4358
4359
4360
4361
4362
4363
4364
4365
4366
4367
4368
4369
4370
4371
4372
4373
4374
4375
4376
4377
4378
4379
4380
4381
4382
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_aes_256_cfb8.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_aes_256_ctr.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_aes_256_ecb.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_aes_256_gcm.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_aes_256_ofb.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_aes_256_wrap.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_aes_256_xts.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_camellia_128_cfb.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_camellia_128_cfb1.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_camellia_128_cfb128.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_camellia_128_cfb8.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_camellia_128_ecb.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_camellia_128_ofb.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_camellia_192_cbc.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_camellia_192_cfb.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_camellia_192_cfb1.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_camellia_192_cfb128.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_camellia_192_cfb8.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_camellia_192_ecb.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_camellia_192_ofb.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_camellia_256_cbc.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_camellia_256_cfb.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_camellia_256_cfb1.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_camellia_256_cfb128.3"
	-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_des_cfb.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_des_cfb1.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_des_cfb64.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_des_cfb8.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_des_ecb.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_des_ede.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_des_ede3.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_des_ede3_cbc.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_des_ede3_cfb.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_des_ede3_cfb1.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_des_ede3_cfb64.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_des_ede3_cfb8.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_des_ede3_ecb.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_des_ede3_ofb.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_des_ede_cbc.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_des_ede_cfb.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_des_ede_cfb64.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_des_ede_ecb.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_des_ede_ofb.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_des_ofb.3"
	-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_sm4_cfb.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_sm4_cfb128.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_sm4_ctr.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_sm4_ecb.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EVP_sm4_ofb.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EXTENDED_KEY_USAGE_free.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/EDIPARTYNAME_free.3"
4223
4224
4225
4226
4227
4228
4229

4230
4231
4232
4233
4234
4235
4236
4237
4238
4239
4240
4241
4242
4243
4244
4245
4246
4247

4248
4249
4250

4251
4252
4253
4254
4255
4256
4257
	-rm -f "$(DESTDIR)$(mandir)/man3/OCSP_CERTSTATUS_new.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/OCSP_REVOKEDINFO_free.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/OCSP_REVOKEDINFO_new.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/OCSP_SINGLERESP_free.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/OCSP_SINGLERESP_get0_id.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/OCSP_SINGLERESP_new.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/OCSP_basic_verify.3"

	-rm -f "$(DESTDIR)$(mandir)/man3/OCSP_check_validity.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/OCSP_resp_count.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/OCSP_resp_find.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/OCSP_resp_get0.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/OCSP_single_get0_status.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/OCSP_BASICRESP_free.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/OCSP_BASICRESP_new.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/OCSP_RESPBYTES_free.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/OCSP_RESPBYTES_new.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/OCSP_RESPDATA_free.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/OCSP_RESPDATA_new.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/OCSP_RESPID_free.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/OCSP_RESPID_new.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/OCSP_RESPONSE_free.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/OCSP_RESPONSE_new.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/OCSP_basic_sign.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/OCSP_response_create.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/OCSP_response_get1_basic.3"

	-rm -f "$(DESTDIR)$(mandir)/man3/OCSP_REQ_CTX_add1_header.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/OCSP_REQ_CTX_free.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/OCSP_REQ_CTX_set1_req.3"

	-rm -f "$(DESTDIR)$(mandir)/man3/OCSP_sendreq_bio.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/OCSP_sendreq_nbio.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/LIBRESSL_VERSION_NUMBER.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/LIBRESSL_VERSION_TEXT.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/OPENSSL_VERSION_TEXT.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/OpenSSL_version.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/OpenSSL_version_num.3"







>


















>



>







4451
4452
4453
4454
4455
4456
4457
4458
4459
4460
4461
4462
4463
4464
4465
4466
4467
4468
4469
4470
4471
4472
4473
4474
4475
4476
4477
4478
4479
4480
4481
4482
4483
4484
4485
4486
4487
4488
	-rm -f "$(DESTDIR)$(mandir)/man3/OCSP_CERTSTATUS_new.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/OCSP_REVOKEDINFO_free.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/OCSP_REVOKEDINFO_new.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/OCSP_SINGLERESP_free.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/OCSP_SINGLERESP_get0_id.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/OCSP_SINGLERESP_new.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/OCSP_basic_verify.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/OCSP_cert_status_str.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/OCSP_check_validity.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/OCSP_resp_count.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/OCSP_resp_find.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/OCSP_resp_get0.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/OCSP_single_get0_status.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/OCSP_BASICRESP_free.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/OCSP_BASICRESP_new.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/OCSP_RESPBYTES_free.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/OCSP_RESPBYTES_new.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/OCSP_RESPDATA_free.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/OCSP_RESPDATA_new.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/OCSP_RESPID_free.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/OCSP_RESPID_new.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/OCSP_RESPONSE_free.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/OCSP_RESPONSE_new.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/OCSP_basic_sign.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/OCSP_response_create.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/OCSP_response_get1_basic.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/OCSP_response_status_str.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/OCSP_REQ_CTX_add1_header.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/OCSP_REQ_CTX_free.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/OCSP_REQ_CTX_set1_req.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/OCSP_parse_url.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/OCSP_sendreq_bio.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/OCSP_sendreq_nbio.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/LIBRESSL_VERSION_NUMBER.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/LIBRESSL_VERSION_TEXT.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/OPENSSL_VERSION_TEXT.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/OpenSSL_version.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/OpenSSL_version_num.3"
4380
4381
4382
4383
4384
4385
4386

4387
4388
4389
4390
4391
4392
4393
	-rm -f "$(DESTDIR)$(mandir)/man3/PEM_write_bio_RSAPublicKey.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/PEM_write_bio_RSA_PUBKEY.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/PEM_write_bio_X509.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/PEM_write_bio_X509_AUX.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/PEM_write_bio_X509_CRL.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/PEM_write_bio_X509_REQ.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/PEM_write_bio_X509_REQ_NEW.3"

	-rm -f "$(DESTDIR)$(mandir)/man3/PKCS12_BAGS_free.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/PKCS12_BAGS_new.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/PKCS12_SAFEBAG_free.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/PKCS12_MAC_DATA_free.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/PKCS12_MAC_DATA_new.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/PKCS12_free.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/PKCS5_PBKDF2_HMAC_SHA1.3"







>







4611
4612
4613
4614
4615
4616
4617
4618
4619
4620
4621
4622
4623
4624
4625
	-rm -f "$(DESTDIR)$(mandir)/man3/PEM_write_bio_RSAPublicKey.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/PEM_write_bio_RSA_PUBKEY.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/PEM_write_bio_X509.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/PEM_write_bio_X509_AUX.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/PEM_write_bio_X509_CRL.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/PEM_write_bio_X509_REQ.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/PEM_write_bio_X509_REQ_NEW.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/pem_password_cb.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/PKCS12_BAGS_free.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/PKCS12_BAGS_new.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/PKCS12_SAFEBAG_free.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/PKCS12_MAC_DATA_free.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/PKCS12_MAC_DATA_new.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/PKCS12_free.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/PKCS5_PBKDF2_HMAC_SHA1.3"
4456
4457
4458
4459
4460
4461
4462



4463











4464

4465




4466
4467






4468
4469
4470
4471
4472
4473
4474
	-rm -f "$(DESTDIR)$(mandir)/man3/CRYPTO_EX_dup.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/CRYPTO_EX_free.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/CRYPTO_EX_new.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/RSA_get_ex_data.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/RSA_set_ex_data.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/RSA_meth_dup.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/RSA_meth_free.3"



	-rm -f "$(DESTDIR)$(mandir)/man3/RSA_meth_get_finish.3"











	-rm -f "$(DESTDIR)$(mandir)/man3/RSA_meth_set1_name.3"

	-rm -f "$(DESTDIR)$(mandir)/man3/RSA_meth_set_finish.3"




	-rm -f "$(DESTDIR)$(mandir)/man3/RSA_meth_set_priv_dec.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/RSA_meth_set_priv_enc.3"






	-rm -f "$(DESTDIR)$(mandir)/man3/RSA_free.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/RSA_up_ref.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/RSA_padding_add_PKCS1_OAEP.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/RSA_padding_add_PKCS1_type_2.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/RSA_padding_add_none.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/RSA_padding_check_PKCS1_OAEP.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/RSA_padding_check_PKCS1_type_1.3"







>
>
>

>
>
>
>
>
>
>
>
>
>
>

>

>
>
>
>


>
>
>
>
>
>







4688
4689
4690
4691
4692
4693
4694
4695
4696
4697
4698
4699
4700
4701
4702
4703
4704
4705
4706
4707
4708
4709
4710
4711
4712
4713
4714
4715
4716
4717
4718
4719
4720
4721
4722
4723
4724
4725
4726
4727
4728
4729
4730
4731
	-rm -f "$(DESTDIR)$(mandir)/man3/CRYPTO_EX_dup.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/CRYPTO_EX_free.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/CRYPTO_EX_new.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/RSA_get_ex_data.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/RSA_set_ex_data.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/RSA_meth_dup.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/RSA_meth_free.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/RSA_meth_get0_app_data.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/RSA_meth_get0_name.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/RSA_meth_get_bn_mod_exp.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/RSA_meth_get_finish.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/RSA_meth_get_flags.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/RSA_meth_get_init.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/RSA_meth_get_keygen.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/RSA_meth_get_mod_exp.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/RSA_meth_get_priv_dec.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/RSA_meth_get_priv_enc.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/RSA_meth_get_pub_dec.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/RSA_meth_get_pub_enc.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/RSA_meth_get_sign.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/RSA_meth_get_verify.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/RSA_meth_set0_app_data.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/RSA_meth_set1_name.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/RSA_meth_set_bn_mod_exp.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/RSA_meth_set_finish.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/RSA_meth_set_flags.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/RSA_meth_set_init.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/RSA_meth_set_keygen.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/RSA_meth_set_mod_exp.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/RSA_meth_set_priv_dec.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/RSA_meth_set_priv_enc.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/RSA_meth_set_pub_dec.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/RSA_meth_set_pub_enc.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/RSA_meth_set_sign.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/RSA_meth_set_verify.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/RSAPrivateKey_dup.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/RSAPublicKey_dup.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/RSA_free.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/RSA_up_ref.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/RSA_padding_add_PKCS1_OAEP.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/RSA_padding_add_PKCS1_type_2.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/RSA_padding_add_none.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/RSA_padding_check_PKCS1_OAEP.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/RSA_padding_check_PKCS1_type_1.3"
4517
4518
4519
4520
4521
4522
4523











4524

4525
4526
4527
4528
4529
4530
4531
	-rm -f "$(DESTDIR)$(mandir)/man3/SSL_CIPHER_get_cipher_nid.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/SSL_CIPHER_get_digest_nid.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/SSL_CIPHER_get_id.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/SSL_CIPHER_get_kx_nid.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/SSL_CIPHER_get_version.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/SSL_CIPHER_is_aead.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/SSL_COMP_get_compression_methods.3"











	-rm -f "$(DESTDIR)$(mandir)/man3/SSL_CTX_clear_extra_chain_certs.3"

	-rm -f "$(DESTDIR)$(mandir)/man3/SSL_CTX_remove_session.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/SSL_CTX_callback_ctrl.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/SSL_callback_ctrl.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/SSL_ctrl.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/SSL_CTX_get_ex_data.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/SSL_CTX_set_ex_data.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/SSL_CTX_get_verify_callback.3"







>
>
>
>
>
>
>
>
>
>
>

>







4774
4775
4776
4777
4778
4779
4780
4781
4782
4783
4784
4785
4786
4787
4788
4789
4790
4791
4792
4793
4794
4795
4796
4797
4798
4799
4800
	-rm -f "$(DESTDIR)$(mandir)/man3/SSL_CIPHER_get_cipher_nid.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/SSL_CIPHER_get_digest_nid.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/SSL_CIPHER_get_id.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/SSL_CIPHER_get_kx_nid.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/SSL_CIPHER_get_version.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/SSL_CIPHER_is_aead.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/SSL_COMP_get_compression_methods.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/SSL_CTX_add0_chain_cert.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/SSL_CTX_clear_chain_certs.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/SSL_CTX_get0_chain_certs.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/SSL_CTX_set0_chain.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/SSL_CTX_set1_chain.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/SSL_add0_chain_cert.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/SSL_add1_chain_cert.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/SSL_clear_chain_certs.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/SSL_get0_chain_certs.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/SSL_set0_chain.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/SSL_set1_chain.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/SSL_CTX_clear_extra_chain_certs.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/SSL_CTX_get_extra_chain_certs.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/SSL_CTX_remove_session.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/SSL_CTX_callback_ctrl.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/SSL_callback_ctrl.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/SSL_ctrl.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/SSL_CTX_get_ex_data.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/SSL_CTX_set_ex_data.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/SSL_CTX_get_verify_callback.3"
4610
4611
4612
4613
4614
4615
4616

4617

4618
4619
4620
4621
4622
4623
4624
	-rm -f "$(DESTDIR)$(mandir)/man3/SSL_CTX_get_max_proto_version.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/SSL_CTX_get_min_proto_version.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/SSL_CTX_set_max_proto_version.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/SSL_get_max_proto_version.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/SSL_get_min_proto_version.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/SSL_set_max_proto_version.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/SSL_set_min_proto_version.3"

	-rm -f "$(DESTDIR)$(mandir)/man3/SSL_CTX_get_mode.3"

	-rm -f "$(DESTDIR)$(mandir)/man3/SSL_get_mode.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/SSL_set_mode.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/SSL_CTX_set_msg_callback_arg.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/SSL_set_msg_callback.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/SSL_set_msg_callback_arg.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/SSL_CTX_clear_options.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/SSL_CTX_get_options.3"







>

>







4879
4880
4881
4882
4883
4884
4885
4886
4887
4888
4889
4890
4891
4892
4893
4894
4895
	-rm -f "$(DESTDIR)$(mandir)/man3/SSL_CTX_get_max_proto_version.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/SSL_CTX_get_min_proto_version.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/SSL_CTX_set_max_proto_version.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/SSL_get_max_proto_version.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/SSL_get_min_proto_version.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/SSL_set_max_proto_version.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/SSL_set_min_proto_version.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/SSL_CTX_clear_mode.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/SSL_CTX_get_mode.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/SSL_clear_mode.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/SSL_get_mode.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/SSL_set_mode.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/SSL_CTX_set_msg_callback_arg.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/SSL_set_msg_callback.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/SSL_set_msg_callback_arg.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/SSL_CTX_clear_options.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/SSL_CTX_get_options.3"
4859
4860
4861
4862
4863
4864
4865

4866
4867
4868
4869
4870
4871
4872
	-rm -f "$(DESTDIR)$(mandir)/man3/X509_EXTENSION_free.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/X509_EXTENSION_get_critical.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/X509_EXTENSION_get_data.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/X509_EXTENSION_get_object.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/X509_EXTENSION_new.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/X509_EXTENSION_set_critical.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/X509_EXTENSION_set_data.3"

	-rm -f "$(DESTDIR)$(mandir)/man3/X509_LOOKUP_file.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/X509_load_cert_crl_file.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/X509_load_cert_file.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/X509_load_crl_file.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/X509_NAME_ENTRY_create_by_NID.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/X509_NAME_ENTRY_create_by_OBJ.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/X509_NAME_ENTRY_create_by_txt.3"







>







5130
5131
5132
5133
5134
5135
5136
5137
5138
5139
5140
5141
5142
5143
5144
	-rm -f "$(DESTDIR)$(mandir)/man3/X509_EXTENSION_free.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/X509_EXTENSION_get_critical.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/X509_EXTENSION_get_data.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/X509_EXTENSION_get_object.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/X509_EXTENSION_new.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/X509_EXTENSION_set_critical.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/X509_EXTENSION_set_data.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/X509_INFO_free.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/X509_LOOKUP_file.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/X509_load_cert_crl_file.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/X509_load_cert_file.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/X509_load_crl_file.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/X509_NAME_ENTRY_create_by_NID.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/X509_NAME_ENTRY_create_by_OBJ.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/X509_NAME_ENTRY_create_by_txt.3"
4980
4981
4982
4983
4984
4985
4986






4987
4988
4989
4990
4991
4992
4993
	-rm -f "$(DESTDIR)$(mandir)/man3/X509_VERIFY_PARAM_set_time.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/X509_VERIFY_PARAM_set_trust.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/X509_VERIFY_PARAM_table_cleanup.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/X509_check_email.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/X509_check_ip.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/X509_check_ip_asc.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/X509_REQ_check_private_key.3"






	-rm -f "$(DESTDIR)$(mandir)/man3/X509_cmp_current_time.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/X509_time_adj.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/X509_time_adj_ex.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/PKCS7_ISSUER_AND_SERIAL_digest.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/X509_CRL_digest.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/X509_NAME_digest.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/X509_REQ_digest.3"







>
>
>
>
>
>







5252
5253
5254
5255
5256
5257
5258
5259
5260
5261
5262
5263
5264
5265
5266
5267
5268
5269
5270
5271
	-rm -f "$(DESTDIR)$(mandir)/man3/X509_VERIFY_PARAM_set_time.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/X509_VERIFY_PARAM_set_trust.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/X509_VERIFY_PARAM_table_cleanup.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/X509_check_email.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/X509_check_ip.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/X509_check_ip_asc.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/X509_REQ_check_private_key.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/X509_CRL_cmp.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/X509_CRL_match.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/X509_NAME_cmp.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/X509_issuer_and_serial_cmp.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/X509_issuer_name_cmp.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/X509_subject_name_cmp.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/X509_cmp_current_time.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/X509_time_adj.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/X509_time_adj_ex.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/PKCS7_ISSUER_AND_SERIAL_digest.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/X509_CRL_digest.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/X509_NAME_digest.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/X509_REQ_digest.3"
5003
5004
5005
5006
5007
5008
5009


5010
5011
5012
5013
5014
5015
5016
5017
5018
5019
5020
5021
5022
5023
5024
5025
5026
5027
5028

5029
5030
5031
5032
5033
5034
5035
	-rm -f "$(DESTDIR)$(mandir)/man3/X509_set1_notBefore.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/X509_CRL_get0_signature.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/X509_CRL_get_signature_nid.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/X509_REQ_get0_signature.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/X509_REQ_get_signature_nid.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/X509_get0_tbs_sigalg.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/X509_get_signature_nid.3"


	-rm -f "$(DESTDIR)$(mandir)/man3/X509_REQ_get_pubkey.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/X509_REQ_set_pubkey.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/X509_get0_pubkey.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/X509_get_X509_PUBKEY.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/X509_set_pubkey.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/X509_set_serialNumber.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/X509_CRL_get_issuer.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/X509_CRL_set_issuer_name.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/X509_REQ_get_subject_name.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/X509_REQ_set_subject_name.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/X509_get_issuer_name.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/X509_set_issuer_name.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/X509_set_subject_name.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/X509_CRL_get_version.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/X509_CRL_set_version.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/X509_REQ_get_version.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/X509_REQ_set_version.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/X509_set_version.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/X509_chain_up_ref.3"

	-rm -f "$(DESTDIR)$(mandir)/man3/X509_free.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/X509_up_ref.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/X509_CRL_sign.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/X509_CRL_sign_ctx.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/X509_CRL_verify.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/X509_REQ_sign.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/X509_REQ_sign_ctx.3"







>
>



















>







5281
5282
5283
5284
5285
5286
5287
5288
5289
5290
5291
5292
5293
5294
5295
5296
5297
5298
5299
5300
5301
5302
5303
5304
5305
5306
5307
5308
5309
5310
5311
5312
5313
5314
5315
5316
	-rm -f "$(DESTDIR)$(mandir)/man3/X509_set1_notBefore.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/X509_CRL_get0_signature.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/X509_CRL_get_signature_nid.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/X509_REQ_get0_signature.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/X509_REQ_get_signature_nid.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/X509_get0_tbs_sigalg.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/X509_get_signature_nid.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/X509_email_free.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/X509_get1_ocsp.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/X509_REQ_get_pubkey.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/X509_REQ_set_pubkey.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/X509_get0_pubkey.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/X509_get_X509_PUBKEY.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/X509_set_pubkey.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/X509_set_serialNumber.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/X509_CRL_get_issuer.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/X509_CRL_set_issuer_name.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/X509_REQ_get_subject_name.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/X509_REQ_set_subject_name.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/X509_get_issuer_name.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/X509_set_issuer_name.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/X509_set_subject_name.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/X509_CRL_get_version.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/X509_CRL_set_version.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/X509_REQ_get_version.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/X509_REQ_set_version.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/X509_set_version.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/X509_chain_up_ref.3"
	-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_CRL_sign.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/X509_CRL_sign_ctx.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/X509_CRL_verify.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/X509_REQ_sign.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/X509_REQ_sign_ctx.3"
5134
5135
5136
5137
5138
5139
5140





5141
5142
5143
5144
5145
5146
5147
	-rm -f "$(DESTDIR)$(mandir)/man3/d2i_ASN1_SET_ANY.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/i2d_ASN1_SEQUENCE_ANY.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/i2d_ASN1_SET_ANY.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/i2d_AUTHORITY_KEYID.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/d2i_EXTENDED_KEY_USAGE.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/i2d_BASIC_CONSTRAINTS.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/i2d_EXTENDED_KEY_USAGE.3"





	-rm -f "$(DESTDIR)$(mandir)/man3/i2d_DHparams.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/d2i_ACCESS_DESCRIPTION.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/d2i_AUTHORITY_INFO_ACCESS.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/d2i_CRL_DIST_POINTS.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/d2i_DIST_POINT_NAME.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/d2i_ISSUING_DIST_POINT.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/i2d_ACCESS_DESCRIPTION.3"







>
>
>
>
>







5415
5416
5417
5418
5419
5420
5421
5422
5423
5424
5425
5426
5427
5428
5429
5430
5431
5432
5433
	-rm -f "$(DESTDIR)$(mandir)/man3/d2i_ASN1_SET_ANY.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/i2d_ASN1_SEQUENCE_ANY.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/i2d_ASN1_SET_ANY.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/i2d_AUTHORITY_KEYID.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/d2i_EXTENDED_KEY_USAGE.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/i2d_BASIC_CONSTRAINTS.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/i2d_EXTENDED_KEY_USAGE.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/d2i_CMS_ReceiptRequest.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/d2i_CMS_bio.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/i2d_CMS_ContentInfo.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/i2d_CMS_ReceiptRequest.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/i2d_CMS_bio.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/i2d_DHparams.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/d2i_ACCESS_DESCRIPTION.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/d2i_AUTHORITY_INFO_ACCESS.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/d2i_CRL_DIST_POINTS.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/d2i_DIST_POINT_NAME.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/d2i_ISSUING_DIST_POINT.3"
	-rm -f "$(DESTDIR)$(mandir)/man3/i2d_ACCESS_DESCRIPTION.3"
Changes to jni/libressl/man/OBJ_nid2obj.3.
1
2
3
4
5
6
7
8
.\"	$OpenBSD: OBJ_nid2obj.3,v 1.12 2018/04/25 15:17:52 schwarze Exp $
.\"	OpenSSL c264592d May 14 11:28:00 2006 +0000
.\"
.\" This file is a derived work.
.\" The changes are covered by the following Copyright and license:
.\"
.\" Copyright (c) 2017 Ingo Schwarze <schwarze@openbsd.org>
.\"
|







1
2
3
4
5
6
7
8
.\"	$OpenBSD: OBJ_nid2obj.3,v 1.14 2019/06/14 13:59:32 schwarze Exp $
.\"	OpenSSL c264592d May 14 11:28:00 2006 +0000
.\"
.\" This file is a derived work.
.\" The changes are covered by the following Copyright and license:
.\"
.\" Copyright (c) 2017 Ingo Schwarze <schwarze@openbsd.org>
.\"
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: April 25 2018 $
.Dt OBJ_NID2OBJ 3
.Os
.Sh NAME
.Nm OBJ_nid2obj ,
.Nm OBJ_nid2ln ,
.Nm OBJ_nid2sn ,
.Nm OBJ_obj2nid ,







|







62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: June 14 2019 $
.Dt OBJ_NID2OBJ 3
.Os
.Sh NAME
.Nm OBJ_nid2obj ,
.Nm OBJ_nid2ln ,
.Nm OBJ_nid2sn ,
.Nm OBJ_obj2nid ,
336
337
338
339
340
341
342














343
344
345
346
347
348
349
.Dv NID_undef
on error.
.Pp
.Fn OBJ_create
returns the new NID or
.Dv NID_undef
if an error occurs.














.Sh EXAMPLES
Create an object for
.Sy commonName :
.Bd -literal -offset indent
ASN1_OBJECT *o;
o = OBJ_nid2obj(NID_commonName);
.Ed







>
>
>
>
>
>
>
>
>
>
>
>
>
>







336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
.Dv NID_undef
on error.
.Pp
.Fn OBJ_create
returns the new NID or
.Dv NID_undef
if an error occurs.
.Pp
In some cases of failure of
.Fn OBJ_nid2obj ,
.Fn OBJ_nid2ln ,
.Fn OBJ_nid2sn ,
.Fn OBJ_txt2nid ,
.Fn OBJ_txt2obj ,
.Fn OBJ_obj2txt ,
.Fn OBJ_dup ,
.Fn OBJ_create ,
and
.Fn i2t_ASN1_OBJECT ,
the reason can be determined with
.Xr ERR_get_error 3 .
.Sh EXAMPLES
Create an object for
.Sy commonName :
.Bd -literal -offset indent
ASN1_OBJECT *o;
o = OBJ_nid2obj(NID_commonName);
.Ed
364
365
366
367
368
369
370
371

372
373
374
375
376
377
378
.Ed
.Pp
Create a new object directly:
.Bd -literal -offset indent
obj = OBJ_txt2obj("1.2.3.4", 1);
.Ed
.Sh SEE ALSO
.Xr ERR_get_error 3

.Sh HISTORY
.Fn OBJ_nid2obj ,
.Fn OBJ_nid2ln ,
.Fn OBJ_nid2sn ,
.Fn OBJ_obj2nid ,
.Fn OBJ_ln2nid ,
.Fn OBJ_sn2nid ,







|
>







378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
.Ed
.Pp
Create a new object directly:
.Bd -literal -offset indent
obj = OBJ_txt2obj("1.2.3.4", 1);
.Ed
.Sh SEE ALSO
.Xr ASN1_OBJECT_new 3 ,
.Xr d2i_ASN1_OBJECT 3
.Sh HISTORY
.Fn OBJ_nid2obj ,
.Fn OBJ_nid2ln ,
.Fn OBJ_nid2sn ,
.Fn OBJ_obj2nid ,
.Fn OBJ_ln2nid ,
.Fn OBJ_sn2nid ,
Changes to jni/libressl/man/OCSP_CRLID_new.3.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
.\"	$OpenBSD: OCSP_CRLID_new.3,v 1.6 2018/05/13 14:36:05 schwarze Exp $
.\"
.\" Copyright (c) 2016 Ingo Schwarze <schwarze@openbsd.org>
.\"
.\" Permission to use, copy, modify, and distribute this software for any
.\" purpose with or without fee is hereby granted, provided that the above
.\" copyright notice and this permission notice appear in all copies.
.\"
.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
.Dd $Mdocdate: May 13 2018 $
.Dt OCSP_CRLID_NEW 3
.Os
.Sh NAME
.Nm OCSP_CRLID_new ,
.Nm OCSP_CRLID_free ,
.Nm OCSP_crlID_new
.Nd OCSP CRL extension
|















|







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
.\"	$OpenBSD: OCSP_CRLID_new.3,v 1.7 2019/06/06 01:06:58 schwarze Exp $
.\"
.\" Copyright (c) 2016 Ingo Schwarze <schwarze@openbsd.org>
.\"
.\" Permission to use, copy, modify, and distribute this software for any
.\" purpose with or without fee is hereby granted, provided that the above
.\" copyright notice and this permission notice appear in all copies.
.\"
.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
.Dd $Mdocdate: June 6 2019 $
.Dt OCSP_CRLID_NEW 3
.Os
.Sh NAME
.Nm OCSP_CRLID_new ,
.Nm OCSP_CRLID_free ,
.Nm OCSP_crlID_new
.Nd OCSP CRL extension
87
88
89
90
91
92
93

94
95
96
97
98
99
100
.Fn OCSP_crlID_new
returns a new
.Vt X509_EXTENSION
object or
.Dv NULL
if an error occurred.
.Sh SEE ALSO

.Xr OCSP_resp_find_status 3 ,
.Xr OCSP_response_status 3 ,
.Xr X509_EXTENSION_new 3
.Sh STANDARDS
RFC 6960: X.509 Internet Public Key Infrastructure Online Certificate
Status Protocol, section 4.4.2: CRL References
.Sh HISTORY







>







87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
.Fn OCSP_crlID_new
returns a new
.Vt X509_EXTENSION
object or
.Dv NULL
if an error occurred.
.Sh SEE ALSO
.Xr OCSP_REQUEST_new 3 ,
.Xr OCSP_resp_find_status 3 ,
.Xr OCSP_response_status 3 ,
.Xr X509_EXTENSION_new 3
.Sh STANDARDS
RFC 6960: X.509 Internet Public Key Infrastructure Online Certificate
Status Protocol, section 4.4.2: CRL References
.Sh HISTORY
Changes to jni/libressl/man/OCSP_REQUEST_new.3.
1
2
3
4
5
6
7
8
.\"	$OpenBSD: OCSP_REQUEST_new.3,v 1.8 2018/03/22 21:08:22 schwarze Exp $
.\"	OpenSSL b97fdb57 Nov 11 09:33:09 2016 +0100
.\"
.\" This file is a derived work.
.\" The changes are covered by the following Copyright and license:
.\"
.\" Copyright (c) 2016 Ingo Schwarze <schwarze@openbsd.org>
.\"
|







1
2
3
4
5
6
7
8
.\"	$OpenBSD: OCSP_REQUEST_new.3,v 1.10 2019/06/10 09:49:48 schwarze Exp $
.\"	OpenSSL b97fdb57 Nov 11 09:33:09 2016 +0100
.\"
.\" This file is a derived work.
.\" The changes are covered by the following Copyright and license:
.\"
.\" Copyright (c) 2016 Ingo Schwarze <schwarze@openbsd.org>
.\"
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: March 22 2018 $
.Dt OCSP_REQUEST_NEW 3
.Os
.Sh NAME
.Nm OCSP_REQUEST_new ,
.Nm OCSP_REQUEST_free ,
.Nm OCSP_SIGNATURE_new ,
.Nm OCSP_SIGNATURE_free ,







|







61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: June 10 2019 $
.Dt OCSP_REQUEST_NEW 3
.Os
.Sh NAME
.Nm OCSP_REQUEST_new ,
.Nm OCSP_REQUEST_free ,
.Nm OCSP_SIGNATURE_new ,
.Nm OCSP_SIGNATURE_free ,
304
305
306
307
308
309
310




311

312
313
314
315
316
317
318
319
320
321
322
323

 /* Do something with req, e.g. query responder */

OCSP_REQUEST_free(req);
.Ed
.Sh SEE ALSO
.Xr ACCESS_DESCRIPTION_new 3 ,




.Xr OCSP_cert_to_id 3 ,

.Xr OCSP_request_add1_nonce 3 ,
.Xr OCSP_resp_find_status 3 ,
.Xr OCSP_response_status 3 ,
.Xr OCSP_sendreq_new 3 ,
.Xr OCSP_SERVICELOC_new 3
.Sh STANDARDS
RFC 6960: X.509 Internet Public Key Infrastructure Online Certificate
Status Protocol, section 4.1: Request Syntax
.Sh HISTORY
These functions first appeared in OpenSSL 0.9.7
and have been available since
.Ox 3.2 .







>
>
>
>

>












304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328

 /* Do something with req, e.g. query responder */

OCSP_REQUEST_free(req);
.Ed
.Sh SEE ALSO
.Xr ACCESS_DESCRIPTION_new 3 ,
.Xr crypto 3 ,
.Xr d2i_OCSP_REQUEST 3 ,
.Xr d2i_OCSP_RESPONSE 3 ,
.Xr EVP_DigestInit 3 ,
.Xr OCSP_cert_to_id 3 ,
.Xr OCSP_CRLID_new 3 ,
.Xr OCSP_request_add1_nonce 3 ,
.Xr OCSP_resp_find_status 3 ,
.Xr OCSP_response_status 3 ,
.Xr OCSP_sendreq_new 3 ,
.Xr OCSP_SERVICELOC_new 3
.Sh STANDARDS
RFC 6960: X.509 Internet Public Key Infrastructure Online Certificate
Status Protocol, section 4.1: Request Syntax
.Sh HISTORY
These functions first appeared in OpenSSL 0.9.7
and have been available since
.Ox 3.2 .
Changes to jni/libressl/man/OCSP_SERVICELOC_new.3.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
.\"	$OpenBSD: OCSP_SERVICELOC_new.3,v 1.7 2018/05/13 14:36:05 schwarze Exp $
.\"
.\" Copyright (c) 2016 Ingo Schwarze <schwarze@openbsd.org>
.\"
.\" Permission to use, copy, modify, and distribute this software for any
.\" purpose with or without fee is hereby granted, provided that the above
.\" copyright notice and this permission notice appear in all copies.
.\"
.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
.Dd $Mdocdate: May 13 2018 $
.Dt OCSP_SERVICELOC_NEW 3
.Os
.Sh NAME
.Nm OCSP_SERVICELOC_new ,
.Nm OCSP_SERVICELOC_free ,
.Nm OCSP_url_svcloc_new
.Nd OCSP service locator extension
|















|







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
.\" $OpenBSD: OCSP_SERVICELOC_new.3,v 1.8 2019/08/23 12:23:39 schwarze Exp $
.\"
.\" Copyright (c) 2016 Ingo Schwarze <schwarze@openbsd.org>
.\"
.\" Permission to use, copy, modify, and distribute this software for any
.\" purpose with or without fee is hereby granted, provided that the above
.\" copyright notice and this permission notice appear in all copies.
.\"
.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
.Dd $Mdocdate: August 23 2019 $
.Dt OCSP_SERVICELOC_NEW 3
.Os
.Sh NAME
.Nm OCSP_SERVICELOC_new ,
.Nm OCSP_SERVICELOC_free ,
.Nm OCSP_url_svcloc_new
.Nd OCSP service locator extension
90
91
92
93
94
95
96

97
98
99
100
101
102
103
104
105
106
107
108
.Vt X509_EXTENSION
object or
.Dv NULL
if an error occurred.
.Sh SEE ALSO
.Xr OCSP_REQUEST_new 3 ,
.Xr X509_EXTENSION_new 3 ,

.Xr X509_get_issuer_name 3 ,
.Xr X509_NAME_new 3
.Sh STANDARDS
RFC 6960: X.509 Internet Public Key Infrastructure Online Certificate
Status Protocol, section 4.4.6: Service Locator
.Sh HISTORY
.Fn OCSP_SERVICELOC_new ,
.Fn OCSP_SERVICELOC_free ,
and
.Fn OCSP_url_svcloc_new
first appeared in OpenSSL 0.9.7 and have been available since
.Ox 3.2 .







>












90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
.Vt X509_EXTENSION
object or
.Dv NULL
if an error occurred.
.Sh SEE ALSO
.Xr OCSP_REQUEST_new 3 ,
.Xr X509_EXTENSION_new 3 ,
.Xr X509_get1_ocsp 3 ,
.Xr X509_get_issuer_name 3 ,
.Xr X509_NAME_new 3
.Sh STANDARDS
RFC 6960: X.509 Internet Public Key Infrastructure Online Certificate
Status Protocol, section 4.4.6: Service Locator
.Sh HISTORY
.Fn OCSP_SERVICELOC_new ,
.Fn OCSP_SERVICELOC_free ,
and
.Fn OCSP_url_svcloc_new
first appeared in OpenSSL 0.9.7 and have been available since
.Ox 3.2 .
Changes to jni/libressl/man/OCSP_cert_to_id.3.
1
2
3
4
5
6
7
8
.\"	$OpenBSD: OCSP_cert_to_id.3,v 1.9 2018/08/24 20:04:10 tb Exp $
.\"	OpenSSL b97fdb57 Nov 11 09:33:09 2016 +0100
.\"
.\" This file is a derived work.
.\" The changes are covered by the following Copyright and license:
.\"
.\" Copyright (c) 2016 Ingo Schwarze <schwarze@openbsd.org>
.\"
|







1
2
3
4
5
6
7
8
.\"	$OpenBSD: OCSP_cert_to_id.3,v 1.10 2019/06/06 01:06:58 schwarze Exp $
.\"	OpenSSL b97fdb57 Nov 11 09:33:09 2016 +0100
.\"
.\" This file is a derived work.
.\" The changes are covered by the following Copyright and license:
.\"
.\" Copyright (c) 2016 Ingo Schwarze <schwarze@openbsd.org>
.\"
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: August 24 2018 $
.Dt OCSP_CERT_TO_ID 3
.Os
.Sh NAME
.Nm OCSP_CERTID_new ,
.Nm OCSP_CERTID_free ,
.Nm OCSP_cert_to_id ,
.Nm OCSP_cert_id_new ,







|







61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: June 6 2019 $
.Dt OCSP_CERT_TO_ID 3
.Os
.Sh NAME
.Nm OCSP_CERTID_new ,
.Nm OCSP_CERTID_free ,
.Nm OCSP_cert_to_id ,
.Nm OCSP_cert_id_new ,
210
211
212
213
214
215
216

217
218
219
220
221
222
223
and
.Fn OCSP_id_issuer_cmp
return 0 for a match or non-zero otherwise.
.Pp
.Fn OCSP_id_get0_info
returns 1 for success or 0 for failure.
.Sh SEE ALSO

.Xr OCSP_request_add1_nonce 3 ,
.Xr OCSP_REQUEST_new 3 ,
.Xr OCSP_resp_find_status 3 ,
.Xr OCSP_response_status 3 ,
.Xr OCSP_sendreq_new 3 ,
.Xr X509_get_issuer_name 3 ,
.Xr X509_NAME_new 3







>







210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
and
.Fn OCSP_id_issuer_cmp
return 0 for a match or non-zero otherwise.
.Pp
.Fn OCSP_id_get0_info
returns 1 for success or 0 for failure.
.Sh SEE ALSO
.Xr EVP_DigestInit 3 ,
.Xr OCSP_request_add1_nonce 3 ,
.Xr OCSP_REQUEST_new 3 ,
.Xr OCSP_resp_find_status 3 ,
.Xr OCSP_response_status 3 ,
.Xr OCSP_sendreq_new 3 ,
.Xr X509_get_issuer_name 3 ,
.Xr X509_NAME_new 3
Changes to jni/libressl/man/OCSP_resp_find_status.3.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
.\" $OpenBSD: OCSP_resp_find_status.3,v 1.9 2019/03/15 11:15:33 schwarze Exp $
.\" full merge up to: OpenSSL c952780c Jun 21 07:03:34 2016 -0400
.\" selective merge up to: OpenSSL 1212818e Sep 11 13:22:14 2018 +0100
.\"
.\" This file is a derived work.
.\" The changes are covered by the following Copyright and license:
.\"
.\" Copyright (c) 2016, 2018 Ingo Schwarze <schwarze@openbsd.org>
.\"
.\" Permission to use, copy, modify, and distribute this software for any
.\" purpose with or without fee is hereby granted, provided that the above
.\" copyright notice and this permission notice appear in all copies.
.\"
.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|






|







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
.\" $OpenBSD: OCSP_resp_find_status.3,v 1.10 2019/08/27 10:00:41 schwarze Exp $
.\" full merge up to: OpenSSL c952780c Jun 21 07:03:34 2016 -0400
.\" selective merge up to: OpenSSL 1212818e Sep 11 13:22:14 2018 +0100
.\"
.\" This file is a derived work.
.\" The changes are covered by the following Copyright and license:
.\"
.\" Copyright (c) 2016, 2018, 2019 Ingo Schwarze <schwarze@openbsd.org>
.\"
.\" Permission to use, copy, modify, and distribute this software for any
.\" purpose with or without fee is hereby granted, provided that the above
.\" copyright notice and this permission notice appear in all copies.
.\"
.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80

81
82
83
84
85
86
87
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: March 15 2019 $
.Dt OCSP_RESP_FIND_STATUS 3
.Os
.Sh NAME
.Nm OCSP_SINGLERESP_new ,
.Nm OCSP_SINGLERESP_free ,
.Nm OCSP_CERTSTATUS_new ,
.Nm OCSP_CERTSTATUS_free ,
.Nm OCSP_REVOKEDINFO_new ,
.Nm OCSP_REVOKEDINFO_free ,
.Nm OCSP_resp_find_status ,

.Nm OCSP_resp_count ,
.Nm OCSP_resp_get0 ,
.Nm OCSP_resp_find ,
.Nm OCSP_SINGLERESP_get0_id ,
.Nm OCSP_single_get0_status ,
.Nm OCSP_check_validity ,
.Nm OCSP_basic_verify







|










>







63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: August 27 2019 $
.Dt OCSP_RESP_FIND_STATUS 3
.Os
.Sh NAME
.Nm OCSP_SINGLERESP_new ,
.Nm OCSP_SINGLERESP_free ,
.Nm OCSP_CERTSTATUS_new ,
.Nm OCSP_CERTSTATUS_free ,
.Nm OCSP_REVOKEDINFO_new ,
.Nm OCSP_REVOKEDINFO_free ,
.Nm OCSP_resp_find_status ,
.Nm OCSP_cert_status_str ,
.Nm OCSP_resp_count ,
.Nm OCSP_resp_get0 ,
.Nm OCSP_resp_find ,
.Nm OCSP_SINGLERESP_get0_id ,
.Nm OCSP_single_get0_status ,
.Nm OCSP_check_validity ,
.Nm OCSP_basic_verify
106
107
108
109
110
111
112




113
114
115
116
117
118
119
.Fa "OCSP_CERTID *id"
.Fa "int *status"
.Fa "int *reason"
.Fa "ASN1_GENERALIZEDTIME **revtime"
.Fa "ASN1_GENERALIZEDTIME **thisupd"
.Fa "ASN1_GENERALIZEDTIME **nextupd"
.Fc




.Ft int
.Fo OCSP_resp_count
.Fa "OCSP_BASICRESP *bs"
.Fc
.Ft OCSP_SINGLERESP *
.Fo OCSP_resp_get0
.Fa "OCSP_BASICRESP *bs"







>
>
>
>







107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
.Fa "OCSP_CERTID *id"
.Fa "int *status"
.Fa "int *reason"
.Fa "ASN1_GENERALIZEDTIME **revtime"
.Fa "ASN1_GENERALIZEDTIME **thisupd"
.Fa "ASN1_GENERALIZEDTIME **nextupd"
.Fc
.Ft const char *
.Fo OCSP_cert_status_str
.Fa "long status"
.Fc
.Ft int
.Fo OCSP_resp_count
.Fa "OCSP_BASICRESP *bs"
.Fc
.Ft OCSP_SINGLERESP *
.Fo OCSP_resp_get0
.Fa "OCSP_BASICRESP *bs"
229
230
231
232
233
234
235







236
237
238
239
240
241
242
.Dv OCSP_REVOKED_STATUS_AFFILIATIONCHANGED ,
.Dv OCSP_REVOKED_STATUS_SUPERSEDED ,
.Dv OCSP_REVOKED_STATUS_CESSATIONOFOPERATION ,
.Dv OCSP_REVOKED_STATUS_CERTIFICATEHOLD
or
.Dv OCSP_REVOKED_STATUS_REMOVEFROMCRL .
.Pp







.Fn OCSP_resp_count
returns the number of
.Vt OCSP_SINGLERESP
structures in
.Fa bs .
.Pp
.Fn OCSP_resp_get0







>
>
>
>
>
>
>







234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
.Dv OCSP_REVOKED_STATUS_AFFILIATIONCHANGED ,
.Dv OCSP_REVOKED_STATUS_SUPERSEDED ,
.Dv OCSP_REVOKED_STATUS_CESSATIONOFOPERATION ,
.Dv OCSP_REVOKED_STATUS_CERTIFICATEHOLD
or
.Dv OCSP_REVOKED_STATUS_REMOVEFROMCRL .
.Pp
.Fn OCSP_cert_status_str
converts one of the
.Fa status
codes retrieved by
.Fn OCSP_resp_find_status
to a string consisting of one word.
.Pp
.Fn OCSP_resp_count
returns the number of
.Vt OCSP_SINGLERESP
structures in
.Fa bs .
.Pp
.Fn OCSP_resp_get0
406
407
408
409
410
411
412



413
414
415
416
417
418
419
.Fn OCSP_resp_find_status
returns 1 if
.Fa id
is found in
.Fa bs
or 0 otherwise.
.Pp



.Fn OCSP_resp_count
returns the total number of
.Vt OCSP_SINGLERESP
fields in
.Fa bs .
.Pp
.Fn OCSP_resp_get0







>
>
>







418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
.Fn OCSP_resp_find_status
returns 1 if
.Fa id
is found in
.Fa bs
or 0 otherwise.
.Pp
.Fn OCSP_cert_status_str
returns a pointer to a static string.
.Pp
.Fn OCSP_resp_count
returns the total number of
.Vt OCSP_SINGLERESP
fields in
.Fa bs .
.Pp
.Fn OCSP_resp_get0
460
461
462
463
464
465
466

467
468
469
470
471
472
473
474
475
476
477
478
.Fn OCSP_SINGLERESP_new ,
.Fn OCSP_SINGLERESP_free ,
.Fn OCSP_CERTSTATUS_new ,
.Fn OCSP_CERTSTATUS_free ,
.Fn OCSP_REVOKEDINFO_new ,
.Fn OCSP_REVOKEDINFO_free ,
.Fn OCSP_resp_find_status ,

.Fn OCSP_resp_count ,
.Fn OCSP_resp_get0 ,
.Fn OCSP_resp_find ,
.Fn OCSP_single_get0_status ,
and
.Fn OCSP_check_validity
first appeared in OpenSSL 0.9.7 and have been available since
.Ox 3.2 .
.Pp
.Fn OCSP_SINGLERESP_get0_id
first appeared in OpenSSL 1.1.0 and has been available since
.Ox 6.3 .







>












475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
.Fn OCSP_SINGLERESP_new ,
.Fn OCSP_SINGLERESP_free ,
.Fn OCSP_CERTSTATUS_new ,
.Fn OCSP_CERTSTATUS_free ,
.Fn OCSP_REVOKEDINFO_new ,
.Fn OCSP_REVOKEDINFO_free ,
.Fn OCSP_resp_find_status ,
.Fn OCSP_cert_status_str ,
.Fn OCSP_resp_count ,
.Fn OCSP_resp_get0 ,
.Fn OCSP_resp_find ,
.Fn OCSP_single_get0_status ,
and
.Fn OCSP_check_validity
first appeared in OpenSSL 0.9.7 and have been available since
.Ox 3.2 .
.Pp
.Fn OCSP_SINGLERESP_get0_id
first appeared in OpenSSL 1.1.0 and has been available since
.Ox 6.3 .
Changes to jni/libressl/man/OCSP_response_status.3.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
.\" $OpenBSD: OCSP_response_status.3,v 1.6 2018/03/22 21:08:22 schwarze Exp $
.\" full merge up to: OpenSSL bb9ad09e Jun 6 00:43:05 2016 -0400
.\" selective merge up to: OpenSSL e23ac625 Jan 24 12:27:19 2018 -0500
.\"
.\" This file is a derived work.
.\" The changes are covered by the following Copyright and license:
.\"
.\" Copyright (c) 2016 Ingo Schwarze <schwarze@openbsd.org>
.\"
.\" Permission to use, copy, modify, and distribute this software for any
.\" purpose with or without fee is hereby granted, provided that the above
.\" copyright notice and this permission notice appear in all copies.
.\"
.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|

|




|







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
.\" $OpenBSD: OCSP_response_status.3,v 1.8 2019/08/27 09:40:29 schwarze Exp $
.\" full merge up to: OpenSSL bb9ad09e Jun 6 00:43:05 2016 -0400
.\" selective merge up to: OpenSSL 6738bf14 Feb 13 12:51:29 2018 +0000
.\"
.\" This file is a derived work.
.\" The changes are covered by the following Copyright and license:
.\"
.\" Copyright (c) 2016, 2019 Ingo Schwarze <schwarze@openbsd.org>
.\"
.\" Permission to use, copy, modify, and distribute this software for any
.\" purpose with or without fee is hereby granted, provided that the above
.\" copyright notice and this permission notice appear in all copies.
.\"
.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84

85
86
87
88
89
90
91
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: March 22 2018 $
.Dt OCSP_RESPONSE_STATUS 3
.Os
.Sh NAME
.Nm OCSP_RESPONSE_new ,
.Nm OCSP_RESPONSE_free ,
.Nm OCSP_RESPBYTES_new ,
.Nm OCSP_RESPBYTES_free ,
.Nm OCSP_BASICRESP_new ,
.Nm OCSP_BASICRESP_free ,
.Nm OCSP_RESPDATA_new ,
.Nm OCSP_RESPDATA_free ,
.Nm OCSP_RESPID_new ,
.Nm OCSP_RESPID_free ,
.Nm OCSP_response_create ,
.Nm OCSP_response_status ,

.Nm OCSP_response_get1_basic ,
.Nm OCSP_basic_sign
.Nd OCSP response functions
.Sh SYNOPSIS
.In openssl/ocsp.h
.Ft OCSP_RESPONSE *
.Fn OCSP_RESPONSE_new void







|















>







62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: August 27 2019 $
.Dt OCSP_RESPONSE_STATUS 3
.Os
.Sh NAME
.Nm OCSP_RESPONSE_new ,
.Nm OCSP_RESPONSE_free ,
.Nm OCSP_RESPBYTES_new ,
.Nm OCSP_RESPBYTES_free ,
.Nm OCSP_BASICRESP_new ,
.Nm OCSP_BASICRESP_free ,
.Nm OCSP_RESPDATA_new ,
.Nm OCSP_RESPDATA_free ,
.Nm OCSP_RESPID_new ,
.Nm OCSP_RESPID_free ,
.Nm OCSP_response_create ,
.Nm OCSP_response_status ,
.Nm OCSP_response_status_str ,
.Nm OCSP_response_get1_basic ,
.Nm OCSP_basic_sign
.Nd OCSP response functions
.Sh SYNOPSIS
.In openssl/ocsp.h
.Ft OCSP_RESPONSE *
.Fn OCSP_RESPONSE_new void
111
112
113
114
115
116
117




118
119
120
121
122
123
124
.Fo OCSP_response_create
.Fa "int status"
.Fa "OCSP_BASICRESP *bs"
.Fc
.Ft int
.Fo OCSP_response_status
.Fa "OCSP_RESPONSE *resp"




.Fc
.Ft OCSP_BASICRESP *
.Fo OCSP_response_get1_basic
.Fa "OCSP_RESPONSE *resp"
.Fc
.Ft int
.Fo OCSP_basic_sign







>
>
>
>







112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
.Fo OCSP_response_create
.Fa "int status"
.Fa "OCSP_BASICRESP *bs"
.Fc
.Ft int
.Fo OCSP_response_status
.Fa "OCSP_RESPONSE *resp"
.Fc
.Ft const char *
.Fo OCSP_response_status_str
.Fa "long code"
.Fc
.Ft OCSP_BASICRESP *
.Fo OCSP_response_get1_basic
.Fa "OCSP_RESPONSE *resp"
.Fc
.Ft int
.Fo OCSP_basic_sign
206
207
208
209
210
211
212







213
214
215
216
217
218
219
.Dv OCSP_RESPONSE_STATUS_MALFORMEDREQUEST ,
.Dv OCSP_RESPONSE_STATUS_INTERNALERROR ,
.Dv OCSP_RESPONSE_STATUS_TRYLATER ,
.Dv OCSP_RESPONSE_STATUS_SIGREQUIRED ,
or
.Dv OCSP_RESPONSE_STATUS_UNAUTHORIZED .
.Pp







.Fn OCSP_response_get1_basic
decodes and returns the
.Vt OCSP_BASICRESP
object contained in
.Fa resp .
It is only called if the status of a response is
.Dv OCSP_RESPONSE_STATUS_SUCCESSFUL .







>
>
>
>
>
>
>







211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
.Dv OCSP_RESPONSE_STATUS_MALFORMEDREQUEST ,
.Dv OCSP_RESPONSE_STATUS_INTERNALERROR ,
.Dv OCSP_RESPONSE_STATUS_TRYLATER ,
.Dv OCSP_RESPONSE_STATUS_SIGREQUIRED ,
or
.Dv OCSP_RESPONSE_STATUS_UNAUTHORIZED .
.Pp
.Fn OCSP_response_status_str
converts one of the
.Fa status
codes returned by
.Fn OCSP_response_status
to a string consisting of one word.
.Pp
.Fn OCSP_response_get1_basic
decodes and returns the
.Vt OCSP_BASICRESP
object contained in
.Fa resp .
It is only called if the status of a response is
.Dv OCSP_RESPONSE_STATUS_SUCCESSFUL .
271
272
273
274
275
276
277



278
279
280

281
282
283
284
285
286
287
288
289
290
291
292
object, respectively, or
.Dv NULL
if an error occurred.
.Pp
.Fn OCSP_response_status
returns a status value.
.Pp



.Fn OCSP_basic_sign
return 1 on success or 0 on failure.
.Sh SEE ALSO

.Xr OCSP_cert_to_id 3 ,
.Xr OCSP_request_add1_nonce 3 ,
.Xr OCSP_REQUEST_new 3 ,
.Xr OCSP_resp_find_status 3 ,
.Xr OCSP_sendreq_new 3
.Sh STANDARDS
RFC 6960: X.509 Internet Public Key Infrastructure Online Certificate
Status Protocol, section 4.2: Response Syntax
.Sh HISTORY
These functions first appeared in OpenSSL 0.9.7
and have been available since
.Ox 3.2 .







>
>
>



>












283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
object, respectively, or
.Dv NULL
if an error occurred.
.Pp
.Fn OCSP_response_status
returns a status value.
.Pp
.Fn OCSP_response_status_str
returns a pointer to a static string.
.Pp
.Fn OCSP_basic_sign
return 1 on success or 0 on failure.
.Sh SEE ALSO
.Xr EVP_DigestInit 3 ,
.Xr OCSP_cert_to_id 3 ,
.Xr OCSP_request_add1_nonce 3 ,
.Xr OCSP_REQUEST_new 3 ,
.Xr OCSP_resp_find_status 3 ,
.Xr OCSP_sendreq_new 3
.Sh STANDARDS
RFC 6960: X.509 Internet Public Key Infrastructure Online Certificate
Status Protocol, section 4.2: Response Syntax
.Sh HISTORY
These functions first appeared in OpenSSL 0.9.7
and have been available since
.Ox 3.2 .
Changes to jni/libressl/man/OCSP_sendreq_new.3.
1
2
3

















4
5
6
7
8
9
10
11
.\"	$OpenBSD: OCSP_sendreq_new.3,v 1.7 2018/03/23 04:34:23 schwarze Exp $
.\"	OpenSSL b97fdb57 Nov 11 09:33:09 2016 +0100
.\"

















.\" This file was written by Dr. Stephen Henson <steve@openssl.org>.
.\" Copyright (c) 2014, 2016 The OpenSSL Project.  All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\"
.\" 1. Redistributions of source code must retain the above copyright
|
|

>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
|







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
.\" $OpenBSD: OCSP_sendreq_new.3,v 1.9 2019/08/27 10:48:41 schwarze Exp $
.\" full merge up to: OpenSSL b97fdb57 Nov 11 09:33:09 2016 +0100
.\"
.\" This file is a derived work.
.\" The changes are covered by the following Copyright and license:
.\"
.\" Copyright (c) 2018, 2019 Ingo Schwarze <schwarze@openbsd.org>
.\"
.\" Permission to use, copy, modify, and distribute this software for any
.\" purpose with or without fee is hereby granted, provided that the above
.\" copyright notice and this permission notice appear in all copies.
.\"
.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
.\" The original file was written by Dr. Stephen Henson <steve@openssl.org>.
.\" Copyright (c) 2014, 2016 The OpenSSL Project.  All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\"
.\" 1. Redistributions of source code must retain the above copyright
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59

60
61
62
63
64
65
66
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: March 23 2018 $
.Dt OCSP_SENDREQ_NEW 3
.Os
.Sh NAME
.Nm OCSP_sendreq_new ,
.Nm OCSP_sendreq_nbio ,
.Nm OCSP_REQ_CTX_free ,
.Nm OCSP_REQ_CTX_add1_header ,
.Nm OCSP_REQ_CTX_set1_req ,

.Nm OCSP_sendreq_bio
.Nd OCSP responder query functions
.Sh SYNOPSIS
.In openssl/ocsp.h
.Ft OCSP_REQ_CTX *
.Fo OCSP_sendreq_new
.Fa "BIO *io"







|








>







61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: August 27 2019 $
.Dt OCSP_SENDREQ_NEW 3
.Os
.Sh NAME
.Nm OCSP_sendreq_new ,
.Nm OCSP_sendreq_nbio ,
.Nm OCSP_REQ_CTX_free ,
.Nm OCSP_REQ_CTX_add1_header ,
.Nm OCSP_REQ_CTX_set1_req ,
.Nm OCSP_parse_url ,
.Nm OCSP_sendreq_bio
.Nd OCSP responder query functions
.Sh SYNOPSIS
.In openssl/ocsp.h
.Ft OCSP_REQ_CTX *
.Fo OCSP_sendreq_new
.Fa "BIO *io"
84
85
86
87
88
89
90








91
92
93
94
95
96
97
.Fa "const char *value"
.Fc
.Ft int
.Fo OCSP_REQ_CTX_set1_req
.Fa "OCSP_REQ_CTX *rctx"
.Fa "OCSP_REQUEST *req"
.Fc








.Ft OCSP_RESPONSE *
.Fo OCSP_sendreq_bio
.Fa "BIO *io"
.Fa "const char *path"
.Fa "OCSP_REQUEST *req"
.Fc
.Sh DESCRIPTION







>
>
>
>
>
>
>
>







102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
.Fa "const char *value"
.Fc
.Ft int
.Fo OCSP_REQ_CTX_set1_req
.Fa "OCSP_REQ_CTX *rctx"
.Fa "OCSP_REQUEST *req"
.Fc
.Ft int
.Fo OCSP_parse_url
.Fa "const char *url"
.Fa "char **phost"
.Fa "char **pport"
.Fa "char **ppath"
.Fa "int *pssl"
.Fc
.Ft OCSP_RESPONSE *
.Fo OCSP_sendreq_bio
.Fa "BIO *io"
.Fa "const char *path"
.Fa "OCSP_REQUEST *req"
.Fc
.Sh DESCRIPTION
178
179
180
181
182
183
184








































185
186
187
188
189
190
191
sets the OCSP request in
.Fa rctx
to
.Fa req .
This function should be called after any calls to
.Fn OCSP_REQ_CTX_add1_header .
.Pp








































.Fn OCSP_sendreq_bio
performs an OCSP request using the responder
.Fa io ,
the URI path
.Fa path ,
the OCSP request
.Fa req .







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
sets the OCSP request in
.Fa rctx
to
.Fa req .
This function should be called after any calls to
.Fn OCSP_REQ_CTX_add1_header .
.Pp
.Fn OCSP_parse_url
is a utility function to parse a
.Fa url
of the form
.Sm off
.Sy http Op Sy s
.Pf :// Ar host
.Op : Ar port
.Op / Ar path
.Sm on
and store pointers to newly allocated copies of the strings
.Ar host ,
.Ar port ,
and
.Ar path
in
.Pf * phost ,
.Pf * pport ,
and
.Pf * ppath ,
respectively.
By default,
.Pf * ppath
is set to
.Qq /
and
.Pf * pport
to
.Qq 443
for
.Sy https
or
.Qq 80
for
.Sy http .
For
.Sy https ,
.Pf * Fa pssl
is set to 1; otherwise, to 0.
.Pp
.Fn OCSP_sendreq_bio
performs an OCSP request using the responder
.Fa io ,
the URI path
.Fa path ,
the OCSP request
.Fa req .
202
203
204
205
206
207
208
209

210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230

231


232
233
234
235
236
237
238
239
240
if an error occurred.
.Pp
.Fn OCSP_sendreq_nbio
returns 1 if the operation was completed successfully,
-1 if the operation should be retried,
or 0 if an error occurred.
.Pp
.Fn OCSP_REQ_CTX_add1_header

and
.Fn OCSP_REQ_CTX_set1_req
return 1 for success or 0 for failure.
.Pp
.Fn OCSP_sendreq_bio
returns the
.Vt OCSP_RESPONSE
structure sent by the responder or
.Dv NULL
if an error occurred.
.Sh EXAMPLES
Add a Host header for
.Pa ocsp.com :
.Pp
.Dl OCSP_REQ_CTX_add1_header(ctx, "Host", "ocsp.com");
.Sh SEE ALSO
.Xr OCSP_cert_to_id 3 ,
.Xr OCSP_request_add1_nonce 3 ,
.Xr OCSP_REQUEST_new 3 ,
.Xr OCSP_resp_find_status 3 ,
.Xr OCSP_response_status 3

.Sh HISTORY


.Fn OCSP_sendreq_bio
first appeared in OpenSSL 0.9.7 and has been available since
.Ox 3.2 .
.Pp
.Fn OCSP_sendreq_new ,
.Fn OCSP_sendreq_nbio ,
and
.Fn OCSP_REQ_CTX_free
first appeared in OpenSSL 0.9.8h and have been available since







|
>

|


















|
>

>
>

|







268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
if an error occurred.
.Pp
.Fn OCSP_sendreq_nbio
returns 1 if the operation was completed successfully,
-1 if the operation should be retried,
or 0 if an error occurred.
.Pp
.Fn OCSP_REQ_CTX_add1_header ,
.Fn OCSP_REQ_CTX_set1_req ,
and
.Fn OCSP_parse_url
return 1 for success or 0 for failure.
.Pp
.Fn OCSP_sendreq_bio
returns the
.Vt OCSP_RESPONSE
structure sent by the responder or
.Dv NULL
if an error occurred.
.Sh EXAMPLES
Add a Host header for
.Pa ocsp.com :
.Pp
.Dl OCSP_REQ_CTX_add1_header(ctx, "Host", "ocsp.com");
.Sh SEE ALSO
.Xr OCSP_cert_to_id 3 ,
.Xr OCSP_request_add1_nonce 3 ,
.Xr OCSP_REQUEST_new 3 ,
.Xr OCSP_resp_find_status 3 ,
.Xr OCSP_response_status 3 ,
.Xr X509_get1_ocsp 3
.Sh HISTORY
.Fn OCSP_parse_url
and
.Fn OCSP_sendreq_bio
first appeared in OpenSSL 0.9.7 and have been available since
.Ox 3.2 .
.Pp
.Fn OCSP_sendreq_new ,
.Fn OCSP_sendreq_nbio ,
and
.Fn OCSP_REQ_CTX_free
first appeared in OpenSSL 0.9.8h and have been available since
Changes to jni/libressl/man/OPENSSL_VERSION_NUMBER.3.
1
2
3
4
5
6
7
8
.\" $OpenBSD: OPENSSL_VERSION_NUMBER.3,v 1.11 2019/03/15 12:32:15 schwarze Exp $
.\" full merge up to: OpenSSL 1f13ad31 Dec 25 17:50:39 2017 +0800
.\"
.\" This file is a derived work.
.\" The changes are covered by the following Copyright and license:
.\"
.\" Copyright (c) 2017, 2018 Ingo Schwarze <schwarze@openbsd.org>
.\"
|







1
2
3
4
5
6
7
8
.\" $OpenBSD: OPENSSL_VERSION_NUMBER.3,v 1.12 2019/06/06 01:06:58 schwarze Exp $
.\" full merge up to: OpenSSL 1f13ad31 Dec 25 17:50:39 2017 +0800
.\"
.\" This file is a derived work.
.\" The changes are covered by the following Copyright and license:
.\"
.\" Copyright (c) 2017, 2018 Ingo Schwarze <schwarze@openbsd.org>
.\"
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: March 15 2019 $
.Dt OPENSSL_VERSION_NUMBER 3
.Os
.Sh NAME
.Nm OPENSSL_VERSION_NUMBER ,
.Nm LIBRESSL_VERSION_NUMBER ,
.Nm LIBRESSL_VERSION_TEXT ,
.Nm OPENSSL_VERSION_TEXT ,







|







64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: June 6 2019 $
.Dt OPENSSL_VERSION_NUMBER 3
.Os
.Sh NAME
.Nm OPENSSL_VERSION_NUMBER ,
.Nm LIBRESSL_VERSION_NUMBER ,
.Nm LIBRESSL_VERSION_TEXT ,
.Nm OPENSSL_VERSION_TEXT ,
241
242
243
244
245
246
247
248

249
250
251
252
253
254
255
return a constant version number.
.Pp
.Fn OpenSSL_version
and
.Fn SSLeay_version
return pointers to static strings.
.Sh SEE ALSO
.Xr crypto 3

.Sh HISTORY
.Fn SSLeay ,
.Fn SSLeay_version ,
and
.Dv SSLEAY_VERSION_NUMBER
first appeared in SSLeay 0.6.0 and have been available since
.Ox 2.4 .







|
>







241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
return a constant version number.
.Pp
.Fn OpenSSL_version
and
.Fn SSLeay_version
return pointers to static strings.
.Sh SEE ALSO
.Xr crypto 3 ,
.Xr OPENSSL_config 3
.Sh HISTORY
.Fn SSLeay ,
.Fn SSLeay_version ,
and
.Dv SSLEAY_VERSION_NUMBER
first appeared in SSLeay 0.6.0 and have been available since
.Ox 2.4 .
Changes to jni/libressl/man/OPENSSL_cleanse.3.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36


37
38
39
40
.\"	$OpenBSD: OPENSSL_cleanse.3,v 1.3 2018/03/22 18:05:00 schwarze Exp $
.\"
.\" Copyright (c) 2016 Ingo Schwarze <schwarze@openbsd.org>
.\"
.\" Permission to use, copy, modify, and distribute this software for any
.\" purpose with or without fee is hereby granted, provided that the above
.\" copyright notice and this permission notice appear in all copies.
.\"
.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
.Dd $Mdocdate: March 22 2018 $
.Dt OPENSSL_CLEANSE 3
.Os
.Sh NAME
.Nm OPENSSL_cleanse
.Nd OpenSSL memory cleaning operation
.Sh SYNOPSIS
.In openssl/crypto.h
.Ft void
.Fo OPENSSL_cleanse
.Fa "void *ptr"
.Fa "size_t len"
.Fc
.Sh DESCRIPTION
Do not use the interface documented here.
It is provided purely for compatibility with legacy application code.
.Pp
.Fn OPENSSL_cleanse
has the same semantics as, and is a wrapper around,
.Xr explicit_bzero 3 .


.Sh HISTORY
.Fn OPENSSL_cleanse
first appeared in OpenSSL 0.9.6h and has been available since
.Ox 3.4 .
|















|



















>
>




1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
.\"	$OpenBSD: OPENSSL_cleanse.3,v 1.4 2019/06/10 09:49:48 schwarze Exp $
.\"
.\" Copyright (c) 2016 Ingo Schwarze <schwarze@openbsd.org>
.\"
.\" Permission to use, copy, modify, and distribute this software for any
.\" purpose with or without fee is hereby granted, provided that the above
.\" copyright notice and this permission notice appear in all copies.
.\"
.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
.Dd $Mdocdate: June 10 2019 $
.Dt OPENSSL_CLEANSE 3
.Os
.Sh NAME
.Nm OPENSSL_cleanse
.Nd OpenSSL memory cleaning operation
.Sh SYNOPSIS
.In openssl/crypto.h
.Ft void
.Fo OPENSSL_cleanse
.Fa "void *ptr"
.Fa "size_t len"
.Fc
.Sh DESCRIPTION
Do not use the interface documented here.
It is provided purely for compatibility with legacy application code.
.Pp
.Fn OPENSSL_cleanse
has the same semantics as, and is a wrapper around,
.Xr explicit_bzero 3 .
.Sh SEE ALSO
.Xr crypto 3
.Sh HISTORY
.Fn OPENSSL_cleanse
first appeared in OpenSSL 0.9.6h and has been available since
.Ox 3.4 .
Changes to jni/libressl/man/OPENSSL_config.3.
1
2
3
4
5
6
7
8
.\" $OpenBSD: OPENSSL_config.3,v 1.12 2018/04/07 20:47:40 jmc Exp $
.\" full merge up to: OpenSSL b97fdb57 Nov 11 09:33:09 2016 +0100
.\"
.\" This file is a derived work.
.\" The changes are covered by the following Copyright and license:
.\"
.\" Copyright (c) 2018 Ingo Schwarze <schwarze@openbsd.org>
.\"
|







1
2
3
4
5
6
7
8
.\" $OpenBSD: OPENSSL_config.3,v 1.15 2019/06/14 13:41:31 schwarze Exp $
.\" full merge up to: OpenSSL b97fdb57 Nov 11 09:33:09 2016 +0100
.\"
.\" This file is a derived work.
.\" The changes are covered by the following Copyright and license:
.\"
.\" Copyright (c) 2018 Ingo Schwarze <schwarze@openbsd.org>
.\"
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117











118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138

139

140
141
142
143
144
145
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: April 7 2018 $
.Dt OPENSSL_CONFIG 3
.Os
.Sh NAME
.Nm OPENSSL_config ,
.Nm OPENSSL_no_config
.Nd simple crypto and ssl library configuration
.Sh SYNOPSIS
.In openssl/conf.h
.Ft void
.Fo OPENSSL_config
.Fa "const char *appname"
.Fc
.Ft void
.Fn OPENSSL_no_config void
.Sh DESCRIPTION
.Fn OPENSSL_config
initializes the crypto library with
.Xr OPENSSL_init_crypto 3
and then calls
.Xr OPENSSL_load_builtin_modules 3 ,
.Xr ENGINE_load_builtin_engines 3 ,
and
.Xr CONF_modules_load_file 3
with the standard configuration file and the given
.Fa appname .
If
.Fa appname
is
.Dv NULL ,
then the default name
.Sy openssl_conf
is used.
Any errors are ignored.
Further calls to
.Fn OPENSSL_config
have no effect.
.Pp
.Fn OPENSSL_no_config
suppresses the loading of any configuration file, so that any
future calls to
.Fn OPENSSL_config
or to
.Xr OPENSSL_init_crypto 3
will ensure the library is initialized but no configuration
file will be loaded.
.Pp
Calling these functions is optional.
All required initialization of the crypto libraries happens
automatically when needed.











.Pp
If an application is compiled with the preprocessor symbol
.Dv OPENSSL_LOAD_CONF
#define'd,
.Xr OpenSSL_add_all_algorithms 3
automatically calls
.Fn OPENSSL_config .
.Pp
Applications should free up configuration at application closedown by
calling
.Xr CONF_modules_free 3 .
.Sh FILES
.Bl -tag -width /etc/ssl/openssl.cnf -compact
.It Pa /etc/ssl/openssl.cnf
standard configuration file
.El
.Sh SEE ALSO
.Xr CONF_modules_free 3 ,
.Xr CONF_modules_load_file 3 ,
.Xr OPENSSL_init_crypto 3 ,
.Xr OPENSSL_load_builtin_modules 3 ,

.Xr openssl.cnf 5

.Sh HISTORY
.Fn OPENSSL_config
and
.Fn OPENSSL_no_config
first appeared in OpenSSL 0.9.7 and have been available since
.Ox 3.2 .







|
















|
<
<
<
<
<
















|










>
>
>
>
>
>
>
>
>
>
>



















|

>
|
>






61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85





86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: June 14 2019 $
.Dt OPENSSL_CONFIG 3
.Os
.Sh NAME
.Nm OPENSSL_config ,
.Nm OPENSSL_no_config
.Nd simple crypto and ssl library configuration
.Sh SYNOPSIS
.In openssl/conf.h
.Ft void
.Fo OPENSSL_config
.Fa "const char *appname"
.Fc
.Ft void
.Fn OPENSSL_no_config void
.Sh DESCRIPTION
.Fn OPENSSL_config
initializes the crypto library and calls





.Xr CONF_modules_load_file 3
with the standard configuration file and the given
.Fa appname .
If
.Fa appname
is
.Dv NULL ,
then the default name
.Sy openssl_conf
is used.
Any errors are ignored.
Further calls to
.Fn OPENSSL_config
have no effect.
.Pp
.Fn OPENSSL_no_config
suppresses the loading of the standard configuration file, so that any
future calls to
.Fn OPENSSL_config
or to
.Xr OPENSSL_init_crypto 3
will ensure the library is initialized but no configuration
file will be loaded.
.Pp
Calling these functions is optional.
All required initialization of the crypto libraries happens
automatically when needed.
.Pp
To use a non-standard configuration file, refer to
.Xr CONF_modules_load_file 3 .
.Pp
Internally,
.Fn OPENSSL_config
calls
.Xr OPENSSL_init_crypto 3 ,
.Xr OPENSSL_load_builtin_modules 3 ,
and
.Xr ENGINE_load_builtin_engines 3 .
.Pp
If an application is compiled with the preprocessor symbol
.Dv OPENSSL_LOAD_CONF
#define'd,
.Xr OpenSSL_add_all_algorithms 3
automatically calls
.Fn OPENSSL_config .
.Pp
Applications should free up configuration at application closedown by
calling
.Xr CONF_modules_free 3 .
.Sh FILES
.Bl -tag -width /etc/ssl/openssl.cnf -compact
.It Pa /etc/ssl/openssl.cnf
standard configuration file
.El
.Sh SEE ALSO
.Xr CONF_modules_free 3 ,
.Xr CONF_modules_load_file 3 ,
.Xr crypto 3 ,
.Xr OPENSSL_load_builtin_modules 3 ,
.Xr OPENSSL_VERSION_NUMBER 3 ,
.Xr openssl.cnf 5 ,
.Xr x509v3.cnf 5
.Sh HISTORY
.Fn OPENSSL_config
and
.Fn OPENSSL_no_config
first appeared in OpenSSL 0.9.7 and have been available since
.Ox 3.2 .
Changes to jni/libressl/man/OPENSSL_init_crypto.3.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29















30
31
32
33





34
35
36
37
38
39
40
.\" $OpenBSD: OPENSSL_init_crypto.3,v 1.3 2018/03/23 23:18:17 schwarze Exp $
.\" Copyright (c) 2018 Ingo Schwarze <schwarze@openbsd.org>
.\"
.\" Permission to use, copy, modify, and distribute this software for any
.\" purpose with or without fee is hereby granted, provided that the above
.\" copyright notice and this permission notice appear in all copies.
.\"
.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
.Dd $Mdocdate: March 23 2018 $
.Dt OPENSSL_INIT_CRYPTO 3
.Os
.Sh NAME
.Nm OPENSSL_init_crypto
.Nd initialise the crypto library
.Sh SYNOPSIS
.In openssl/crypto.h
.Ft int
.Fo OPENSSL_init_crypto
.Fa "uint64_t options"
.Fa "const void *dummy"
.Fc
.Sh DESCRIPTION















If
.Fn OPENSSL_init_crypto
is called before any other crypto or ssl functions, the crypto
library is initialised by allocating various internal resources.





.Pp
The following
.Fa options
are supported:
.Bl -tag -width Ds
.It Dv OPENSSL_INIT_LOAD_CONFIG
At the end of the initialization, call
|














|













>
>
>
>
>
>
>
>
>
>
>
>
>
>
>



|
>
>
>
>
>







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
.\" $OpenBSD: OPENSSL_init_crypto.3,v 1.4 2019/06/14 13:41:31 schwarze Exp $
.\" Copyright (c) 2018 Ingo Schwarze <schwarze@openbsd.org>
.\"
.\" Permission to use, copy, modify, and distribute this software for any
.\" purpose with or without fee is hereby granted, provided that the above
.\" copyright notice and this permission notice appear in all copies.
.\"
.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
.Dd $Mdocdate: June 14 2019 $
.Dt OPENSSL_INIT_CRYPTO 3
.Os
.Sh NAME
.Nm OPENSSL_init_crypto
.Nd initialise the crypto library
.Sh SYNOPSIS
.In openssl/crypto.h
.Ft int
.Fo OPENSSL_init_crypto
.Fa "uint64_t options"
.Fa "const void *dummy"
.Fc
.Sh DESCRIPTION
This function is deprecated.
It is never useful for any application program to call it explicitly.
The library automatically calls it internally with an
.Fa options
argument of 0 whenever needed.
It is safest to assume that any function may do so.
.Pp
To enable or disable the standard configuration file, instead use
.Xr OPENSSL_config 3
or
.Xr OPENSSL_no_config 3 ,
respectively.
To load a non-standard configuration file, refer to
.Xr CONF_modules_load_file 3 .
.Pp
If
.Fn OPENSSL_init_crypto
is called before any other crypto or ssl functions, the crypto
library is initialised by allocating various internal resources,
in particular calling
.Xr ERR_load_crypto_strings 3 ,
.Xr OpenSSL_add_all_ciphers 3 ,
and
.Xr OpenSSL_add_all_digests 3 .
.Pp
The following
.Fa options
are supported:
.Bl -tag -width Ds
.It Dv OPENSSL_INIT_LOAD_CONFIG
At the end of the initialization, call
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
The other
.Fa options
flags defined by OpenSSL are all ignored by LibreSSL.
The
.Fa dummy
argument has no effect.
.Pp
Calling this function is almost never useful because it is internally
called with an
.Fa options
argument of 0 by those functions in the crypto and ssl libraries
that require it.
It is safest to assume that any function may do so.
.Pp
If this function is called more than once, none of the calls except
the first one have any effect.
.Sh RETURN VALUES
.Fn OPENSSL_init_crypto
is intended to return 1 on success or 0 on error.
.Sh SEE ALSO
.Xr CONF_modules_load_file 3 ,
.Xr OPENSSL_config 3 ,
.Xr OPENSSL_init_ssl 3 ,
.Xr OPENSSL_load_builtin_modules 3 ,
.Xr openssl.cnf 5
.Sh HISTORY
.Fn OPENSSL_init_crypto
first appeared in OpenSSL 1.1.0 and has been available since
.Ox 6.3 .
.Sh BUGS







<
<
<
<
<
<
<








<







70
71
72
73
74
75
76







77
78
79
80
81
82
83
84

85
86
87
88
89
90
91
The other
.Fa options
flags defined by OpenSSL are all ignored by LibreSSL.
The
.Fa dummy
argument has no effect.
.Pp







If this function is called more than once, none of the calls except
the first one have any effect.
.Sh RETURN VALUES
.Fn OPENSSL_init_crypto
is intended to return 1 on success or 0 on error.
.Sh SEE ALSO
.Xr CONF_modules_load_file 3 ,
.Xr OPENSSL_config 3 ,

.Xr OPENSSL_load_builtin_modules 3 ,
.Xr openssl.cnf 5
.Sh HISTORY
.Fn OPENSSL_init_crypto
first appeared in OpenSSL 1.1.0 and has been available since
.Ox 6.3 .
.Sh BUGS
Changes to jni/libressl/man/OPENSSL_init_ssl.3.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29















30
31
32


33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53

54
55
56
57
58
59
60
61
.\" $OpenBSD: OPENSSL_init_ssl.3,v 1.2 2018/03/24 00:55:37 schwarze Exp $
.\" Copyright (c) 2018 Ingo Schwarze <schwarze@openbsd.org>
.\"
.\" Permission to use, copy, modify, and distribute this software for any
.\" purpose with or without fee is hereby granted, provided that the above
.\" copyright notice and this permission notice appear in all copies.
.\"
.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
.Dd $Mdocdate: March 24 2018 $
.Dt OPENSSL_INIT_SSL 3
.Os
.Sh NAME
.Nm OPENSSL_init_ssl
.Nd initialise the crypto and ssl libraries
.Sh SYNOPSIS
.In openssl/ssl.h
.Ft int
.Fo OPENSSL_init_ssl
.Fa "uint64_t options"
.Fa "const void *dummy"
.Fc
.Sh DESCRIPTION















.Fn OPENSSL_init_ssl
calls
.Xr OPENSSL_init_crypto 3


and also allocates various resources used internally by the ssl library.
.Pp
Calling it is never useful because it is automatically called
internally when needed.
.Pp
The
.Fa options
argument is passed on to
.Xr OPENSSL_init_crypto 3
and the
.Fa dummy
argument is ignored.
.Pp
If this function is called more than once,
none of the calls except the first one have any effect.
.Sh RETURN VALUES
.Fn OPENSSL_init_ssl
is intended to return 1 on success or 0 on error.
.Sh SEE ALSO
.Xr CONF_modules_load_file 3 ,
.Xr OPENSSL_init_crypto 3

.Sh HISTORY
.Fn OPENSSL_init_ssl
first appeared in OpenSSL 1.1.0 and has been available since
.Ox 6.3 .
.Sh BUGS
.Fn OPENSSL_init_ssl
silently ignores even more configuration failures than
.Xr OPENSSL_init_crypto 3 .
|














|













>
>
>
>
>
>
>
>
>
>
>
>
>
>
>


|
>
>
|
<
<
<
















|
>








1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50



51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
.\" $OpenBSD: OPENSSL_init_ssl.3,v 1.4 2019/06/14 13:41:31 schwarze Exp $
.\" Copyright (c) 2018 Ingo Schwarze <schwarze@openbsd.org>
.\"
.\" Permission to use, copy, modify, and distribute this software for any
.\" purpose with or without fee is hereby granted, provided that the above
.\" copyright notice and this permission notice appear in all copies.
.\"
.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
.Dd $Mdocdate: June 14 2019 $
.Dt OPENSSL_INIT_SSL 3
.Os
.Sh NAME
.Nm OPENSSL_init_ssl
.Nd initialise the crypto and ssl libraries
.Sh SYNOPSIS
.In openssl/ssl.h
.Ft int
.Fo OPENSSL_init_ssl
.Fa "uint64_t options"
.Fa "const void *dummy"
.Fc
.Sh DESCRIPTION
This function is deprecated.
It is never useful for any application program to call it explicitly.
The library automatically calls it internally with an
.Fa options
argument of 0 whenever needed.
It is safest to assume that any function may do so.
.Pp
To enable or disable the standard configuration file, instead use
.Xr OPENSSL_config 3
or
.Xr OPENSSL_no_config 3 ,
respectively.
To load a non-standard configuration file, refer to
.Xr CONF_modules_load_file 3 .
.Pp
.Fn OPENSSL_init_ssl
calls
.Xr OPENSSL_init_crypto 3 ,
.Xr SSL_load_error_strings 3 ,
and
.Xr SSL_library_init 3 .



.Pp
The
.Fa options
argument is passed on to
.Xr OPENSSL_init_crypto 3
and the
.Fa dummy
argument is ignored.
.Pp
If this function is called more than once,
none of the calls except the first one have any effect.
.Sh RETURN VALUES
.Fn OPENSSL_init_ssl
is intended to return 1 on success or 0 on error.
.Sh SEE ALSO
.Xr CONF_modules_load_file 3 ,
.Xr OPENSSL_config 3 ,
.Xr ssl 3
.Sh HISTORY
.Fn OPENSSL_init_ssl
first appeared in OpenSSL 1.1.0 and has been available since
.Ox 6.3 .
.Sh BUGS
.Fn OPENSSL_init_ssl
silently ignores even more configuration failures than
.Xr OPENSSL_init_crypto 3 .
Changes to jni/libressl/man/OPENSSL_load_builtin_modules.3.
1
2
3
4
5
6
7
8
.\"	$OpenBSD: OPENSSL_load_builtin_modules.3,v 1.5 2018/03/22 21:08:22 schwarze Exp $
.\"	OpenSSL b97fdb57 Nov 11 09:33:09 2016 +0100
.\"
.\" This file was written by Dr. Stephen Henson <steve@openssl.org>.
.\" Copyright (c) 2004, 2013 The OpenSSL Project.  All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
|







1
2
3
4
5
6
7
8
.\"	$OpenBSD: OPENSSL_load_builtin_modules.3,v 1.6 2019/06/14 13:41:31 schwarze Exp $
.\"	OpenSSL b97fdb57 Nov 11 09:33:09 2016 +0100
.\"
.\" This file was written by Dr. Stephen Henson <steve@openssl.org>.
.\" Copyright (c) 2004, 2013 The OpenSSL Project.  All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: March 22 2018 $
.Dt OPENSSL_LOAD_BUILTIN_MODULES 3
.Os
.Sh NAME
.Nm OPENSSL_load_builtin_modules ,
.Nm ASN1_add_oid_module ,
.Nm ENGINE_add_conf_module
.Nd add standard configuration modules







|







44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: June 14 2019 $
.Dt OPENSSL_LOAD_BUILTIN_MODULES 3
.Os
.Sh NAME
.Nm OPENSSL_load_builtin_modules ,
.Nm ASN1_add_oid_module ,
.Nm ENGINE_add_conf_module
.Nd add standard configuration modules
79
80
81
82
83
84
85
86

87
88
89
90
91
92
93


94
95
96
97
98

99
100
101
102
103
.Pp
If the simple configuration function
.Xr OPENSSL_config 3
is called then
.Fn OPENSSL_load_builtin_modules
is called automatically.
.Pp
Applications which use the configuration functions directly will need to

call
.Fn OPENSSL_load_builtin_modules
themselves
.Em before
any other configuration code.
.Pp
Applications should call


.Fn OPENSSL_load_builtin_modules
to load all configuration modules instead of adding modules selectively:
otherwise functionality may be missing from the application when
new modules are added.
.Sh SEE ALSO

.Xr OPENSSL_config 3
.Sh HISTORY
These functions first appeared in OpenSSL 0.9.7
and have been available since
.Ox 3.2 .







|
>
|






>
>





>





79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
.Pp
If the simple configuration function
.Xr OPENSSL_config 3
is called then
.Fn OPENSSL_load_builtin_modules
is called automatically.
.Pp
Applications which use configuration functions like
.Xr CONF_modules_load_file 3
directly need to call
.Fn OPENSSL_load_builtin_modules
themselves
.Em before
any other configuration code.
.Pp
Applications should call
.Xr OPENSSL_config 3
or
.Fn OPENSSL_load_builtin_modules
to load all configuration modules instead of adding modules selectively:
otherwise functionality may be missing from the application when
new modules are added.
.Sh SEE ALSO
.Xr CONF_modules_load_file 3 ,
.Xr OPENSSL_config 3
.Sh HISTORY
These functions first appeared in OpenSSL 0.9.7
and have been available since
.Ox 3.2 .
Changes to jni/libressl/man/OPENSSL_malloc.3.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
.\"	$OpenBSD: OPENSSL_malloc.3,v 1.8 2018/03/27 17:35:50 schwarze Exp $
.\"
.\" Copyright (c) 2016 Ingo Schwarze <schwarze@openbsd.org>
.\"
.\" Permission to use, copy, modify, and distribute this software for any
.\" purpose with or without fee is hereby granted, provided that the above
.\" copyright notice and this permission notice appear in all copies.
.\"
.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
.Dd $Mdocdate: March 27 2018 $
.Dt OPENSSL_MALLOC 3
.Os
.Sh NAME
.Nm OPENSSL_malloc ,
.Nm OPENSSL_realloc ,
.Nm OPENSSL_free ,
.Nm OPENSSL_strdup ,
|















|







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
.\"	$OpenBSD: OPENSSL_malloc.3,v 1.9 2019/06/10 09:49:48 schwarze Exp $
.\"
.\" Copyright (c) 2016 Ingo Schwarze <schwarze@openbsd.org>
.\"
.\" Permission to use, copy, modify, and distribute this software for any
.\" purpose with or without fee is hereby granted, provided that the above
.\" copyright notice and this permission notice appear in all copies.
.\"
.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
.Dd $Mdocdate: June 10 2019 $
.Dt OPENSSL_MALLOC 3
.Os
.Sh NAME
.Nm OPENSSL_malloc ,
.Nm OPENSSL_realloc ,
.Nm OPENSSL_free ,
.Nm OPENSSL_strdup ,
82
83
84
85
86
87
88


89
90
91
92
93
94
95
.Xr free 3 ,
and
.Xr strdup 3
functions.
.Sh RETURN VALUES
These functions return the same type and value as the corresponding
standard functions.


.Sh HISTORY
.Fn CRYPTO_malloc ,
.Fn CRYPTO_realloc ,
and
.Fn CRYPTO_free
first appeared in SSLeay 0.6.4 and have been available since
.Ox 2.4 .







>
>







82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
.Xr free 3 ,
and
.Xr strdup 3
functions.
.Sh RETURN VALUES
These functions return the same type and value as the corresponding
standard functions.
.Sh SEE ALSO
.Xr crypto 3
.Sh HISTORY
.Fn CRYPTO_malloc ,
.Fn CRYPTO_realloc ,
and
.Fn CRYPTO_free
first appeared in SSLeay 0.6.4 and have been available since
.Ox 2.4 .
Changes to jni/libressl/man/OPENSSL_sk_new.3.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
.\" $OpenBSD: OPENSSL_sk_new.3,v 1.10 2018/08/08 18:21:02 tb Exp $
.\"
.\" Copyright (c) 2018 Ingo Schwarze <schwarze@openbsd.org>
.\"
.\" Permission to use, copy, modify, and distribute this software for any
.\" purpose with or without fee is hereby granted, provided that the above
.\" copyright notice and this permission notice appear in all copies.
.\"
.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
.Dd $Mdocdate: August 8 2018 $
.Dt OPENSSL_SK_NEW 3
.Os
.Sh NAME
.Nm sk_new_null ,
.Nm sk_new ,
.Nm sk_set_cmp_func ,
.Nm sk_dup ,
|















|







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
.\" $OpenBSD: OPENSSL_sk_new.3,v 1.11 2019/06/06 01:06:58 schwarze Exp $
.\"
.\" Copyright (c) 2018 Ingo Schwarze <schwarze@openbsd.org>
.\"
.\" Permission to use, copy, modify, and distribute this software for any
.\" purpose with or without fee is hereby granted, provided that the above
.\" copyright notice and this permission notice appear in all copies.
.\"
.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
.Dd $Mdocdate: June 6 2019 $
.Dt OPENSSL_SK_NEW 3
.Os
.Sh NAME
.Nm sk_new_null ,
.Nm sk_new ,
.Nm sk_set_cmp_func ,
.Nm sk_dup ,
521
522
523
524
525
526
527


528
529
530
531
532
533
534
.Pp
.Fn sk_delete_ptr
returns
.Fa wanted
or
.Dv NULL
if it is not found.


.Sh HISTORY
.Fn sk_new_null ,
.Fn sk_new ,
.Fn sk_free ,
.Fn sk_pop_free ,
.Fn sk_num ,
.Fn sk_value ,







>
>







521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
.Pp
.Fn sk_delete_ptr
returns
.Fa wanted
or
.Dv NULL
if it is not found.
.Sh SEE ALSO
.Xr STACK_OF 3
.Sh HISTORY
.Fn sk_new_null ,
.Fn sk_new ,
.Fn sk_free ,
.Fn sk_pop_free ,
.Fn sk_num ,
.Fn sk_value ,
Changes to jni/libressl/man/OpenSSL_add_all_algorithms.3.
1
2
3
4
5
6
7
8
.\" $OpenBSD: OpenSSL_add_all_algorithms.3,v 1.7 2018/03/27 17:35:50 schwarze Exp $
.\" full merge up to: OpenSSL b3696a55 Sep 2 09:35:50 2017 -0400
.\"
.\" This file was written by Dr. Stephen Henson <steve@openssl.org>.
.\" Copyright (c) 2000, 2003, 2013 The OpenSSL Project.  All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
|







1
2
3
4
5
6
7
8
.\" $OpenBSD: OpenSSL_add_all_algorithms.3,v 1.8 2019/06/14 13:41:31 schwarze Exp $
.\" full merge up to: OpenSSL b3696a55 Sep 2 09:35:50 2017 -0400
.\"
.\" This file was written by Dr. Stephen Henson <steve@openssl.org>.
.\" Copyright (c) 2000, 2003, 2013 The OpenSSL Project.  All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: March 27 2018 $
.Dt OPENSSL_ADD_ALL_ALGORITHMS 3
.Os
.Sh NAME
.Nm OpenSSL_add_all_algorithms ,
.Nm OpenSSL_add_all_ciphers ,
.Nm OpenSSL_add_all_digests ,
.Nm EVP_cleanup







|







44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: June 14 2019 $
.Dt OPENSSL_ADD_ALL_ALGORITHMS 3
.Os
.Sh NAME
.Nm OpenSSL_add_all_algorithms ,
.Nm OpenSSL_add_all_ciphers ,
.Nm OpenSSL_add_all_digests ,
.Nm EVP_cleanup
75
76
77
78
79
80
81







82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
.Pp
OpenSSL keeps an internal table of digest algorithms and ciphers.
It uses this table to look up ciphers via functions such as
.Xr EVP_get_cipherbyname 3 .
.Pp
.Fn OpenSSL_add_all_algorithms
adds all algorithms to the table (digests and ciphers).







.Pp
.Fn OpenSSL_add_all_digests
adds all digest algorithms to the table.
.Pp
.Fn OpenSSL_add_all_ciphers
adds all encryption algorithms to the table including password based
encryption algorithms.
.Pp
If any of the above functions is called more than once,
only the first call has an effect.
.Pp
.Fn EVP_cleanup
removes all ciphers and digests from the table.
.Sh SEE ALSO
.Xr evp 3 ,
.Xr EVP_DigestInit 3 ,
.Xr EVP_EncryptInit 3 ,
.Xr OPENSSL_config 3 ,
.Xr OPENSSL_init_crypto 3
.Sh HISTORY
.Fn EVP_cleanup
and precursor functions
.Fn SSLeay_add_all_algorithms ,
.Fn SSLeay_add_all_ciphers ,
and
.Fn SSLeay_add_all_digests







>
>
>
>
>
>
>

















|
<







75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106

107
108
109
110
111
112
113
.Pp
OpenSSL keeps an internal table of digest algorithms and ciphers.
It uses this table to look up ciphers via functions such as
.Xr EVP_get_cipherbyname 3 .
.Pp
.Fn OpenSSL_add_all_algorithms
adds all algorithms to the table (digests and ciphers).
If an application is compiled with the preprocessor symbol
.Dv OPENSSL_LOAD_CONF
#define'd, it also calls
.Xr OPENSSL_config 3
with a
.Dv NULL
argument, loading the default configuration file.
.Pp
.Fn OpenSSL_add_all_digests
adds all digest algorithms to the table.
.Pp
.Fn OpenSSL_add_all_ciphers
adds all encryption algorithms to the table including password based
encryption algorithms.
.Pp
If any of the above functions is called more than once,
only the first call has an effect.
.Pp
.Fn EVP_cleanup
removes all ciphers and digests from the table.
.Sh SEE ALSO
.Xr evp 3 ,
.Xr EVP_DigestInit 3 ,
.Xr EVP_EncryptInit 3 ,
.Xr OPENSSL_config 3

.Sh HISTORY
.Fn EVP_cleanup
and precursor functions
.Fn SSLeay_add_all_algorithms ,
.Fn SSLeay_add_all_ciphers ,
and
.Fn SSLeay_add_all_digests
Changes to jni/libressl/man/PEM_read.3.
1
2
3
4
5
6
7
8
.\"	$OpenBSD: PEM_read.3,v 1.6 2018/05/13 14:44:14 schwarze Exp $
.\"	OpenSSL 99d63d46 Oct 26 13:56:48 2016 -0400
.\"
.\" This file was written by Viktor Dukhovni
.\" and by Rich Salz <rsalz@openssl.org>.
.\" Copyright (c) 2016 The OpenSSL Project.  All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
|







1
2
3
4
5
6
7
8
.\"	$OpenBSD: PEM_read.3,v 1.9 2019/06/10 14:58:48 schwarze Exp $
.\"	OpenSSL 99d63d46 Oct 26 13:56:48 2016 -0400
.\"
.\" This file was written by Viktor Dukhovni
.\" and by Rich Salz <rsalz@openssl.org>.
.\" Copyright (c) 2016 The OpenSSL Project.  All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: May 13 2018 $
.Dt PEM_READ 3
.Os
.Sh NAME
.Nm PEM_write ,
.Nm PEM_write_bio ,
.Nm PEM_read ,
.Nm PEM_read_bio ,







|







45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: June 10 2019 $
.Dt PEM_READ 3
.Os
.Sh NAME
.Nm PEM_write ,
.Nm PEM_write_bio ,
.Nm PEM_read ,
.Nm PEM_read_bio ,
273
274
275
276
277
278
279

280
281
282
283
284

285
286
287
288
289
290
291
and
.Fn PEM_do_header
return 1 on success or 0 on failure.
The
.Fa data
is likely meaningless if these functions fail.
.Sh SEE ALSO

.Xr d2i_PKCS8PrivateKey_bio 3 ,
.Xr ERR_GET_LIB 3 ,
.Xr ERR_peek_last_error 3 ,
.Xr PEM_bytes_read_bio 3 ,
.Xr PEM_read_bio_PrivateKey 3

.Sh HISTORY
.Fn PEM_write ,
.Fn PEM_read ,
and
.Fn PEM_do_header
appeared in SSLeay 0.4 or earlier.
.Fn PEM_get_EVP_CIPHER_INFO







>

<
<

|
>







273
274
275
276
277
278
279
280
281


282
283
284
285
286
287
288
289
290
291
and
.Fn PEM_do_header
return 1 on success or 0 on failure.
The
.Fa data
is likely meaningless if these functions fail.
.Sh SEE ALSO
.Xr crypto 3 ,
.Xr d2i_PKCS8PrivateKey_bio 3 ,


.Xr PEM_bytes_read_bio 3 ,
.Xr PEM_read_bio_PrivateKey 3 ,
.Xr PEM_write_bio_PKCS7_stream 3
.Sh HISTORY
.Fn PEM_write ,
.Fn PEM_read ,
and
.Fn PEM_do_header
appeared in SSLeay 0.4 or earlier.
.Fn PEM_get_EVP_CIPHER_INFO
Changes to jni/libressl/man/PEM_read_SSL_SESSION.3.
1
2
3
4
5
6
7
8
.\"	$OpenBSD: PEM_read_SSL_SESSION.3,v 1.3 2018/03/27 17:35:50 schwarze Exp $
.\"	OpenSSL doc/man3/PEM_read_CMS.pod b97fdb57 Nov 11 09:33:09 2016 +0100
.\"
.\" This file was written by Rich Salz <rsalz@openssl.org>.
.\" Copyright (c) 2016 The OpenSSL Project.  All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
|







1
2
3
4
5
6
7
8
.\"	$OpenBSD: PEM_read_SSL_SESSION.3,v 1.4 2019/06/12 09:36:30 schwarze Exp $
.\"	OpenSSL doc/man3/PEM_read_CMS.pod b97fdb57 Nov 11 09:33:09 2016 +0100
.\"
.\" This file was written by Rich Salz <rsalz@openssl.org>.
.\" Copyright (c) 2016 The OpenSSL Project.  All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: March 27 2018 $
.Dt PEM_READ_SSL_SESSION 3
.Os
.Sh NAME
.Nm PEM_read_SSL_SESSION ,
.Nm PEM_read_bio_SSL_SESSION ,
.Nm PEM_write_SSL_SESSION ,
.Nm PEM_write_bio_SSL_SESSION







|







44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: June 12 2019 $
.Dt PEM_READ_SSL_SESSION 3
.Os
.Sh NAME
.Nm PEM_read_SSL_SESSION ,
.Nm PEM_read_bio_SSL_SESSION ,
.Nm PEM_write_SSL_SESSION ,
.Nm PEM_write_bio_SSL_SESSION
128
129
130
131
132
133
134
135

136
137
138
139
140
141
142
143
144
145
146
on error.
.Pp
.Fn PEM_write_SSL_SESSION
and
.Fn PEM_write_bio_SSL_SESSION
return the number of bytes written or 0 on error.
.Sh SEE ALSO
.Xr PEM_read 3

.Sh HISTORY
.Fn PEM_read_SSL_SESSION
and
.Fn PEM_write_SSL_SESSION
first appeared in SSLeay 0.5.2.
.Fn PEM_read_bio_SSL_SESSION
and
.Fn PEM_write_bio_SSL_SESSION
first appeared in SSLeay 0.6.0.
These functions have been available since
.Ox 2.4 .







|
>











128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
on error.
.Pp
.Fn PEM_write_SSL_SESSION
and
.Fn PEM_write_bio_SSL_SESSION
return the number of bytes written or 0 on error.
.Sh SEE ALSO
.Xr PEM_read 3 ,
.Xr ssl 3
.Sh HISTORY
.Fn PEM_read_SSL_SESSION
and
.Fn PEM_write_SSL_SESSION
first appeared in SSLeay 0.5.2.
.Fn PEM_read_bio_SSL_SESSION
and
.Fn PEM_write_bio_SSL_SESSION
first appeared in SSLeay 0.6.0.
These functions have been available since
.Ox 2.4 .
Changes to jni/libressl/man/PEM_read_bio_PrivateKey.3.
1


2
3
4
5
6
7
8
9
.\"	$OpenBSD: PEM_read_bio_PrivateKey.3,v 1.13 2018/03/27 17:35:50 schwarze Exp $


.\"	OpenSSL 99d63d46 Oct 26 13:56:48 2016 -0400
.\"
.\" This file was written by Dr. Stephen Henson <steve@openssl.org>.
.\" Copyright (c) 2001-2004, 2009, 2013-2016 The OpenSSL Project.
.\" All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
|
>
>
|







1
2
3
4
5
6
7
8
9
10
11
.\" $OpenBSD: PEM_read_bio_PrivateKey.3,v 1.15 2019/08/12 11:36:12 schwarze Exp $
.\" full merge up to:
.\" OpenSSL man3/PEM_read_bio_PrivateKey.pod 18bad535 Apr 9 15:13:55 2019 +0100
.\" OpenSSL man3/PEM_read_CMS.pod 83cf7abf May 29 13:07:08 2018 +0100
.\"
.\" This file was written by Dr. Stephen Henson <steve@openssl.org>.
.\" Copyright (c) 2001-2004, 2009, 2013-2016 The OpenSSL Project.
.\" All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
45
46
47
48
49
50
51
52
53
54
55

56
57
58
59
60
61
62
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: March 27 2018 $
.Dt PEM_READ_BIO_PRIVATEKEY 3
.Os
.Sh NAME

.Nm PEM_read_bio_PrivateKey ,
.Nm PEM_read_PrivateKey ,
.Nm PEM_write_bio_PrivateKey ,
.Nm PEM_write_PrivateKey ,
.Nm PEM_write_bio_PKCS8PrivateKey ,
.Nm PEM_write_PKCS8PrivateKey ,
.Nm PEM_write_bio_PKCS8PrivateKey_nid ,







|



>







47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: August 12 2019 $
.Dt PEM_READ_BIO_PRIVATEKEY 3
.Os
.Sh NAME
.Nm pem_password_cb ,
.Nm PEM_read_bio_PrivateKey ,
.Nm PEM_read_PrivateKey ,
.Nm PEM_write_bio_PrivateKey ,
.Nm PEM_write_PrivateKey ,
.Nm PEM_write_bio_PKCS8PrivateKey ,
.Nm PEM_write_PKCS8PrivateKey ,
.Nm PEM_write_bio_PKCS8PrivateKey_nid ,
138
139
140
141
142
143
144







145
146
147
148
149
150
151
.Nm PEM_read_bio_NETSCAPE_CERT_SEQUENCE ,
.Nm PEM_read_NETSCAPE_CERT_SEQUENCE ,
.Nm PEM_write_bio_NETSCAPE_CERT_SEQUENCE ,
.Nm PEM_write_NETSCAPE_CERT_SEQUENCE
.Nd PEM routines
.Sh SYNOPSIS
.In openssl/pem.h







.Ft EVP_PKEY *
.Fo PEM_read_bio_PrivateKey
.Fa "BIO *bp"
.Fa "EVP_PKEY **x"
.Fa "pem_password_cb *cb"
.Fa "void *u"
.Fc







>
>
>
>
>
>
>







141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
.Nm PEM_read_bio_NETSCAPE_CERT_SEQUENCE ,
.Nm PEM_read_NETSCAPE_CERT_SEQUENCE ,
.Nm PEM_write_bio_NETSCAPE_CERT_SEQUENCE ,
.Nm PEM_write_NETSCAPE_CERT_SEQUENCE
.Nd PEM routines
.Sh SYNOPSIS
.In openssl/pem.h
.Ft typedef int
.Fo pem_password_cb
.Fa "char *buf"
.Fa "int size"
.Fa "int rwflag"
.Fa "void *u"
.Fc
.Ft EVP_PKEY *
.Fo PEM_read_bio_PrivateKey
.Fa "BIO *bp"
.Fa "EVP_PKEY **x"
.Fa "pem_password_cb *cb"
.Fa "void *u"
.Fc
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
header lines.
.Pp
For more details about the meaning of arguments see the
.Sx PEM function arguments
section.
.Pp
Each operation has four functions associated with it.
For clarity the term
.Dq Sy foobar No functions
will be used to collectively refer to the
.Fn PEM_read_bio_foobar ,
.Fn PEM_read_foobar ,
.Fn PEM_write_bio_foobar ,
and
.Fn PEM_write_foobar
functions.
.Pp
The
.Sy PrivateKey
functions read or write a private key in PEM format using an
.Vt EVP_PKEY
structure.







|
|

|
|
|

|







728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
header lines.
.Pp
For more details about the meaning of arguments see the
.Sx PEM function arguments
section.
.Pp
Each operation has four functions associated with it.
For brevity the term
.Dq Ar TYPE No functions
will be used to collectively refer to the
.Fn PEM_read_bio_TYPE ,
.Fn PEM_read_TYPE ,
.Fn PEM_write_bio_TYPE ,
and
.Fn PEM_write_TYPE
functions.
.Pp
The
.Sy PrivateKey
functions read or write a private key in PEM format using an
.Vt EVP_PKEY
structure.
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
.Fa u
parameter has the same value as the
.Fa u
parameter passed to the PEM routine.
It allows arbitrary data to be passed to the callback by the application
(for example a window handle in a GUI application).
The callback must return the number of characters in the passphrase
or 0 if an error occurred.
.Ss PEM encryption format
This old
.Sy PrivateKey
routines use a non-standard technique for encryption.
.Pp
The private key (or other data) takes the following form:
.Bd -literal -offset indent







|







1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
.Fa u
parameter has the same value as the
.Fa u
parameter passed to the PEM routine.
It allows arbitrary data to be passed to the callback by the application
(for example a window handle in a GUI application).
The callback must return the number of characters in the passphrase
or -1 if an error occurred.
.Ss PEM encryption format
This old
.Sy PrivateKey
routines use a non-standard technique for encryption.
.Pp
The private key (or other data) takes the following form:
.Bd -literal -offset indent
1189
1190
1191
1192
1193
1194
1195

1196
1197
1198
1199
1200
1201
1202



1203
1204

1205

1206
1207

1208
1209
1210
1211
1212
1213
1214
1215
1216

1217
1218





1219
1220
1221
1222
1223
1224
1225
.Ed
.Pp
Skeleton pass phrase callback:
.Bd -literal -offset indent
int
pass_cb(char *buf, int size, int rwflag, void *u)
{

	int len;
	char *tmp;

	/* We'd probably do something else if 'rwflag' is 1 */
	printf("Enter pass phrase for \e"%s\e"\en", u);

	/* get pass phrase, length 'len' into 'tmp' */



	tmp = "hello";
	len = strlen(tmp);



	if (len == 0)
		return 0;

	/* if too long, truncate */
	if (len > size)
		len = size;
	memcpy(buf, tmp, len);
	return len;
}
.Ed
.Sh SEE ALSO
.Xr BIO_new 3 ,

.Xr PEM_bytes_read_bio 3 ,
.Xr PEM_read 3





.Sh HISTORY
.Fn PEM_read_X509
and
.Fn PEM_write_X509
appeared in SSLeay 0.4 or earlier.
.Fn PEM_read_X509_REQ ,
.Fn PEM_write_X509_REQ ,







>
|
<




|
>
>
>

|
>

>
|
|
>









>

|
>
>
>
>
>







1199
1200
1201
1202
1203
1204
1205
1206
1207

1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
.Ed
.Pp
Skeleton pass phrase callback:
.Bd -literal -offset indent
int
pass_cb(char *buf, int size, int rwflag, void *u)
{
	char	*tmp;
	size_t	 len;


	/* We'd probably do something else if 'rwflag' is 1 */
	printf("Enter pass phrase for \e"%s\e"\en", u);

	/*
	 * Instead of the following line, get the passphrase
	 * from the user in some way.
	 */
	tmp = "hello";
	if (tmp == NULL) /* An error occurred. */
		return -1;

	len = strlen(tmp);
	if (len == 0) /* Treat an empty passphrase as an error, too. */
		return -1;

	/* if too long, truncate */
	if (len > size)
		len = size;
	memcpy(buf, tmp, len);
	return len;
}
.Ed
.Sh SEE ALSO
.Xr BIO_new 3 ,
.Xr DSA_new 3 ,
.Xr PEM_bytes_read_bio 3 ,
.Xr PEM_read 3 ,
.Xr PEM_write_bio_PKCS7_stream 3 ,
.Xr RSA_new 3 ,
.Xr X509_CRL_new 3 ,
.Xr X509_REQ_new 3 ,
.Xr X509_SIG_new 3
.Sh HISTORY
.Fn PEM_read_X509
and
.Fn PEM_write_X509
appeared in SSLeay 0.4 or earlier.
.Fn PEM_read_X509_REQ ,
.Fn PEM_write_X509_REQ ,
1336
1337
1338
1339
1340
1341
1342




1343
1344
1345
1346
1347
1348
1349
X509 *x;
PEM_read_bio_X509(bp, &x, 0, NULL);
.Ed
.Pp
This is a bug because an attempt will be made to reuse the data at
.Fa x ,
which is an uninitialised pointer.




.Sh BUGS
The PEM read routines in some versions of OpenSSL will not correctly
reuse an existing structure.
Therefore
.Pp
.Dl PEM_read_bio_X509(bp, &x, 0, NULL);
.Pp







>
>
>
>







1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
X509 *x;
PEM_read_bio_X509(bp, &x, 0, NULL);
.Ed
.Pp
This is a bug because an attempt will be made to reuse the data at
.Fa x ,
which is an uninitialised pointer.
.Pp
These functions make no assumption regarding the pass phrase received
from the password callback.
It will simply be treated as a byte sequence.
.Sh BUGS
The PEM read routines in some versions of OpenSSL will not correctly
reuse an existing structure.
Therefore
.Pp
.Dl PEM_read_bio_X509(bp, &x, 0, NULL);
.Pp
Added jni/libressl/man/PEM_write_bio_CMS_stream.3.






























































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
.\" $OpenBSD: PEM_write_bio_CMS_stream.3,v 1.3 2019/08/18 21:44:10 schwarze Exp $
.\" full merge up to: OpenSSL df75c2bf Dec 9 01:02:36 2018 +0100
.\"
.\" This file was written by Dr. Stephen Henson <steve@openssl.org>.
.\" Copyright (c) 2008 The OpenSSL Project.  All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\"
.\" 1. Redistributions of source code must retain the above copyright
.\"    notice, this list of conditions and the following disclaimer.
.\"
.\" 2. Redistributions in binary form must reproduce the above copyright
.\"    notice, this list of conditions and the following disclaimer in
.\"    the documentation and/or other materials provided with the
.\"    distribution.
.\"
.\" 3. All advertising materials mentioning features or use of this
.\"    software must display the following acknowledgment:
.\"    "This product includes software developed by the OpenSSL Project
.\"    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
.\"
.\" 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
.\"    endorse or promote products derived from this software without
.\"    prior written permission. For written permission, please contact
.\"    openssl-core@openssl.org.
.\"
.\" 5. Products derived from this software may not be called "OpenSSL"
.\"    nor may "OpenSSL" appear in their names without prior written
.\"    permission of the OpenSSL Project.
.\"
.\" 6. Redistributions of any form whatsoever must retain the following
.\"    acknowledgment:
.\"    "This product includes software developed by the OpenSSL Project
.\"    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
.\"
.\" THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
.\" EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
.\" PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
.\" ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
.\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: August 18 2019 $
.Dt PEM_WRITE_BIO_CMS_STREAM 3
.Os
.Sh NAME
.Nm PEM_write_bio_CMS_stream
.Nd output CMS_ContentInfo structure in PEM format
.Sh SYNOPSIS
.In openssl/cms.h
.Ft int
.Fo PEM_write_bio_CMS_stream
.Fa "BIO *out"
.Fa "CMS_ContentInfo *cms"
.Fa "BIO *data"
.Fa "int flags"
.Fc
.Sh DESCRIPTION
.Fn PEM_write_bio_CMS_stream
outputs a
.Vt CMS_ContentInfo
structure in PEM format.
.Pp
It is otherwise identical to the function
.Xr SMIME_write_CMS 3 .
.Pp
This function is effectively a version of
.Xr PEM_write_bio_CMS 3
supporting streaming.
.Sh RETURN VALUES
.Fn PEM_write_bio_CMS_stream
returns 1 for success or 0 for failure.
.Sh SEE ALSO
.Xr CMS_ContentInfo_new 3 ,
.Xr CMS_decrypt 3 ,
.Xr CMS_encrypt 3 ,
.Xr CMS_sign 3 ,
.Xr CMS_verify 3 ,
.Xr ERR_get_error 3 ,
.Xr i2d_CMS_bio_stream 3 ,
.Xr PEM_write 3 ,
.Xr SMIME_write_CMS 3
.Sh HISTORY
.Fn PEM_write_bio_CMS_stream
first appeared in OpenSSL 1.0.0
and has been available since
.Ox 6.6 .
Changes to jni/libressl/man/PEM_write_bio_PKCS7_stream.3.
1
2
3
4
5
6
7
8
.\"	$OpenBSD: PEM_write_bio_PKCS7_stream.3,v 1.8 2018/03/23 04:34:23 schwarze Exp $
.\"	OpenSSL 99d63d46 Oct 26 13:56:48 2016 -0400
.\"
.\" This file was written by Dr. Stephen Henson <steve@openssl.org>.
.\" Copyright (c) 2007, 2009, 2016 The OpenSSL Project.  All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
|







1
2
3
4
5
6
7
8
.\"	$OpenBSD: PEM_write_bio_PKCS7_stream.3,v 1.9 2019/06/14 13:59:32 schwarze Exp $
.\"	OpenSSL 99d63d46 Oct 26 13:56:48 2016 -0400
.\"
.\" This file was written by Dr. Stephen Henson <steve@openssl.org>.
.\" Copyright (c) 2007, 2009, 2016 The OpenSSL Project.  All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: March 23 2018 $
.Dt PEM_WRITE_BIO_PKCS7_STREAM 3
.Os
.Sh NAME
.Nm PEM_write_bio_PKCS7_stream
.Nd output PKCS7 structure in PEM format
.Sh SYNOPSIS
.In openssl/pkcs7.h







|







44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: June 14 2019 $
.Dt PEM_WRITE_BIO_PKCS7_STREAM 3
.Os
.Sh NAME
.Nm PEM_write_bio_PKCS7_stream
.Nd output PKCS7 structure in PEM format
.Sh SYNOPSIS
.In openssl/pkcs7.h
70
71
72
73
74
75
76
77
78


79
80
81
82
83
84
85
86
87
88
89
It is otherwise identical to the function
.Xr SMIME_write_PKCS7 3 .
.Pp
This function is effectively a version of
.Xr PEM_write_bio_PKCS7 3
supporting streaming.
.Sh RETURN VALUES
.Fn PEM_write_bio_PKCS7_stream
returns 1 for success or 0 for failure.


.Sh SEE ALSO
.Xr BIO_new 3 ,
.Xr ERR_get_error 3 ,
.Xr i2d_PKCS7_bio_stream 3 ,
.Xr PEM_write_PKCS7 3 ,
.Xr PKCS7_new 3 ,
.Xr SMIME_write_PKCS7 3
.Sh HISTORY
.Fn PEM_write_bio_PKCS7_stream
first appeared in OpenSSL 1.0.0 and has been available since
.Ox 4.9 .







<
|
>
>


<








70
71
72
73
74
75
76

77
78
79
80
81

82
83
84
85
86
87
88
89
It is otherwise identical to the function
.Xr SMIME_write_PKCS7 3 .
.Pp
This function is effectively a version of
.Xr PEM_write_bio_PKCS7 3
supporting streaming.
.Sh RETURN VALUES

Upon successful completion, 1 is returned;
otherwise 0 is returned and an error code can be retrieved with
.Xr ERR_get_error 3 .
.Sh SEE ALSO
.Xr BIO_new 3 ,

.Xr i2d_PKCS7_bio_stream 3 ,
.Xr PEM_write_PKCS7 3 ,
.Xr PKCS7_new 3 ,
.Xr SMIME_write_PKCS7 3
.Sh HISTORY
.Fn PEM_write_bio_PKCS7_stream
first appeared in OpenSSL 1.0.0 and has been available since
.Ox 4.9 .
Changes to jni/libressl/man/PKCS12_SAFEBAG_new.3.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
.\"	$OpenBSD: PKCS12_SAFEBAG_new.3,v 1.3 2018/03/21 17:57:48 schwarze Exp $
.\"
.\" Copyright (c) 2016 Ingo Schwarze <schwarze@openbsd.org>
.\"
.\" Permission to use, copy, modify, and distribute this software for any
.\" purpose with or without fee is hereby granted, provided that the above
.\" copyright notice and this permission notice appear in all copies.
.\"
.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
.Dd $Mdocdate: March 21 2018 $
.Dt PKCS12_SAFEBAG_NEW 3
.Os
.Sh NAME
.Nm PKCS12_SAFEBAG_new ,
.Nm PKCS12_SAFEBAG_free ,
.Nm PKCS12_BAGS_new ,
.Nm PKCS12_BAGS_free
|















|







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
.\"	$OpenBSD: PKCS12_SAFEBAG_new.3,v 1.4 2019/06/06 01:06:58 schwarze Exp $
.\"
.\" Copyright (c) 2016 Ingo Schwarze <schwarze@openbsd.org>
.\"
.\" Permission to use, copy, modify, and distribute this software for any
.\" purpose with or without fee is hereby granted, provided that the above
.\" copyright notice and this permission notice appear in all copies.
.\"
.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
.Dd $Mdocdate: June 6 2019 $
.Dt PKCS12_SAFEBAG_NEW 3
.Os
.Sh NAME
.Nm PKCS12_SAFEBAG_new ,
.Nm PKCS12_SAFEBAG_free ,
.Nm PKCS12_BAGS_new ,
.Nm PKCS12_BAGS_free
80
81
82
83
84
85
86

87
88
89
90
91
92
93
.Vt PKCS12_SAFEBAG
or
.Vt PKCS12_BAGS
object, respectively, or
.Dv NULL
if an error occurs.
.Sh SEE ALSO

.Xr PKCS12_new 3 ,
.Xr PKCS8_PRIV_KEY_INFO_new 3 ,
.Xr X509_ATTRIBUTE_new 3 ,
.Xr X509_CRL_new 3 ,
.Xr X509_new 3 ,
.Xr X509_SIG_new 3
.Sh STANDARDS







>







80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
.Vt PKCS12_SAFEBAG
or
.Vt PKCS12_BAGS
object, respectively, or
.Dv NULL
if an error occurs.
.Sh SEE ALSO
.Xr PKCS12_create 3 ,
.Xr PKCS12_new 3 ,
.Xr PKCS8_PRIV_KEY_INFO_new 3 ,
.Xr X509_ATTRIBUTE_new 3 ,
.Xr X509_CRL_new 3 ,
.Xr X509_new 3 ,
.Xr X509_SIG_new 3
.Sh STANDARDS
Changes to jni/libressl/man/PKCS12_create.3.
1
2
3
4
5
6
7
8
.\" $OpenBSD: PKCS12_create.3,v 1.7 2018/05/13 14:52:23 schwarze Exp $
.\" full merge up to: OpenSSL 05ea606a May 20 20:52:46 2016 -0400
.\" selective merge up to: OpenSSL 61f805c1 Jan 16 01:01:46 2018 +0800
.\"
.\" This file was written by Dr. Stephen Henson <steve@openssl.org>.
.\" Copyright (c) 2002, 2015 The OpenSSL Project.  All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
|







1
2
3
4
5
6
7
8
.\" $OpenBSD: PKCS12_create.3,v 1.9 2019/06/10 09:49:48 schwarze Exp $
.\" full merge up to: OpenSSL 05ea606a May 20 20:52:46 2016 -0400
.\" selective merge up to: OpenSSL 61f805c1 Jan 16 01:01:46 2018 +0800
.\"
.\" This file was written by Dr. Stephen Henson <steve@openssl.org>.
.\" Copyright (c) 2002, 2015 The OpenSSL Project.  All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: May 13 2018 $
.Dt PKCS12_CREATE 3
.Os
.Sh NAME
.Nm PKCS12_create
.Nd create a PKCS#12 structure
.Sh SYNOPSIS
.In openssl/pkcs12.h







|







45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: June 10 2019 $
.Dt PKCS12_CREATE 3
.Os
.Sh NAME
.Nm PKCS12_create
.Nd create a PKCS#12 structure
.Sh SYNOPSIS
.In openssl/pkcs12.h
159
160
161
162
163
164
165

166




167
168
169
170
171
172
173
.Fn PKCS12_create
returns a valid
.Vt PKCS12
structure or
.Dv NULL
if an error occurred.
.Sh SEE ALSO

.Xr d2i_PKCS12 3




.Sh HISTORY
.Fn PKCS12_create
first appeared in OpenSSL 0.9.3 and has been available since
.Ox 2.6 .
.Pp
Before OpenSSL 0.9.8, neither
.Fa pkey







>
|
>
>
>
>







159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
.Fn PKCS12_create
returns a valid
.Vt PKCS12
structure or
.Dv NULL
if an error occurred.
.Sh SEE ALSO
.Xr crypto 3 ,
.Xr d2i_PKCS12 3 ,
.Xr PKCS12_new 3 ,
.Xr PKCS12_newpass 3 ,
.Xr PKCS12_parse 3 ,
.Xr PKCS12_SAFEBAG_new 3
.Sh HISTORY
.Fn PKCS12_create
first appeared in OpenSSL 0.9.3 and has been available since
.Ox 2.6 .
.Pp
Before OpenSSL 0.9.8, neither
.Fa pkey
Changes to jni/libressl/man/PKCS12_new.3.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
.\"	$OpenBSD: PKCS12_new.3,v 1.3 2018/03/21 17:57:48 schwarze Exp $
.\"
.\" Copyright (c) 2016 Ingo Schwarze <schwarze@openbsd.org>
.\"
.\" Permission to use, copy, modify, and distribute this software for any
.\" purpose with or without fee is hereby granted, provided that the above
.\" copyright notice and this permission notice appear in all copies.
.\"
.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
.Dd $Mdocdate: March 21 2018 $
.Dt PKCS12_NEW 3
.Os
.Sh NAME
.Nm PKCS12_new ,
.Nm PKCS12_free ,
.Nm PKCS12_MAC_DATA_new ,
.Nm PKCS12_MAC_DATA_free
|















|







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
.\"	$OpenBSD: PKCS12_new.3,v 1.4 2019/06/06 01:06:58 schwarze Exp $
.\"
.\" Copyright (c) 2016 Ingo Schwarze <schwarze@openbsd.org>
.\"
.\" Permission to use, copy, modify, and distribute this software for any
.\" purpose with or without fee is hereby granted, provided that the above
.\" copyright notice and this permission notice appear in all copies.
.\"
.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
.Dd $Mdocdate: June 6 2019 $
.Dt PKCS12_NEW 3
.Os
.Sh NAME
.Nm PKCS12_new ,
.Nm PKCS12_free ,
.Nm PKCS12_MAC_DATA_new ,
.Nm PKCS12_MAC_DATA_free
79
80
81
82
83
84
85

86
87
88
89
90
91
92
93
94
95
96
97
98
object, respectively, or
.Dv NULL
if an error occurs.
.Sh SEE ALSO
.Xr d2i_PKCS12 3 ,
.Xr PKCS12_create 3 ,
.Xr PKCS12_newpass 3 ,

.Xr PKCS12_SAFEBAG_new 3 ,
.Xr PKCS7_new 3 ,
.Xr X509_SIG_new 3
.Sh STANDARDS
RFC 7292: PKCS #12: Personal Information Exchange Syntax
.Sh HISTORY
.Fn PKCS12_new ,
.Fn PKCS12_free ,
.Fn PKCS12_MAC_DATA_new ,
and
.Fn PKCS12_MAC_DATA_free
first appeared in OpenSSL 0.9.3 and have been available since
.Ox 2.6 .







>













79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
object, respectively, or
.Dv NULL
if an error occurs.
.Sh SEE ALSO
.Xr d2i_PKCS12 3 ,
.Xr PKCS12_create 3 ,
.Xr PKCS12_newpass 3 ,
.Xr PKCS12_parse 3 ,
.Xr PKCS12_SAFEBAG_new 3 ,
.Xr PKCS7_new 3 ,
.Xr X509_SIG_new 3
.Sh STANDARDS
RFC 7292: PKCS #12: Personal Information Exchange Syntax
.Sh HISTORY
.Fn PKCS12_new ,
.Fn PKCS12_free ,
.Fn PKCS12_MAC_DATA_new ,
and
.Fn PKCS12_MAC_DATA_free
first appeared in OpenSSL 0.9.3 and have been available since
.Ox 2.6 .
Changes to jni/libressl/man/PKCS12_newpass.3.
1
2
3
4
5
6
7
8
.\"	$OpenBSD: PKCS12_newpass.3,v 1.2 2018/03/22 16:06:33 schwarze Exp $
.\"	OpenSSL c95a8b4e May 5 14:26:26 2016 +0100
.\"
.\" This file was written by Jeffrey Walton <noloader@gmail.com>.
.\" Copyright (c) 2016 The OpenSSL Project.  All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
|







1
2
3
4
5
6
7
8
.\"	$OpenBSD: PKCS12_newpass.3,v 1.4 2019/06/14 13:59:32 schwarze Exp $
.\"	OpenSSL c95a8b4e May 5 14:26:26 2016 +0100
.\"
.\" This file was written by Jeffrey Walton <noloader@gmail.com>.
.\" Copyright (c) 2016 The OpenSSL Project.  All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: March 22 2018 $
.Dt PKCS12_NEWPASS 3
.Os
.Sh NAME
.Nm PKCS12_newpass
.Nd change the password of a PKCS#12 structure
.Sh SYNOPSIS
.In openssl/pkcs12.h







|







44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: June 14 2019 $
.Dt PKCS12_NEWPASS 3
.Os
.Sh NAME
.Nm PKCS12_newpass
.Nd change the password of a PKCS#12 structure
.Sh SYNOPSIS
.In openssl/pkcs12.h
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
.Pp
If the wrong password is used for
.Fa oldpass ,
the function will fail with a MAC verification error.
In rare cases, the PKCS#12 structure does not contain a MAC:
in this case it will usually fail with a decryption padding error.
.Sh RETURN VALUES
.Fn PKCS12_newpass
returns 1 on success or 0 on failure.
.Pp
Applications can retrieve the most recent error from
.Fn PKCS12_newpass
with
.Xr ERR_get_error 3 .
.Sh EXAMPLES
This example loads a PKCS#12 file, changes its password,
and writes out the result to a new file.
.Bd -literal
#include <stdio.h>
#include <stdlib.h>







<
|
<
<
<
|







88
89
90
91
92
93
94

95



96
97
98
99
100
101
102
103
.Pp
If the wrong password is used for
.Fa oldpass ,
the function will fail with a MAC verification error.
In rare cases, the PKCS#12 structure does not contain a MAC:
in this case it will usually fail with a decryption padding error.
.Sh RETURN VALUES

Upon successful completion, 1 is returned;



otherwise 0 is returned and an error code can be retrieved with
.Xr ERR_get_error 3 .
.Sh EXAMPLES
This example loads a PKCS#12 file, changes its password,
and writes out the result to a new file.
.Bd -literal
#include <stdio.h>
#include <stdlib.h>
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
	i2d_PKCS12_fp(fp, p12);
	PKCS12_free(p12);
	fclose(fp);
	return 0;
}
.Ed
.Sh SEE ALSO
.Xr ERR_get_error 3 ,
.Xr PKCS12_create 3
.Sh HISTORY
.Fn PKCS12_newpass
first appeared in OpenSSL 0.9.5 and has been available since
.Ox 2.7 .
.Sh BUGS
The password format is a NUL terminated ASCII string which is
converted to Unicode form internally.
As a result, some passwords cannot be supplied to this function.







|
|








139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
	i2d_PKCS12_fp(fp, p12);
	PKCS12_free(p12);
	fclose(fp);
	return 0;
}
.Ed
.Sh SEE ALSO
.Xr PKCS12_create 3 ,
.Xr PKCS12_new 3
.Sh HISTORY
.Fn PKCS12_newpass
first appeared in OpenSSL 0.9.5 and has been available since
.Ox 2.7 .
.Sh BUGS
The password format is a NUL terminated ASCII string which is
converted to Unicode form internally.
As a result, some passwords cannot be supplied to this function.
Changes to jni/libressl/man/PKCS12_parse.3.
1
2
3
4
5
6
7
8
.\"	$OpenBSD: PKCS12_parse.3,v 1.5 2018/03/21 17:57:48 schwarze Exp $
.\"	OpenSSL 99d63d46 Oct 26 13:56:48 2016 -0400
.\"
.\" This file was written by Dr. Stephen Henson <steve@openssl.org>.
.\" Copyright (c) 2002, 2009 The OpenSSL Project.  All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
|







1
2
3
4
5
6
7
8
.\"	$OpenBSD: PKCS12_parse.3,v 1.6 2019/06/06 01:06:58 schwarze Exp $
.\"	OpenSSL 99d63d46 Oct 26 13:56:48 2016 -0400
.\"
.\" This file was written by Dr. Stephen Henson <steve@openssl.org>.
.\" Copyright (c) 2002, 2009 The OpenSSL Project.  All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: March 21 2018 $
.Dt PKCS12_PARSE 3
.Os
.Sh NAME
.Nm PKCS12_parse
.Nd parse a PKCS#12 structure
.Sh SYNOPSIS
.In openssl/pkcs12.h







|







44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: June 6 2019 $
.Dt PKCS12_PARSE 3
.Os
.Sh NAME
.Nm PKCS12_parse
.Nd parse a PKCS#12 structure
.Sh SYNOPSIS
.In openssl/pkcs12.h
115
116
117
118
119
120
121
122


123
124
125
126
127
128
129
.Sh RETURN VALUES
.Fn PKCS12_parse
returns 1 for success and 0 if an error occurred.
.Pp
The error can be obtained from
.Xr ERR_get_error 3 .
.Sh SEE ALSO
.Xr d2i_PKCS12 3


.Sh HISTORY
.Fn PKCS12_parse
first appeared in OpenSSL 0.9.3 and has been available since
.Ox 2.6 .
.Sh BUGS
Only a single private key and corresponding certificate is returned by
this function.







|
>
>







115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
.Sh RETURN VALUES
.Fn PKCS12_parse
returns 1 for success and 0 if an error occurred.
.Pp
The error can be obtained from
.Xr ERR_get_error 3 .
.Sh SEE ALSO
.Xr d2i_PKCS12 3 ,
.Xr PKCS12_create 3 ,
.Xr PKCS12_new 3
.Sh HISTORY
.Fn PKCS12_parse
first appeared in OpenSSL 0.9.3 and has been available since
.Ox 2.6 .
.Sh BUGS
Only a single private key and corresponding certificate is returned by
this function.
Changes to jni/libressl/man/PKCS5_PBKDF2_HMAC.3.
1
2
3
4
5
6
7
8
.\"	$OpenBSD: PKCS5_PBKDF2_HMAC.3,v 1.6 2018/03/23 04:34:23 schwarze Exp $
.\"	OpenSSL b97fdb57 Nov 11 09:33:09 2016 +0100
.\"
.\" This file was written by Jeffrey Walton <noloader@gmail.com>.
.\" Copyright (c) 2014, 2015 The OpenSSL Project.  All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
|







1
2
3
4
5
6
7
8
.\"	$OpenBSD: PKCS5_PBKDF2_HMAC.3,v 1.9 2019/06/07 20:46:25 schwarze Exp $
.\"	OpenSSL b97fdb57 Nov 11 09:33:09 2016 +0100
.\"
.\" This file was written by Jeffrey Walton <noloader@gmail.com>.
.\" Copyright (c) 2014, 2015 The OpenSSL Project.  All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: March 23 2018 $
.Dt PKCS5_PBKDF2_HMAC 3
.Os
.Sh NAME
.Nm PKCS5_PBKDF2_HMAC ,
.Nm PKCS5_PBKDF2_HMAC_SHA1
.Nd password based derivation routines with salt and iteration count
.Sh SYNOPSIS







|







44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: June 7 2019 $
.Dt PKCS5_PBKDF2_HMAC 3
.Os
.Sh NAME
.Nm PKCS5_PBKDF2_HMAC ,
.Nm PKCS5_PBKDF2_HMAC_SHA1
.Nd password based derivation routines with salt and iteration count
.Sh SYNOPSIS
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
passwords.
.Sh RETURN VALUES
.Fn PKCS5_PBKDF2_HMAC
and
.Fn PBKCS5_PBKDF2_HMAC_SHA1
return 1 on success or 0 on error.
.Sh SEE ALSO
.Xr evp 3 ,
.Xr EVP_BytesToKey 3 ,
.Xr RAND_bytes 3
.Sh HISTORY
.Fn PKCS5_PBKDF2_HMAC_SHA1
first appeared in OpenSSL 0.9.4 and has been available since
.Ox 2.6 .
.Pp
.Fn PKCS5_PBKDF2_HMAC
first appeared in OpenSSL 1.0.0 and has been available since
.Ox 4.9 .







<

|








147
148
149
150
151
152
153

154
155
156
157
158
159
160
161
162
163
passwords.
.Sh RETURN VALUES
.Fn PKCS5_PBKDF2_HMAC
and
.Fn PBKCS5_PBKDF2_HMAC_SHA1
return 1 on success or 0 on error.
.Sh SEE ALSO

.Xr EVP_BytesToKey 3 ,
.Xr EVP_DigestInit 3
.Sh HISTORY
.Fn PKCS5_PBKDF2_HMAC_SHA1
first appeared in OpenSSL 0.9.4 and has been available since
.Ox 2.6 .
.Pp
.Fn PKCS5_PBKDF2_HMAC
first appeared in OpenSSL 1.0.0 and has been available since
.Ox 4.9 .
Changes to jni/libressl/man/PKCS7_decrypt.3.
1
2
3
4
5
6
7
8
.\"	$OpenBSD: PKCS7_decrypt.3,v 1.7 2018/03/22 16:06:33 schwarze Exp $
.\"	OpenSSL 99d63d46 Oct 26 13:56:48 2016 -0400
.\"
.\" This file was written by Dr. Stephen Henson <steve@openssl.org>.
.\" Copyright (c) 2002, 2006 The OpenSSL Project.  All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
|







1
2
3
4
5
6
7
8
.\"	$OpenBSD: PKCS7_decrypt.3,v 1.10 2019/06/10 14:58:48 schwarze Exp $
.\"	OpenSSL 99d63d46 Oct 26 13:56:48 2016 -0400
.\"
.\" This file was written by Dr. Stephen Henson <steve@openssl.org>.
.\" Copyright (c) 2002, 2006 The OpenSSL Project.  All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: March 22 2018 $
.Dt PKCS7_DECRYPT 3
.Os
.Sh NAME
.Nm PKCS7_decrypt
.Nd decrypt content from a PKCS#7 envelopedData structure
.Sh SYNOPSIS
.In openssl/pkcs7.h







|







44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: June 10 2019 $
.Dt PKCS7_DECRYPT 3
.Os
.Sh NAME
.Nm PKCS7_decrypt
.Nd decrypt content from a PKCS#7 envelopedData structure
.Sh SYNOPSIS
.In openssl/pkcs7.h
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107

108
109
110
111
112
113
114
.Fa data
is a
.Vt BIO
to write the content to and
.Fa flags
is an optional set of flags.
.Pp
.Xr OpenSSL_add_all_algorithms 3
(or equivalent) should be called before using this function or errors
about unknown algorithms will occur.
.Pp
Although the recipient's certificate is not needed to decrypt the data,
it is needed to locate the appropriate recipients
in the PKCS#7 structure.
.Pp
If the
.Dv PKCS7_TEXT
.Fa flag
is set, MIME headers for type
.Sy text/plain
are deleted from the content.
If the content is not of type
.Sy text/plain ,
an error is returned.
.Sh RETURN VALUES
.Fn PKCS7_decrypt
returns 1 for success or 0 for failure.
.Pp
The error can be obtained from
.Xr ERR_get_error 3 .
.Sh SEE ALSO
.Xr ERR_get_error 3 ,
.Xr PKCS7_encrypt 3 ,
.Xr PKCS7_new 3

.Sh HISTORY
.Fn PKCS7_decrypt
first appeared in OpenSSL 0.9.5 and has been available since
.Ox 2.7 .
.Sh BUGS
.Fn PKCS7_decrypt
must be passed the correct recipient key and certificate.







<
<
<
<




















<

|
>







74
75
76
77
78
79
80




81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100

101
102
103
104
105
106
107
108
109
110
.Fa data
is a
.Vt BIO
to write the content to and
.Fa flags
is an optional set of flags.
.Pp




Although the recipient's certificate is not needed to decrypt the data,
it is needed to locate the appropriate recipients
in the PKCS#7 structure.
.Pp
If the
.Dv PKCS7_TEXT
.Fa flag
is set, MIME headers for type
.Sy text/plain
are deleted from the content.
If the content is not of type
.Sy text/plain ,
an error is returned.
.Sh RETURN VALUES
.Fn PKCS7_decrypt
returns 1 for success or 0 for failure.
.Pp
The error can be obtained from
.Xr ERR_get_error 3 .
.Sh SEE ALSO

.Xr PKCS7_encrypt 3 ,
.Xr PKCS7_new 3 ,
.Xr PKCS7_verify 3
.Sh HISTORY
.Fn PKCS7_decrypt
first appeared in OpenSSL 0.9.5 and has been available since
.Ox 2.7 .
.Sh BUGS
.Fn PKCS7_decrypt
must be passed the correct recipient key and certificate.
Changes to jni/libressl/man/PKCS7_encrypt.3.
1
2
3
4
5
6
7
8
.\"	$OpenBSD: PKCS7_encrypt.3,v 1.8 2018/03/23 23:18:17 schwarze Exp $
.\"	OpenSSL 99d63d46 Oct 26 13:56:48 2016 -0400
.\"
.\" This file was written by Dr. Stephen Henson <steve@openssl.org>.
.\" Copyright (c) 2002, 2006, 2007, 2008, 2009 The OpenSSL Project.
.\" All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
|







1
2
3
4
5
6
7
8
.\"	$OpenBSD: PKCS7_encrypt.3,v 1.10 2019/06/10 14:58:48 schwarze Exp $
.\"	OpenSSL 99d63d46 Oct 26 13:56:48 2016 -0400
.\"
.\" This file was written by Dr. Stephen Henson <steve@openssl.org>.
.\" Copyright (c) 2002, 2006, 2007, 2008, 2009 The OpenSSL Project.
.\" All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: March 23 2018 $
.Dt PKCS7_ENCRYPT 3
.Os
.Sh NAME
.Nm PKCS7_encrypt
.Nd create a PKCS#7 envelopedData structure
.Sh SYNOPSIS
.In openssl/pkcs7.h







|







45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: June 10 2019 $
.Dt PKCS7_ENCRYPT 3
.Os
.Sh NAME
.Nm PKCS7_encrypt
.Nd create a PKCS#7 envelopedData structure
.Sh SYNOPSIS
.In openssl/pkcs7.h
150
151
152
153
154
155
156
157
158
159

160
161
162
163
164
165
166
167
.Vt PKCS7
structure or
.Dv NULL
if an error occurred.
The error can be obtained from
.Xr ERR_get_error 3 .
.Sh SEE ALSO
.Xr ERR_get_error 3 ,
.Xr PKCS7_decrypt 3 ,
.Xr PKCS7_new 3

.Sh HISTORY
.Fn PKCS7_encrypt
first appeared in OpenSSL 0.9.5 and has been available since
.Ox 2.7 .
.Pp
The
.Dv PKCS7_STREAM
flag was first supported in OpenSSL 1.0.0.







<

|
>








150
151
152
153
154
155
156

157
158
159
160
161
162
163
164
165
166
167
.Vt PKCS7
structure or
.Dv NULL
if an error occurred.
The error can be obtained from
.Xr ERR_get_error 3 .
.Sh SEE ALSO

.Xr PKCS7_decrypt 3 ,
.Xr PKCS7_new 3 ,
.Xr PKCS7_sign 3
.Sh HISTORY
.Fn PKCS7_encrypt
first appeared in OpenSSL 0.9.5 and has been available since
.Ox 2.7 .
.Pp
The
.Dv PKCS7_STREAM
flag was first supported in OpenSSL 1.0.0.
Changes to jni/libressl/man/PKCS7_new.3.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
.\"	$OpenBSD: PKCS7_new.3,v 1.4 2018/03/27 17:35:50 schwarze Exp $
.\"
.\" Copyright (c) 2016 Ingo Schwarze <schwarze@openbsd.org>
.\"
.\" Permission to use, copy, modify, and distribute this software for any
.\" purpose with or without fee is hereby granted, provided that the above
.\" copyright notice and this permission notice appear in all copies.
.\"
.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
.Dd $Mdocdate: March 27 2018 $
.Dt PKCS7_NEW 3
.Os
.Sh NAME
.Nm PKCS7_new ,
.Nm PKCS7_free ,
.Nm PKCS7_SIGNED_new ,
.Nm PKCS7_SIGNED_free ,
|















|







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
.\"	$OpenBSD: PKCS7_new.3,v 1.6 2019/06/10 09:49:48 schwarze Exp $
.\"
.\" Copyright (c) 2016 Ingo Schwarze <schwarze@openbsd.org>
.\"
.\" Permission to use, copy, modify, and distribute this software for any
.\" purpose with or without fee is hereby granted, provided that the above
.\" copyright notice and this permission notice appear in all copies.
.\"
.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
.Dd $Mdocdate: June 10 2019 $
.Dt PKCS7_NEW 3
.Os
.Sh NAME
.Nm PKCS7_new ,
.Nm PKCS7_free ,
.Nm PKCS7_SIGNED_new ,
.Nm PKCS7_SIGNED_free ,
237
238
239
240
241
242
243


244
245
246
247
248

249
250
251
252
253
254
255
256
257
258
259
objects and identifies a certificate by holding the distinguished
name of the certificate issuer and an issuer-specific certificate
serial number.
.Fn PKCS7_ISSUER_AND_SERIAL_free
frees
.Fa cert .
.Sh SEE ALSO


.Xr i2d_PKCS7_bio_stream 3 ,
.Xr PEM_read_PKCS7 3 ,
.Xr PEM_write_bio_PKCS7_stream 3 ,
.Xr PKCS7_decrypt 3 ,
.Xr PKCS7_encrypt 3 ,

.Xr PKCS7_sign 3 ,
.Xr PKCS7_sign_add_signer 3 ,
.Xr PKCS7_verify 3 ,
.Xr SMIME_read_PKCS7 3 ,
.Xr SMIME_write_PKCS7 3
.Sh STANDARDS
RFC 2315: PKCS #7: Cryptographic Message Syntax Version 1.5
.Sh HISTORY
These functions first appeared in SSLeay 0.5.1
and have been available since
.Ox 2.4 .







>
>





>











237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
objects and identifies a certificate by holding the distinguished
name of the certificate issuer and an issuer-specific certificate
serial number.
.Fn PKCS7_ISSUER_AND_SERIAL_free
frees
.Fa cert .
.Sh SEE ALSO
.Xr crypto 3 ,
.Xr d2i_PKCS7 3 ,
.Xr i2d_PKCS7_bio_stream 3 ,
.Xr PEM_read_PKCS7 3 ,
.Xr PEM_write_bio_PKCS7_stream 3 ,
.Xr PKCS7_decrypt 3 ,
.Xr PKCS7_encrypt 3 ,
.Xr PKCS7_ISSUER_AND_SERIAL_digest 3 ,
.Xr PKCS7_sign 3 ,
.Xr PKCS7_sign_add_signer 3 ,
.Xr PKCS7_verify 3 ,
.Xr SMIME_read_PKCS7 3 ,
.Xr SMIME_write_PKCS7 3
.Sh STANDARDS
RFC 2315: PKCS #7: Cryptographic Message Syntax Version 1.5
.Sh HISTORY
These functions first appeared in SSLeay 0.5.1
and have been available since
.Ox 2.4 .
Changes to jni/libressl/man/PKCS7_sign.3.
1
2
3
4
5
6
7
8
.\"	$OpenBSD: PKCS7_sign.3,v 1.8 2018/03/22 16:06:33 schwarze Exp $
.\"	OpenSSL 99d63d46 Oct 26 13:56:48 2016 -0400
.\"
.\" This file was written by Dr. Stephen Henson <steve@openssl.org>.
.\" Copyright (c) 2002, 2003, 2006-2009, 2015 The OpenSSL Project.
.\" All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
|







1
2
3
4
5
6
7
8
.\"	$OpenBSD: PKCS7_sign.3,v 1.10 2019/06/10 14:58:48 schwarze Exp $
.\"	OpenSSL 99d63d46 Oct 26 13:56:48 2016 -0400
.\"
.\" This file was written by Dr. Stephen Henson <steve@openssl.org>.
.\" Copyright (c) 2002, 2003, 2006-2009, 2015 The OpenSSL Project.
.\" All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: March 22 2018 $
.Dt PKCS7_SIGN 3
.Os
.Sh NAME
.Nm PKCS7_sign
.Nd create a PKCS#7 signedData structure
.Sh SYNOPSIS
.In openssl/pkcs7.h







|







45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: June 10 2019 $
.Dt PKCS7_SIGN 3
.Os
.Sh NAME
.Nm PKCS7_sign
.Nd create a PKCS#7 signedData structure
.Sh SYNOPSIS
.In openssl/pkcs7.h
221
222
223
224
225
226
227
228
229
230
231

232
233
234
235
236
237
238
239
240
241
242
243
244
.Fn PKCS7_sign
returns either a valid
.Vt PKCS7
structure or
.Dv NULL
if an error occurred.
The error can be obtained from
.Fn ERR_get_error 3 .
.Sh SEE ALSO
.Xr ERR_get_error 3 ,
.Xr PKCS7_new 3 ,

.Xr PKCS7_verify 3
.Sh HISTORY
.Fn PKCS7_sign
first appeared in OpenSSL 0.9.5 and have been available since
.Ox 2.7 .
.Pp
The
.Dv PKCS7_PARTIAL
and
.Dv PKCS7_STREAM
flags were added in OpenSSL 1.0.0.
.Sh BUGS
Some advanced attributes such as counter signatures are not supported.







|

|

>













221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
.Fn PKCS7_sign
returns either a valid
.Vt PKCS7
structure or
.Dv NULL
if an error occurred.
The error can be obtained from
.Xr ERR_get_error 3 .
.Sh SEE ALSO
.Xr PKCS7_encrypt 3 ,
.Xr PKCS7_new 3 ,
.Xr PKCS7_sign_add_signer 3 ,
.Xr PKCS7_verify 3
.Sh HISTORY
.Fn PKCS7_sign
first appeared in OpenSSL 0.9.5 and have been available since
.Ox 2.7 .
.Pp
The
.Dv PKCS7_PARTIAL
and
.Dv PKCS7_STREAM
flags were added in OpenSSL 1.0.0.
.Sh BUGS
Some advanced attributes such as counter signatures are not supported.
Changes to jni/libressl/man/PKCS7_sign_add_signer.3.
1
2
3
4
5
6
7
8
.\"	$OpenBSD: PKCS7_sign_add_signer.3,v 1.8 2018/03/23 04:34:23 schwarze Exp $
.\"	OpenSSL 99d63d46 Oct 26 13:56:48 2016 -0400
.\"
.\" This file was written by Dr. Stephen Henson <steve@openssl.org>.
.\" Copyright (c) 2007, 2008, 2009, 2015 The OpenSSL Project.
.\" All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
|







1
2
3
4
5
6
7
8
.\"	$OpenBSD: PKCS7_sign_add_signer.3,v 1.10 2019/06/14 13:59:32 schwarze Exp $
.\"	OpenSSL 99d63d46 Oct 26 13:56:48 2016 -0400
.\"
.\" This file was written by Dr. Stephen Henson <steve@openssl.org>.
.\" Copyright (c) 2007, 2008, 2009, 2015 The OpenSSL Project.
.\" All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: March 23 2018 $
.Dt PKCS7_SIGN_ADD_SIGNER 3
.Os
.Sh NAME
.Nm PKCS7_sign_add_signer
.Nd add a signer PKCS7 signed data structure
.Sh SYNOPSIS
.In openssl/pkcs7.h







|







45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: June 14 2019 $
.Dt PKCS7_SIGN_ADD_SIGNER 3
.Os
.Sh NAME
.Nm PKCS7_sign_add_signer
.Nd add a signer PKCS7 signed data structure
.Sh SYNOPSIS
.In openssl/pkcs7.h
166
167
168
169
170
171
172


173
174
175
176
177
178
179
180
.Sh RETURN VALUES
.Fn PKCS7_sign_add_signer
returns an internal pointer to the
.Vt PKCS7_SIGNER_INFO
structure just added or
.Dv NULL
if an error occurs.


.Sh SEE ALSO
.Xr ERR_get_error 3 ,
.Xr PKCS7_new 3 ,
.Xr PKCS7_sign 3
.Sh HISTORY
.Fn PKCS7_sign_add_signer
first appeared in OpenSSL 1.0.0 and has been available since
.Ox 4.9 .







>
>

|






166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
.Sh RETURN VALUES
.Fn PKCS7_sign_add_signer
returns an internal pointer to the
.Vt PKCS7_SIGNER_INFO
structure just added or
.Dv NULL
if an error occurs.
In some cases of failure, the reason can be determined with
.Xr ERR_get_error 3 .
.Sh SEE ALSO
.Xr EVP_DigestInit 3 ,
.Xr PKCS7_new 3 ,
.Xr PKCS7_sign 3
.Sh HISTORY
.Fn PKCS7_sign_add_signer
first appeared in OpenSSL 1.0.0 and has been available since
.Ox 4.9 .
Changes to jni/libressl/man/PKCS7_verify.3.
1
2
3
4
5
6
7
8
.\"	$OpenBSD: PKCS7_verify.3,v 1.7 2018/03/22 16:06:33 schwarze Exp $
.\"	OpenSSL a528d4f0 Oct 27 13:40:11 2015 -0400
.\"
.\" This file was written by Dr. Stephen Henson <steve@openssl.org>.
.\" Copyright (c) 2002, 2006, 2013, 2014, 2015 The OpenSSL Project.  All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
|







1
2
3
4
5
6
7
8
.\"	$OpenBSD: PKCS7_verify.3,v 1.9 2019/06/10 14:58:48 schwarze Exp $
.\"	OpenSSL a528d4f0 Oct 27 13:40:11 2015 -0400
.\"
.\" This file was written by Dr. Stephen Henson <steve@openssl.org>.
.\" Copyright (c) 2002, 2006, 2013, 2014, 2015 The OpenSSL Project.  All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: March 22 2018 $
.Dt PKCS7_VERIFY 3
.Os
.Sh NAME
.Nm PKCS7_verify ,
.Nm PKCS7_get0_signers
.Nd verify a PKCS#7 signedData structure
.Sh SYNOPSIS







|







44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: June 10 2019 $
.Dt PKCS7_VERIFY 3
.Os
.Sh NAME
.Nm PKCS7_verify ,
.Nm PKCS7_get0_signers
.Nd verify a PKCS#7 signedData structure
.Sh SYNOPSIS
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
returns all signers or
.Dv NULL
if an error occurred.
.Pp
The error can be obtained from
.Xr ERR_get_error 3 .
.Sh SEE ALSO
.Xr ERR_get_error 3 ,
.Xr PKCS7_new 3 ,
.Xr PKCS7_sign 3 ,
.Xr X509_STORE_new 3
.Sh HISTORY
.Fn PKCS7_verify
and
.Fn PKCS7_get0_signers







|







220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
returns all signers or
.Dv NULL
if an error occurred.
.Pp
The error can be obtained from
.Xr ERR_get_error 3 .
.Sh SEE ALSO
.Xr PKCS7_decrypt 3 ,
.Xr PKCS7_new 3 ,
.Xr PKCS7_sign 3 ,
.Xr X509_STORE_new 3
.Sh HISTORY
.Fn PKCS7_verify
and
.Fn PKCS7_get0_signers
Changes to jni/libressl/man/PKCS8_PRIV_KEY_INFO_new.3.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
.\"	$OpenBSD: PKCS8_PRIV_KEY_INFO_new.3,v 1.3 2018/03/21 17:57:48 schwarze Exp $
.\"
.\" Copyright (c) 2016 Ingo Schwarze <schwarze@openbsd.org>
.\"
.\" Permission to use, copy, modify, and distribute this software for any
.\" purpose with or without fee is hereby granted, provided that the above
.\" copyright notice and this permission notice appear in all copies.
.\"
.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
.Dd $Mdocdate: March 21 2018 $
.Dt PKCS8_PRIV_KEY_INFO_NEW 3
.Os
.Sh NAME
.Nm PKCS8_PRIV_KEY_INFO_new ,
.Nm PKCS8_PRIV_KEY_INFO_free
.Nd PKCS#8 private key information
.Sh SYNOPSIS
|















|







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
.\"	$OpenBSD: PKCS8_PRIV_KEY_INFO_new.3,v 1.4 2019/06/06 01:06:59 schwarze Exp $
.\"
.\" Copyright (c) 2016 Ingo Schwarze <schwarze@openbsd.org>
.\"
.\" Permission to use, copy, modify, and distribute this software for any
.\" purpose with or without fee is hereby granted, provided that the above
.\" copyright notice and this permission notice appear in all copies.
.\"
.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
.Dd $Mdocdate: June 6 2019 $
.Dt PKCS8_PRIV_KEY_INFO_NEW 3
.Os
.Sh NAME
.Nm PKCS8_PRIV_KEY_INFO_new ,
.Nm PKCS8_PRIV_KEY_INFO_free
.Nd PKCS#8 private key information
.Sh SYNOPSIS
45
46
47
48
49
50
51

52
53
54
55
56
57
58
59
60
61
62
returns the new
.Vt PKCS8_PRIV_KEY_INFO
object or
.Dv NULL
if an error occurs.
.Sh SEE ALSO
.Xr d2i_PKCS8PrivateKey_bio 3 ,

.Xr PEM_read_PKCS8_PRIV_KEY_INFO 3 ,
.Xr PKCS12_parse 3 ,
.Xr X509_ATTRIBUTE_new 3
.Sh STANDARDS
RFC 5208: PKCS#8: Private-Key Information Syntax Specification
.Sh HISTORY
.Fn PKCS8_PRIV_KEY_INFO_new
and
.Fn PKCS8_PRIV_KEY_INFO_free
first appeared in OpenSSL 0.9.3 and have been available since
.Ox 2.6 .







>











45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
returns the new
.Vt PKCS8_PRIV_KEY_INFO
object or
.Dv NULL
if an error occurs.
.Sh SEE ALSO
.Xr d2i_PKCS8PrivateKey_bio 3 ,
.Xr EVP_PKEY_asn1_set_private 3 ,
.Xr PEM_read_PKCS8_PRIV_KEY_INFO 3 ,
.Xr PKCS12_parse 3 ,
.Xr X509_ATTRIBUTE_new 3
.Sh STANDARDS
RFC 5208: PKCS#8: Private-Key Information Syntax Specification
.Sh HISTORY
.Fn PKCS8_PRIV_KEY_INFO_new
and
.Fn PKCS8_PRIV_KEY_INFO_free
first appeared in OpenSSL 0.9.3 and have been available since
.Ox 2.6 .
Changes to jni/libressl/man/PKEY_USAGE_PERIOD_new.3.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
.\"	$OpenBSD: PKEY_USAGE_PERIOD_new.3,v 1.4 2018/03/21 16:09:51 schwarze Exp $
.\"
.\" Copyright (c) 2016 Ingo Schwarze <schwarze@openbsd.org>
.\"
.\" Permission to use, copy, modify, and distribute this software for any
.\" purpose with or without fee is hereby granted, provided that the above
.\" copyright notice and this permission notice appear in all copies.
.\"
.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
.Dd $Mdocdate: March 21 2018 $
.Dt PKEY_USAGE_PERIOD_NEW 3
.Os
.Sh NAME
.Nm PKEY_USAGE_PERIOD_new ,
.Nm PKEY_USAGE_PERIOD_free
.Nd X.509 certificate private key usage period extension
.Sh SYNOPSIS
|















|







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
.\"	$OpenBSD: PKEY_USAGE_PERIOD_new.3,v 1.5 2019/06/06 01:06:59 schwarze Exp $
.\"
.\" Copyright (c) 2016 Ingo Schwarze <schwarze@openbsd.org>
.\"
.\" Permission to use, copy, modify, and distribute this software for any
.\" purpose with or without fee is hereby granted, provided that the above
.\" copyright notice and this permission notice appear in all copies.
.\"
.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
.Dd $Mdocdate: June 6 2019 $
.Dt PKEY_USAGE_PERIOD_NEW 3
.Os
.Sh NAME
.Nm PKEY_USAGE_PERIOD_new ,
.Nm PKEY_USAGE_PERIOD_free
.Nd X.509 certificate private key usage period extension
.Sh SYNOPSIS
46
47
48
49
50
51
52

53
54
55
56
57
58
59
.Fn PKEY_USAGE_PERIOD_new
returns the new
.Vt PKEY_USAGE_PERIOD
object or
.Dv NULL
if an error occurs.
.Sh SEE ALSO

.Xr EXTENDED_KEY_USAGE_new 3 ,
.Xr X509_CINF_new 3 ,
.Xr X509_EXTENSION_new 3 ,
.Xr X509_new 3
.Sh STANDARDS
RFC 3280: Internet X.509 Public Key Infrastructure Certificate and
Certificate Revocation List (CRL) Profile,







>







46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
.Fn PKEY_USAGE_PERIOD_new
returns the new
.Vt PKEY_USAGE_PERIOD
object or
.Dv NULL
if an error occurs.
.Sh SEE ALSO
.Xr d2i_PKEY_USAGE_PERIOD 3 ,
.Xr EXTENDED_KEY_USAGE_new 3 ,
.Xr X509_CINF_new 3 ,
.Xr X509_EXTENSION_new 3 ,
.Xr X509_new 3
.Sh STANDARDS
RFC 3280: Internet X.509 Public Key Infrastructure Certificate and
Certificate Revocation List (CRL) Profile,
Changes to jni/libressl/man/POLICYINFO_new.3.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
.\"	$OpenBSD: POLICYINFO_new.3,v 1.5 2018/03/23 00:09:11 schwarze Exp $
.\"
.\" Copyright (c) 2016 Ingo Schwarze <schwarze@openbsd.org>
.\"
.\" Permission to use, copy, modify, and distribute this software for any
.\" purpose with or without fee is hereby granted, provided that the above
.\" copyright notice and this permission notice appear in all copies.
.\"
.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
.Dd $Mdocdate: March 23 2018 $
.Dt POLICYINFO_NEW 3
.Os
.Sh NAME
.Nm POLICYINFO_new ,
.Nm POLICYINFO_free ,
.Nm CERTIFICATEPOLICIES_new ,
.Nm CERTIFICATEPOLICIES_free ,
|















|







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
.\"	$OpenBSD: POLICYINFO_new.3,v 1.7 2019/06/06 17:41:43 schwarze Exp $
.\"
.\" Copyright (c) 2016 Ingo Schwarze <schwarze@openbsd.org>
.\"
.\" Permission to use, copy, modify, and distribute this software for any
.\" purpose with or without fee is hereby granted, provided that the above
.\" copyright notice and this permission notice appear in all copies.
.\"
.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
.Dd $Mdocdate: June 6 2019 $
.Dt POLICYINFO_NEW 3
.Os
.Sh NAME
.Nm POLICYINFO_new ,
.Nm POLICYINFO_free ,
.Nm CERTIFICATEPOLICIES_new ,
.Nm CERTIFICATEPOLICIES_free ,
171
172
173
174
175
176
177

178
179
180
181
182
183
184
.Sh RETURN VALUES
The constructor functions return a new object of the respective
type or
.Dv NULL
if an error occurs.
.Sh SEE ALSO
.Xr BASIC_CONSTRAINTS_new 3 ,

.Xr NAME_CONSTRAINTS_new 3 ,
.Xr X509_EXTENSION_new 3 ,
.Xr X509_new 3
.Sh STANDARDS
RFC 5280: Internet X.509 Public Key Infrastructure Certificate and
Certificate Revocation List (CRL) Profile:
.Bl -dash -compact







>







171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
.Sh RETURN VALUES
The constructor functions return a new object of the respective
type or
.Dv NULL
if an error occurs.
.Sh SEE ALSO
.Xr BASIC_CONSTRAINTS_new 3 ,
.Xr d2i_POLICYINFO 3 ,
.Xr NAME_CONSTRAINTS_new 3 ,
.Xr X509_EXTENSION_new 3 ,
.Xr X509_new 3
.Sh STANDARDS
RFC 5280: Internet X.509 Public Key Infrastructure Certificate and
Certificate Revocation List (CRL) Profile:
.Bl -dash -compact
Changes to jni/libressl/man/PROXY_POLICY_new.3.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
.\"	$OpenBSD: PROXY_POLICY_new.3,v 1.3 2018/03/22 22:07:12 schwarze Exp $
.\"
.\" Copyright (c) 2016 Ingo Schwarze <schwarze@openbsd.org>
.\"
.\" Permission to use, copy, modify, and distribute this software for any
.\" purpose with or without fee is hereby granted, provided that the above
.\" copyright notice and this permission notice appear in all copies.
.\"
.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
.Dd $Mdocdate: March 22 2018 $
.Dt PROXY_POLICY_NEW 3
.Os
.Sh NAME
.Nm PROXY_POLICY_new ,
.Nm PROXY_POLICY_free ,
.Nm PROXY_CERT_INFO_EXTENSION_new ,
.Nm PROXY_CERT_INFO_EXTENSION_free
|















|







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
.\"	$OpenBSD: PROXY_POLICY_new.3,v 1.5 2019/06/06 17:41:43 schwarze Exp $
.\"
.\" Copyright (c) 2016 Ingo Schwarze <schwarze@openbsd.org>
.\"
.\" Permission to use, copy, modify, and distribute this software for any
.\" purpose with or without fee is hereby granted, provided that the above
.\" copyright notice and this permission notice appear in all copies.
.\"
.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
.Dd $Mdocdate: June 6 2019 $
.Dt PROXY_POLICY_NEW 3
.Os
.Sh NAME
.Nm PROXY_POLICY_new ,
.Nm PROXY_POLICY_free ,
.Nm PROXY_CERT_INFO_EXTENSION_new ,
.Nm PROXY_CERT_INFO_EXTENSION_free
78
79
80
81
82
83
84

85
86
87
88
89
90
91
92
93
94
95
or
.Vt PROXY_CERT_INFO_EXTENSION
object, respectively, or
.Dv NULL
if an error occurs.
.Sh SEE ALSO
.Xr BASIC_CONSTRAINTS_new 3 ,

.Xr EXTENDED_KEY_USAGE_new 3 ,
.Xr POLICYINFO_new 3 ,
.Xr X509_EXTENSION_new 3 ,
.Xr X509_new 3
.Sh STANDARDS
RFC 3820: Internet X.509 Public Key Infrastructure (PKI) Proxy
Certificate Profile
.Sh HISTORY
These functions first appeared in OpenSSL 0.9.7g
and have been available since
.Ox 3.8 .







>











78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
or
.Vt PROXY_CERT_INFO_EXTENSION
object, respectively, or
.Dv NULL
if an error occurs.
.Sh SEE ALSO
.Xr BASIC_CONSTRAINTS_new 3 ,
.Xr d2i_PROXY_POLICY 3 ,
.Xr EXTENDED_KEY_USAGE_new 3 ,
.Xr POLICYINFO_new 3 ,
.Xr X509_EXTENSION_new 3 ,
.Xr X509_new 3
.Sh STANDARDS
RFC 3820: Internet X.509 Public Key Infrastructure (PKI) Proxy
Certificate Profile
.Sh HISTORY
These functions first appeared in OpenSSL 0.9.7g
and have been available since
.Ox 3.8 .
Changes to jni/libressl/man/RC4.3.
1
2
3
4
5
6
7
8
.\"	$OpenBSD: RC4.3,v 1.6 2018/03/27 17:35:50 schwarze Exp $
.\"	OpenSSL 99d63d46 Oct 26 13:56:48 2016 -0400
.\"
.\" This file was written by Ulf Moeller <ulf@openssl.org>.
.\" Copyright (c) 2000 The OpenSSL Project.  All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
|







1
2
3
4
5
6
7
8
.\"	$OpenBSD: RC4.3,v 1.7 2019/06/06 01:06:59 schwarze Exp $
.\"	OpenSSL 99d63d46 Oct 26 13:56:48 2016 -0400
.\"
.\" This file was written by Ulf Moeller <ulf@openssl.org>.
.\" Copyright (c) 2000 The OpenSSL Project.  All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: March 27 2018 $
.Dt RC4 3
.Os
.Sh NAME
.Nm RC4_set_key ,
.Nm RC4
.Nd RC4 encryption
.Sh SYNOPSIS







|







44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: June 6 2019 $
.Dt RC4 3
.Os
.Sh NAME
.Nm RC4_set_key ,
.Nm RC4
.Nd RC4 encryption
.Sh SYNOPSIS
115
116
117
118
119
120
121
122

123
124
125
126
127
128
129
130
.Sh RETURN VALUES
.Fn RC4_set_key
and
.Fn RC4
do not return values.
.Sh SEE ALSO
.Xr blowfish 3 ,
.Xr EVP_EncryptInit 3

.Sh HISTORY
.Fn RC4_set_key
and
.Fn RC4
appeared in SSLeay 0.4 or earlier and have been available since
.Ox 2.4 .
.Sh BUGS
This cipher is broken and should no longer be used.







|
>








115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
.Sh RETURN VALUES
.Fn RC4_set_key
and
.Fn RC4
do not return values.
.Sh SEE ALSO
.Xr blowfish 3 ,
.Xr EVP_EncryptInit 3 ,
.Xr EVP_rc4 3
.Sh HISTORY
.Fn RC4_set_key
and
.Fn RC4
appeared in SSLeay 0.4 or earlier and have been available since
.Ox 2.4 .
.Sh BUGS
This cipher is broken and should no longer be used.
Changes to jni/libressl/man/RIPEMD160.3.
1
2
3
4
5
6
7
8
9
.\" $OpenBSD: RIPEMD160.3,v 1.6 2018/03/21 07:16:31 schwarze Exp $
.\" full merge up to: OpenSSL bbda8ce9 Oct 31 15:43:01 2017 +0800
.\"
.\" This file was written by Ulf Moeller <ulf@openssl.org>.
.\" Copyright (c) 2000, 2006, 2014 The OpenSSL Project.  All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
|
|







1
2
3
4
5
6
7
8
9
.\" $OpenBSD: RIPEMD160.3,v 1.7 2019/08/25 15:17:19 schwarze Exp $
.\" full merge up to: OpenSSL 72a7a702 Feb 26 14:05:09 2019 +0000
.\"
.\" This file was written by Ulf Moeller <ulf@openssl.org>.
.\" Copyright (c) 2000, 2006, 2014 The OpenSSL Project.  All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: March 21 2018 $
.Dt RIPEMD160 3
.Os
.Sh NAME
.Nm RIPEMD160 ,
.Nm RIPEMD160_Init ,
.Nm RIPEMD160_Update ,
.Nm RIPEMD160_Final







|







44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: August 25 2019 $
.Dt RIPEMD160 3
.Os
.Sh NAME
.Nm RIPEMD160 ,
.Nm RIPEMD160_Init ,
.Nm RIPEMD160_Update ,
.Nm RIPEMD160_Final
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
.Fc
.Ft int
.Fo RIPEMD160_Init
.Fa "RIPEMD160_CTX *c"
.Fc
.Ft int
.Fo RIPEMD160_Update
.Fa "RIPEMD_CTX *c"
.Fa "const void *data"
.Fa "unsigned long len"
.Fc
.Ft int
.Fo RIPEMD160_Final
.Fa "unsigned char *md"
.Fa "RIPEMD160_CTX *c"







|







67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
.Fc
.Ft int
.Fo RIPEMD160_Init
.Fa "RIPEMD160_CTX *c"
.Fc
.Ft int
.Fo RIPEMD160_Update
.Fa "RIPEMD160_CTX *c"
.Fa "const void *data"
.Fa "unsigned long len"
.Fc
.Ft int
.Fo RIPEMD160_Final
.Fa "unsigned char *md"
.Fa "RIPEMD160_CTX *c"
Changes to jni/libressl/man/RSA_PSS_PARAMS_new.3.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
.\"	$OpenBSD: RSA_PSS_PARAMS_new.3,v 1.3 2018/03/23 05:48:56 schwarze Exp $
.\"
.\" Copyright (c) 2016 Ingo Schwarze <schwarze@openbsd.org>
.\"
.\" Permission to use, copy, modify, and distribute this software for any
.\" purpose with or without fee is hereby granted, provided that the above
.\" copyright notice and this permission notice appear in all copies.
.\"
.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
.Dd $Mdocdate: March 23 2018 $
.Dt RSA_PSS_PARAMS_NEW 3
.Os
.Sh NAME
.Nm RSA_PSS_PARAMS_new ,
.Nm RSA_PSS_PARAMS_free
.Nd probabilistic signature scheme with RSA hashing
.Sh SYNOPSIS
|















|







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
.\"	$OpenBSD: RSA_PSS_PARAMS_new.3,v 1.4 2019/06/06 01:06:59 schwarze Exp $
.\"
.\" Copyright (c) 2016 Ingo Schwarze <schwarze@openbsd.org>
.\"
.\" Permission to use, copy, modify, and distribute this software for any
.\" purpose with or without fee is hereby granted, provided that the above
.\" copyright notice and this permission notice appear in all copies.
.\"
.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
.Dd $Mdocdate: June 6 2019 $
.Dt RSA_PSS_PARAMS_NEW 3
.Os
.Sh NAME
.Nm RSA_PSS_PARAMS_new ,
.Nm RSA_PSS_PARAMS_free
.Nd probabilistic signature scheme with RSA hashing
.Sh SYNOPSIS
43
44
45
46
47
48
49

50
51
52
53
54
55
56
57
58
59
.Fn RSA_PSS_PARAMS_new
returns the new
.Vt RSA_PSS_PARAMS
object or
.Dv NULL
if an error occurs.
.Sh SEE ALSO

.Xr RSA_padding_add_PKCS1_type_1 3 ,
.Xr X509_sign 3
.Sh STANDARDS
RFC 8017: PKCS#1: RSA Cryptography Specifications Version 2.2
.Sh HISTORY
.Fn RSA_PSS_PARAMS_new
and
.Fn RSA_PSS_PARAMS_free
first appeared in OpenSSL 1.0.1 and have been available since
.Ox 5.3 .







>










43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
.Fn RSA_PSS_PARAMS_new
returns the new
.Vt RSA_PSS_PARAMS
object or
.Dv NULL
if an error occurs.
.Sh SEE ALSO
.Xr RSA_new 3 ,
.Xr RSA_padding_add_PKCS1_type_1 3 ,
.Xr X509_sign 3
.Sh STANDARDS
RFC 8017: PKCS#1: RSA Cryptography Specifications Version 2.2
.Sh HISTORY
.Fn RSA_PSS_PARAMS_new
and
.Fn RSA_PSS_PARAMS_free
first appeared in OpenSSL 1.0.1 and have been available since
.Ox 5.3 .
Changes to jni/libressl/man/RSA_blinding_on.3.
1
2
3
4
5
6
7
8
.\"	$OpenBSD: RSA_blinding_on.3,v 1.5 2018/03/21 07:25:59 schwarze Exp $
.\"	OpenSSL 99d63d46 Oct 26 13:56:48 2016 -0400
.\"
.\" This file was written by Ulf Moeller <ulf@openssl.org>.
.\" Copyright (c) 2000 The OpenSSL Project.  All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
|







1
2
3
4
5
6
7
8
.\"	$OpenBSD: RSA_blinding_on.3,v 1.6 2019/06/06 01:06:59 schwarze Exp $
.\"	OpenSSL 99d63d46 Oct 26 13:56:48 2016 -0400
.\"
.\" This file was written by Ulf Moeller <ulf@openssl.org>.
.\" Copyright (c) 2000 The OpenSSL Project.  All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: March 21 2018 $
.Dt RSA_BLINDING_ON 3
.Os
.Sh NAME
.Nm RSA_blinding_on ,
.Nm RSA_blinding_off
.Nd protect the RSA operation from timing attacks
.Sh SYNOPSIS







|







44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: June 6 2019 $
.Dt RSA_BLINDING_ON 3
.Os
.Sh NAME
.Nm RSA_blinding_on ,
.Nm RSA_blinding_off
.Nd protect the RSA operation from timing attacks
.Sh SYNOPSIS
84
85
86
87
88
89
90

91
92
93
94
95
96
97
.Pp
.Fn RSA_blinding_off
turns blinding off and frees the memory used for the blinding factor.
.Sh RETURN VALUES
.Fn RSA_blinding_on
returns 1 on success, and 0 if an error occurred.
.Sh SEE ALSO

.Xr RSA_new 3
.Sh HISTORY
.Fn RSA_blinding_on
and
.Fn RSA_blinding_off
first appeared in SSLeay 0.9.0 and have been available since
.Ox 2.4 .







>







84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
.Pp
.Fn RSA_blinding_off
turns blinding off and frees the memory used for the blinding factor.
.Sh RETURN VALUES
.Fn RSA_blinding_on
returns 1 on success, and 0 if an error occurred.
.Sh SEE ALSO
.Xr BN_BLINDING_new 3 ,
.Xr RSA_new 3
.Sh HISTORY
.Fn RSA_blinding_on
and
.Fn RSA_blinding_off
first appeared in SSLeay 0.9.0 and have been available since
.Ox 2.4 .
Changes to jni/libressl/man/RSA_check_key.3.
1
2
3
4
5
6
7
8
.\"	$OpenBSD: RSA_check_key.3,v 1.6 2018/03/21 21:18:08 schwarze Exp $
.\"	OpenSSL 6859cf74 Sep 25 13:33:28 2002 +0000
.\"
.\" This file was written by Ulf Moeller <ulf@openssl.org> and
.\" Geoff Thorpe <geoff@openssl.org>.
.\" Copyright (c) 2000, 2002 The OpenSSL Project.  All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
|







1
2
3
4
5
6
7
8
.\"	$OpenBSD: RSA_check_key.3,v 1.7 2019/06/10 14:58:48 schwarze Exp $
.\"	OpenSSL 6859cf74 Sep 25 13:33:28 2002 +0000
.\"
.\" This file was written by Ulf Moeller <ulf@openssl.org> and
.\" Geoff Thorpe <geoff@openssl.org>.
.\" Copyright (c) 2000, 2002 The OpenSSL Project.  All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: March 21 2018 $
.Dt RSA_CHECK_KEY 3
.Os
.Sh NAME
.Nm RSA_check_key
.Nd validate private RSA keys
.Sh SYNOPSIS
.In openssl/rsa.h







|







45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: June 10 2019 $
.Dt RSA_CHECK_KEY 3
.Os
.Sh NAME
.Nm RSA_check_key
.Nd validate private RSA keys
.Sh SYNOPSIS
.In openssl/rsa.h
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
-1 is returned if an error occurs while checking the key.
.Pp
If the key is invalid or an error occurred, the reason code can be
obtained using
.Xr ERR_get_error 3 .
.Sh SEE ALSO
.Xr BN_is_prime_ex 3 ,
.Xr ERR_get_error 3 ,
.Xr RSA_get0_key 3 ,
.Xr RSA_new 3
.Sh HISTORY
.Fn RSA_check_key
first appeared in OpenSSL 0.9.4 and has been available since
.Ox 2.6 .
.Sh BUGS







<







121
122
123
124
125
126
127

128
129
130
131
132
133
134
-1 is returned if an error occurs while checking the key.
.Pp
If the key is invalid or an error occurred, the reason code can be
obtained using
.Xr ERR_get_error 3 .
.Sh SEE ALSO
.Xr BN_is_prime_ex 3 ,

.Xr RSA_get0_key 3 ,
.Xr RSA_new 3
.Sh HISTORY
.Fn RSA_check_key
first appeared in OpenSSL 0.9.4 and has been available since
.Ox 2.6 .
.Sh BUGS
Changes to jni/libressl/man/RSA_generate_key.3.
1
2
3
4
5
6
7
8
.\"	$OpenBSD: RSA_generate_key.3,v 1.11 2018/03/27 17:35:50 schwarze Exp $
.\"	OpenSSL RSA_generate_key.pod bb6c5e7f Feb 5 10:29:22 2017 -0500
.\"
.\" This file was written by Ulf Moeller <ulf@openssl.org>.
.\" Copyright (c) 2000, 2002, 2013 The OpenSSL Project.  All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
|







1
2
3
4
5
6
7
8
.\"	$OpenBSD: RSA_generate_key.3,v 1.13 2019/06/10 14:58:48 schwarze Exp $
.\"	OpenSSL RSA_generate_key.pod bb6c5e7f Feb 5 10:29:22 2017 -0500
.\"
.\" This file was written by Ulf Moeller <ulf@openssl.org>.
.\" Copyright (c) 2000, 2002, 2013 The OpenSSL Project.  All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: March 27 2018 $
.Dt RSA_GENERATE_KEY 3
.Os
.Sh NAME
.Nm RSA_generate_key_ex ,
.Nm RSA_generate_key
.Nd generate RSA key pair
.Sh SYNOPSIS







|







44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: June 10 2019 $
.Dt RSA_GENERATE_KEY 3
.Os
.Sh NAME
.Nm RSA_generate_key_ex ,
.Nm RSA_generate_key
.Nd generate RSA key pair
.Sh SYNOPSIS
138
139
140
141
142
143
144
145
146

147
148
149
150
151
152
153
.Dv NULL
on error.
.Pp
The error codes can be obtained by
.Xr ERR_get_error 3 .
.Sh SEE ALSO
.Xr BN_generate_prime 3 ,
.Xr ERR_get_error 3 ,
.Xr RSA_get0_key 3 ,

.Xr RSA_new 3
.Sh HISTORY
.Fn RSA_generate_key
appeared in SSLeay 0.4 or earlier and had its
.Fa cb_arg
argument added in SSLeay 0.9.0.
It has been available since







<

>







138
139
140
141
142
143
144

145
146
147
148
149
150
151
152
153
.Dv NULL
on error.
.Pp
The error codes can be obtained by
.Xr ERR_get_error 3 .
.Sh SEE ALSO
.Xr BN_generate_prime 3 ,

.Xr RSA_get0_key 3 ,
.Xr RSA_meth_set_keygen 3 ,
.Xr RSA_new 3
.Sh HISTORY
.Fn RSA_generate_key
appeared in SSLeay 0.4 or earlier and had its
.Fa cb_arg
argument added in SSLeay 0.9.0.
It has been available since
Changes to jni/libressl/man/RSA_get0_key.3.
1
2
3

















4
5
6
7
8
9
10
11
.\" $OpenBSD: RSA_get0_key.3,v 1.4 2018/03/23 23:18:17 schwarze Exp $
.\" selective merge up to: OpenSSL 665d899f Aug 2 02:19:43 2017 +0800
.\"

















.\" This file was written by Richard Levitte <levitte@openssl.org>
.\" Copyright (c) 2016 The OpenSSL Project.  All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\"
.\" 1. Redistributions of source code must retain the above copyright
|


>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
|







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
.\" $OpenBSD: RSA_get0_key.3,v 1.6 2019/07/13 17:26:38 schwarze Exp $
.\" selective merge up to: OpenSSL 665d899f Aug 2 02:19:43 2017 +0800
.\"
.\" This file is a derived work.
.\" The changes are covered by the following Copyright and license:
.\"
.\" Copyright (c) 2019 Ingo Schwarze <schwarze@openbsd.org>
.\"
.\" Permission to use, copy, modify, and distribute this software for any
.\" purpose with or without fee is hereby granted, provided that the above
.\" copyright notice and this permission notice appear in all copies.
.\"
.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
.\" The original file was written by Richard Levitte <levitte@openssl.org>
.\" Copyright (c) 2016 The OpenSSL Project.  All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\"
.\" 1. Redistributions of source code must retain the above copyright
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: March 23 2018 $
.Dt RSA_GET0_KEY 3
.Os
.Sh NAME
.Nm RSA_get0_key ,
.Nm RSA_set0_key ,
.Nm RSA_get0_factors ,
.Nm RSA_set0_factors ,







|







61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: July 13 2019 $
.Dt RSA_GET0_KEY 3
.Os
.Sh NAME
.Nm RSA_get0_key ,
.Nm RSA_set0_key ,
.Nm RSA_get0_factors ,
.Nm RSA_set0_factors ,
142
143
144
145
146
147
148
149

150
151
152
153
154
155
156
.Fa q
are the first and second factor of
.Fa n .
.Fa dmp1 ,
.Fa dmq1 ,
and
.Fa iqmp
are the exponents and coefficient for CRT calculations.

.Pp
The
.Fa n ,
.Fa e ,
and
.Fa d
parameters can be obtained by calling







|
>







159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
.Fa q
are the first and second factor of
.Fa n .
.Fa dmp1 ,
.Fa dmq1 ,
and
.Fa iqmp
are the exponents and coefficient
for Chinese Remainder Theorem (CRT) calculations.
.Pp
The
.Fa n ,
.Fa e ,
and
.Fa d
parameters can be obtained by calling
259
260
261
262
263
264
265
























































266
267
268
269
270
271
272
sets the
.Fa flags
in
.Fa r ;
any flags already set remain set.
For all three functions, multiple flags can be passed in one call,
OR'ed together bitwise.
























































.Sh RETURN VALUES
.Fn RSA_set0_key ,
.Fn RSA_set0_factors ,
and
.Fn RSA_set0_crt_params
return 1 on success or 0 on failure.
.Pp







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
sets the
.Fa flags
in
.Fa r ;
any flags already set remain set.
For all three functions, multiple flags can be passed in one call,
OR'ed together bitwise.
.Pp
The following flags are supported:
.Bl -tag -width Ds
.It Dv RSA_FLAG_CACHE_PRIVATE No and Dv RSA_FLAG_CACHE_PUBLIC
Precompute information needed for Montgomery multiplication
from the private and public key, respectively, and cache it in
.Fa r
for repeated use.
These two flags are set by default for the default RSA implementation,
.Xr RSA_PKCS1_SSLeay 3 .
.It Dv RSA_FLAG_EXT_PKEY
The function set with
.Xr RSA_meth_set_mod_exp 3
is used for private key operations even if
.Fa p ,
.Fa q ,
.Fa dmp1 ,
.Fa dmq1 ,
and
.Fa iqmp
are all
.Dv NULL .
This flag may be useful with RSA implementations that do not use the
private key components stored in the standard fields, for example
because they store the private key in external hardware.
If this flag is unset, the function set with
.Xr RSA_meth_set_bn_mod_exp 3
is used with
.Fa n
and
.Fa d
instead.
.It Dv RSA_FLAG_NO_BLINDING
Turn off blinding during private key encryption and decryption.
This flag is set by
.Xr RSA_blinding_off 3 .
.It Dv RSA_FLAG_SIGN_VER
Enable the use of the functions set with
.Xr RSA_meth_set_sign 3
and
.Xr RSA_meth_set_verify 3 .
If unset, the functions set with
.Xr RSA_meth_set_priv_enc 3
and
.Xr RSA_meth_set_pub_dec 3
are used instead, respectively.
.El
.Pp
The flags
.Dv RSA_FLAG_BLINDING ,
.Dv RSA_FLAG_CHECKED ,
.Dv RSA_FLAG_FIPS_METHOD ,
.Dv RSA_FLAG_NON_FIPS_ALLOW ,
and
.Dv RSA_FLAG_THREAD_SAFE
are defined for compatibility with existing code but have no effect.
.Sh RETURN VALUES
.Fn RSA_set0_key ,
.Fn RSA_set0_factors ,
and
.Fn RSA_set0_crt_params
return 1 on success or 0 on failure.
.Pp
Changes to jni/libressl/man/RSA_meth_new.3.
1
2

3
4
5
6
7
8
9
10
11
12
13
14
.\" $OpenBSD: RSA_meth_new.3,v 1.3 2018/09/12 15:09:22 jmc Exp $
.\" selective merge up to: OpenSSL a970b14f Jul 31 18:58:40 2017 -0400

.\"
.\" This file is a derived work.
.\" The changes are covered by the following Copyright and license:
.\"
.\" Copyright (c) 2018 Ingo Schwarze <schwarze@openbsd.org>
.\"
.\" Permission to use, copy, modify, and distribute this software for any
.\" purpose with or without fee is hereby granted, provided that the above
.\" copyright notice and this permission notice appear in all copies.
.\"
.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
|
>




|







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
.\" $OpenBSD: RSA_meth_new.3,v 1.5 2019/07/13 17:26:38 schwarze Exp $
.\" full merge up to: OpenSSL a970b14f Jul 31 18:58:40 2017 -0400
.\" selective merge up to: OpenSSL 24907560 Sep 17 07:47:42 2018 +1000
.\"
.\" This file is a derived work.
.\" The changes are covered by the following Copyright and license:
.\"
.\" Copyright (c) 2018, 2019 Ingo Schwarze <schwarze@openbsd.org>
.\"
.\" Permission to use, copy, modify, and distribute this software for any
.\" purpose with or without fee is hereby granted, provided that the above
.\" copyright notice and this permission notice appear in all copies.
.\"
.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76







77





78

79










80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95




96
97
98
99
100
101



























102


103
104
105
106
107




































108
109
110
111
112
113
114








115
116
117
118
119






































































120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140

141
142
143
144



145
146
147
148
149
150
151
152








153



154
155
156
157
158
159




































160


















161
162
163
164
165
166
167
168
169
170
171
172


173
174

175
176
177
178
179
180







181





182

183
184

185
186


187
188
189
190



















































































191
192
193
194
195
196
197
198
199
200


























201
202
203



204

205
206
207

208

209
210
211




212
213
214





215


























216
217
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: September 12 2018 $
.Dt RSA_METH_NEW 3
.Os
.Sh NAME
.Nm RSA_meth_new ,
.Nm RSA_meth_dup ,
.Nm RSA_meth_free ,
.Nm RSA_meth_get_finish ,
.Nm RSA_meth_set1_name ,







.Nm RSA_meth_set_finish ,





.Nm RSA_meth_set_priv_enc ,

.Nm RSA_meth_set_priv_dec










.Nd build up RSA methods
.Sh SYNOPSIS
.In openssl/rsa.h
.Ft RSA_METHOD *
.Fo RSA_meth_new
.Fa "const char *name"
.Fa "int flags"
.Fc
.Ft RSA_METHOD *
.Fo RSA_meth_dup
.Fa "const RSA_METHOD *meth"
.Fc
.Ft void
.Fo RSA_meth_free
.Fa "RSA_METHOD *meth"
.Fc




.Ft int
.Fo RSA_meth_set1_name
.Fa "RSA_METHOD *meth"
.Fa "const char *name"
.Fc
.Ft int



























.Fn "(*RSA_meth_get_finish(const RSA_METHOD *meth))" "RSA *rsa"


.Ft int
.Fo RSA_meth_set_finish
.Fa "RSA_METHOD *meth"
.Fa "int (*finish)(RSA *rsa)"
.Fc




































.Ft int
.Fo RSA_meth_set_priv_enc
.Fa "RSA_METHOD *meth"
.Fa "int (*priv_enc)(int flen, const unsigned char *from,\
 unsigned char *to, RSA *rsa, int padding)"
.Fc
.Ft int








.Fo RSA_meth_set_priv_dec
.Fa "RSA_METHOD *meth"
.Fa "int (*priv_dec)(int flen, const unsigned char *from,\
 unsigned char *to, RSA *rsa, int padding)"
.Fc






































































.Sh DESCRIPTION
The
.Vt RSA_METHOD
structure holds function pointers for custom RSA implementations.
.Pp
.Fn RSA_meth_new
creates a new
.Vt RSA_METHOD
structure.
A copy of the NUL-terminated
.Fa name
is stored in the new
.Vt RSA_METHOD
object.
Any new
.Vt RSA
object constructed from this
.Vt RSA_METHOD
will have the given
.Fa flags
set by default.

.Pp
.Fn RSA_meth_dup
creates a deep copy of
.Fa meth .



This might be useful for creating a new
.Vt RSA_METHOD
based on an existing one, but with some differences.
.Pp
.Fn RSA_meth_free
destroys
.Fa meth
and frees any memory associated with it.








.Pp



.Fn RSA_meth_set1_name
Stores a copy of the NUL-terminated
.Fa name
in the
.Vt RSA_METHOD
object after freeing the previously stored




































.Fa name .


















.Pp
.Fn RSA_meth_get_finish
and
.Fn RSA_meth_set_finish
get and set an optional function for destroying an
.Vt RSA
object.
Unless
.Fa finish
is
.Dv NULL ,
it will be called from


.Xr RSA_free 3 .
It takes the same argument

and is intended to do RSA implementation specific cleanup.
The memory used by the
.Vt RSA
object itself should not be freed by the
.Fa finish
function.







.Pp





.Fn RSA_meth_set_priv_enc

and
.Fn RSA_meth_set_priv_dec

set the functions used for private key encryption and decryption.
These functions will be called from


.Xr RSA_private_decrypt 3
and
.Xr RSA_private_encrypt 3
and take the same parameters as those.



















































































.Sh RETURN VALUES
.Fn RSA_meth_new
and
.Fn RSA_meth_dup
return the newly allocated
.Vt RSA_METHOD
object or
.Dv NULL
on failure.
.Pp


























All
.Fn RSA_meth_set*
functions return 1 on success or 0 on failure.



.Sh SEE ALSO

.Xr RSA_new 3 ,
.Xr RSA_private_decrypt 3 ,
.Xr RSA_private_encrypt 3 ,

.Xr RSA_set_method 3

.Sh HISTORY
These functions first appeared in OpenSSL 1.1.0.
.Fn RSA_meth_get_finish




and
.Fn RSA_meth_set1_name
have been available since





.Ox 6.4 ,


























all the other functions since
.Ox 6.3 .







|






|

>
>
>
>
>
>
>

>
>
>
>
>

>
|
>
>
>
>
>
>
>
>
>
>
















>
>
>
>






>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
|
>
>





>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







>
>
>
>
>
>
>
>





>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>




















|
>



|
>
>
>







|
>
>
>
>
>
>
>
>

>
>
>

|



|
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
|
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>












>
>

|
>






>
>
>
>
>
>
>

>
>
>
>
>
|
>


>
|

>
>
|

|
|
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>










>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>



>
>
>

>

|
|
>
|
>


|
>
>
>
>

|

>
>
>
>
>

>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
|
|
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: July 13 2019 $
.Dt RSA_METH_NEW 3
.Os
.Sh NAME
.Nm RSA_meth_new ,
.Nm RSA_meth_dup ,
.Nm RSA_meth_free ,
.Nm RSA_meth_get0_name ,
.Nm RSA_meth_set1_name ,
.Nm RSA_meth_get_flags ,
.Nm RSA_meth_set_flags ,
.Nm RSA_meth_get0_app_data ,
.Nm RSA_meth_set0_app_data ,
.Nm RSA_meth_get_init ,
.Nm RSA_meth_set_init ,
.Nm RSA_meth_get_finish ,
.Nm RSA_meth_set_finish ,
.Nm RSA_meth_get_pub_enc ,
.Nm RSA_meth_set_pub_enc ,
.Nm RSA_meth_get_pub_dec ,
.Nm RSA_meth_set_pub_dec ,
.Nm RSA_meth_get_priv_enc ,
.Nm RSA_meth_set_priv_enc ,
.Nm RSA_meth_get_priv_dec ,
.Nm RSA_meth_set_priv_dec ,
.Nm RSA_meth_get_sign ,
.Nm RSA_meth_set_sign ,
.Nm RSA_meth_get_verify ,
.Nm RSA_meth_set_verify ,
.Nm RSA_meth_get_mod_exp ,
.Nm RSA_meth_set_mod_exp ,
.Nm RSA_meth_get_bn_mod_exp ,
.Nm RSA_meth_set_bn_mod_exp ,
.Nm RSA_meth_get_keygen ,
.Nm RSA_meth_set_keygen
.Nd build up RSA methods
.Sh SYNOPSIS
.In openssl/rsa.h
.Ft RSA_METHOD *
.Fo RSA_meth_new
.Fa "const char *name"
.Fa "int flags"
.Fc
.Ft RSA_METHOD *
.Fo RSA_meth_dup
.Fa "const RSA_METHOD *meth"
.Fc
.Ft void
.Fo RSA_meth_free
.Fa "RSA_METHOD *meth"
.Fc
.Ft const char *
.Fo RSA_meth_get0_name
.Fa "const RSA_METHOD *meth"
.Fc
.Ft int
.Fo RSA_meth_set1_name
.Fa "RSA_METHOD *meth"
.Fa "const char *name"
.Fc
.Ft int
.Fo RSA_meth_get_flags
.Fa "const RSA_METHOD *meth"
.Fc
.Ft int
.Fo RSA_meth_set_flags
.Fa "RSA_METHOD *meth"
.Fa "int flags"
.Fc
.Ft void *
.Fo RSA_meth_get0_app_data
.Fa "const RSA_METHOD *meth"
.Fc
.Ft int
.Fo RSA_meth_set0_app_data
.Fa "RSA_METHOD *meth"
.Fa "void *app_data"
.Fc
.Ft int
.Fo "(*RSA_meth_get_init(const RSA_METHOD *meth))"
.Fa "RSA *rsa"
.Fc
.Ft int
.Fo "RSA_meth_set_init"
.Fa "RSA_METHOD *meth"
.Fa "int (*init)(RSA *rsa)"
.Fc
.Ft int
.Fo "(*RSA_meth_get_finish(const RSA_METHOD *meth))"
.Fa "RSA *rsa"
.Fc
.Ft int
.Fo RSA_meth_set_finish
.Fa "RSA_METHOD *meth"
.Fa "int (*finish)(RSA *rsa)"
.Fc
.Ft int
.Fo "(*RSA_meth_get_pub_enc(const RSA_METHOD *meth))"
.Fa "int flen"
.Fa "const unsigned char *from"
.Fa "unsigned char *to"
.Fa "RSA *rsa"
.Fa "int padding"
.Fc
.Ft int
.Fo RSA_meth_set_pub_enc
.Fa "RSA_METHOD *meth"
.Fa "int (*pub_enc)(int flen, const unsigned char *from,\
 unsigned char *to, RSA *rsa, int padding)"
.Fc
.Ft int
.Fo "(*RSA_meth_get_pub_dec(const RSA_METHOD *meth))"
.Fa "int flen"
.Fa "const unsigned char *from"
.Fa "unsigned char *to"
.Fa "RSA *rsa"
.Fa "int padding"
.Fc
.Ft int
.Fo RSA_meth_set_pub_dec
.Fa "RSA_METHOD *meth"
.Fa "int (*pub_dec)(int flen, const unsigned char *from,\
 unsigned char *to, RSA *rsa, int padding)"
.Fc
.Ft int
.Fo "(*RSA_meth_get_priv_enc(const RSA_METHOD *meth))"
.Fa "int flen"
.Fa "const unsigned char *from"
.Fa "unsigned char *to"
.Fa "RSA *rsa"
.Fa "int padding"
.Fc
.Ft int
.Fo RSA_meth_set_priv_enc
.Fa "RSA_METHOD *meth"
.Fa "int (*priv_enc)(int flen, const unsigned char *from,\
 unsigned char *to, RSA *rsa, int padding)"
.Fc
.Ft int
.Fo "(*RSA_meth_get_priv_dec(const RSA_METHOD *meth))"
.Fa "int flen"
.Fa "const unsigned char *from"
.Fa "unsigned char *to"
.Fa "RSA *rsa"
.Fa "int padding"
.Fc
.Ft int
.Fo RSA_meth_set_priv_dec
.Fa "RSA_METHOD *meth"
.Fa "int (*priv_dec)(int flen, const unsigned char *from,\
 unsigned char *to, RSA *rsa, int padding)"
.Fc
.Ft int
.Fo "(*RSA_meth_get_sign(const RSA_METHOD *meth))"
.Fa "int type"
.Fa "const unsigned char *m"
.Fa "unsigned int m_length"
.Fa "unsigned char *sigret"
.Fa "unsigned int *siglen"
.Fa "const RSA *rsa"
.Fc
.Ft int
.Fo RSA_meth_set_sign
.Fa "RSA_METHOD *rsa"
.Fa "int (*sign)(int type, const unsigned char *m, unsigned int m_length,\
 unsigned char *sigret, unsigned int *siglen, const RSA *rsa)"
.Fc
.Ft int
.Fo "(*RSA_meth_get_verify(const RSA_METHOD *meth))"
.Fa "int dtype"
.Fa "const unsigned char *m"
.Fa "unsigned int m_length"
.Fa "const unsigned char *sigbuf"
.Fa "unsigned int siglen"
.Fa "const RSA *rsa"
.Fc
.Ft int
.Fo RSA_meth_set_verify
.Fa "RSA_METHOD *rsa"
.Fa "int (*verify)(int dtype, const unsigned char *m,\
 unsigned int m_length, const unsigned char *sigbuf,\
 unsigned int siglen, const RSA *rsa)"
.Fc
.Ft int
.Fo "(*RSA_meth_get_mod_exp(const RSA_METHOD *meth))"
.Fa "BIGNUM *r0"
.Fa "const BIGNUM *i"
.Fa "RSA *rsa"
.Fa "BN_CTX *ctx"
.Fc
.Ft int
.Fo RSA_meth_set_mod_exp
.Fa "RSA_METHOD *meth"
.Fa "int (*mod_exp)(BIGNUM *r0, const BIGNUM *i, RSA *rsa, BN_CTX *ctx)"
.Fc
.Ft int
.Fo "(*RSA_meth_get_bn_mod_exp(const RSA_METHOD *meth))"
.Fa "BIGNUM *r"
.Fa "const BIGNUM *a"
.Fa "const BIGNUM *p"
.Fa "const BIGNUM *m"
.Fa "BN_CTX *ctx"
.Fa "BN_MONT_CTX *m_ctx"
.Fc
.Ft int
.Fo RSA_meth_set_bn_mod_exp
.Fa "RSA_METHOD *meth"
.Fa "int (*bn_mod_exp)(BIGNUM *r, const BIGNUM *a, const BIGNUM *p,\
 const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *m_ctx)"
.Fc
.Ft int
.Fo "(*RSA_meth_get_keygen(const RSA_METHOD *meth))"
.Fa "RSA *rsa"
.Fa "int bits"
.Fa "BIGNUM *e"
.Fa "BN_GENCB *cb"
.Fc
.Ft int
.Fo RSA_meth_set_keygen
.Fa "RSA_METHOD *meth"
.Fa "int (*keygen)(RSA *rsa, int bits, BIGNUM *e, BN_GENCB *cb)"
.Fc
.Sh DESCRIPTION
The
.Vt RSA_METHOD
structure holds function pointers for custom RSA implementations.
.Pp
.Fn RSA_meth_new
creates a new
.Vt RSA_METHOD
structure.
A copy of the NUL-terminated
.Fa name
is stored in the new
.Vt RSA_METHOD
object.
Any new
.Vt RSA
object constructed from this
.Vt RSA_METHOD
will have the given
.Fa flags
set by default, as if they were set with
.Xr RSA_set_flags 3 .
.Pp
.Fn RSA_meth_dup
creates a deep copy of
.Fa meth ,
except that a pointer stored into it with
.Fn RSA_meth_set0_app_data
is copied as a pointer without creating a copy of its content.
This might be useful for creating a new
.Vt RSA_METHOD
based on an existing one, but with some differences.
.Pp
.Fn RSA_meth_free
destroys
.Fa meth
and frees any memory associated with it,
except that memory pointed to by a pointer set with
.Fn RSA_meth_set0_app_data
is not freed.
If
.Fa meth
is
.Dv NULL ,
no action occurs.
.Pp
.Fn RSA_meth_get0_name
returns an internal pointer to the name of
.Fa meth .
.Fn RSA_meth_set1_name
stores a copy of the NUL-terminated
.Fa name
in the
.Vt RSA_METHOD
object after freeing the previously stored name.
Method names are ignored by the default RSA implementation
but can be used by alternative implementations
and by the application program.
.Pp
.Fn RSA_meth_get_flags
retrieves the flags from
.Fa meth .
Flags are documented in
.Xr RSA_test_flags 3 .
.Fn RSA_meth_set_flags
overwrites all flags in
.Fa meth .
Unlike
.Xr RSA_set_flags 3 ,
it does not preserve any flags that were set before the call.
.Pp
.Fn RSA_meth_get0_app_data
and
.Fn RSA_meth_set0_app_data
get and set a pointer to implementation-specific data.
The function
.Fn RSA_meth_free
does not
.Xr free 3
the memory pointed to by
.Fa app_data .
The default RSA implementation does not use
.Fa app_data .
.Pp
.Fn RSA_meth_get_init
and
.Fn RSA_meth_set_init
get and set an optional function used when creating a new
.Vt RSA
object.
Unless
.Fa init
is
.Dv NULL ,
it will be called at the end of
.Xr RSA_new 3 ,
.Xr RSA_new_method 3 ,
and
.Xr RSA_set_method 3 ,
passing a pointer to the newly allocated or reset
.Vt RSA
object as an argument.
The default RSA implementation,
.Xr RSA_PKCS1_SSLeay 3 ,
contains an
.Fa init
function equivalent to calling
.Xr RSA_set_flags 3
with an argument of
.Dv RSA_FLAG_CACHE_PUBLIC | RSA_FLAG_CACHE_PRIVATE .
.Pp
.Fn RSA_meth_get_finish
and
.Fn RSA_meth_set_finish
get and set an optional function for destroying an
.Vt RSA
object.
Unless
.Fa finish
is
.Dv NULL ,
it will be called from
.Xr RSA_set_method 3
and from
.Xr RSA_free 3 .
It takes the same argument as
.Xr RSA_free 3
and is intended to do RSA implementation specific cleanup.
The memory used by the
.Vt RSA
object itself should not be freed by the
.Fa finish
function.
The default RSA implementation contains a
.Fa finish
function freeing the memory used by the
.Dv RSA_FLAG_CACHE_PUBLIC
and
.Dv RSA_FLAG_CACHE_PRIVATE
caches.
.Pp
.Fn RSA_meth_get_pub_enc ,
.Fn RSA_meth_set_pub_enc ,
.Fn RSA_meth_get_pub_dec ,
.Fn RSA_meth_set_pub_dec ,
.Fn RSA_meth_get_priv_enc ,
.Fn RSA_meth_set_priv_enc ,
.Fn RSA_meth_get_priv_dec ,
and
.Fn RSA_meth_set_priv_dec
get and set the mandatory functions
used for public and private key encryption and decryption.
These functions will be called from
.Xr RSA_public_encrypt 3 ,
.Xr RSA_public_decrypt 3 ,
.Xr RSA_private_encrypt 3 ,
and
.Xr RSA_private_decrypt 3 ,
respectively, and take the same parameters as those.
.Pp
.Fn RSA_meth_get_sign ,
.Fn RSA_meth_set_sign ,
.Fn RSA_meth_get_verify ,
and
.Fn RSA_meth_set_verify
get and set the optional functions
used for creating and verifying an RSA signature.
If the flag
.Dv RSA_FLAG_SIGN_VER
is set on the
.Vt RSA
object in question and
.Fa sign
or
.Fa verify
is not
.Dv NULL ,
it will be called from
.Xr RSA_sign 3
or
.Xr RSA_verify 3 ,
respectively, and take the same parameters as those.
Otherwise,
.Xr RSA_private_encrypt 3
or
.Xr RSA_public_decrypt 3
will be used instead.
.Pp
.Fn RSA_meth_get_mod_exp
and
.Fn RSA_meth_set_mod_exp
get and set the function
used for Chinese Remainder Theorem (CRT) computations involving the
.Fa p ,
.Fa q ,
.Fa dmp1 ,
.Fa dmq1 ,
and
.Fa iqmp
fields of an
.Vt RSA
object.
It is used by the default RSA implementation during
.Xr RSA_private_encrypt 3
and
.Xr RSA_private_decrypt 3
when the required components of the private key are available
or when the
.Dv RSA_FLAG_EXT_PKEY
flag is set.
.Pp
.Fn RSA_meth_get_bn_mod_exp
and
.Fn RSA_meth_set_bn_mod_exp
get and set the function used for CRT computations,
specifically the value r =
.Fa a
\(ha
.Fa p
mod
.Fa m .
It is used by the default RSA implementation during
.Xr RSA_public_encrypt 3
and
.Xr RSA_public_decrypt 3
and as a fallback during
.Xr RSA_private_encrypt 3
and
.Xr RSA_private_decrypt 3 .
.Pp
.Fn RSA_meth_get_keygen
and
.Fn RSA_meth_set_keygen
get and set the optional function used for generating a new RSA key pair.
Unless
.Fa keygen
is
.Dv NULL ,
it will be called from
.Xr RSA_generate_key_ex 3
and takes the same parameters.
Otherwise, a builtin default implementation is used.
.Sh RETURN VALUES
.Fn RSA_meth_new
and
.Fn RSA_meth_dup
return the newly allocated
.Vt RSA_METHOD
object or
.Dv NULL
on failure.
.Pp
.Fn RSA_meth_get0_name
returns an internal pointer which must not be freed by the caller.
.Pp
.Fn RSA_meth_get_flags
returns zero or more
.Dv RSA_FLAG_*
constants OR'ed together, or 0 if no flags are set in
.Fa meth .
.Pp
.Fn RSA_meth_get0_app_data
returns the pointer that was earlier passed to
.Fn RSA_meth_set0_app_data
or
.Dv NULL
otherwise.
.Pp
All other
.Fn RSA_meth_get_*
functions return the appropriate function pointer that has been set
with the corresponding
.Fn RSA_meth_set_*
function, or
.Dv NULL
if no such pointer has been set in
.Fa meth .
.Pp
All
.Fn RSA_meth_set*
functions return 1 on success or 0 on failure.
In the current implementation, only
.Fn RSA_meth_set1_name
can actually fail.
.Sh SEE ALSO
.Xr RSA_generate_key_ex 3 ,
.Xr RSA_new 3 ,
.Xr RSA_private_encrypt 3 ,
.Xr RSA_public_encrypt 3 ,
.Xr RSA_set_flags 3 ,
.Xr RSA_set_method 3 ,
.Xr RSA_sign 3
.Sh HISTORY
These functions first appeared in OpenSSL 1.1.0.
.Fn RSA_meth_new ,
.Fn RSA_meth_dup ,
.Fn RSA_meth_free ,
.Fn RSA_meth_set_finish ,
.Fn RSA_meth_set_priv_enc ,
and
.Fn RSA_meth_set_priv_dec
have been available since
.Ox 6.3 ,
.Fn RSA_meth_set1_name
and
.Fn RSA_meth_get_finish
since
.Ox 6.4 ,
and
.Fn RSA_meth_get0_name ,
.Fn RSA_meth_get_flags ,
.Fn RSA_meth_set_flags ,
.Fn RSA_meth_get0_app_data ,
.Fn RSA_meth_set0_app_data ,
.Fn RSA_meth_get_init ,
.Fn RSA_meth_set_init ,
.Fn RSA_meth_set_finish ,
.Fn RSA_meth_get_pub_enc ,
.Fn RSA_meth_set_pub_enc ,
.Fn RSA_meth_get_pub_dec ,
.Fn RSA_meth_set_pub_dec ,
.Fn RSA_meth_get_priv_enc ,
.Fn RSA_meth_get_priv_dec ,
.Fn RSA_meth_get_sign ,
.Fn RSA_meth_set_sign ,
.Fn RSA_meth_get_verify ,
.Fn RSA_meth_set_verify ,
.Fn RSA_meth_get_mod_exp ,
.Fn RSA_meth_set_mod_exp ,
.Fn RSA_meth_get_bn_mod_exp ,
.Fn RSA_meth_set_bn_mod_exp ,
.Fn RSA_meth_get_keygen ,
and
.Fn RSA_meth_set_keygen
since
.Ox 6.6 .
Changes to jni/libressl/man/RSA_new.3.
1

2
3
4

















5
6
7
8
9
10
11
12
.\"	$OpenBSD: RSA_new.3,v 1.10 2018/04/18 01:11:45 schwarze Exp $

.\"	OpenSSL doc/man3/RSA_new.pod 99d63d46 Oct 26 13:56:48 2016 -0400
.\"	OpenSSL doc/crypto/rsa.pod 35d2e327 Jun 3 16:19:49 2016 -0400
.\"

















.\" This file was written by Ulf Moeller <ulf@openssl.org>.
.\" Copyright (c) 2000, 2002, 2016 The OpenSSL Project.  All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\"
.\" 1. Redistributions of source code must retain the above copyright
|
>
|
|

>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
|







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" $OpenBSD: RSA_new.3,v 1.15 2019/08/23 15:18:13 schwarze Exp $
.\" full merge up to:
.\" OpenSSL doc/man3/RSA_new.pod e9b77246 Jan 20 19:58:49 2017 +0100
.\" OpenSSL doc/crypto/rsa.pod 35d2e327 Jun 3 16:19:49 2016 -0400 (final)
.\"
.\" This file is a derived work.
.\" The changes are covered by the following Copyright and license:
.\"
.\" Copyright (c) 2018, 2019 Ingo Schwarze <schwarze@openbsd.org>
.\"
.\" Permission to use, copy, modify, and distribute this software for any
.\" purpose with or without fee is hereby granted, provided that the above
.\" copyright notice and this permission notice appear in all copies.
.\"
.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
.\" The original file was written by Ulf Moeller <ulf@openssl.org>.
.\" Copyright (c) 2000, 2002, 2016 The OpenSSL Project.  All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\"
.\" 1. Redistributions of source code must retain the above copyright
45
46
47
48
49
50
51
52
53
54
55
56


57
58
59
60
61
62
63








64
65
66
67
68
69
70
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: April 18 2018 $
.Dt RSA_NEW 3
.Os
.Sh NAME
.Nm RSA_new ,


.Nm RSA_up_ref ,
.Nm RSA_free
.Nd allocate and free RSA objects
.Sh SYNOPSIS
.In openssl/rsa.h
.Ft RSA *
.Fn RSA_new void








.Ft int
.Fo RSA_up_ref
.Fa "RSA *rsa"
.Fc
.Ft void
.Fo RSA_free
.Fa "RSA *rsa"







|




>
>







>
>
>
>
>
>
>
>







63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: August 23 2019 $
.Dt RSA_NEW 3
.Os
.Sh NAME
.Nm RSA_new ,
.Nm RSAPrivateKey_dup ,
.Nm RSAPublicKey_dup ,
.Nm RSA_up_ref ,
.Nm RSA_free
.Nd allocate and free RSA objects
.Sh SYNOPSIS
.In openssl/rsa.h
.Ft RSA *
.Fn RSA_new void
.Ft RSA *
.Fo RSAPrivateKey_dup
.Fa "RSA *rsa"
.Fc
.Ft RSA *
.Fo RSAPublicKey_dup
.Fa "RSA *rsa"
.Fc
.Ft int
.Fo RSA_up_ref
.Fa "RSA *rsa"
.Fc
.Ft void
.Fo RSA_free
.Fa "RSA *rsa"
79
80
81
82
83
84
85









86
87
88
89
90
91








92
93
94
95
96
97
98
structure, setting the reference count to 1.
It is equivalent to calling
.Xr RSA_new_method 3
with a
.Dv NULL
argument.
.Pp









.Fn RSA_up_ref
increments the reference count by 1.
.Pp
.Fn RSA_free
decrements the reference count by 1.
If it reaches 0, it frees the








.Vt RSA
structure and its components.
The key is erased before the memory is returned to the system.
If
.Fa rsa
is a
.Dv NULL







>
>
>
>
>
>
>
>
>





|
>
>
>
>
>
>
>
>







107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
structure, setting the reference count to 1.
It is equivalent to calling
.Xr RSA_new_method 3
with a
.Dv NULL
argument.
.Pp
.Fn RSAPrivateKey_dup
calls
.Fn RSA_new
and copies the public and private key components from
.Fa rsa
into the new structure.
.Fn RSAPublicKey_dup
does the same except that it copies the public key components only.
.Pp
.Fn RSA_up_ref
increments the reference count by 1.
.Pp
.Fn RSA_free
decrements the reference count by 1.
If it reaches 0, it calls the optional
.Fa finish
function set up with
.Xr RSA_meth_set_finish 3 ,
calls
.Xr ENGINE_finish 3
if
.Fa rsa
uses an engine, and frees the
.Vt RSA
structure and its components.
The key is erased before the memory is returned to the system.
If
.Fa rsa
is a
.Dv NULL
150
151
152
153
154
155
156
157
158



159
160

161
162
163
164
165
166
167
168

169
170
171
172
173
174
175
176
177
178
179
180
181
182

183
184
185
186
187
188
189
190
191
192
193
194
195
196





197
198
199
200
201
values will not be used by the implementation or may be used for
alternative data storage.
For this reason, applications should generally avoid using
.Vt RSA
structure elements directly and instead use API functions to query
or modify keys.
.Sh RETURN VALUES
If the allocation fails,
.Fn RSA_new



returns
.Dv NULL

and sets an error code that can be obtained by
.Xr ERR_get_error 3 .
Otherwise it returns a pointer to the newly allocated structure.
.Pp
.Fn RSA_up_ref
returns 1 for success or 0 for failure.
.Sh SEE ALSO
.Xr BN_new 3 ,

.Xr d2i_RSAPublicKey 3 ,
.Xr DH_new 3 ,
.Xr DSA_new 3 ,
.Xr ERR_get_error 3 ,
.Xr EVP_PKEY_set1_RSA 3 ,
.Xr RSA_blinding_on 3 ,
.Xr RSA_check_key 3 ,
.Xr RSA_generate_key 3 ,
.Xr RSA_get0_key 3 ,
.Xr RSA_get_ex_new_index 3 ,
.Xr RSA_meth_new 3 ,
.Xr RSA_padding_add_PKCS1_type_1 3 ,
.Xr RSA_print 3 ,
.Xr RSA_private_encrypt 3 ,

.Xr RSA_public_encrypt 3 ,
.Xr RSA_set_method 3 ,
.Xr RSA_sign 3 ,
.Xr RSA_sign_ASN1_OCTET_STRING 3 ,
.Xr RSA_size 3
.Sh STANDARDS
SSL, PKCS #1 v2.0
.Pp
RSA was covered by a US patent which expired in September 2000.
.Sh HISTORY
.Fn RSA_new
and
.Fn RSA_free
appeared in SSLeay 0.4 or earlier and have been available since





.Ox 2.4 .
.Pp
.Fn RSA_up_ref
first appeared in OpenSSL 0.9.7 and has been available since
.Ox 3.2 .







<
|
>
>
>
|

>
|

<





>



<










>













|
>
>
>
>
>





195
196
197
198
199
200
201

202
203
204
205
206
207
208
209
210

211
212
213
214
215
216
217
218
219

220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
values will not be used by the implementation or may be used for
alternative data storage.
For this reason, applications should generally avoid using
.Vt RSA
structure elements directly and instead use API functions to query
or modify keys.
.Sh RETURN VALUES

.Fn RSA_new ,
.Fn RSAPrivateKey_dup ,
and
.Fn RSAPublicKey_dup
return a pointer to the newly allocated structure, or
.Dv NULL
if an error occurs.
An error code can be obtained by
.Xr ERR_get_error 3 .

.Pp
.Fn RSA_up_ref
returns 1 for success or 0 for failure.
.Sh SEE ALSO
.Xr BN_new 3 ,
.Xr crypto 3 ,
.Xr d2i_RSAPublicKey 3 ,
.Xr DH_new 3 ,
.Xr DSA_new 3 ,

.Xr EVP_PKEY_set1_RSA 3 ,
.Xr RSA_blinding_on 3 ,
.Xr RSA_check_key 3 ,
.Xr RSA_generate_key 3 ,
.Xr RSA_get0_key 3 ,
.Xr RSA_get_ex_new_index 3 ,
.Xr RSA_meth_new 3 ,
.Xr RSA_padding_add_PKCS1_type_1 3 ,
.Xr RSA_print 3 ,
.Xr RSA_private_encrypt 3 ,
.Xr RSA_PSS_PARAMS_new 3 ,
.Xr RSA_public_encrypt 3 ,
.Xr RSA_set_method 3 ,
.Xr RSA_sign 3 ,
.Xr RSA_sign_ASN1_OCTET_STRING 3 ,
.Xr RSA_size 3
.Sh STANDARDS
SSL, PKCS #1 v2.0
.Pp
RSA was covered by a US patent which expired in September 2000.
.Sh HISTORY
.Fn RSA_new
and
.Fn RSA_free
appeared in SSLeay 0.4 or earlier.
.Fn RSAPrivateKey_dup
first appeared in SSLeay 0.5.1 and
.Fn RSAPublicKey_dup
in SSLeay 0.5.2.
These functions have been available since
.Ox 2.4 .
.Pp
.Fn RSA_up_ref
first appeared in OpenSSL 0.9.7 and has been available since
.Ox 3.2 .
Changes to jni/libressl/man/RSA_print.3.
1
2
3
4
5
6
7
8
.\"	$OpenBSD: RSA_print.3,v 1.8 2018/03/27 17:35:50 schwarze Exp $
.\"	OpenSSL 99d63d46 Oct 26 13:56:48 2016 -0400
.\"
.\" This file was written by Ulf Moeller <ulf@openssl.org>.
.\" Copyright (c) 2000, 2002, 2003 The OpenSSL Project.  All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
|







1
2
3
4
5
6
7
8
.\"	$OpenBSD: RSA_print.3,v 1.9 2019/06/06 01:06:59 schwarze Exp $
.\"	OpenSSL 99d63d46 Oct 26 13:56:48 2016 -0400
.\"
.\" This file was written by Ulf Moeller <ulf@openssl.org>.
.\" Copyright (c) 2000, 2002, 2003 The OpenSSL Project.  All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: March 27 2018 $
.Dt RSA_PRINT 3
.Os
.Sh NAME
.Nm RSA_print ,
.Nm RSA_print_fp ,
.Nm DSAparams_print ,
.Nm DSAparams_print_fp ,







|







44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: June 6 2019 $
.Dt RSA_PRINT 3
.Os
.Sh NAME
.Nm RSA_print ,
.Nm RSA_print_fp ,
.Nm DSAparams_print ,
.Nm DSAparams_print_fp ,
120
121
122
123
124
125
126

127
128
129
130
131
132
133
.Fa offset
spaces.
.Sh RETURN VALUES
These functions return 1 on success or 0 on error.
.Sh SEE ALSO
.Xr BN_bn2bin 3 ,
.Xr DH_get0_pqg 3 ,

.Xr DSA_get0_pqg 3 ,
.Xr RSA_get0_key 3 ,
.Xr RSA_new 3
.Sh HISTORY
.Fn RSA_print
and
.Fn DHparams_print







>







120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
.Fa offset
spaces.
.Sh RETURN VALUES
These functions return 1 on success or 0 on error.
.Sh SEE ALSO
.Xr BN_bn2bin 3 ,
.Xr DH_get0_pqg 3 ,
.Xr DH_new 3 ,
.Xr DSA_get0_pqg 3 ,
.Xr RSA_get0_key 3 ,
.Xr RSA_new 3
.Sh HISTORY
.Fn RSA_print
and
.Fn DHparams_print
Changes to jni/libressl/man/RSA_private_encrypt.3.
1
2
3
4
5
6
7
8
.\"	$OpenBSD: RSA_private_encrypt.3,v 1.9 2018/03/27 17:35:50 schwarze Exp $
.\"	OpenSSL RSA_private_encrypt.pod b41f6b64 Mar 10 15:49:04 2017 +0000
.\"
.\" This file was written by Ulf Moeller <ulf@openssl.org>.
.\" Copyright (c) 2000 The OpenSSL Project.  All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
|







1
2
3
4
5
6
7
8
.\"	$OpenBSD: RSA_private_encrypt.3,v 1.10 2019/06/10 14:58:48 schwarze Exp $
.\"	OpenSSL RSA_private_encrypt.pod b41f6b64 Mar 10 15:49:04 2017 +0000
.\"
.\" This file was written by Ulf Moeller <ulf@openssl.org>.
.\" Copyright (c) 2000 The OpenSSL Project.  All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: March 27 2018 $
.Dt RSA_PRIVATE_ENCRYPT 3
.Os
.Sh NAME
.Nm RSA_private_encrypt ,
.Nm RSA_public_decrypt
.Nd low level signature operations
.Sh SYNOPSIS







|







44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: June 10 2019 $
.Dt RSA_PRIVATE_ENCRYPT 3
.Os
.Sh NAME
.Nm RSA_private_encrypt ,
.Nm RSA_public_decrypt
.Nd low level signature operations
.Sh SYNOPSIS
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
.Fn RSA_size rsa ) .
.Fn RSA_public_decrypt
returns the size of the recovered message digest.
.Pp
On error, -1 is returned; the error codes can be obtained by
.Xr ERR_get_error 3 .
.Sh SEE ALSO
.Xr ERR_get_error 3 ,
.Xr RSA_meth_set_priv_enc 3 ,
.Xr RSA_new 3 ,
.Xr RSA_sign 3 ,
.Xr RSA_verify 3
.Sh HISTORY
.Fn RSA_private_encrypt
and
.Fn RSA_public_decrypt
appeared in SSLeay 0.4 or earlier and have been available since
.Ox 2.4 .
.Pp
.Dv RSA_NO_PADDING
is available since SSLeay 0.9.0.







<













131
132
133
134
135
136
137

138
139
140
141
142
143
144
145
146
147
148
149
150
.Fn RSA_size rsa ) .
.Fn RSA_public_decrypt
returns the size of the recovered message digest.
.Pp
On error, -1 is returned; the error codes can be obtained by
.Xr ERR_get_error 3 .
.Sh SEE ALSO

.Xr RSA_meth_set_priv_enc 3 ,
.Xr RSA_new 3 ,
.Xr RSA_sign 3 ,
.Xr RSA_verify 3
.Sh HISTORY
.Fn RSA_private_encrypt
and
.Fn RSA_public_decrypt
appeared in SSLeay 0.4 or earlier and have been available since
.Ox 2.4 .
.Pp
.Dv RSA_NO_PADDING
is available since SSLeay 0.9.0.
Changes to jni/libressl/man/RSA_public_encrypt.3.
1
2
3
4
5
6
7
8
.\"	$OpenBSD: RSA_public_encrypt.3,v 1.11 2018/03/27 17:35:50 schwarze Exp $
.\"	OpenSSL RSA_public_encrypt.pod 1e3f62a3 Jul 17 16:47:13 2017 +0200
.\"
.\" This file was written by Ulf Moeller <ulf@openssl.org>.
.\" Copyright (c) 2000, 2004 The OpenSSL Project.  All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
|







1
2
3
4
5
6
7
8
.\"	$OpenBSD: RSA_public_encrypt.3,v 1.12 2019/06/10 14:58:48 schwarze Exp $
.\"	OpenSSL RSA_public_encrypt.pod 1e3f62a3 Jul 17 16:47:13 2017 +0200
.\"
.\" This file was written by Ulf Moeller <ulf@openssl.org>.
.\" Copyright (c) 2000, 2004 The OpenSSL Project.  All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: March 27 2018 $
.Dt RSA_PUBLIC_ENCRYPT 3
.Os
.Sh NAME
.Nm RSA_public_encrypt ,
.Nm RSA_private_decrypt
.Nd RSA public key cryptography
.Sh SYNOPSIS







|







44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: June 10 2019 $
.Dt RSA_PUBLIC_ENCRYPT 3
.Os
.Sh NAME
.Nm RSA_public_encrypt ,
.Nm RSA_private_decrypt
.Nd RSA public key cryptography
.Sh SYNOPSIS
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
.Fn RSA_size rsa ) .
.Fn RSA_private_decrypt
returns the size of the recovered plaintext.
.Pp
On error, -1 is returned; the error codes can be obtained by
.Xr ERR_get_error 3 .
.Sh SEE ALSO
.Xr ERR_get_error 3 ,
.Xr RSA_meth_set_priv_dec 3 ,
.Xr RSA_new 3 ,
.Xr RSA_size 3
.Sh STANDARDS
SSL, PKCS #1 v2.0
.Sh HISTORY
.Fn RSA_public_encrypt







<







138
139
140
141
142
143
144

145
146
147
148
149
150
151
.Fn RSA_size rsa ) .
.Fn RSA_private_decrypt
returns the size of the recovered plaintext.
.Pp
On error, -1 is returned; the error codes can be obtained by
.Xr ERR_get_error 3 .
.Sh SEE ALSO

.Xr RSA_meth_set_priv_dec 3 ,
.Xr RSA_new 3 ,
.Xr RSA_size 3
.Sh STANDARDS
SSL, PKCS #1 v2.0
.Sh HISTORY
.Fn RSA_public_encrypt
Changes to jni/libressl/man/RSA_set_method.3.
1
2
3
4
5
6
7
8
.\"	$OpenBSD: RSA_set_method.3,v 1.12 2018/04/18 01:07:38 schwarze Exp $
.\"	OpenSSL 99d63d46 Oct 26 13:56:48 2016 -0400
.\"
.\" This file was written by Ulf Moeller <ulf@openssl.org>
.\" and Geoff Thorpe <geoff@openssl.org>.
.\" Copyright (c) 2000, 2002, 2007, 2014 The OpenSSL Project.
.\" All rights reserved.
.\"
|







1
2
3
4
5
6
7
8
.\"	$OpenBSD: RSA_set_method.3,v 1.15 2019/06/08 10:40:51 schwarze Exp $
.\"	OpenSSL 99d63d46 Oct 26 13:56:48 2016 -0400
.\"
.\" This file was written by Ulf Moeller <ulf@openssl.org>
.\" and Geoff Thorpe <geoff@openssl.org>.
.\" Copyright (c) 2000, 2002, 2007, 2014 The OpenSSL Project.
.\" All rights reserved.
.\"
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: April 18 2018 $
.Dt RSA_SET_METHOD 3
.Os
.Sh NAME
.Nm RSA_set_default_method ,
.Nm RSA_get_default_method ,
.Nm RSA_set_method ,
.Nm RSA_get_method ,







|







46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: June 8 2019 $
.Dt RSA_SET_METHOD 3
.Os
.Sh NAME
.Nm RSA_set_default_method ,
.Nm RSA_get_default_method ,
.Nm RSA_set_method ,
.Nm RSA_get_method ,
117
118
119
120
121
122
123
124
125




126
127
128
129









130
131
132
133
134
135
136
.Vt ENGINE .
.Pp
.Fn RSA_set_method
selects
.Fa meth
to perform all operations using the key
.Fa rsa .
This replaces the
.Vt RSA_METHOD




used by the RSA key, and if the previous method was supplied by an
.Vt ENGINE ,
.Xr ENGINE_finish 3
is called on it.









It is possible to have RSA keys that only work with certain
.Vt RSA_METHOD
implementations (e.g. from an
.Vt ENGINE
module that supports embedded hardware-protected keys),
and in such cases attempting to change the
.Vt RSA_METHOD







|

>
>
>
>
|



>
>
>
>
>
>
>
>
>







117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
.Vt ENGINE .
.Pp
.Fn RSA_set_method
selects
.Fa meth
to perform all operations using the key
.Fa rsa .
This replaces the previous
.Vt RSA_METHOD
used by the RSA key, calling the
.Fa finish
function set up with
.Xr RSA_meth_set_finish 3
if any, and if the previous method was supplied by an
.Vt ENGINE ,
.Xr ENGINE_finish 3
is called on it.
If
.Fa meth
contains an
.Fa init
function set up with
.Xr RSA_meth_set_init 3 ,
that function is called just before returning from
.Fn RSA_set_method .
.Pp
It is possible to have RSA keys that only work with certain
.Vt RSA_METHOD
implementations (e.g. from an
.Vt ENGINE
module that supports embedded hardware-protected keys),
and in such cases attempting to change the
.Vt RSA_METHOD
144
145
146
147
148
149
150

151
152
153
154
155




156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
This method may or may not be supplied by an
.Vt ENGINE
implementation but if it is, the return value can only be guaranteed
to be valid as long as the RSA key itself is valid and does not
have its implementation changed by
.Fn RSA_set_method .
.Pp

.Fn RSA_flags
returns the flags that are set for the current
.Vt RSA_METHOD
of
.Fa rsa .




See the
.Sx BUGS
section.
.Pp
.Fn RSA_new_method
allocates and initializes an
.Vt RSA
structure so that
.Fa engine
is used for the RSA operations.
If
.Fa engine
is
.Dv NULL ,
.Xr ENGINE_get_default_RSA 3
is used.
If that returns
.Dv NULL ,
the default method controlled by
.Fn RSA_set_default_method
is used.
.Pp
The
.Dv RSA_METHOD
structure is defined as follows:
.Bd -literal
typedef struct rsa_meth_st
{
     /* name of the implementation */
	const char *name;

     /* encrypt */
	int (*rsa_pub_enc)(int flen, unsigned char *from,
          unsigned char *to, RSA *rsa, int padding);

     /* verify arbitrary data */
	int (*rsa_pub_dec)(int flen, unsigned char *from,
          unsigned char *to, RSA *rsa, int padding);

     /* sign arbitrary data */
	int (*rsa_priv_enc)(int flen, unsigned char *from,
          unsigned char *to, RSA *rsa, int padding);

     /* decrypt */
	int (*rsa_priv_dec)(int flen, unsigned char *from,
          unsigned char *to, RSA *rsa, int padding);

     /* compute r0 = r0 ^ I mod rsa->n (May be NULL for some
                                        implementations) */
	int (*rsa_mod_exp)(BIGNUM *r0, BIGNUM *I, RSA *rsa);

     /* compute r = a ^ p mod m (May be NULL for some implementations) */
	int (*bn_mod_exp)(BIGNUM *r, BIGNUM *a, const BIGNUM *p,
          const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *m_ctx);

     /* called at RSA_new */
	int (*init)(RSA *rsa);

     /* called at RSA_free */
	int (*finish)(RSA *rsa);

     /* RSA_FLAG_EXT_PKEY        - rsa_mod_exp is called for private key
      *                            operations, even if p,q,dmp1,dmq1,iqmp
      *                            are NULL
      * RSA_FLAG_SIGN_VER        - enable rsa_sign and rsa_verify
      * RSA_METHOD_FLAG_NO_CHECK - don't check pub/private match
      */
	int flags;

	char *app_data; /* ?? */

     /* sign. For backward compatibility, this is used only
      * if (flags & RSA_FLAG_SIGN_VER)
      */
	int (*rsa_sign)(int type, unsigned char *m, unsigned int m_len,
           unsigned char *sigret, unsigned int *siglen, RSA *rsa);

     /* verify. For backward compatibility, this is used only
      * if (flags & RSA_FLAG_SIGN_VER)
      */
	int (*rsa_verify)(int type, unsigned char *m, unsigned int m_len,
           unsigned char *sigbuf, unsigned int siglen, RSA *rsa);

} RSA_METHOD;
.Ed
.Sh RETURN VALUES
.Fn RSA_PKCS1_SSLeay ,
.Fn RSA_get_default_method ,
and
.Fn RSA_get_method
return pointers to the respective
.Vt RSA_METHOD .







>





>
>
>
>


|



















|
<
<
<
<
<
<
<
|
<
<
<
|
<
<
<
|
<
<
<
|
<
<
<
|
<
<
<
|
<
<
<
|
<
<
|
<
<
|
<
<
<
<
<
<
<
|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196







197



198



199



200



201



202



203


204


205







206
















207
208
209
210
211
212
213
This method may or may not be supplied by an
.Vt ENGINE
implementation but if it is, the return value can only be guaranteed
to be valid as long as the RSA key itself is valid and does not
have its implementation changed by
.Fn RSA_set_method .
.Pp
The misleadingly named function
.Fn RSA_flags
returns the flags that are set for the current
.Vt RSA_METHOD
of
.Fa rsa .
The flags used by
.Fa rsa
itself can instead be tested with
.Xr RSA_test_flags 3 .
See the
.Sx BUGS
section for more details.
.Pp
.Fn RSA_new_method
allocates and initializes an
.Vt RSA
structure so that
.Fa engine
is used for the RSA operations.
If
.Fa engine
is
.Dv NULL ,
.Xr ENGINE_get_default_RSA 3
is used.
If that returns
.Dv NULL ,
the default method controlled by
.Fn RSA_set_default_method
is used.
.Pp
The initial







.Fa flags



are copied from the



.Vt RSA_METHOD



object used and will not be affected by later changes to that object,



but may be modified by the optional



.Fa init



function which may have been set up with


.Xr RSA_meth_set_init 3


and which is called just before returning from







.Fn RSA_new_method .
















.Sh RETURN VALUES
.Fn RSA_PKCS1_SSLeay ,
.Fn RSA_get_default_method ,
and
.Fn RSA_get_method
return pointers to the respective
.Vt RSA_METHOD .
304
305
306
307
308
309
310
311
312
If the flags element of an
.Vt RSA
key is changed, the changes will be honoured by RSA functionality
but will not be reflected in the return value of the
.Fn RSA_flags
function - in effect
.Fn RSA_flags
behaves more like a RSA_default_flags() function, which does not
currently exist.







|

270
271
272
273
274
275
276
277
278
If the flags element of an
.Vt RSA
key is changed, the changes will be honoured by RSA functionality
but will not be reflected in the return value of the
.Fn RSA_flags
function - in effect
.Fn RSA_flags
behaves more like an RSA_default_flags() function, which does not
currently exist.
Changes to jni/libressl/man/RSA_sign.3.
1
2
3
4
5
6
7
8
.\"	$OpenBSD: RSA_sign.3,v 1.6 2018/03/27 17:35:50 schwarze Exp $
.\"	OpenSSL aa90ca11 Aug 20 15:48:56 2016 -0400
.\"
.\" This file was written by Ulf Moeller <ulf@openssl.org>.
.\" Copyright (c) 2000, 2005, 2014, 2015, 2016 The OpenSSL Project.
.\" All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
|







1
2
3
4
5
6
7
8
.\"	$OpenBSD: RSA_sign.3,v 1.8 2019/06/10 14:58:48 schwarze Exp $
.\"	OpenSSL aa90ca11 Aug 20 15:48:56 2016 -0400
.\"
.\" This file was written by Ulf Moeller <ulf@openssl.org>.
.\" Copyright (c) 2000, 2005, 2014, 2015, 2016 The OpenSSL Project.
.\" All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: March 27 2018 $
.Dt RSA_SIGN 3
.Os
.Sh NAME
.Nm RSA_sign ,
.Nm RSA_verify
.Nd RSA signatures
.Sh SYNOPSIS







|







45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: June 10 2019 $
.Dt RSA_SIGN 3
.Os
.Sh NAME
.Nm RSA_sign ,
.Nm RSA_verify
.Nd RSA signatures
.Sh SYNOPSIS
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
returns 1 on success.
.Fn RSA_verify
returns 1 on successful verification.
.Pp
The error codes can be obtained by
.Xr ERR_get_error 3 .
.Sh SEE ALSO
.Xr ERR_get_error 3 ,
.Xr RSA_new 3 ,
.Xr RSA_private_encrypt 3 ,
.Xr RSA_public_decrypt 3
.Sh STANDARDS
SSL, PKCS #1 v2.0
.Sh HISTORY
.Fn RSA_sign
first appeared in SSLeay 0.4.4.
.Fn RSA_verify
first appeared in SSLeay 0.6.0.
Both functions have been available since
.Ox 2.4 .







|












128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
returns 1 on success.
.Fn RSA_verify
returns 1 on successful verification.
.Pp
The error codes can be obtained by
.Xr ERR_get_error 3 .
.Sh SEE ALSO
.Xr RSA_meth_set_sign 3 ,
.Xr RSA_new 3 ,
.Xr RSA_private_encrypt 3 ,
.Xr RSA_public_decrypt 3
.Sh STANDARDS
SSL, PKCS #1 v2.0
.Sh HISTORY
.Fn RSA_sign
first appeared in SSLeay 0.4.4.
.Fn RSA_verify
first appeared in SSLeay 0.6.0.
Both functions have been available since
.Ox 2.4 .
Changes to jni/libressl/man/RSA_sign_ASN1_OCTET_STRING.3.
1
2
3
4
5
6
7
8
.\"	$OpenBSD: RSA_sign_ASN1_OCTET_STRING.3,v 1.6 2018/03/27 17:35:50 schwarze Exp $
.\"	OpenSSL b97fdb57 Nov 11 09:33:09 2016 +0100
.\"
.\" This file was written by Ulf Moeller <ulf@openssl.org>.
.\" Copyright (c) 2000 The OpenSSL Project.  All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
|







1
2
3
4
5
6
7
8
.\"	$OpenBSD: RSA_sign_ASN1_OCTET_STRING.3,v 1.7 2019/06/10 14:58:48 schwarze Exp $
.\"	OpenSSL b97fdb57 Nov 11 09:33:09 2016 +0100
.\"
.\" This file was written by Ulf Moeller <ulf@openssl.org>.
.\" Copyright (c) 2000 The OpenSSL Project.  All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: March 27 2018 $
.Dt RSA_SIGN_ASN1_OCTET_STRING 3
.Os
.Sh NAME
.Nm RSA_sign_ASN1_OCTET_STRING ,
.Nm RSA_verify_ASN1_OCTET_STRING
.Nd RSA signatures
.Sh SYNOPSIS







|







44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: June 10 2019 $
.Dt RSA_SIGN_ASN1_OCTET_STRING 3
.Os
.Sh NAME
.Nm RSA_sign_ASN1_OCTET_STRING ,
.Nm RSA_verify_ASN1_OCTET_STRING
.Nd RSA signatures
.Sh SYNOPSIS
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
returns 1 on success or 0 otherwise.
.Fn RSA_verify_ASN1_OCTET_STRING
returns 1 on successful verification or 0 otherwise.
.Pp
The error codes can be obtained by
.Xr ERR_get_error 3 .
.Sh SEE ALSO
.Xr ERR_get_error 3 ,
.Xr RSA_new 3 ,
.Xr RSA_sign 3 ,
.Xr RSA_verify 3
.Sh HISTORY
.Fn RSA_sign_ASN1_OCTET_STRING
and
.Fn RSA_verify_ASN1_OCTET_STRING
first appeared in SSLeay 0.8.0 and have been available since
.Ox 2.4 .
.Sh BUGS
These functions serve no recognizable purpose.







<











114
115
116
117
118
119
120

121
122
123
124
125
126
127
128
129
130
131
returns 1 on success or 0 otherwise.
.Fn RSA_verify_ASN1_OCTET_STRING
returns 1 on successful verification or 0 otherwise.
.Pp
The error codes can be obtained by
.Xr ERR_get_error 3 .
.Sh SEE ALSO

.Xr RSA_new 3 ,
.Xr RSA_sign 3 ,
.Xr RSA_verify 3
.Sh HISTORY
.Fn RSA_sign_ASN1_OCTET_STRING
and
.Fn RSA_verify_ASN1_OCTET_STRING
first appeared in SSLeay 0.8.0 and have been available since
.Ox 2.4 .
.Sh BUGS
These functions serve no recognizable purpose.
Added jni/libressl/man/SMIME_read_CMS.3.






































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
.\" $OpenBSD: SMIME_read_CMS.3,v 1.5 2019/08/18 21:44:10 schwarze Exp $
.\" full merge up to: OpenSSL b97fdb57 Nov 11 09:33:09 2016 +0100
.\"
.\" This file was written by Dr. Stephen Henson <steve@openssl.org>.
.\" Copyright (c) 2008 The OpenSSL Project.  All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\"
.\" 1. Redistributions of source code must retain the above copyright
.\"    notice, this list of conditions and the following disclaimer.
.\"
.\" 2. Redistributions in binary form must reproduce the above copyright
.\"    notice, this list of conditions and the following disclaimer in
.\"    the documentation and/or other materials provided with the
.\"    distribution.
.\"
.\" 3. All advertising materials mentioning features or use of this
.\"    software must display the following acknowledgment:
.\"    "This product includes software developed by the OpenSSL Project
.\"    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
.\"
.\" 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
.\"    endorse or promote products derived from this software without
.\"    prior written permission. For written permission, please contact
.\"    openssl-core@openssl.org.
.\"
.\" 5. Products derived from this software may not be called "OpenSSL"
.\"    nor may "OpenSSL" appear in their names without prior written
.\"    permission of the OpenSSL Project.
.\"
.\" 6. Redistributions of any form whatsoever must retain the following
.\"    acknowledgment:
.\"    "This product includes software developed by the OpenSSL Project
.\"    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
.\"
.\" THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
.\" EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
.\" PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
.\" ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
.\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: August 18 2019 $
.Dt SMIME_READ_CMS 3
.Os
.Sh NAME
.Nm SMIME_read_CMS
.Nd parse S/MIME message
.Sh SYNOPSIS
.In openssl/cms.h
.Ft CMS_ContentInfo *
.Fo SMIME_read_CMS
.Fa "BIO *in"
.Fa "BIO **bcont"
.Fc
.Sh DESCRIPTION
.Fn SMIME_read_CMS
parses a message in S/MIME format from
.Fa in .
.Pp
If the message uses cleartext signing, the content is saved in a memory BIO
which is written to
.Pf * Fa bcont
and which can then be passed to
.Xr CMS_verify 3
with the
.Dv CMS_DETACHED
flag set.
Otherwise,
.Pf * Fa bcont
is set to
.Dv NULL
and the type of the returned structure can be determined using
.Xr CMS_get0_type 3 .
.Pp
To support future functionality if
.Fa bcont
is not
.Dv NULL ,
.Pf * Fa bcont
should be initialized to
.Dv NULL ,
for example:
.Bd -literal -offset indent
BIO *cont = NULL;
CMS_ContentInfo *cms = SMIME_read_CMS(in, &cont);
.Ed
.Sh RETURN VALUES
.Fn SMIME_read_CMS
returns a valid
.Vt CMS_ContentInfo
structure or
.Dv NULL
if an error occurred.
The error can be obtained from
.Xr ERR_get_error 3 .
.Sh SEE ALSO
.Xr CMS_ContentInfo_new 3 ,
.Xr CMS_decrypt 3 ,
.Xr CMS_get0_type 3 ,
.Xr CMS_verify 3 ,
.Xr d2i_CMS_ContentInfo 3 ,
.Xr SMIME_write_CMS 3
.Sh HISTORY
.Fn SMIME_read_CMS
first appeared in OpenSSL 0.9.8h
and has been available since
.Ox 6.6 .
.Sh BUGS
The MIME parser used by
.Fn SMIME_read_CMS
is somewhat primitive.
While it will handle most S/MIME messages, more complex compound formats
may not work.
.Pp
The parser assumes that the
.Vt CMS_ContentInfo
structure is always base64 encoded and will not handle the case
where it is in binary format or uses quoted printable format.
.Pp
The use of a memory BIO to hold the signed content limits the size of
the message which can be processed due to memory restraints: a streaming
single pass option should be available.
Changes to jni/libressl/man/SMIME_read_PKCS7.3.
1
2
3
4
5
6
7
8
.\"	$OpenBSD: SMIME_read_PKCS7.3,v 1.6 2018/03/22 16:06:33 schwarze Exp $
.\"	OpenSSL 99d63d46 Oct 26 13:56:48 2016 -0400
.\"
.\" This file was written by Dr. Stephen Henson <steve@openssl.org>.
.\" Copyright (c) 2002, 2006 The OpenSSL Project.  All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
|







1
2
3
4
5
6
7
8
.\"	$OpenBSD: SMIME_read_PKCS7.3,v 1.7 2019/06/10 14:58:48 schwarze Exp $
.\"	OpenSSL 99d63d46 Oct 26 13:56:48 2016 -0400
.\"
.\" This file was written by Dr. Stephen Henson <steve@openssl.org>.
.\" Copyright (c) 2002, 2006 The OpenSSL Project.  All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: March 22 2018 $
.Dt SMIME_READ_PKCS7 3
.Os
.Sh NAME
.Nm SMIME_read_PKCS7
.Nd parse S/MIME message
.Sh SYNOPSIS
.In openssl/pkcs7.h







|







44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: June 10 2019 $
.Dt SMIME_READ_PKCS7 3
.Os
.Sh NAME
.Nm SMIME_read_PKCS7
.Nd parse S/MIME message
.Sh SYNOPSIS
.In openssl/pkcs7.h
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
.Vt PKCS7
structure or
.Dv NULL
if an error occurred.
The error can be obtained from
.Xr ERR_get_error 3 .
.Sh SEE ALSO
.Xr ERR_get_error 3 ,
.Xr PKCS7_new 3 ,
.Xr SMIME_write_PKCS7 3
.Sh HISTORY
.Fn SMIME_read_PKCS7
first appeared in OpenSSL 0.9.5 and has been available since
.Ox 2.7 .
.Sh BUGS







<







120
121
122
123
124
125
126

127
128
129
130
131
132
133
.Vt PKCS7
structure or
.Dv NULL
if an error occurred.
The error can be obtained from
.Xr ERR_get_error 3 .
.Sh SEE ALSO

.Xr PKCS7_new 3 ,
.Xr SMIME_write_PKCS7 3
.Sh HISTORY
.Fn SMIME_read_PKCS7
first appeared in OpenSSL 0.9.5 and has been available since
.Ox 2.7 .
.Sh BUGS
Added jni/libressl/man/SMIME_write_CMS.3.








































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
.\" $OpenBSD: SMIME_write_CMS.3,v 1.4 2019/08/18 21:44:10 schwarze Exp $
.\" full merge up to: OpenSSL 99d63d46 Oct 26 13:56:48 2016 -0400
.\"
.\" This file was written by Dr. Stephen Henson <steve@openssl.org>.
.\" Copyright (c) 2008 The OpenSSL Project.  All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\"
.\" 1. Redistributions of source code must retain the above copyright
.\"    notice, this list of conditions and the following disclaimer.
.\"
.\" 2. Redistributions in binary form must reproduce the above copyright
.\"    notice, this list of conditions and the following disclaimer in
.\"    the documentation and/or other materials provided with the
.\"    distribution.
.\"
.\" 3. All advertising materials mentioning features or use of this
.\"    software must display the following acknowledgment:
.\"    "This product includes software developed by the OpenSSL Project
.\"    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
.\"
.\" 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
.\"    endorse or promote products derived from this software without
.\"    prior written permission. For written permission, please contact
.\"    openssl-core@openssl.org.
.\"
.\" 5. Products derived from this software may not be called "OpenSSL"
.\"    nor may "OpenSSL" appear in their names without prior written
.\"    permission of the OpenSSL Project.
.\"
.\" 6. Redistributions of any form whatsoever must retain the following
.\"    acknowledgment:
.\"    "This product includes software developed by the OpenSSL Project
.\"    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
.\"
.\" THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
.\" EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
.\" PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
.\" ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
.\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: August 18 2019 $
.Dt SMIME_WRITE_CMS 3
.Os
.Sh NAME
.Nm SMIME_write_CMS
.Nd convert CMS structure to S/MIME format
.Sh SYNOPSIS
.In openssl/cms.h
.Ft int
.Fo SMIME_write_CMS
.Fa "BIO *out"
.Fa "CMS_ContentInfo *cms"
.Fa "BIO *data"
.Fa "int flags"
.Fc
.Sh DESCRIPTION
.Fn SMIME_write_CMS
adds the appropriate MIME headers to the
.Fa cms
structure to produce an S/MIME message and writes it to
.Fa out .
If streaming is enabled, the content must be supplied in the
.Fa data
argument.
.Pp
The following
.Fa flags
can be passed:
.Bl -tag -width Ds
.It Dv CMS_DETACHED
Use cleartext signing.
This option only makes sense if
.Fa cms
is of the type
.Vt SignedData
and
.Dv CMS_DETACHED
was also set when it was created with
.Xr CMS_sign 3 .
.Pp
If
.Dv CMS_STREAM
is not set, the data must be read twice:
once to compute the signature in
.Xr CMS_sign 3
and once to output the S/MIME message.
.It Dv CMS_TEXT
Add MIME headers for type text/plain to the content.
This only makes sense if
.Dv CMS_DETACHED
is also set.
.It Dv CMS_STREAM
Perform streaming.
This flag should only be set if
.Dv CMS_STREAM
was also passed to the function that created
.Fa cms .
.Pp
The content is output in BER format using indefinite length
constructed encoding except in the case of
.Vt SignedData
with detached content where the content is absent and DER format is
used.
.El
.Sh RETURN VALUES
.Fn SMIME_write_CMS
returns 1 for success or 0 for failure.
.Sh SEE ALSO
.Xr CMS_ContentInfo_new 3 ,
.Xr CMS_encrypt 3 ,
.Xr CMS_sign 3 ,
.Xr d2i_CMS_ContentInfo 3 ,
.Xr ERR_get_error 3
.Sh HISTORY
.Fn SMIME_write_CMS
first appeared in OpenSSL 0.9.8h
and has been available since
.Ox 6.6 .
.Sh BUGS
.Fn SMIME_write_CMS
always base64 encodes CMS structures.
There should be an option to disable this.
Changes to jni/libressl/man/SMIME_write_PKCS7.3.
1
2
3
4
5
6
7
8
.\"	$OpenBSD: SMIME_write_PKCS7.3,v 1.5 2018/03/22 16:06:33 schwarze Exp $
.\"	OpenSSL 99d63d46 Oct 26 13:56:48 2016 -0400
.\"
.\" This file was written by Dr. Stephen Henson <steve@openssl.org>.
.\" Copyright (c) 2002, 2003, 2006, 2007, 2015 The OpenSSL Project.
.\" All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
|







1
2
3
4
5
6
7
8
.\"	$OpenBSD: SMIME_write_PKCS7.3,v 1.6 2019/06/14 13:59:32 schwarze Exp $
.\"	OpenSSL 99d63d46 Oct 26 13:56:48 2016 -0400
.\"
.\" This file was written by Dr. Stephen Henson <steve@openssl.org>.
.\" Copyright (c) 2002, 2003, 2006, 2007, 2015 The OpenSSL Project.
.\" All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: March 22 2018 $
.Dt SMIME_WRITE_PKCS7 3
.Os
.Sh NAME
.Nm SMIME_write_PKCS7
.Nd convert PKCS#7 structure to S/MIME format
.Sh SYNOPSIS
.In openssl/pkcs7.h







|







45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: June 14 2019 $
.Dt SMIME_WRITE_PKCS7 3
.Os
.Sh NAME
.Nm SMIME_write_PKCS7
.Nd convert PKCS#7 structure to S/MIME format
.Sh SYNOPSIS
.In openssl/pkcs7.h
123
124
125
126
127
128
129
130
131


132
133
134
135
136
137
138
139
140
141
142
143
144
145
and once to output the S/MIME message.
.Pp
If streaming is performed, the content is output in BER format using
indefinite length constructed encoding except in the case of signed
data with detached content where the content is absent and DER
format is used.
.Sh RETURN VALUES
.Fn SMIME_write_PKCS7
returns 1 for success or 0 for failure.


.Sh SEE ALSO
.Xr ERR_get_error 3 ,
.Xr i2d_PKCS7_bio_stream 3 ,
.Xr PEM_write_PKCS7 3 ,
.Xr PKCS7_new 3 ,
.Xr SMIME_read_PKCS7 3
.Sh HISTORY
.Fn SMIME_write_PKCS7
first appeared in OpenSSL 0.9.5 and has been available since
.Ox 2.7 .
.Sh BUGS
.Fn SMIME_write_PKCS7
always base64 encodes PKCS#7 structures.
There should be an option to disable this.







<
|
>
>

<












123
124
125
126
127
128
129

130
131
132
133

134
135
136
137
138
139
140
141
142
143
144
145
and once to output the S/MIME message.
.Pp
If streaming is performed, the content is output in BER format using
indefinite length constructed encoding except in the case of signed
data with detached content where the content is absent and DER
format is used.
.Sh RETURN VALUES

Upon successful completion, 1 is returned;
otherwise 0 is returned and an error code can be retrieved with
.Xr ERR_get_error 3 .
.Sh SEE ALSO

.Xr i2d_PKCS7_bio_stream 3 ,
.Xr PEM_write_PKCS7 3 ,
.Xr PKCS7_new 3 ,
.Xr SMIME_read_PKCS7 3
.Sh HISTORY
.Fn SMIME_write_PKCS7
first appeared in OpenSSL 0.9.5 and has been available since
.Ox 2.7 .
.Sh BUGS
.Fn SMIME_write_PKCS7
always base64 encodes PKCS#7 structures.
There should be an option to disable this.
Changes to jni/libressl/man/SSL_COMP_add_compression_method.3.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
.\"	$OpenBSD: SSL_COMP_add_compression_method.3,v 1.4 2018/03/23 00:10:28 schwarze Exp $
.\"
.\" Copyright (c) 2016 Ingo Schwarze <schwarze@openbsd.org>
.\"
.\" Permission to use, copy, modify, and distribute this software for any
.\" purpose with or without fee is hereby granted, provided that the above
.\" copyright notice and this permission notice appear in all copies.
.\"
.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
.Dd $Mdocdate: March 23 2018 $
.Dt SSL_COMP_ADD_COMPRESSION_METHOD 3
.Os
.Sh NAME
.Nm SSL_COMP_add_compression_method ,
.Nm SSL_COMP_get_compression_methods
.Nd handle SSL/TLS integrated compression methods
.Sh SYNOPSIS
|















|







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
.\" $OpenBSD: SSL_COMP_add_compression_method.3,v 1.5 2019/06/12 09:36:30 schwarze Exp $
.\"
.\" Copyright (c) 2016 Ingo Schwarze <schwarze@openbsd.org>
.\"
.\" Permission to use, copy, modify, and distribute this software for any
.\" purpose with or without fee is hereby granted, provided that the above
.\" copyright notice and this permission notice appear in all copies.
.\"
.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
.Dd $Mdocdate: June 12 2019 $
.Dt SSL_COMP_ADD_COMPRESSION_METHOD 3
.Os
.Sh NAME
.Nm SSL_COMP_add_compression_method ,
.Nm SSL_COMP_get_compression_methods
.Nd handle SSL/TLS integrated compression methods
.Sh SYNOPSIS
42
43
44
45
46
47
48


49
50
51
52
53
54
55
56
used to return a stack of available compression methods.
.Sh RETURN VALUES
.Fn SSL_COMP_add_compression_method
always returns 1.
.Fn SSL_COMP_get_compression_methods
always returns
.Dv NULL .


.Sh HISTORY
.Fn SSL_COMP_add_compression_method
first appeared in OpenSSL 0.9.2b and has been available since
.Ox 2.6 .
.Pp
.Fn SSL_COMP_get_compression_methods
first appeared in OpenSSL 0.9.8 and has been available since
.Ox 4.5 .







>
>








42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
used to return a stack of available compression methods.
.Sh RETURN VALUES
.Fn SSL_COMP_add_compression_method
always returns 1.
.Fn SSL_COMP_get_compression_methods
always returns
.Dv NULL .
.Sh SEE ALSO
.Xr ssl 3
.Sh HISTORY
.Fn SSL_COMP_add_compression_method
first appeared in OpenSSL 0.9.2b and has been available since
.Ox 2.6 .
.Pp
.Fn SSL_COMP_get_compression_methods
first appeared in OpenSSL 0.9.8 and has been available since
.Ox 4.5 .
Changes to jni/libressl/man/SSL_CTX_get0_certificate.3.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
.\" $OpenBSD: SSL_CTX_get0_certificate.3,v 1.2 2018/03/23 14:28:16 schwarze Exp $
.\"
.\" Copyright (c) 2018 Ingo Schwarze <schwarze@openbsd.org>
.\"
.\" Permission to use, copy, modify, and distribute this software for any
.\" purpose with or without fee is hereby granted, provided that the above
.\" copyright notice and this permission notice appear in all copies.
.\"
.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
.Dd $Mdocdate: March 23 2018 $
.Dt SSL_CTX_GET0_CERTIFICATE 3
.Os
.Sh NAME
.Nm SSL_CTX_get0_certificate
.Nd get the active certificate from an SSL context
.Sh SYNOPSIS
.Ft X509 *
|















|







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
.\" $OpenBSD: SSL_CTX_get0_certificate.3,v 1.3 2019/06/12 09:36:30 schwarze Exp $
.\"
.\" Copyright (c) 2018 Ingo Schwarze <schwarze@openbsd.org>
.\"
.\" Permission to use, copy, modify, and distribute this software for any
.\" purpose with or without fee is hereby granted, provided that the above
.\" copyright notice and this permission notice appear in all copies.
.\"
.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
.Dd $Mdocdate: June 12 2019 $
.Dt SSL_CTX_GET0_CERTIFICATE 3
.Os
.Sh NAME
.Nm SSL_CTX_get0_certificate
.Nd get the active certificate from an SSL context
.Sh SYNOPSIS
.Ft X509 *
35
36
37
38
39
40
41

42
43
44
45
46
47
48
49
50
.Dv NULL
if none was installed with
.Xr SSL_CTX_use_certificate 3
or similar functions.
.Pp
The returned pointer must not be freed by the caller.
.Sh SEE ALSO

.Xr SSL_CTX_new 3 ,
.Xr SSL_CTX_use_certificate 3 ,
.Xr X509_get_pubkey 3 ,
.Xr X509_get_subject_name 3 ,
.Xr X509_new 3
.Sh HISTORY
.Fn SSL_CTX_get0_certificate
first appeared in OpenSSL 1.0.2 and have been available since
.Ox 6.3 .







>









35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
.Dv NULL
if none was installed with
.Xr SSL_CTX_use_certificate 3
or similar functions.
.Pp
The returned pointer must not be freed by the caller.
.Sh SEE ALSO
.Xr ssl 3 ,
.Xr SSL_CTX_new 3 ,
.Xr SSL_CTX_use_certificate 3 ,
.Xr X509_get_pubkey 3 ,
.Xr X509_get_subject_name 3 ,
.Xr X509_new 3
.Sh HISTORY
.Fn SSL_CTX_get0_certificate
first appeared in OpenSSL 1.0.2 and have been available since
.Ox 6.3 .
Changes to jni/libressl/man/SSL_CTX_sess_number.3.
1
2
3
4
5
6
7
8
.\"	$OpenBSD: SSL_CTX_sess_number.3,v 1.8 2018/03/27 17:35:50 schwarze Exp $
.\"	OpenSSL SSL_CTX_sess_number.pod 7bd27895 Mar 29 11:45:29 2017 +1000
.\"
.\" This file was written by Lutz Jaenicke <jaenicke@openssl.org>.
.\" Copyright (c) 2001 The OpenSSL Project.  All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
|







1
2
3
4
5
6
7
8
.\"	$OpenBSD: SSL_CTX_sess_number.3,v 1.9 2019/06/12 09:36:30 schwarze Exp $
.\"	OpenSSL SSL_CTX_sess_number.pod 7bd27895 Mar 29 11:45:29 2017 +1000
.\"
.\" This file was written by Lutz Jaenicke <jaenicke@openssl.org>.
.\" Copyright (c) 2001 The OpenSSL Project.  All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: March 27 2018 $
.Dt SSL_CTX_SESS_NUMBER 3
.Os
.Sh NAME
.Nm SSL_CTX_sess_number ,
.Nm SSL_CTX_sess_connect ,
.Nm SSL_CTX_sess_connect_good ,
.Nm SSL_CTX_sess_connect_renegotiate ,







|







44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: June 12 2019 $
.Dt SSL_CTX_SESS_NUMBER 3
.Os
.Sh NAME
.Nm SSL_CTX_sess_number ,
.Nm SSL_CTX_sess_connect ,
.Nm SSL_CTX_sess_connect_good ,
.Nm SSL_CTX_sess_connect_renegotiate ,
137
138
139
140
141
142
143

144
145
146
147
148
149
150
.Fn SSL_CTX_sess_hits
count.
.Pp
.Fn SSL_CTX_sess_cache_full
returns the number of sessions that were removed because the maximum session
cache size was exceeded.
.Sh SEE ALSO

.Xr SSL_CTX_ctrl 3 ,
.Xr SSL_CTX_sess_set_cache_size 3 ,
.Xr SSL_CTX_set_session_cache_mode 3 ,
.Xr SSL_set_session 3
.Sh HISTORY
.Fn SSL_CTX_sess_number ,
.Fn SSL_CTX_sess_connect ,







>







137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
.Fn SSL_CTX_sess_hits
count.
.Pp
.Fn SSL_CTX_sess_cache_full
returns the number of sessions that were removed because the maximum session
cache size was exceeded.
.Sh SEE ALSO
.Xr ssl 3 ,
.Xr SSL_CTX_ctrl 3 ,
.Xr SSL_CTX_sess_set_cache_size 3 ,
.Xr SSL_CTX_set_session_cache_mode 3 ,
.Xr SSL_set_session 3
.Sh HISTORY
.Fn SSL_CTX_sess_number ,
.Fn SSL_CTX_sess_connect ,
Changes to jni/libressl/man/SSL_CTX_sess_set_cache_size.3.
1
2
3
4
5
6
7
8
.\"	$OpenBSD: SSL_CTX_sess_set_cache_size.3,v 1.4 2018/03/21 08:06:34 schwarze Exp $
.\"	OpenSSL b97fdb57 Nov 11 09:33:09 2016 +0100
.\"
.\" This file was written by Lutz Jaenicke <jaenicke@openssl.org>.
.\" Copyright (c) 2001, 2002, 2014 The OpenSSL Project.  All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
|







1
2
3
4
5
6
7
8
.\"	$OpenBSD: SSL_CTX_sess_set_cache_size.3,v 1.5 2019/06/12 09:36:30 schwarze Exp $
.\"	OpenSSL b97fdb57 Nov 11 09:33:09 2016 +0100
.\"
.\" This file was written by Lutz Jaenicke <jaenicke@openssl.org>.
.\" Copyright (c) 2001, 2002, 2014 The OpenSSL Project.  All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: March 21 2018 $
.Dt SSL_CTX_SESS_SET_CACHE_SIZE 3
.Os
.Sh NAME
.Nm SSL_CTX_sess_set_cache_size ,
.Nm SSL_CTX_sess_get_cache_size
.Nd manipulate session cache size
.Sh SYNOPSIS







|







44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: June 12 2019 $
.Dt SSL_CTX_SESS_SET_CACHE_SIZE 3
.Os
.Sh NAME
.Nm SSL_CTX_sess_set_cache_size ,
.Nm SSL_CTX_sess_get_cache_size
.Nd manipulate session cache size
.Sh SYNOPSIS
92
93
94
95
96
97
98

99
100
101
102
103
104
105
106
107
108
.Sh RETURN VALUES
.Fn SSL_CTX_sess_set_cache_size
returns the previously valid size.
.Pp
.Fn SSL_CTX_sess_get_cache_size
returns the currently valid size.
.Sh SEE ALSO

.Xr SSL_CTX_ctrl 3 ,
.Xr SSL_CTX_flush_sessions 3 ,
.Xr SSL_CTX_sess_number 3 ,
.Xr SSL_CTX_set_session_cache_mode 3
.Sh HISTORY
.Fn SSL_CTX_sess_set_cache_size
and
.Fn SSL_CTX_sess_get_cache_size
first appeared in SSLeay 0.9.0 and have been available since
.Ox 2.4 .







>










92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
.Sh RETURN VALUES
.Fn SSL_CTX_sess_set_cache_size
returns the previously valid size.
.Pp
.Fn SSL_CTX_sess_get_cache_size
returns the currently valid size.
.Sh SEE ALSO
.Xr ssl 3 ,
.Xr SSL_CTX_ctrl 3 ,
.Xr SSL_CTX_flush_sessions 3 ,
.Xr SSL_CTX_sess_number 3 ,
.Xr SSL_CTX_set_session_cache_mode 3
.Sh HISTORY
.Fn SSL_CTX_sess_set_cache_size
and
.Fn SSL_CTX_sess_get_cache_size
first appeared in SSLeay 0.9.0 and have been available since
.Ox 2.4 .
Changes to jni/libressl/man/SSL_CTX_set_cert_verify_callback.3.
1
2
3
4
5
6
7
8
.\"	$OpenBSD: SSL_CTX_set_cert_verify_callback.3,v 1.4 2018/03/27 17:35:50 schwarze Exp $
.\"	OpenSSL b97fdb57 Nov 11 09:33:09 2016 +0100
.\"
.\" This file was written by Lutz Jaenicke <jaenicke@openssl.org>.
.\" Copyright (c) 2001, 2002 The OpenSSL Project.  All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
|







1
2
3
4
5
6
7
8
.\"	$OpenBSD: SSL_CTX_set_cert_verify_callback.3,v 1.5 2019/06/08 15:25:43 schwarze Exp $
.\"	OpenSSL b97fdb57 Nov 11 09:33:09 2016 +0100
.\"
.\" This file was written by Lutz Jaenicke <jaenicke@openssl.org>.
.\" Copyright (c) 2001, 2002 The OpenSSL Project.  All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: March 27 2018 $
.Dt SSL_CTX_SET_CERT_VERIFY_CALLBACK 3
.Os
.Sh NAME
.Nm SSL_CTX_set_cert_verify_callback
.Nd set peer certificate verification procedure
.Sh SYNOPSIS
.In openssl/ssl.h







|







44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: June 8 2019 $
.Dt SSL_CTX_SET_CERT_VERIFY_CALLBACK 3
.Os
.Sh NAME
.Nm SSL_CTX_set_cert_verify_callback
.Nd set peer certificate verification procedure
.Sh SYNOPSIS
.In openssl/ssl.h
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
.Fa ctx .
.Vt SSL
objects that are created from
.Fa ctx
inherit the setting valid at the time when
.Xr SSL_new 3
is called.
.Sh NOTES
Whenever a certificate is verified during a SSL/TLS handshake,
a verification function is called.
If the application does not explicitly specify a verification callback
function, the built-in verification function is used.
If a verification callback
.Fa callback
is specified via







|







68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
.Fa ctx .
.Vt SSL
objects that are created from
.Fa ctx
inherit the setting valid at the time when
.Xr SSL_new 3
is called.
.Pp
Whenever a certificate is verified during a SSL/TLS handshake,
a verification function is called.
If the application does not explicitly specify a verification callback
function, the built-in verification function is used.
If a verification callback
.Fa callback
is specified via
Changes to jni/libressl/man/SSL_CTX_set_cipher_list.3.
1
2
3
4
5
6
7
8
.\" $OpenBSD: SSL_CTX_set_cipher_list.3,v 1.7 2018/04/10 21:37:20 schwarze Exp $
.\" full merge up to: OpenSSL b97fdb57 Nov 11 09:33:09 2016 +0100
.\"
.\" This file is a derived work.
.\" The changes are covered by the following Copyright and license:
.\"
.\" Copyright (c) 2018 Ingo Schwarze <schwarze@openbsd.org>
.\"
|







1
2
3
4
5
6
7
8
.\" $OpenBSD: SSL_CTX_set_cipher_list.3,v 1.8 2019/05/20 06:04:45 jmc Exp $
.\" full merge up to: OpenSSL b97fdb57 Nov 11 09:33:09 2016 +0100
.\"
.\" This file is a derived work.
.\" The changes are covered by the following Copyright and license:
.\"
.\" Copyright (c) 2018 Ingo Schwarze <schwarze@openbsd.org>
.\"
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: April 10 2018 $
.Dt SSL_CTX_SET_CIPHER_LIST 3
.Os
.Sh NAME
.Nm SSL_CTX_set_cipher_list ,
.Nm SSL_set_cipher_list
.Nd choose list of available SSL_CIPHERs
.Sh SYNOPSIS







|







61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: May 20 2019 $
.Dt SSL_CTX_SET_CIPHER_LIST 3
.Os
.Sh NAME
.Nm SSL_CTX_set_cipher_list ,
.Nm SSL_set_cipher_list
.Nd choose list of available SSL_CIPHERs
.Sh SYNOPSIS
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
.Pp
On the client side, including a cipher suite into the list of
available cipher suites is sufficient for using it.
On the server side, all cipher suites have additional requirements.
ADH ciphers don't need a certificate, but DH-parameters must have been set.
All other cipher suites need a corresponding certificate and key.
.Pp
A RSA cipher can only be chosen when a RSA certificate is available.
RSA ciphers using DHE need a certificate and key and additional DH-parameters
(see
.Xr SSL_CTX_set_tmp_dh_callback 3 ) .
.Pp
A DSA cipher can only be chosen when a DSA certificate is available.
DSA ciphers always use DH key exchange and therefore need DH-parameters (see
.Xr SSL_CTX_set_tmp_dh_callback 3 ) .







|







334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
.Pp
On the client side, including a cipher suite into the list of
available cipher suites is sufficient for using it.
On the server side, all cipher suites have additional requirements.
ADH ciphers don't need a certificate, but DH-parameters must have been set.
All other cipher suites need a corresponding certificate and key.
.Pp
A RSA cipher can only be chosen when an RSA certificate is available.
RSA ciphers using DHE need a certificate and key and additional DH-parameters
(see
.Xr SSL_CTX_set_tmp_dh_callback 3 ) .
.Pp
A DSA cipher can only be chosen when a DSA certificate is available.
DSA ciphers always use DH key exchange and therefore need DH-parameters (see
.Xr SSL_CTX_set_tmp_dh_callback 3 ) .
Changes to jni/libressl/man/SSL_CTX_set_max_cert_list.3.
1
2
3
4
5
6
7
8
.\"	$OpenBSD: SSL_CTX_set_max_cert_list.3,v 1.4 2018/03/22 21:09:18 schwarze Exp $
.\"	OpenSSL b97fdb57 Nov 11 09:33:09 2016 +0100
.\"
.\" This file was written by Lutz Jaenicke <jaenicke@openssl.org>.
.\" Copyright (c) 2001 The OpenSSL Project.  All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
|







1
2
3
4
5
6
7
8
.\"	$OpenBSD: SSL_CTX_set_max_cert_list.3,v 1.6 2019/06/12 09:36:30 schwarze Exp $
.\"	OpenSSL b97fdb57 Nov 11 09:33:09 2016 +0100
.\"
.\" This file was written by Lutz Jaenicke <jaenicke@openssl.org>.
.\" Copyright (c) 2001 The OpenSSL Project.  All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: March 22 2018 $
.Dt SSL_CTX_SET_MAX_CERT_LIST 3
.Os
.Sh NAME
.Nm SSL_CTX_set_max_cert_list ,
.Nm SSL_CTX_get_max_cert_list ,
.Nm SSL_set_max_cert_list ,
.Nm SSL_get_max_cert_list







|







44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: June 12 2019 $
.Dt SSL_CTX_SET_MAX_CERT_LIST 3
.Os
.Sh NAME
.Nm SSL_CTX_set_max_cert_list ,
.Nm SSL_CTX_get_max_cert_list ,
.Nm SSL_set_max_cert_list ,
.Nm SSL_get_max_cert_list
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
.Fa size
bytes.
This setting stays valid until a new value is set.
.Pp
.Fn SSL_get_max_cert_list
returns the currently set maximum size for
.Fa ssl .
.Sh NOTES
During the handshake process, the peer may send a certificate chain.
The TLS/SSL standard does not give any maximum size of the certificate chain.
The OpenSSL library handles incoming data by a dynamically allocated buffer.
In order to prevent this buffer from growing without bound due to data
received from a faulty or malicious peer, a maximum size for the certificate
chain is set.
.Pp







|







95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
.Fa size
bytes.
This setting stays valid until a new value is set.
.Pp
.Fn SSL_get_max_cert_list
returns the currently set maximum size for
.Fa ssl .
.Pp
During the handshake process, the peer may send a certificate chain.
The TLS/SSL standard does not give any maximum size of the certificate chain.
The OpenSSL library handles incoming data by a dynamically allocated buffer.
In order to prevent this buffer from growing without bound due to data
received from a faulty or malicious peer, a maximum size for the certificate
chain is set.
.Pp
140
141
142
143
144
145
146

147
148
149
150
151
152
153
return the previously set value.
.Pp
.Fn SSL_CTX_get_max_cert_list
and
.Fn SSL_get_max_cert_list
return the currently set value.
.Sh SEE ALSO

.Xr SSL_CTX_ctrl 3 ,
.Xr SSL_CTX_set_verify 3 ,
.Xr SSL_new 3
.Sh HISTORY
These functions first appeared in OpenSSL 0.9.7
and have been available since
.Ox 3.2 .







>







140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
return the previously set value.
.Pp
.Fn SSL_CTX_get_max_cert_list
and
.Fn SSL_get_max_cert_list
return the currently set value.
.Sh SEE ALSO
.Xr ssl 3 ,
.Xr SSL_CTX_ctrl 3 ,
.Xr SSL_CTX_set_verify 3 ,
.Xr SSL_new 3
.Sh HISTORY
These functions first appeared in OpenSSL 0.9.7
and have been available since
.Ox 3.2 .
Changes to jni/libressl/man/SSL_CTX_set_mode.3.
1
2
3
4
5
6
7
8
.\" $OpenBSD: SSL_CTX_set_mode.3,v 1.5 2019/04/09 21:06:31 schwarze Exp $
.\" full merge up to: OpenSSL 8671b898 Jun 3 02:48:34 2008 +0000
.\" selective merge up to: OpenSSL df75c2bf Dec 9 01:02:36 2018 +0100
.\"
.\" This file was written by Lutz Jaenicke <jaenicke@openssl.org> and
.\" Ben Laurie <ben@openssl.org>.
.\" Copyright (c) 2001, 2008 The OpenSSL Project.  All rights reserved.
.\"
|







1
2
3
4
5
6
7
8
.\" $OpenBSD: SSL_CTX_set_mode.3,v 1.6 2019/06/12 09:36:30 schwarze Exp $
.\" full merge up to: OpenSSL 8671b898 Jun 3 02:48:34 2008 +0000
.\" selective merge up to: OpenSSL df75c2bf Dec 9 01:02:36 2018 +0100
.\"
.\" This file was written by Lutz Jaenicke <jaenicke@openssl.org> and
.\" Ben Laurie <ben@openssl.org>.
.\" Copyright (c) 2001, 2008 The OpenSSL Project.  All rights reserved.
.\"
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: April 9 2019 $
.Dt SSL_CTX_SET_MODE 3
.Os
.Sh NAME
.Nm SSL_CTX_set_mode ,
.Nm SSL_set_mode ,
.Nm SSL_CTX_clear_mode ,
.Nm SSL_clear_mode ,







|







46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: June 12 2019 $
.Dt SSL_CTX_SET_MODE 3
.Os
.Sh NAME
.Nm SSL_CTX_set_mode ,
.Nm SSL_set_mode ,
.Nm SSL_CTX_clear_mode ,
.Nm SSL_clear_mode ,
177
178
179
180
181
182
183

184
185
186
187
188
189
190
.Fa mode .
.Pp
.Fn SSL_CTX_get_mode
and
.Fn SSL_get_mode
return the current bitmask.
.Sh SEE ALSO

.Xr SSL_CTX_ctrl 3 ,
.Xr SSL_read 3 ,
.Xr SSL_write 3
.Sh HISTORY
.Fn SSL_CTX_set_mode ,
.Fn SSL_set_mode ,
.Fn SSL_CTX_get_mode ,







>







177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
.Fa mode .
.Pp
.Fn SSL_CTX_get_mode
and
.Fn SSL_get_mode
return the current bitmask.
.Sh SEE ALSO
.Xr ssl 3 ,
.Xr SSL_CTX_ctrl 3 ,
.Xr SSL_read 3 ,
.Xr SSL_write 3
.Sh HISTORY
.Fn SSL_CTX_set_mode ,
.Fn SSL_set_mode ,
.Fn SSL_CTX_get_mode ,
Changes to jni/libressl/man/SSL_CTX_set_quiet_shutdown.3.
1
2
3
4
5
6
7
8
.\"	$OpenBSD: SSL_CTX_set_quiet_shutdown.3,v 1.4 2018/03/27 17:35:50 schwarze Exp $
.\"	OpenSSL b97fdb57 Nov 11 09:33:09 2016 +0100
.\"
.\" This file was written by Lutz Jaenicke <jaenicke@openssl.org>.
.\" Copyright (c) 2001, 2005 The OpenSSL Project.  All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
|







1
2
3
4
5
6
7
8
.\"	$OpenBSD: SSL_CTX_set_quiet_shutdown.3,v 1.5 2019/06/08 15:25:43 schwarze Exp $
.\"	OpenSSL b97fdb57 Nov 11 09:33:09 2016 +0100
.\"
.\" This file was written by Lutz Jaenicke <jaenicke@openssl.org>.
.\" Copyright (c) 2001, 2005 The OpenSSL Project.  All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: March 27 2018 $
.Dt SSL_CTX_SET_QUIET_SHUTDOWN 3
.Os
.Sh NAME
.Nm SSL_CTX_set_quiet_shutdown ,
.Nm SSL_CTX_get_quiet_shutdown ,
.Nm SSL_set_quiet_shutdown ,
.Nm SSL_get_quiet_shutdown







|







44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: June 8 2019 $
.Dt SSL_CTX_SET_QUIET_SHUTDOWN 3
.Os
.Sh NAME
.Nm SSL_CTX_set_quiet_shutdown ,
.Nm SSL_CTX_get_quiet_shutdown ,
.Nm SSL_set_quiet_shutdown ,
.Nm SSL_get_quiet_shutdown
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
may be 0 or 1.
.Pp
.Fn SSL_get_quiet_shutdown
returns the
.Dq quiet shutdown
setting of
.Fa ssl .
.Sh NOTES
Normally when a SSL connection is finished, the parties must send out
.Dq close notify
alert messages using
.Xr SSL_shutdown 3
for a clean shutdown.
.Pp
When setting the







|







113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
may be 0 or 1.
.Pp
.Fn SSL_get_quiet_shutdown
returns the
.Dq quiet shutdown
setting of
.Fa ssl .
.Pp
Normally when a SSL connection is finished, the parties must send out
.Dq close notify
alert messages using
.Xr SSL_shutdown 3
for a clean shutdown.
.Pp
When setting the
Changes to jni/libressl/man/SSL_CTX_set_session_cache_mode.3.
1
2
3
4
5
6
7
8
.\"	$OpenBSD: SSL_CTX_set_session_cache_mode.3,v 1.6 2018/03/27 17:35:50 schwarze Exp $
.\"	OpenSSL 67adf0a7 Dec 25 19:58:38 2016 +0100
.\"
.\" This file was written by Lutz Jaenicke <jaenicke@openssl.org> and
.\" Geoff Thorpe <geoff@openssl.org>.
.\" Copyright (c) 2001, 2002 The OpenSSL Project.  All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
|







1
2
3
4
5
6
7
8
.\"	$OpenBSD: SSL_CTX_set_session_cache_mode.3,v 1.7 2019/06/12 09:36:30 schwarze Exp $
.\"	OpenSSL 67adf0a7 Dec 25 19:58:38 2016 +0100
.\"
.\" This file was written by Lutz Jaenicke <jaenicke@openssl.org> and
.\" Geoff Thorpe <geoff@openssl.org>.
.\" Copyright (c) 2001, 2002 The OpenSSL Project.  All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: March 27 2018 $
.Dt SSL_CTX_SET_SESSION_CACHE_MODE 3
.Os
.Sh NAME
.Nm SSL_CTX_set_session_cache_mode ,
.Nm SSL_CTX_get_session_cache_mode
.Nd enable/disable session caching
.Sh SYNOPSIS







|







45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: June 12 2019 $
.Dt SSL_CTX_SET_SESSION_CACHE_MODE 3
.Os
.Sh NAME
.Nm SSL_CTX_set_session_cache_mode ,
.Nm SSL_CTX_get_session_cache_mode
.Nd enable/disable session caching
.Sh SYNOPSIS
170
171
172
173
174
175
176

177
178
179
180
181
182
183
.Sh RETURN VALUES
.Fn SSL_CTX_set_session_cache_mode
returns the previously set cache mode.
.Pp
.Fn SSL_CTX_get_session_cache_mode
returns the currently set cache mode.
.Sh SEE ALSO

.Xr SSL_CTX_add_session 3 ,
.Xr SSL_CTX_ctrl 3 ,
.Xr SSL_CTX_flush_sessions 3 ,
.Xr SSL_CTX_sess_number 3 ,
.Xr SSL_CTX_sess_set_cache_size 3 ,
.Xr SSL_CTX_sess_set_get_cb 3 ,
.Xr SSL_CTX_set_session_id_context 3 ,







>







170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
.Sh RETURN VALUES
.Fn SSL_CTX_set_session_cache_mode
returns the previously set cache mode.
.Pp
.Fn SSL_CTX_get_session_cache_mode
returns the currently set cache mode.
.Sh SEE ALSO
.Xr ssl 3 ,
.Xr SSL_CTX_add_session 3 ,
.Xr SSL_CTX_ctrl 3 ,
.Xr SSL_CTX_flush_sessions 3 ,
.Xr SSL_CTX_sess_number 3 ,
.Xr SSL_CTX_sess_set_cache_size 3 ,
.Xr SSL_CTX_sess_set_get_cb 3 ,
.Xr SSL_CTX_set_session_id_context 3 ,
Changes to jni/libressl/man/SSL_CTX_set_session_id_context.3.
1
2
3
4
5
6
7
8
.\"	$OpenBSD: SSL_CTX_set_session_id_context.3,v 1.5 2018/03/21 17:58:58 schwarze Exp $
.\"	OpenSSL b97fdb57 Nov 11 09:33:09 2016 +0100
.\"
.\" This file was written by Lutz Jaenicke <jaenicke@openssl.org>.
.\" Copyright (c) 2001, 2004 The OpenSSL Project.  All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
|







1
2
3
4
5
6
7
8
.\"	$OpenBSD: SSL_CTX_set_session_id_context.3,v 1.6 2019/06/08 15:25:43 schwarze Exp $
.\"	OpenSSL b97fdb57 Nov 11 09:33:09 2016 +0100
.\"
.\" This file was written by Lutz Jaenicke <jaenicke@openssl.org>.
.\" Copyright (c) 2001, 2004 The OpenSSL Project.  All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: March 21 2018 $
.Dt SSL_CTX_SET_SESSION_ID_CONTEXT 3
.Os
.Sh NAME
.Nm SSL_CTX_set_session_id_context ,
.Nm SSL_set_session_id_context
.Nd set context within which session can be reused (server side only)
.Sh SYNOPSIS







|







44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: June 8 2019 $
.Dt SSL_CTX_SET_SESSION_ID_CONTEXT 3
.Os
.Sh NAME
.Nm SSL_CTX_set_session_id_context ,
.Nm SSL_set_session_id_context
.Nd set context within which session can be reused (server side only)
.Sh SYNOPSIS
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
sets the context
.Fa sid_ctx
of length
.Fa sid_ctx_len
within which a session can be reused for the
.Fa ssl
object.
.Sh NOTES
Sessions are generated within a certain context.
When exporting/importing sessions with
.Xr i2d_SSL_SESSION 3
and
.Xr d2i_SSL_SESSION 3 ,
it would be possible to re-import a session generated from another context
(e.g., another application), which might lead to malfunctions.







|







83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
sets the context
.Fa sid_ctx
of length
.Fa sid_ctx_len
within which a session can be reused for the
.Fa ssl
object.
.Pp
Sessions are generated within a certain context.
When exporting/importing sessions with
.Xr i2d_SSL_SESSION 3
and
.Xr d2i_SSL_SESSION 3 ,
it would be possible to re-import a session generated from another context
(e.g., another application), which might lead to malfunctions.
Changes to jni/libressl/man/SSL_CTX_set_tlsext_servername_callback.3.
1
2
3
4
5
6
7
8
.\"	$OpenBSD: SSL_CTX_set_tlsext_servername_callback.3,v 1.3 2018/03/23 01:06:56 schwarze Exp $
.\"	OpenSSL 190b9a03 Jun 28 15:46:13 2017 +0800
.\"	OpenSSL 8c55c461 Mar 29 08:34:37 2017 +1000
.\"
.\" This file was written by Jon Spillett <jon.spillett@oracle.com>
.\" and Paul Yang <yang dot yang at baishancloud dot com>.
.\" Copyright (c) 2000 The OpenSSL Project.  All rights reserved.
.\"
|







1
2
3
4
5
6
7
8
.\"	$OpenBSD: SSL_CTX_set_tlsext_servername_callback.3,v 1.4 2019/06/12 09:36:30 schwarze Exp $
.\"	OpenSSL 190b9a03 Jun 28 15:46:13 2017 +0800
.\"	OpenSSL 8c55c461 Mar 29 08:34:37 2017 +1000
.\"
.\" This file was written by Jon Spillett <jon.spillett@oracle.com>
.\" and Paul Yang <yang dot yang at baishancloud dot com>.
.\" Copyright (c) 2000 The OpenSSL Project.  All rights reserved.
.\"
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: March 23 2018 $
.Dt SSL_CTX_SET_TLSEXT_SERVERNAME_CALLBACK 3
.Os
.Sh NAME
.Nm SSL_CTX_set_tlsext_servername_callback ,
.Nm SSL_CTX_set_tlsext_servername_arg ,
.Nm SSL_get_servername_type ,
.Nm SSL_get_servername ,







|







46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: June 12 2019 $
.Dt SSL_CTX_SET_TLSEXT_SERVERNAME_CALLBACK 3
.Os
.Sh NAME
.Nm SSL_CTX_set_tlsext_servername_callback ,
.Nm SSL_CTX_set_tlsext_servername_arg ,
.Nm SSL_get_servername_type ,
.Nm SSL_get_servername ,
140
141
142
143
144
145
146

147
148
149
150
151
152
returns the servername type or -1 if no servername is present.
Currently the only supported type (defined in RFC 3546) is
.Dv TLSEXT_NAMETYPE_host_name .
.Pp
.Fn SSL_set_tlsext_host_name
returns 1 on success or 0 in case of an error.
.Sh SEE ALSO

.Xr SSL_CTX_callback_ctrl 3 ,
.Xr SSL_CTX_set_alpn_select_cb 3
.Sh HISTORY
These functions first appeared in OpenSSL 0.9.8f
and have been available since
.Ox 4.5 .







>






140
141
142
143
144
145
146
147
148
149
150
151
152
153
returns the servername type or -1 if no servername is present.
Currently the only supported type (defined in RFC 3546) is
.Dv TLSEXT_NAMETYPE_host_name .
.Pp
.Fn SSL_set_tlsext_host_name
returns 1 on success or 0 in case of an error.
.Sh SEE ALSO
.Xr ssl 3 ,
.Xr SSL_CTX_callback_ctrl 3 ,
.Xr SSL_CTX_set_alpn_select_cb 3
.Sh HISTORY
These functions first appeared in OpenSSL 0.9.8f
and have been available since
.Ox 4.5 .
Changes to jni/libressl/man/SSL_CTX_set_tlsext_status_cb.3.
1
2
3
4
5
6
7
8
.\" $OpenBSD: SSL_CTX_set_tlsext_status_cb.3,v 1.6 2018/03/24 00:11:37 schwarze Exp $
.\" full merge up to: OpenSSL 43c34894 Nov 30 16:04:51 2015 +0000
.\" selective merge up to: OpenSSL e9b77246 Jan 20 19:58:49 2017 +0100
.\"
.\" This file was written by Matt Caswell <matt@openssl.org>.
.\" Copyright (c) 2015, 2016 The OpenSSL Project.  All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
|







1
2
3
4
5
6
7
8
.\" $OpenBSD: SSL_CTX_set_tlsext_status_cb.3,v 1.7 2019/06/12 09:36:30 schwarze Exp $
.\" full merge up to: OpenSSL 43c34894 Nov 30 16:04:51 2015 +0000
.\" selective merge up to: OpenSSL e9b77246 Jan 20 19:58:49 2017 +0100
.\"
.\" This file was written by Matt Caswell <matt@openssl.org>.
.\" Copyright (c) 2015, 2016 The OpenSSL Project.  All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: March 24 2018 $
.Dt SSL_CTX_SET_TLSEXT_STATUS_CB 3
.Os
.Sh NAME
.Nm SSL_CTX_set_tlsext_status_cb ,
.Nm SSL_CTX_get_tlsext_status_cb ,
.Nm SSL_CTX_set_tlsext_status_arg ,
.Nm SSL_CTX_get_tlsext_status_arg ,







|







45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: June 12 2019 $
.Dt SSL_CTX_SET_TLSEXT_STATUS_CB 3
.Os
.Sh NAME
.Nm SSL_CTX_set_tlsext_status_cb ,
.Nm SSL_CTX_get_tlsext_status_cb ,
.Nm SSL_CTX_set_tlsext_status_arg ,
.Nm SSL_CTX_get_tlsext_status_arg ,
183
184
185
186
187
188
189

190
191
192
193
194
195
196
.Fn SSL_set_tlsext_status_ocsp_resp
always return 1, indicating success.
.Pp
.Fn SSL_get_tlsext_status_ocsp_resp
returns the length of the OCSP response data
or \-1 if there is no OCSP response data.
.Sh SEE ALSO

.Xr SSL_CTX_callback_ctrl 3
.Sh HISTORY
.Fn SSL_CTX_set_tlsext_status_cb ,
.Fn SSL_CTX_set_tlsext_status_arg ,
.Fn SSL_set_tlsext_status_type ,
.Fn SSL_get_tlsext_status_ocsp_resp ,
and







>







183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
.Fn SSL_set_tlsext_status_ocsp_resp
always return 1, indicating success.
.Pp
.Fn SSL_get_tlsext_status_ocsp_resp
returns the length of the OCSP response data
or \-1 if there is no OCSP response data.
.Sh SEE ALSO
.Xr ssl 3 ,
.Xr SSL_CTX_callback_ctrl 3
.Sh HISTORY
.Fn SSL_CTX_set_tlsext_status_cb ,
.Fn SSL_CTX_set_tlsext_status_arg ,
.Fn SSL_set_tlsext_status_type ,
.Fn SSL_get_tlsext_status_ocsp_resp ,
and
Changes to jni/libressl/man/SSL_CTX_set_tlsext_ticket_key_cb.3.
1
2
3
4
5
6
7
8
.\"	$OpenBSD: SSL_CTX_set_tlsext_ticket_key_cb.3,v 1.4 2018/03/23 01:06:56 schwarze Exp $
.\"	OpenSSL b97fdb57 Nov 11 09:33:09 2016 +0100
.\"
.\" This file was written by Rich Salz <rsalz@akamai.com>
.\" Copyright (c) 2014, 2015, 2016 The OpenSSL Project.  All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
|







1
2
3
4
5
6
7
8
.\"	$OpenBSD: SSL_CTX_set_tlsext_ticket_key_cb.3,v 1.5 2019/06/12 09:36:30 schwarze Exp $
.\"	OpenSSL b97fdb57 Nov 11 09:33:09 2016 +0100
.\"
.\" This file was written by Rich Salz <rsalz@akamai.com>
.\" Copyright (c) 2014, 2015, 2016 The OpenSSL Project.  All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: March 23 2018 $
.Dt SSL_CTX_SET_TLSEXT_TICKET_KEY_CB 3
.Os
.Sh NAME
.Nm SSL_CTX_set_tlsext_ticket_key_cb
.Nd set a callback for session ticket processing
.Sh SYNOPSIS
.In openssl/tls1.h







|







44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: June 12 2019 $
.Dt SSL_CTX_SET_TLSEXT_TICKET_KEY_CB 3
.Os
.Sh NAME
.Nm SSL_CTX_set_tlsext_ticket_key_cb
.Nd set a callback for session ticket processing
.Sh SYNOPSIS
.In openssl/tls1.h
282
283
284
285
286
287
288

289
290
291
292
293
294
295
296
297
298
299
		    return 2;

		return 1;
	}
}
.Ed
.Sh SEE ALSO

.Xr SSL_CTX_add_session 3 ,
.Xr SSL_CTX_callback_ctrl 3 ,
.Xr SSL_CTX_sess_number 3 ,
.Xr SSL_CTX_sess_set_get_cb 3 ,
.Xr SSL_CTX_set_session_id_context 3 ,
.Xr SSL_session_reused 3 ,
.Xr SSL_set_session 3
.Sh HISTORY
.Fn SSL_CTX_set_tlsext_ticket_key_cb
first appeared in OpenSSL 0.9.8h and has been available since
.Ox 4.5 .







>











282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
		    return 2;

		return 1;
	}
}
.Ed
.Sh SEE ALSO
.Xr ssl 3 ,
.Xr SSL_CTX_add_session 3 ,
.Xr SSL_CTX_callback_ctrl 3 ,
.Xr SSL_CTX_sess_number 3 ,
.Xr SSL_CTX_sess_set_get_cb 3 ,
.Xr SSL_CTX_set_session_id_context 3 ,
.Xr SSL_session_reused 3 ,
.Xr SSL_set_session 3
.Sh HISTORY
.Fn SSL_CTX_set_tlsext_ticket_key_cb
first appeared in OpenSSL 0.9.8h and has been available since
.Ox 4.5 .
Changes to jni/libressl/man/SSL_CTX_set_tlsext_use_srtp.3.
1
2
3
4
5
6
7
8
.\" $OpenBSD: SSL_CTX_set_tlsext_use_srtp.3,v 1.3 2018/03/30 19:31:11 schwarze Exp $
.\" full merge up to: OpenSSL b0edda11 Mar 20 13:00:17 2018 +0000
.\"
.\" This file was written by Matt Caswell <matt@openssl.org>.
.\" Copyright (c) 2017 The OpenSSL Project.  All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
|







1
2
3
4
5
6
7
8
.\" $OpenBSD: SSL_CTX_set_tlsext_use_srtp.3,v 1.4 2019/06/12 09:36:30 schwarze Exp $
.\" full merge up to: OpenSSL b0edda11 Mar 20 13:00:17 2018 +0000
.\"
.\" This file was written by Matt Caswell <matt@openssl.org>.
.\" Copyright (c) 2017 The OpenSSL Project.  All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: March 30 2018 $
.Dt SSL_CTX_SET_TLSEXT_USE_SRTP 3
.Os
.Sh NAME
.Nm SSL_CTX_set_tlsext_use_srtp ,
.Nm SSL_set_tlsext_use_srtp ,
.Nm SSL_get_srtp_profiles ,
.Nm SSL_get_selected_srtp_profile







|







44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: June 12 2019 $
.Dt SSL_CTX_SET_TLSEXT_USE_SRTP 3
.Os
.Sh NAME
.Nm SSL_CTX_set_tlsext_use_srtp ,
.Nm SSL_set_tlsext_use_srtp ,
.Nm SSL_get_srtp_profiles ,
.Nm SSL_get_selected_srtp_profile
181
182
183
184
185
186
187

188
189
190
191
192
.Fn SSL_get_selected_srtp_profile
returns a pointer to an
.Vt SRTP_PROTECTION_PROFILE
object if one has been negotiated or
.Dv NULL
otherwise.
.Sh SEE ALSO

.Xr SSL_export_keying_material 3
.Sh HISTORY
These functions first appeared in OpenSSL 1.0.1
and have been available since
.Ox 5.3 .







>





181
182
183
184
185
186
187
188
189
190
191
192
193
.Fn SSL_get_selected_srtp_profile
returns a pointer to an
.Vt SRTP_PROTECTION_PROFILE
object if one has been negotiated or
.Dv NULL
otherwise.
.Sh SEE ALSO
.Xr ssl 3 ,
.Xr SSL_export_keying_material 3
.Sh HISTORY
These functions first appeared in OpenSSL 1.0.1
and have been available since
.Ox 5.3 .
Changes to jni/libressl/man/SSL_CTX_use_certificate.3.
1
2
3
4
5
6
7
8
.\" $OpenBSD: SSL_CTX_use_certificate.3,v 1.11 2019/04/09 22:01:50 schwarze Exp $
.\" full merge up to: OpenSSL 3aaa1bd0 Mar 28 16:35:25 2017 +1000
.\" selective merge up to: OpenSSL d1f7a1e6 Apr 26 14:05:40 2018 +0100
.\"
.\" This file was written by Lutz Jaenicke <jaenicke@openssl.org>.
.\" Copyright (c) 2000, 2001, 2002, 2003, 2005 The OpenSSL Project.
.\" All rights reserved.
.\"
|







1
2
3
4
5
6
7
8
.\" $OpenBSD: SSL_CTX_use_certificate.3,v 1.13 2019/06/08 15:25:43 schwarze Exp $
.\" full merge up to: OpenSSL 3aaa1bd0 Mar 28 16:35:25 2017 +1000
.\" selective merge up to: OpenSSL d1f7a1e6 Apr 26 14:05:40 2018 +0100
.\"
.\" This file was written by Lutz Jaenicke <jaenicke@openssl.org>.
.\" Copyright (c) 2000, 2001, 2002, 2003, 2005 The OpenSSL Project.
.\" All rights reserved.
.\"
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: April 9 2019 $
.Dt SSL_CTX_USE_CERTIFICATE 3
.Os
.Sh NAME
.Nm SSL_CTX_use_certificate ,
.Nm SSL_CTX_use_certificate_ASN1 ,
.Nm SSL_CTX_use_certificate_file ,
.Nm SSL_use_certificate ,







|







46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: June 8 2019 $
.Dt SSL_CTX_USE_CERTIFICATE 3
.Os
.Sh NAME
.Nm SSL_CTX_use_certificate ,
.Nm SSL_CTX_use_certificate_ASN1 ,
.Nm SSL_CTX_use_certificate_file ,
.Nm SSL_use_certificate ,
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
.Dv SSL_FILETYPE_ASN1 .
.Fn SSL_use_certificate_file
loads the certificate from
.Fa file
into
.Fa ssl .
See the
.Sx NOTES
section on why
.Fn SSL_CTX_use_certificate_chain_file
should be preferred.
.Pp
The
.Fn SSL_CTX_use_certificate_chain*
functions load a certificate chain into







|







202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
.Dv SSL_FILETYPE_ASN1 .
.Fn SSL_use_certificate_file
loads the certificate from
.Fa file
into
.Fa ssl .
See the
.Pp
section on why
.Fn SSL_CTX_use_certificate_chain_file
should be preferred.
.Pp
The
.Fn SSL_CTX_use_certificate_chain*
functions load a certificate chain into
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
It compares the
.Em public
key components and parameters of an OpenSSL private key with the
corresponding certificate loaded into
.Fa ctx .
If more than one key/certificate pair (RSA/DSA) is installed,
the last item installed will be compared.
If, e.g., the last item was a RSA certificate or key,
the RSA key/certificate pair will be checked.
.Fn SSL_check_private_key
performs the same
.Em public
key comparison for
.Fa ssl .
If no key/certificate was explicitly added for this







|







308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
It compares the
.Em public
key components and parameters of an OpenSSL private key with the
corresponding certificate loaded into
.Fa ctx .
If more than one key/certificate pair (RSA/DSA) is installed,
the last item installed will be compared.
If, e.g., the last item was an RSA certificate or key,
the RSA key/certificate pair will be checked.
.Fn SSL_check_private_key
performs the same
.Em public
key comparison for
.Fa ssl .
If no key/certificate was explicitly added for this
Changes to jni/libressl/man/SSL_SESSION_free.3.
1
2
3
4
5
6
7
8
.\" $OpenBSD: SSL_SESSION_free.3,v 1.6 2018/03/27 17:35:50 schwarze Exp $
.\" full merge up to: OpenSSL b31db505 Mar 24 16:01:50 2017 +0000
.\"
.\" This file was written by Lutz Jaenicke <jaenicke@openssl.org>
.\" and Matt Caswell <matt@openssl.org>.
.\" Copyright (c) 2000, 2001, 2009, 2017 The OpenSSL Project.
.\" All rights reserved.
.\"
|







1
2
3
4
5
6
7
8
.\" $OpenBSD: SSL_SESSION_free.3,v 1.7 2019/06/12 09:36:30 schwarze Exp $
.\" full merge up to: OpenSSL b31db505 Mar 24 16:01:50 2017 +0000
.\"
.\" This file was written by Lutz Jaenicke <jaenicke@openssl.org>
.\" and Matt Caswell <matt@openssl.org>.
.\" Copyright (c) 2000, 2001, 2009, 2017 The OpenSSL Project.
.\" All rights reserved.
.\"
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: March 27 2018 $
.Dt SSL_SESSION_FREE 3
.Os
.Sh NAME
.Nm SSL_SESSION_up_ref ,
.Nm SSL_SESSION_free
.Nd SSL_SESSION reference counting
.Sh SYNOPSIS







|







46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: June 12 2019 $
.Dt SSL_SESSION_FREE 3
.Os
.Sh NAME
.Nm SSL_SESSION_up_ref ,
.Nm SSL_SESSION_free
.Nd SSL_SESSION reference counting
.Sh SYNOPSIS
129
130
131
132
133
134
135

136
137
138
139
140
141
142
143
144
145
146
147
objects, as this would cause incorrect reference counts and therefore program
failures.
.Sh RETURN VALUES
.Fn SSL_SESSION_up_ref
returns 1 on success or 0 on error.
.Sh SEE ALSO
.Xr d2i_SSL_SESSION 3 ,

.Xr SSL_CTX_flush_sessions 3 ,
.Xr SSL_CTX_set_session_cache_mode 3 ,
.Xr SSL_get_session 3 ,
.Xr SSL_SESSION_new 3
.Sh HISTORY
.Fn SSL_SESSION_free
first appeared in SSLeay 0.5.2 and has been available since
.Ox 2.4 .
.Pp
.Fn SSL_SESSION_up_ref
first appeared in OpenSSL 1.1.0 and has been available since
.Ox 6.3 .







>












129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
objects, as this would cause incorrect reference counts and therefore program
failures.
.Sh RETURN VALUES
.Fn SSL_SESSION_up_ref
returns 1 on success or 0 on error.
.Sh SEE ALSO
.Xr d2i_SSL_SESSION 3 ,
.Xr ssl 3 ,
.Xr SSL_CTX_flush_sessions 3 ,
.Xr SSL_CTX_set_session_cache_mode 3 ,
.Xr SSL_get_session 3 ,
.Xr SSL_SESSION_new 3
.Sh HISTORY
.Fn SSL_SESSION_free
first appeared in SSLeay 0.5.2 and has been available since
.Ox 2.4 .
.Pp
.Fn SSL_SESSION_up_ref
first appeared in OpenSSL 1.1.0 and has been available since
.Ox 6.3 .
Changes to jni/libressl/man/SSL_SESSION_get_time.3.
1
2
3
4
5
6
7
8
.\"	$OpenBSD: SSL_SESSION_get_time.3,v 1.7 2018/03/27 17:35:50 schwarze Exp $
.\"	OpenSSL b97fdb57 Nov 11 09:33:09 2016 +0100
.\"
.\" This file was written by Lutz Jaenicke <jaenicke@openssl.org>.
.\" Copyright (c) 2001, 2005, 2006, 2016 The OpenSSL Project.
.\" All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
|







1
2
3
4
5
6
7
8
.\"	$OpenBSD: SSL_SESSION_get_time.3,v 1.8 2019/06/08 15:25:43 schwarze Exp $
.\"	OpenSSL b97fdb57 Nov 11 09:33:09 2016 +0100
.\"
.\" This file was written by Lutz Jaenicke <jaenicke@openssl.org>.
.\" Copyright (c) 2001, 2005, 2006, 2016 The OpenSSL Project.
.\" All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: March 27 2018 $
.Dt SSL_SESSION_GET_TIME 3
.Os
.Sh NAME
.Nm SSL_SESSION_get_time ,
.Nm SSL_SESSION_set_time ,
.Nm SSL_SESSION_get_timeout ,
.Nm SSL_SESSION_set_timeout ,







|







45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: June 8 2019 $
.Dt SSL_SESSION_GET_TIME 3
.Os
.Sh NAME
.Nm SSL_SESSION_get_time ,
.Nm SSL_SESSION_set_time ,
.Nm SSL_SESSION_get_timeout ,
.Nm SSL_SESSION_set_timeout ,
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
.Fn SSL_set_time ,
.Fn SSL_get_timeout ,
and
.Fn SSL_set_timeout
functions are synonyms for the
.Fn SSL_SESSION_*
counterparts.
.Sh NOTES
Sessions are expired by examining the creation time and the timeout value.
Both are set at creation time of the session to the actual time and the default
timeout value at creation, respectively, as set by
.Xr SSL_CTX_set_timeout 3 .
Using these functions it is possible to extend or shorten the lifetime of the
session.
.Sh RETURN VALUES







|







113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
.Fn SSL_set_time ,
.Fn SSL_get_timeout ,
and
.Fn SSL_set_timeout
functions are synonyms for the
.Fn SSL_SESSION_*
counterparts.
.Pp
Sessions are expired by examining the creation time and the timeout value.
Both are set at creation time of the session to the actual time and the default
timeout value at creation, respectively, as set by
.Xr SSL_CTX_set_timeout 3 .
Using these functions it is possible to extend or shorten the lifetime of the
session.
.Sh RETURN VALUES
Changes to jni/libressl/man/SSL_SESSION_new.3.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
.\"	$OpenBSD: SSL_SESSION_new.3,v 1.6 2018/03/27 17:35:50 schwarze Exp $
.\"
.\" Copyright (c) 2016 Ingo Schwarze <schwarze@openbsd.org>
.\"
.\" Permission to use, copy, modify, and distribute this software for any
.\" purpose with or without fee is hereby granted, provided that the above
.\" copyright notice and this permission notice appear in all copies.
.\"
.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
.Dd $Mdocdate: March 27 2018 $
.Dt SSL_SESSION_NEW 3
.Os
.Sh NAME
.Nm SSL_SESSION_new
.Nd construct a new SSL_SESSION object
.Sh SYNOPSIS
.In openssl/ssl.h
|















|







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
.\" $OpenBSD: SSL_SESSION_new.3,v 1.7 2019/06/12 09:36:30 schwarze Exp $
.\"
.\" Copyright (c) 2016 Ingo Schwarze <schwarze@openbsd.org>
.\"
.\" Permission to use, copy, modify, and distribute this software for any
.\" purpose with or without fee is hereby granted, provided that the above
.\" copyright notice and this permission notice appear in all copies.
.\"
.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
.Dd $Mdocdate: June 12 2019 $
.Dt SSL_SESSION_NEW 3
.Os
.Sh NAME
.Nm SSL_SESSION_new
.Nd construct a new SSL_SESSION object
.Sh SYNOPSIS
.In openssl/ssl.h
49
50
51
52
53
54
55

56
57
58
59
60
61
62
After failure,
.Xr ERR_get_error 3
returns
.Dv ERR_R_MALLOC_FAILURE .
.Sh SEE ALSO
.Xr d2i_SSL_SESSION 3 ,
.Xr PEM_read_SSL_SESSION 3 ,

.Xr SSL_connect 3 ,
.Xr SSL_copy_session_id 3 ,
.Xr SSL_CTX_add_session 3 ,
.Xr SSL_CTX_sess_set_get_cb 3 ,
.Xr SSL_get_session 3 ,
.Xr SSL_SESSION_free 3 ,
.Xr SSL_SESSION_get0_peer 3 ,







>







49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
After failure,
.Xr ERR_get_error 3
returns
.Dv ERR_R_MALLOC_FAILURE .
.Sh SEE ALSO
.Xr d2i_SSL_SESSION 3 ,
.Xr PEM_read_SSL_SESSION 3 ,
.Xr ssl 3 ,
.Xr SSL_connect 3 ,
.Xr SSL_copy_session_id 3 ,
.Xr SSL_CTX_add_session 3 ,
.Xr SSL_CTX_sess_set_get_cb 3 ,
.Xr SSL_get_session 3 ,
.Xr SSL_SESSION_free 3 ,
.Xr SSL_SESSION_get0_peer 3 ,
Changes to jni/libressl/man/SSL_SESSION_print.3.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
.\"	$OpenBSD: SSL_SESSION_print.3,v 1.3 2018/03/27 17:35:50 schwarze Exp $
.\"
.\" Copyright (c) 2016 Ingo Schwarze <schwarze@openbsd.org>
.\"
.\" Permission to use, copy, modify, and distribute this software for any
.\" purpose with or without fee is hereby granted, provided that the above
.\" copyright notice and this permission notice appear in all copies.
.\"
.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
.Dd $Mdocdate: March 27 2018 $
.Dt SSL_SESSION_PRINT 3
.Os
.Sh NAME
.Nm SSL_SESSION_print ,
.Nm SSL_SESSION_print_fp
.Nd print some properties of an SSL_SESSION object
.Sh SYNOPSIS
|















|







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
.\" $OpenBSD: SSL_SESSION_print.3,v 1.4 2019/06/12 09:36:30 schwarze Exp $
.\"
.\" Copyright (c) 2016 Ingo Schwarze <schwarze@openbsd.org>
.\"
.\" Permission to use, copy, modify, and distribute this software for any
.\" purpose with or without fee is hereby granted, provided that the above
.\" copyright notice and this permission notice appear in all copies.
.\"
.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
.Dd $Mdocdate: June 12 2019 $
.Dt SSL_SESSION_PRINT 3
.Os
.Sh NAME
.Nm SSL_SESSION_print ,
.Nm SSL_SESSION_print_fp
.Nd print some properties of an SSL_SESSION object
.Sh SYNOPSIS
55
56
57
58
59
60
61

62
63
64
65
66
67
68
69
70
71
72
73
return 1 for success or 0 for failure.
.Pp
In some cases, the reason for failure can be determined with
.Xr ERR_get_error 3 .
.Sh SEE ALSO
.Xr d2i_SSL_SESSION 3 ,
.Xr PEM_read_SSL_SESSION 3 ,

.Xr SSL_get_session 3 ,
.Xr SSL_SESSION_free 3 ,
.Xr SSL_SESSION_get_ex_new_index 3 ,
.Xr SSL_SESSION_get_time 3 ,
.Xr SSL_SESSION_new 3
.Sh HISTORY
.Fn SSL_SESSION_print
first appeared in SSLeay 0.5.2.
.Fn SSL_SESSION_print_fp
first appeared in SSLeay 0.6.0.
Both functions have been available since
.Ox 2.4 .







>












55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
return 1 for success or 0 for failure.
.Pp
In some cases, the reason for failure can be determined with
.Xr ERR_get_error 3 .
.Sh SEE ALSO
.Xr d2i_SSL_SESSION 3 ,
.Xr PEM_read_SSL_SESSION 3 ,
.Xr ssl 3 ,
.Xr SSL_get_session 3 ,
.Xr SSL_SESSION_free 3 ,
.Xr SSL_SESSION_get_ex_new_index 3 ,
.Xr SSL_SESSION_get_time 3 ,
.Xr SSL_SESSION_new 3
.Sh HISTORY
.Fn SSL_SESSION_print
first appeared in SSLeay 0.5.2.
.Fn SSL_SESSION_print_fp
first appeared in SSLeay 0.6.0.
Both functions have been available since
.Ox 2.4 .
Changes to jni/libressl/man/SSL_accept.3.
1
2
3
4
5
6
7
8
.\"	$OpenBSD: SSL_accept.3,v 1.5 2018/03/27 17:35:50 schwarze Exp $
.\"	OpenSSL b97fdb57 Nov 11 09:33:09 2016 +0100
.\"
.\" This file was written by Lutz Jaenicke <jaenicke@openssl.org>.
.\" Copyright (c) 2000, 2001, 2002, 2003 The OpenSSL Project.
.\" All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
|







1
2
3
4
5
6
7
8
.\"	$OpenBSD: SSL_accept.3,v 1.6 2019/06/08 15:25:43 schwarze Exp $
.\"	OpenSSL b97fdb57 Nov 11 09:33:09 2016 +0100
.\"
.\" This file was written by Lutz Jaenicke <jaenicke@openssl.org>.
.\" Copyright (c) 2000, 2001, 2002, 2003 The OpenSSL Project.
.\" All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: March 27 2018 $
.Dt SSL_ACCEPT 3
.Os
.Sh NAME
.Nm SSL_accept
.Nd wait for a TLS/SSL client to initiate a TLS/SSL handshake
.Sh SYNOPSIS
.In openssl/ssl.h
.Ft int
.Fn SSL_accept "SSL *ssl"
.Sh DESCRIPTION
.Fn SSL_accept
waits for a TLS/SSL client to initiate the TLS/SSL handshake.
The communication channel must already have been set and assigned to the
.Fa ssl
object by setting an underlying
.Vt BIO .
.Sh NOTES
The behaviour of
.Fn SSL_accept
depends on the underlying
.Vt BIO .
.Pp
If the underlying
.Vt BIO







|
















|







45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: June 8 2019 $
.Dt SSL_ACCEPT 3
.Os
.Sh NAME
.Nm SSL_accept
.Nd wait for a TLS/SSL client to initiate a TLS/SSL handshake
.Sh SYNOPSIS
.In openssl/ssl.h
.Ft int
.Fn SSL_accept "SSL *ssl"
.Sh DESCRIPTION
.Fn SSL_accept
waits for a TLS/SSL client to initiate the TLS/SSL handshake.
The communication channel must already have been set and assigned to the
.Fa ssl
object by setting an underlying
.Vt BIO .
.Pp
The behaviour of
.Fn SSL_accept
depends on the underlying
.Vt BIO .
.Pp
If the underlying
.Vt BIO
Changes to jni/libressl/man/SSL_copy_session_id.3.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
.\"	$OpenBSD: SSL_copy_session_id.3,v 1.6 2018/08/24 21:29:51 jmc Exp $
.\"
.\" Copyright (c) 2016 Ingo Schwarze <schwarze@openbsd.org>
.\"
.\" Permission to use, copy, modify, and distribute this software for any
.\" purpose with or without fee is hereby granted, provided that the above
.\" copyright notice and this permission notice appear in all copies.
.\"
.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
.Dd $Mdocdate: August 24 2018 $
.Dt SSL_COPY_SESSION_ID 3
.Os
.Sh NAME
.Nm SSL_copy_session_id
.Nd copy session details between SSL objects
.Sh SYNOPSIS
.In openssl/ssl.h
|















|







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
.\" $OpenBSD: SSL_copy_session_id.3,v 1.7 2019/06/12 09:36:30 schwarze Exp $
.\"
.\" Copyright (c) 2016 Ingo Schwarze <schwarze@openbsd.org>
.\"
.\" Permission to use, copy, modify, and distribute this software for any
.\" purpose with or without fee is hereby granted, provided that the above
.\" copyright notice and this permission notice appear in all copies.
.\"
.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
.Dd $Mdocdate: June 12 2019 $
.Dt SSL_COPY_SESSION_ID 3
.Os
.Sh NAME
.Nm SSL_copy_session_id
.Nd copy session details between SSL objects
.Sh SYNOPSIS
.In openssl/ssl.h
56
57
58
59
60
61
62

63
64
65
66
67
68
69
and by
.Xr BIO_ssl_copy_session_id 3 .
.Sh RETURN VALUES
.Fn SSL_copy_session_id
returns 1 on success and 0 on error.
.Sh SEE ALSO
.Xr BIO_ssl_copy_session_id 3 ,

.Xr SSL_dup 3 ,
.Xr SSL_get_session 3 ,
.Xr SSL_SESSION_get_id 3 ,
.Xr SSL_SESSION_new 3 ,
.Xr SSL_set_session 3 ,
.Xr SSL_set_session_id_context 3
.Sh HISTORY







>







56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
and by
.Xr BIO_ssl_copy_session_id 3 .
.Sh RETURN VALUES
.Fn SSL_copy_session_id
returns 1 on success and 0 on error.
.Sh SEE ALSO
.Xr BIO_ssl_copy_session_id 3 ,
.Xr ssl 3 ,
.Xr SSL_dup 3 ,
.Xr SSL_get_session 3 ,
.Xr SSL_SESSION_get_id 3 ,
.Xr SSL_SESSION_new 3 ,
.Xr SSL_set_session 3 ,
.Xr SSL_set_session_id_context 3
.Sh HISTORY
Changes to jni/libressl/man/SSL_dup.3.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
.\"	$OpenBSD: SSL_dup.3,v 1.3 2018/03/27 17:35:50 schwarze Exp $
.\"
.\" Copyright (c) 2016 Ingo Schwarze <schwarze@openbsd.org>
.\"
.\" Permission to use, copy, modify, and distribute this software for any
.\" purpose with or without fee is hereby granted, provided that the above
.\" copyright notice and this permission notice appear in all copies.
.\"
.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
.Dd $Mdocdate: March 27 2018 $
.Dt SSL_DUP 3
.Os
.Sh NAME
.Nm SSL_dup
.Nd deep copy of an SSL object
.Sh SYNOPSIS
.In openssl/ssl.h
|















|







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
.\" $OpenBSD: SSL_dup.3,v 1.4 2019/06/12 09:36:30 schwarze Exp $
.\"
.\" Copyright (c) 2016 Ingo Schwarze <schwarze@openbsd.org>
.\"
.\" Permission to use, copy, modify, and distribute this software for any
.\" purpose with or without fee is hereby granted, provided that the above
.\" copyright notice and this permission notice appear in all copies.
.\"
.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
.Dd $Mdocdate: June 12 2019 $
.Dt SSL_DUP 3
.Os
.Sh NAME
.Nm SSL_dup
.Nd deep copy of an SSL object
.Sh SYNOPSIS
.In openssl/ssl.h
46
47
48
49
50
51
52

53
54
55
56
57
58
59
60
.Fn SSL_dup
returns the new
.Vt SSL
object or
.Dv NULL
on failure.
.Sh SEE ALSO

.Xr SSL_clear 3 ,
.Xr SSL_copy_session_id 3 ,
.Xr SSL_free 3 ,
.Xr SSL_new 3
.Sh HISTORY
.Fn SSL_dup
first appeared in SSLeay 0.8.0 and has been available since
.Ox 2.4 .







>








46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
.Fn SSL_dup
returns the new
.Vt SSL
object or
.Dv NULL
on failure.
.Sh SEE ALSO
.Xr ssl 3 ,
.Xr SSL_clear 3 ,
.Xr SSL_copy_session_id 3 ,
.Xr SSL_free 3 ,
.Xr SSL_new 3
.Sh HISTORY
.Fn SSL_dup
first appeared in SSLeay 0.8.0 and has been available since
.Ox 2.4 .
Changes to jni/libressl/man/SSL_dup_CA_list.3.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
.\"	$OpenBSD: SSL_dup_CA_list.3,v 1.5 2018/04/25 13:51:34 schwarze Exp $
.\"
.\" Copyright (c) 2016 Ingo Schwarze <schwarze@openbsd.org>
.\"
.\" Permission to use, copy, modify, and distribute this software for any
.\" purpose with or without fee is hereby granted, provided that the above
.\" copyright notice and this permission notice appear in all copies.
.\"
.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
.Dd $Mdocdate: April 25 2018 $
.Dt SSL_DUP_CA_LIST 3
.Os
.Sh NAME
.Nm SSL_dup_CA_list
.Nd deep copy of a stack of X.509 Name objects
.\" The capital "N" in "Name" is intentional (X.509 syntax).
.Sh SYNOPSIS
|















|







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
.\" $OpenBSD: SSL_dup_CA_list.3,v 1.6 2019/06/12 09:36:30 schwarze Exp $
.\"
.\" Copyright (c) 2016 Ingo Schwarze <schwarze@openbsd.org>
.\"
.\" Permission to use, copy, modify, and distribute this software for any
.\" purpose with or without fee is hereby granted, provided that the above
.\" copyright notice and this permission notice appear in all copies.
.\"
.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
.Dd $Mdocdate: June 12 2019 $
.Dt SSL_DUP_CA_LIST 3
.Os
.Sh NAME
.Nm SSL_dup_CA_list
.Nd deep copy of a stack of X.509 Name objects
.\" The capital "N" in "Name" is intentional (X.509 syntax).
.Sh SYNOPSIS
39
40
41
42
43
44
45

46
47
48
49
50
51
52
53
.Fn SSL_dup_CA_list
returns the new
.Vt STACK_OF(X509_NAME)
or
.Dv NULL
on failure.
.Sh SEE ALSO

.Xr SSL_CTX_set_client_CA_list 3 ,
.Xr SSL_get_client_CA_list 3 ,
.Xr SSL_load_client_CA_file 3 ,
.Xr X509_NAME_new 3
.Sh HISTORY
.Fn SSL_dup_CA_list
first appeared in SSLeay 0.8.0 and has been available since
.Ox 2.4 .







>








39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
.Fn SSL_dup_CA_list
returns the new
.Vt STACK_OF(X509_NAME)
or
.Dv NULL
on failure.
.Sh SEE ALSO
.Xr ssl 3 ,
.Xr SSL_CTX_set_client_CA_list 3 ,
.Xr SSL_get_client_CA_list 3 ,
.Xr SSL_load_client_CA_file 3 ,
.Xr X509_NAME_new 3
.Sh HISTORY
.Fn SSL_dup_CA_list
first appeared in SSLeay 0.8.0 and has been available since
.Ox 2.4 .
Changes to jni/libressl/man/SSL_export_keying_material.3.
1
2
3
4
5
6
7
8
.\"	$OpenBSD: SSL_export_keying_material.3,v 1.2 2018/03/23 05:50:30 schwarze Exp $
.\"	OpenSSL a599574b Jun 28 17:18:27 2017 +0100
.\"	OpenSSL 23cec1f4 Jun 21 13:55:02 2017 +0100
.\"
.\" This file was written by Matt Caswell <matt@openssl.org>.
.\" Copyright (c) 2017 The OpenSSL Project.  All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
|







1
2
3
4
5
6
7
8
.\"	$OpenBSD: SSL_export_keying_material.3,v 1.3 2019/06/12 09:36:30 schwarze Exp $
.\"	OpenSSL a599574b Jun 28 17:18:27 2017 +0100
.\"	OpenSSL 23cec1f4 Jun 21 13:55:02 2017 +0100
.\"
.\" This file was written by Matt Caswell <matt@openssl.org>.
.\" Copyright (c) 2017 The OpenSSL Project.  All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: March 23 2018 $
.Dt SSL_EXPORT_KEYING_MATERIAL 3
.Os
.Sh NAME
.Nm SSL_export_keying_material
.Nd obtain keying material for application use
.Sh SYNOPSIS
.In openssl/ssl.h







|







45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: June 12 2019 $
.Dt SSL_EXPORT_KEYING_MATERIAL 3
.Os
.Sh NAME
.Nm SSL_export_keying_material
.Nd obtain keying material for application use
.Sh SYNOPSIS
.In openssl/ssl.h
121
122
123
124
125
126
127


128
129
130
131
.Lk https://www.iana.org/assignments/tls-parameters/tls-parameters.xhtml#exporter-labels "IANA Exporter Label Registry" .
.Pp
Alternatively, labels beginning with "EXPERIMENTAL" are permitted by the
standard to be used without registration.
.Sh RETURN VALUES
.Fn SSL_export_keying_material
returns 1 on success or 0 or -1 on failure.


.Sh HISTORY
.Fn SSL_export_keying_material
first appeared in OpenSSL 1.0.1 and has been available since
.Ox 5.3 .







>
>




121
122
123
124
125
126
127
128
129
130
131
132
133
.Lk https://www.iana.org/assignments/tls-parameters/tls-parameters.xhtml#exporter-labels "IANA Exporter Label Registry" .
.Pp
Alternatively, labels beginning with "EXPERIMENTAL" are permitted by the
standard to be used without registration.
.Sh RETURN VALUES
.Fn SSL_export_keying_material
returns 1 on success or 0 or -1 on failure.
.Sh SEE ALSO
.Xr ssl 3
.Sh HISTORY
.Fn SSL_export_keying_material
first appeared in OpenSSL 1.0.1 and has been available since
.Ox 5.3 .
Changes to jni/libressl/man/SSL_get_certificate.3.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
.\"	$OpenBSD: SSL_get_certificate.3,v 1.4 2018/04/25 13:51:34 schwarze Exp $
.\"
.\" Copyright (c) 2016 Ingo Schwarze <schwarze@openbsd.org>
.\"
.\" Permission to use, copy, modify, and distribute this software for any
.\" purpose with or without fee is hereby granted, provided that the above
.\" copyright notice and this permission notice appear in all copies.
.\"
.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
.Dd $Mdocdate: April 25 2018 $
.Dt SSL_GET_CERTIFICATE 3
.Os
.Sh NAME
.Nm SSL_get_certificate ,
.Nm SSL_get_privatekey
.Nd get SSL certificate and private key
.Sh SYNOPSIS
|















|







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
.\" $OpenBSD: SSL_get_certificate.3,v 1.5 2019/06/12 09:36:30 schwarze Exp $
.\"
.\" Copyright (c) 2016 Ingo Schwarze <schwarze@openbsd.org>
.\"
.\" Permission to use, copy, modify, and distribute this software for any
.\" purpose with or without fee is hereby granted, provided that the above
.\" copyright notice and this permission notice appear in all copies.
.\"
.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
.Dd $Mdocdate: June 12 2019 $
.Dt SSL_GET_CERTIFICATE 3
.Os
.Sh NAME
.Nm SSL_get_certificate ,
.Nm SSL_get_privatekey
.Nd get SSL certificate and private key
.Sh SYNOPSIS
48
49
50
51
52
53
54

55
56
57
58
59
60
61
62
63
.Fn SSL_get_privatekey
returns the active private key currently used by
.Fa ssl
or
.Dv NULL
if none is active.
.Sh SEE ALSO

.Xr SSL_check_private_key 3 ,
.Xr SSL_use_certificate 3
.Sh HISTORY
.Fn SSL_get_certificate
first appeared in SSLeay 0.5.2a.
.Fn SSL_get_privatekey
first appeared in SSLeay 0.8.0.
Both functions have been available since
.Ox 2.4 .







>









48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
.Fn SSL_get_privatekey
returns the active private key currently used by
.Fa ssl
or
.Dv NULL
if none is active.
.Sh SEE ALSO
.Xr ssl 3 ,
.Xr SSL_check_private_key 3 ,
.Xr SSL_use_certificate 3
.Sh HISTORY
.Fn SSL_get_certificate
first appeared in SSLeay 0.5.2a.
.Fn SSL_get_privatekey
first appeared in SSLeay 0.8.0.
Both functions have been available since
.Ox 2.4 .
Changes to jni/libressl/man/SSL_get_ex_data_X509_STORE_CTX_idx.3.
1
2
3
4
5
6
7
8
.\"	$OpenBSD: SSL_get_ex_data_X509_STORE_CTX_idx.3,v 1.3 2018/03/21 09:05:04 schwarze Exp $
.\"	OpenSSL 9b86974e Aug 17 15:21:33 2015 -0400
.\"
.\" This file was written by Lutz Jaenicke <jaenicke@openssl.org>.
.\" Copyright (c) 2001 The OpenSSL Project.  All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
|







1
2
3
4
5
6
7
8
.\"	$OpenBSD: SSL_get_ex_data_X509_STORE_CTX_idx.3,v 1.4 2019/06/08 15:25:43 schwarze Exp $
.\"	OpenSSL 9b86974e Aug 17 15:21:33 2015 -0400
.\"
.\" This file was written by Lutz Jaenicke <jaenicke@openssl.org>.
.\" Copyright (c) 2001 The OpenSSL Project.  All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: March 21 2018 $
.Dt SSL_GET_EX_DATA_X509_STORE_CTX_IDX 3
.Os
.Sh NAME
.Nm SSL_get_ex_data_X509_STORE_CTX_idx
.Nd get ex_data index to access SSL structure from X509_STORE_CTX
.Sh SYNOPSIS
.In openssl/ssl.h
.Ft int
.Fn SSL_get_ex_data_X509_STORE_CTX_idx void
.Sh DESCRIPTION
.Fn SSL_get_ex_data_X509_STORE_CTX_idx
returns the index number under which the pointer to the
.Vt SSL
object is stored into the
.Vt X509_STORE_CTX
object.
.Sh NOTES
Whenever a
.Vt X509_STORE_CTX
object is created for the verification of the peer's certificate during a
handshake, a pointer to the
.Vt SSL
object is stored into the
.Vt X509_STORE_CTX







|
















|







44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: June 8 2019 $
.Dt SSL_GET_EX_DATA_X509_STORE_CTX_IDX 3
.Os
.Sh NAME
.Nm SSL_get_ex_data_X509_STORE_CTX_idx
.Nd get ex_data index to access SSL structure from X509_STORE_CTX
.Sh SYNOPSIS
.In openssl/ssl.h
.Ft int
.Fn SSL_get_ex_data_X509_STORE_CTX_idx void
.Sh DESCRIPTION
.Fn SSL_get_ex_data_X509_STORE_CTX_idx
returns the index number under which the pointer to the
.Vt SSL
object is stored into the
.Vt X509_STORE_CTX
object.
.Pp
Whenever a
.Vt X509_STORE_CTX
object is created for the verification of the peer's certificate during a
handshake, a pointer to the
.Vt SSL
object is stored into the
.Vt X509_STORE_CTX
Changes to jni/libressl/man/SSL_get_server_tmp_key.3.
1
2
3
4
5
6
7
8
.\"	$OpenBSD: SSL_get_server_tmp_key.3,v 1.3 2018/03/24 00:55:37 schwarze Exp $
.\"	OpenSSL SSL_get_server_tmp_key.pod 508fafd8 Apr 3 15:41:21 2017 +0100
.\"
.\" This file was written by Matt Caswell <matt@openssl.org>
.\" Copyright (c) 2017 The OpenSSL Project.  All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
|







1
2
3
4
5
6
7
8
.\"	$OpenBSD: SSL_get_server_tmp_key.3,v 1.4 2019/06/12 09:36:30 schwarze Exp $
.\"	OpenSSL SSL_get_server_tmp_key.pod 508fafd8 Apr 3 15:41:21 2017 +0100
.\"
.\" This file was written by Matt Caswell <matt@openssl.org>
.\" Copyright (c) 2017 The OpenSSL Project.  All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: March 24 2018 $
.Dt SSL_GET_SERVER_TMP_KEY 3
.Os
.Sh NAME
.Nm SSL_get_server_tmp_key
.Nd temporary server key during a handshake
.Sh SYNOPSIS
.In openssl/ssl.h







|







44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: June 12 2019 $
.Dt SSL_GET_SERVER_TMP_KEY 3
.Os
.Sh NAME
.Nm SSL_get_server_tmp_key
.Nd temporary server key during a handshake
.Sh SYNOPSIS
.In openssl/ssl.h
77
78
79
80
81
82
83

84
85
86
87
88
.Pp
This function is implemented as a macro.
.Sh RETURN VALUES
.Fn SSL_get_server_tmp_key
returns 1 on success or 0 on failure.
.Sh SEE ALSO
.Xr EVP_PKEY_free 3 ,

.Xr SSL_ctrl 3
.Sh HISTORY
.Fn SSL_get_server_tmp_key
first appeared in OpenSSL 1.0.2 and has been available since
.Ox 6.1 .







>





77
78
79
80
81
82
83
84
85
86
87
88
89
.Pp
This function is implemented as a macro.
.Sh RETURN VALUES
.Fn SSL_get_server_tmp_key
returns 1 on success or 0 on failure.
.Sh SEE ALSO
.Xr EVP_PKEY_free 3 ,
.Xr ssl 3 ,
.Xr SSL_ctrl 3
.Sh HISTORY
.Fn SSL_get_server_tmp_key
first appeared in OpenSSL 1.0.2 and has been available since
.Ox 6.1 .
Changes to jni/libressl/man/SSL_get_shared_ciphers.3.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
.\"	$OpenBSD: SSL_get_shared_ciphers.3,v 1.3 2018/03/27 17:35:50 schwarze Exp $
.\"
.\" Copyright (c) 2016 Ingo Schwarze <schwarze@openbsd.org>
.\"
.\" Permission to use, copy, modify, and distribute this software for any
.\" purpose with or without fee is hereby granted, provided that the above
.\" copyright notice and this permission notice appear in all copies.
.\"
.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
.Dd $Mdocdate: March 27 2018 $
.Dt SSL_GET_SHARED_CIPHERS 3
.Os
.Sh NAME
.Nm SSL_get_shared_ciphers
.Nd ciphers supported by both client and server
.Sh SYNOPSIS
.In openssl/ssl.h
|















|







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
.\" $OpenBSD: SSL_get_shared_ciphers.3,v 1.4 2019/06/12 09:36:30 schwarze Exp $
.\"
.\" Copyright (c) 2016 Ingo Schwarze <schwarze@openbsd.org>
.\"
.\" Permission to use, copy, modify, and distribute this software for any
.\" purpose with or without fee is hereby granted, provided that the above
.\" copyright notice and this permission notice appear in all copies.
.\"
.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
.Dd $Mdocdate: June 12 2019 $
.Dt SSL_GET_SHARED_CIPHERS 3
.Os
.Sh NAME
.Nm SSL_get_shared_ciphers
.Nd ciphers supported by both client and server
.Sh SYNOPSIS
.In openssl/ssl.h
49
50
51
52
53
54
55


56
57
58
59
60
61
62
.Fa len
is less than 2,
.Fn SSL_get_shared_ciphers
returns
.Dv NULL .
Otherwise, it returns
.Fa buf .


.Sh HISTORY
.Fn SSL_get_shared_ciphers
first appeared in SSLeay 0.4.5b and has been available since
.Ox 2.4 .
.Sh BUGS
If the list is too long to fit into
.Fa len







>
>







49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
.Fa len
is less than 2,
.Fn SSL_get_shared_ciphers
returns
.Dv NULL .
Otherwise, it returns
.Fa buf .
.Sh SEE ALSO
.Xr ssl 3
.Sh HISTORY
.Fn SSL_get_shared_ciphers
first appeared in SSLeay 0.4.5b and has been available since
.Ox 2.4 .
.Sh BUGS
If the list is too long to fit into
.Fa len
Changes to jni/libressl/man/SSL_get_state.3.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
.\"	$OpenBSD: SSL_get_state.3,v 1.4 2018/03/27 17:35:50 schwarze Exp $
.\"
.\" Copyright (c) 2016 Ingo Schwarze <schwarze@openbsd.org>
.\"
.\" Permission to use, copy, modify, and distribute this software for any
.\" purpose with or without fee is hereby granted, provided that the above
.\" copyright notice and this permission notice appear in all copies.
.\"
.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
.Dd $Mdocdate: March 27 2018 $
.Dt SSL_GET_STATE 3
.Os
.Sh NAME
.Nm SSL_get_state ,
.Nm SSL_state ,
.Nm SSL_in_accept_init ,
.Nm SSL_in_before ,
|















|







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
.\" $OpenBSD: SSL_get_state.3,v 1.5 2019/06/12 09:36:30 schwarze Exp $
.\"
.\" Copyright (c) 2016 Ingo Schwarze <schwarze@openbsd.org>
.\"
.\" Permission to use, copy, modify, and distribute this software for any
.\" purpose with or without fee is hereby granted, provided that the above
.\" copyright notice and this permission notice appear in all copies.
.\"
.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
.Dd $Mdocdate: June 12 2019 $
.Dt SSL_GET_STATE 3
.Os
.Sh NAME
.Nm SSL_get_state ,
.Nm SSL_state ,
.Nm SSL_in_accept_init ,
.Nm SSL_in_before ,
136
137
138
139
140
141
142

143
144
145
146
147
148
149
.Pp
The meaning of other bits is protocol-dependent.
Application programs usually do not need to inspect any of those
other bits.
.Pp
All these functions may be implemented as macros.
.Sh SEE ALSO

.Xr SSL_renegotiate 3 ,
.Xr SSL_set_connect_state 3
.Sh HISTORY
.Fn SSL_is_init_finished
first appeared in SSLeay 0.4.5b.
.Fn SSL_state
first appeared in SSLeay 0.5.2.







>







136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
.Pp
The meaning of other bits is protocol-dependent.
Application programs usually do not need to inspect any of those
other bits.
.Pp
All these functions may be implemented as macros.
.Sh SEE ALSO
.Xr ssl 3 ,
.Xr SSL_renegotiate 3 ,
.Xr SSL_set_connect_state 3
.Sh HISTORY
.Fn SSL_is_init_finished
first appeared in SSLeay 0.4.5b.
.Fn SSL_state
first appeared in SSLeay 0.5.2.
Changes to jni/libressl/man/SSL_library_init.3.
1
2
3
4
5
6
7
8
.\"	$OpenBSD: SSL_library_init.3,v 1.6 2018/03/27 17:35:50 schwarze Exp $
.\"	OpenSSL b97fdb57 Nov 11 09:33:09 2016 +0100
.\"
.\" This file was written by Lutz Jaenicke <jaenicke@openssl.org>.
.\" Copyright (c) 2000, 2006, 2010 The OpenSSL Project.  All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
|







1
2
3
4
5
6
7
8
.\"	$OpenBSD: SSL_library_init.3,v 1.7 2019/06/14 13:41:31 schwarze Exp $
.\"	OpenSSL b97fdb57 Nov 11 09:33:09 2016 +0100
.\"
.\" This file was written by Lutz Jaenicke <jaenicke@openssl.org>.
.\" Copyright (c) 2000, 2006, 2010 The OpenSSL Project.  All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67




68
69

70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: March 27 2018 $
.Dt SSL_LIBRARY_INIT 3
.Os
.Sh NAME
.Nm SSL_library_init ,
.Nm OpenSSL_add_ssl_algorithms ,
.Nm SSLeay_add_ssl_algorithms
.Nd initialize SSL library by registering algorithms
.Sh SYNOPSIS
.In openssl/ssl.h
.Ft int
.Fn SSL_library_init void
.Ft int
.Fn OpenSSL_add_ssl_algorithms void
.Ft int
.Fn SSLeay_add_ssl_algorithms void
.Sh DESCRIPTION




.Fn SSL_library_init
registers the available SSL/TLS ciphers and digests.

.Pp
.Fn OpenSSL_add_ssl_algorithms
and
.Fn SSLeay_add_ssl_algorithms
are synonyms for
.Fn SSL_library_init
and are implemented as macros.
.Pp
.Fn SSL_library_init
must be called before any other action takes place.
.Fn SSL_library_init
is not reentrant.
.Pp
.Fn SSL_library_init
adds ciphers and digests used directly and indirectly by SSL/TLS.
.Sh RETURN VALUES
.Fn SSL_library_init
always returns 1, so it is safe to discard the return value.
.Sh EXAMPLES
A typical TLS/SSL application will start with the library initialization, and
provide readable error messages.
.Bd -literal
SSL_load_error_strings();                /* readable error messages */
SSL_library_init();                      /* initialize library */
.Ed
.Sh SEE ALSO
.Xr RAND_add 3 ,
.Xr ssl 3 ,
.Xr SSL_load_error_strings 3
.Sh HISTORY
.Fn SSLeay_add_ssl_algorithms
first appeared in SSLeay 0.8.0 and has been available since
.Ox 2.4 .
.Pp
.Fn SSL_library_init
first appeared in OpenSSL 0.9.2b and has been available since
.Ox 2.6 .
.Pp
.Fn OpenSSL_add_ssl_algorithms
first appeared in OpenSSL 0.9.5 and has been available since
.Ox 2.7 .







|
















>
>
>
>

|
>







<
<
<
<
<
<
<
<


|
<
<
<
<
<
<
<

<
|
<












44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81








82
83
84







85

86

87
88
89
90
91
92
93
94
95
96
97
98
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: June 14 2019 $
.Dt SSL_LIBRARY_INIT 3
.Os
.Sh NAME
.Nm SSL_library_init ,
.Nm OpenSSL_add_ssl_algorithms ,
.Nm SSLeay_add_ssl_algorithms
.Nd initialize SSL library by registering algorithms
.Sh SYNOPSIS
.In openssl/ssl.h
.Ft int
.Fn SSL_library_init void
.Ft int
.Fn OpenSSL_add_ssl_algorithms void
.Ft int
.Fn SSLeay_add_ssl_algorithms void
.Sh DESCRIPTION
These functions are deprecated.
It is never useful for any application program to call any of them explicitly.
The library automatically calls them internally whenever needed.
.Pp
.Fn SSL_library_init
registers the available ciphers and digests
which are used directly or indirectly by TLS.
.Pp
.Fn OpenSSL_add_ssl_algorithms
and
.Fn SSLeay_add_ssl_algorithms
are synonyms for
.Fn SSL_library_init
and are implemented as macros.








.Sh RETURN VALUES
.Fn SSL_library_init
always returns 1.







.Sh SEE ALSO

.Xr ssl 3

.Sh HISTORY
.Fn SSLeay_add_ssl_algorithms
first appeared in SSLeay 0.8.0 and has been available since
.Ox 2.4 .
.Pp
.Fn SSL_library_init
first appeared in OpenSSL 0.9.2b and has been available since
.Ox 2.6 .
.Pp
.Fn OpenSSL_add_ssl_algorithms
first appeared in OpenSSL 0.9.5 and has been available since
.Ox 2.7 .
Changes to jni/libressl/man/SSL_load_client_CA_file.3.
1
2
3
4
5
6
7
8
.\"	$OpenBSD: SSL_load_client_CA_file.3,v 1.8 2018/03/27 17:35:50 schwarze Exp $
.\"	OpenSSL b97fdb57 Nov 11 09:33:09 2016 +0100
.\"
.\" This file is a derived work.
.\" The changes are covered by the following Copyright and license:
.\"
.\" Copyright (c) 2016 Ingo Schwarze <schwarze@openbsd.org>
.\"
|







1
2
3
4
5
6
7
8
.\"	$OpenBSD: SSL_load_client_CA_file.3,v 1.9 2019/06/12 09:36:30 schwarze Exp $
.\"	OpenSSL b97fdb57 Nov 11 09:33:09 2016 +0100
.\"
.\" This file is a derived work.
.\" The changes are covered by the following Copyright and license:
.\"
.\" Copyright (c) 2016 Ingo Schwarze <schwarze@openbsd.org>
.\"
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: March 27 2018 $
.Dt SSL_LOAD_CLIENT_CA_FILE 3
.Os
.Sh NAME
.Nm SSL_load_client_CA_file ,
.Nm SSL_add_file_cert_subjects_to_stack ,
.Nm SSL_add_dir_cert_subjects_to_stack
.Nd load certificate names from files







|







61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: June 12 2019 $
.Dt SSL_LOAD_CLIENT_CA_FILE 3
.Os
.Sh NAME
.Nm SSL_load_client_CA_file ,
.Nm SSL_add_file_cert_subjects_to_stack ,
.Nm SSL_add_dir_cert_subjects_to_stack
.Nd load certificate names from files
137
138
139
140
141
142
143

144
145
146
147
148
149
150
	SSL_CTX_set_client_CA_list(ctx, cert_names);
else
	error_handling();
\&...
.Ed
.Sh SEE ALSO
.Xr PEM_read_bio_X509 3 ,

.Xr SSL_CTX_set_client_CA_list 3 ,
.Xr X509_get_subject_name 3 ,
.Xr X509_NAME_new 3
.Sh HISTORY
.Fn SSL_load_client_CA_file
first appeared in SSLeay 0.8.0 and has been available since
.Ox 2.4 .







>







137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
	SSL_CTX_set_client_CA_list(ctx, cert_names);
else
	error_handling();
\&...
.Ed
.Sh SEE ALSO
.Xr PEM_read_bio_X509 3 ,
.Xr ssl 3 ,
.Xr SSL_CTX_set_client_CA_list 3 ,
.Xr X509_get_subject_name 3 ,
.Xr X509_NAME_new 3
.Sh HISTORY
.Fn SSL_load_client_CA_file
first appeared in SSLeay 0.8.0 and has been available since
.Ox 2.4 .
Changes to jni/libressl/man/SSL_num_renegotiations.3.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
.\"	$OpenBSD: SSL_num_renegotiations.3,v 1.4 2018/03/21 08:06:34 schwarze Exp $
.\"
.\" Copyright (c) 2016 Ingo Schwarze <schwarze@openbsd.org>
.\"
.\" Permission to use, copy, modify, and distribute this software for any
.\" purpose with or without fee is hereby granted, provided that the above
.\" copyright notice and this permission notice appear in all copies.
.\"
.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
.Dd $Mdocdate: March 21 2018 $
.Dt SSL_NUM_RENEGOTIATIONS 3
.Os
.Sh NAME
.Nm SSL_num_renegotiations ,
.Nm SSL_clear_num_renegotiations ,
.Nm SSL_total_renegotiations
.Nd renegotiation counters
|















|







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
.\" $OpenBSD: SSL_num_renegotiations.3,v 1.5 2019/06/12 09:36:30 schwarze Exp $
.\"
.\" Copyright (c) 2016 Ingo Schwarze <schwarze@openbsd.org>
.\"
.\" Permission to use, copy, modify, and distribute this software for any
.\" purpose with or without fee is hereby granted, provided that the above
.\" copyright notice and this permission notice appear in all copies.
.\"
.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
.Dd $Mdocdate: June 12 2019 $
.Dt SSL_NUM_RENEGOTIATIONS 3
.Os
.Sh NAME
.Nm SSL_num_renegotiations ,
.Nm SSL_clear_num_renegotiations ,
.Nm SSL_total_renegotiations
.Nd renegotiation counters
60
61
62
63
64
65
66

67
68
69
70
71
72
73
74
was last called on that object.
.Pp
These functions are implemented as macros.
.Sh RETURN VALUES
All these functions return a number of renegotiations.
.Sh SEE ALSO
.Xr BIO_set_ssl_renegotiate_bytes 3 ,

.Xr SSL_ctrl 3 ,
.Xr SSL_read 3 ,
.Xr SSL_renegotiate 3 ,
.Xr SSL_write 3
.Sh HISTORY
These functions first appeared in SSLeay 0.9.0
and have been available since
.Ox 2.4 .







>








60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
was last called on that object.
.Pp
These functions are implemented as macros.
.Sh RETURN VALUES
All these functions return a number of renegotiations.
.Sh SEE ALSO
.Xr BIO_set_ssl_renegotiate_bytes 3 ,
.Xr ssl 3 ,
.Xr SSL_ctrl 3 ,
.Xr SSL_read 3 ,
.Xr SSL_renegotiate 3 ,
.Xr SSL_write 3
.Sh HISTORY
These functions first appeared in SSLeay 0.9.0
and have been available since
.Ox 2.4 .
Changes to jni/libressl/man/SSL_renegotiate.3.
1
2
3
4
5
6
7
8
.\"	$OpenBSD: SSL_renegotiate.3,v 1.8 2018/03/27 17:35:50 schwarze Exp $
.\"	OpenSSL SSL_key_update.pod 4fbfe86a Feb 16 17:04:40 2017 +0000
.\"
.\" This file is a derived work.
.\" Some parts are covered by the following Copyright and license:
.\"
.\" Copyright (c) 2016, 2017 Ingo Schwarze <schwarze@openbsd.org>
.\"
|







1
2
3
4
5
6
7
8
.\"	$OpenBSD: SSL_renegotiate.3,v 1.9 2019/06/12 09:36:30 schwarze Exp $
.\"	OpenSSL SSL_key_update.pod 4fbfe86a Feb 16 17:04:40 2017 +0000
.\"
.\" This file is a derived work.
.\" Some parts are covered by the following Copyright and license:
.\"
.\" Copyright (c) 2016, 2017 Ingo Schwarze <schwarze@openbsd.org>
.\"
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: March 27 2018 $
.Dt SSL_RENEGOTIATE 3
.Os
.Sh NAME
.Nm SSL_renegotiate ,
.Nm SSL_renegotiate_abbreviated ,
.Nm SSL_renegotiate_pending
.Nd initiate a new TLS handshake







|







61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: June 12 2019 $
.Dt SSL_RENEGOTIATE 3
.Os
.Sh NAME
.Nm SSL_renegotiate ,
.Nm SSL_renegotiate_abbreviated ,
.Nm SSL_renegotiate_pending
.Nd initiate a new TLS handshake
143
144
145
146
147
148
149

150
151
152
153
154
155
156
.Fn SSL_renegotiate_abbreviated
return 1 on success or 0 on error.
.Pp
.Fn SSL_renegotiate_pending
returns 1 if a renegotiation or renegotiation request has been
scheduled but not yet acted on, or 0 otherwise.
.Sh SEE ALSO

.Xr SSL_do_handshake 3 ,
.Xr SSL_num_renegotiations 3 ,
.Xr SSL_read 3 ,
.Xr SSL_write 3
.Sh HISTORY
.Fn SSL_renegotiate
first appeared in SSLeay 0.8.0 and has been available since







>







143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
.Fn SSL_renegotiate_abbreviated
return 1 on success or 0 on error.
.Pp
.Fn SSL_renegotiate_pending
returns 1 if a renegotiation or renegotiation request has been
scheduled but not yet acted on, or 0 otherwise.
.Sh SEE ALSO
.Xr ssl 3 ,
.Xr SSL_do_handshake 3 ,
.Xr SSL_num_renegotiations 3 ,
.Xr SSL_read 3 ,
.Xr SSL_write 3
.Sh HISTORY
.Fn SSL_renegotiate
first appeared in SSLeay 0.8.0 and has been available since
Changes to jni/libressl/man/SSL_session_reused.3.
1
2
3
4
5
6
7
8
.\"	$OpenBSD: SSL_session_reused.3,v 1.5 2018/03/27 17:35:50 schwarze Exp $
.\"	OpenSSL b97fdb57 Nov 11 09:33:09 2016 +0100
.\"
.\" This file was written by Lutz Jaenicke <jaenicke@openssl.org>.
.\" Copyright (c) 2001 The OpenSSL Project.  All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
|







1
2
3
4
5
6
7
8
.\"	$OpenBSD: SSL_session_reused.3,v 1.6 2019/06/12 09:36:30 schwarze Exp $
.\"	OpenSSL b97fdb57 Nov 11 09:33:09 2016 +0100
.\"
.\" This file was written by Lutz Jaenicke <jaenicke@openssl.org>.
.\" Copyright (c) 2001 The OpenSSL Project.  All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: March 27 2018 $
.Dt SSL_SESSION_REUSED 3
.Os
.Sh NAME
.Nm SSL_session_reused
.Nd query whether a reused session was negotiated during handshake
.Sh SYNOPSIS
.In openssl/ssl.h







|







44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: June 12 2019 $
.Dt SSL_SESSION_REUSED 3
.Os
.Sh NAME
.Nm SSL_session_reused
.Nd query whether a reused session was negotiated during handshake
.Sh SYNOPSIS
.In openssl/ssl.h
70
71
72
73
74
75
76

77
78
79
80
81
82
83
.Bl -tag -width Ds
.It 0
A new session was negotiated.
.It 1
A session was reused.
.El
.Sh SEE ALSO

.Xr SSL_ctrl 3 ,
.Xr SSL_CTX_set_session_cache_mode 3 ,
.Xr SSL_set_session 3
.Sh HISTORY
.Fn SSL_session_reused
first appeared in SSLeay 0.8.0 and has been available since
.Ox 2.4 .







>







70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
.Bl -tag -width Ds
.It 0
A new session was negotiated.
.It 1
A session was reused.
.El
.Sh SEE ALSO
.Xr ssl 3 ,
.Xr SSL_ctrl 3 ,
.Xr SSL_CTX_set_session_cache_mode 3 ,
.Xr SSL_set_session 3
.Sh HISTORY
.Fn SSL_session_reused
first appeared in SSLeay 0.8.0 and has been available since
.Ox 2.4 .
Changes to jni/libressl/man/SSL_set1_param.3.
1
2
3
4
5
6
7
8
.\" $OpenBSD: SSL_set1_param.3,v 1.4 2018/03/23 14:28:16 schwarze Exp $
.\" full merge up to:
.\" OpenSSL man3/SSL_CTX_get0_param 99d63d46 Oct 26 13:56:48 2016 -0400
.\"
.\" This file was written by Dr. Stephen Henson <steve@openssl.org>.
.\" Copyright (c) 2015 The OpenSSL Project.  All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
|







1
2
3
4
5
6
7
8
.\" $OpenBSD: SSL_set1_param.3,v 1.5 2019/06/12 09:36:30 schwarze Exp $
.\" full merge up to:
.\" OpenSSL man3/SSL_CTX_get0_param 99d63d46 Oct 26 13:56:48 2016 -0400
.\"
.\" This file was written by Dr. Stephen Henson <steve@openssl.org>.
.\" Copyright (c) 2015 The OpenSSL Project.  All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: March 23 2018 $
.Dt SSL_SET1_PARAM 3
.Os
.Sh NAME
.Nm SSL_CTX_get0_param ,
.Nm SSL_get0_param ,
.Nm SSL_CTX_set1_param ,
.Nm SSL_set1_param







|







45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: June 12 2019 $
.Dt SSL_SET1_PARAM 3
.Os
.Sh NAME
.Nm SSL_CTX_get0_param ,
.Nm SSL_get0_param ,
.Nm SSL_CTX_set1_param ,
.Nm SSL_set1_param
117
118
119
120
121
122
123

124
125
126
127
128
129
130
131
132
133
134
135
136
.Pa www.foo.com
in the peer certificate:
.Bd -literal -offset indent
X509_VERIFY_PARAM *vpm = SSL_get0_param(ssl);
X509_VERIFY_PARAM_set1_host(vpm, "www.foo.com", 0);
.Ed
.Sh SEE ALSO

.Xr X509_VERIFY_PARAM_set_flags 3
.Sh HISTORY
.Fn SSL_CTX_set1_param
and
.Fn SSL_set1_param
first appeared in OpenSSL 1.0.0 and have been available since
.Ox 4.9 .
.Pp
.Fn SSL_CTX_get0_param
and
.Fn SSL_get0_param
first appeared in OpenSSL 1.0.2 and have been available since
.Ox 6.3 .







>













117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
.Pa www.foo.com
in the peer certificate:
.Bd -literal -offset indent
X509_VERIFY_PARAM *vpm = SSL_get0_param(ssl);
X509_VERIFY_PARAM_set1_host(vpm, "www.foo.com", 0);
.Ed
.Sh SEE ALSO
.Xr ssl 3 ,
.Xr X509_VERIFY_PARAM_set_flags 3
.Sh HISTORY
.Fn SSL_CTX_set1_param
and
.Fn SSL_set1_param
first appeared in OpenSSL 1.0.0 and have been available since
.Ox 4.9 .
.Pp
.Fn SSL_CTX_get0_param
and
.Fn SSL_get0_param
first appeared in OpenSSL 1.0.2 and have been available since
.Ox 6.3 .
Changes to jni/libressl/man/SSL_set_max_send_fragment.3.
1
2
3
4
5
6
7
8
.\"	$OpenBSD: SSL_set_max_send_fragment.3,v 1.4 2018/03/23 04:35:09 schwarze Exp $
.\"	OpenSSL doc/man3/SSL_CTX_set_split_send_fragment.pod
.\"	OpenSSL 6782e5fd Oct 21 16:16:20 2016 +0100
.\"
.\" This file was written by Matt Caswell <matt@openssl.org>.
.\" Copyright (c) 2016 The OpenSSL Project.  All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
|







1
2
3
4
5
6
7
8
.\"	$OpenBSD: SSL_set_max_send_fragment.3,v 1.5 2019/06/12 09:36:30 schwarze Exp $
.\"	OpenSSL doc/man3/SSL_CTX_set_split_send_fragment.pod
.\"	OpenSSL 6782e5fd Oct 21 16:16:20 2016 +0100
.\"
.\" This file was written by Matt Caswell <matt@openssl.org>.
.\" Copyright (c) 2016 The OpenSSL Project.  All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: March 23 2018 $
.Dt SSL_SET_MAX_SEND_FRAGMENT 3
.Os
.Sh NAME
.Nm SSL_CTX_set_max_send_fragment ,
.Nm SSL_set_max_send_fragment
.Nd control fragment sizes
.Sh SYNOPSIS







|







45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: June 12 2019 $
.Dt SSL_SET_MAX_SEND_FRAGMENT 3
.Os
.Sh NAME
.Nm SSL_CTX_set_max_send_fragment ,
.Nm SSL_set_max_send_fragment
.Nd control fragment sizes
.Sh SYNOPSIS
81
82
83
84
85
86
87

88
89
90
91
92
93
94
95
96
These functions will only accept a value in the range 512 -
SSL3_RT_MAX_PLAIN_LENGTH.
.Pp
These functions are implemented using macros.
.Sh RETURN VALUES
These functions return 1 on success or 0 on failure.
.Sh SEE ALSO

.Xr SSL_ctrl 3 ,
.Xr SSL_CTX_set_read_ahead 3 ,
.Xr SSL_pending 3
.Sh HISTORY
.Fn SSL_CTX_set_max_send_fragment
and
.Fn SSL_set_max_send_fragment
first appeared in OpenSSL 1.0.0 and have been available since
.Ox 4.9 .







>









81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
These functions will only accept a value in the range 512 -
SSL3_RT_MAX_PLAIN_LENGTH.
.Pp
These functions are implemented using macros.
.Sh RETURN VALUES
These functions return 1 on success or 0 on failure.
.Sh SEE ALSO
.Xr ssl 3 ,
.Xr SSL_ctrl 3 ,
.Xr SSL_CTX_set_read_ahead 3 ,
.Xr SSL_pending 3
.Sh HISTORY
.Fn SSL_CTX_set_max_send_fragment
and
.Fn SSL_set_max_send_fragment
first appeared in OpenSSL 1.0.0 and have been available since
.Ox 4.9 .
Changes to jni/libressl/man/STACK_OF.3.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
.\" $OpenBSD: STACK_OF.3,v 1.2 2018/03/21 17:57:48 schwarze Exp $
.\"
.\" Copyright (c) 2018 Ingo Schwarze <schwarze@openbsd.org>
.\"
.\" Permission to use, copy, modify, and distribute this software for any
.\" purpose with or without fee is hereby granted, provided that the above
.\" copyright notice and this permission notice appear in all copies.
.\"
.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
.Dd $Mdocdate: March 21 2018 $
.Dt STACK_OF 3
.Os
.Sh NAME
.Nm STACK_OF
.Nd variable-sized arrays of pointers, called OpenSSL stacks
.Sh SYNOPSIS
.In openssl/safestack.h
|















|







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
.\" $OpenBSD: STACK_OF.3,v 1.4 2019/06/10 09:49:48 schwarze Exp $
.\"
.\" Copyright (c) 2018 Ingo Schwarze <schwarze@openbsd.org>
.\"
.\" Permission to use, copy, modify, and distribute this software for any
.\" purpose with or without fee is hereby granted, provided that the above
.\" copyright notice and this permission notice appear in all copies.
.\"
.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
.Dd $Mdocdate: June 10 2019 $
.Dt STACK_OF 3
.Os
.Sh NAME
.Nm STACK_OF
.Nd variable-sized arrays of pointers, called OpenSSL stacks
.Sh SYNOPSIS
.In openssl/safestack.h
168
169
170
171
172
173
174

175

176
177
178
179
180
181
182
183
184
185
186
187
188
}
.Ed
.Pp
The output looks similar to:
.Pp
.Dl 2 pointers: 0x4693ff24c00, 0x4693ff24c00
.Sh SEE ALSO

.Xr OCSP_request_sign 3 ,

.Xr PKCS12_parse 3 ,
.Xr PKCS7_encrypt 3 ,
.Xr SSL_CTX_set_client_CA_list 3 ,
.Xr SSL_get_ciphers 3 ,
.Xr SSL_get_peer_cert_chain 3 ,
.Xr SSL_load_client_CA_file 3 ,
.Xr X509_CRL_get_REVOKED 3 ,
.Xr X509_STORE_CTX_get0_chain 3
.Sh HISTORY
The
.Fn STACK_OF
macro first appeared in OpenSSL 0.9.3 and has been available since
.Ox 2.6 .







>

>













168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
}
.Ed
.Pp
The output looks similar to:
.Pp
.Dl 2 pointers: 0x4693ff24c00, 0x4693ff24c00
.Sh SEE ALSO
.Xr crypto 3 ,
.Xr OCSP_request_sign 3 ,
.Xr OPENSSL_sk_new 3 ,
.Xr PKCS12_parse 3 ,
.Xr PKCS7_encrypt 3 ,
.Xr SSL_CTX_set_client_CA_list 3 ,
.Xr SSL_get_ciphers 3 ,
.Xr SSL_get_peer_cert_chain 3 ,
.Xr SSL_load_client_CA_file 3 ,
.Xr X509_CRL_get_REVOKED 3 ,
.Xr X509_STORE_CTX_get0_chain 3
.Sh HISTORY
The
.Fn STACK_OF
macro first appeared in OpenSSL 0.9.3 and has been available since
.Ox 2.6 .
Changes to jni/libressl/man/TS_REQ_new.3.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
.\"	$OpenBSD: TS_REQ_new.3,v 1.5 2018/03/23 04:34:23 schwarze Exp $
.\"
.\" Copyright (c) 2016 Ingo Schwarze <schwarze@openbsd.org>
.\"
.\" Permission to use, copy, modify, and distribute this software for any
.\" purpose with or without fee is hereby granted, provided that the above
.\" copyright notice and this permission notice appear in all copies.
.\"
.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
.Dd $Mdocdate: March 23 2018 $
.Dt TS_REQ_NEW 3
.Os
.Sh NAME
.Nm TS_REQ_new ,
.Nm TS_REQ_free ,
.Nm TS_RESP_new ,
.Nm TS_RESP_free ,
|















|







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
.\"	$OpenBSD: TS_REQ_new.3,v 1.6 2019/06/06 01:06:59 schwarze Exp $
.\"
.\" Copyright (c) 2016 Ingo Schwarze <schwarze@openbsd.org>
.\"
.\" Permission to use, copy, modify, and distribute this software for any
.\" purpose with or without fee is hereby granted, provided that the above
.\" copyright notice and this permission notice appear in all copies.
.\"
.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
.Dd $Mdocdate: June 6 2019 $
.Dt TS_REQ_NEW 3
.Os
.Sh NAME
.Nm TS_REQ_new ,
.Nm TS_REQ_free ,
.Nm TS_RESP_new ,
.Nm TS_RESP_free ,
160
161
162
163
164
165
166
167

168
169
170
171
172
173
174
or
.Vt TS_MSG_IMPRINT
object, respectively, or
.Dv NULL
if an error occurred.
.Sh SEE ALSO
.Xr ACCESS_DESCRIPTION_new 3 ,
.Xr ESS_SIGNING_CERT_new 3

.Sh STANDARDS
RFC 3161: Internet X.509 Public Key Infrastructure Time-Stamp Protocol
.Pp
Note that RFC 3161 has been updated
by RFC 5816: ESSCertIDv2 Update for RFC 3161.
That update allows using the Signing Certificate Attribute Definition
Version 2 according to RFC 5035, but the current implementation







|
>







160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
or
.Vt TS_MSG_IMPRINT
object, respectively, or
.Dv NULL
if an error occurred.
.Sh SEE ALSO
.Xr ACCESS_DESCRIPTION_new 3 ,
.Xr ESS_SIGNING_CERT_new 3 ,
.Xr X509_EXTENSION_new 3
.Sh STANDARDS
RFC 3161: Internet X.509 Public Key Infrastructure Time-Stamp Protocol
.Pp
Note that RFC 3161 has been updated
by RFC 5816: ESSCertIDv2 Update for RFC 3161.
That update allows using the Signing Certificate Attribute Definition
Version 2 according to RFC 5035, but the current implementation
Changes to jni/libressl/man/UI_new.3.
1
2
3
4
5
6
7
8
.\" $OpenBSD: UI_new.3,v 1.8 2018/03/22 21:08:22 schwarze Exp $
.\" full merge up to: OpenSSL 78b19e90 Jan 11 00:12:01 2017 +0100
.\" selective merge up to: OpenSSL 61f805c1 Jan 16 01:01:46 2018 +0800
.\"
.\" This file was written by Richard Levitte <levitte@openssl.org>.
.\" Copyright (c) 2001, 2016, 2017 The OpenSSL Project.  All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
|







1
2
3
4
5
6
7
8
.\" $OpenBSD: UI_new.3,v 1.9 2019/06/10 09:49:48 schwarze Exp $
.\" full merge up to: OpenSSL 78b19e90 Jan 11 00:12:01 2017 +0100
.\" selective merge up to: OpenSSL 61f805c1 Jan 16 01:01:46 2018 +0800
.\"
.\" This file was written by Richard Levitte <levitte@openssl.org>.
.\" Copyright (c) 2001, 2016, 2017 The OpenSSL Project.  All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: March 22 2018 $
.Dt UI_NEW 3
.Os
.Sh NAME
.Nm UI_new ,
.Nm UI_new_method ,
.Nm UI_free ,
.Nm UI_add_input_string ,







|







45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: June 10 2019 $
.Dt UI_NEW 3
.Os
.Sh NAME
.Nm UI_new ,
.Nm UI_new_method ,
.Nm UI_free ,
.Nm UI_add_input_string ,
497
498
499
500
501
502
503

504
505
506
507
508
509
510
511
512
513
514
.Dv NULL ,
but currently, this can only happen when and after
.Fn UI_set_method
is called with an explicit
.Dv NULL
argument.
.Sh SEE ALSO

.Xr des_read_pw 3 ,
.Xr UI_create_method 3 ,
.Xr UI_get_string_type 3 ,
.Xr UI_UTIL_read_pw 3
.Sh HISTORY
These functions first appeared in  OpenSSL 0.9.7
and have been available since
.Ox 3.2 .
.Sh AUTHORS
.An Richard Levitte Aq Mt richard@levitte.org
for the OpenSSL project.







>











497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
.Dv NULL ,
but currently, this can only happen when and after
.Fn UI_set_method
is called with an explicit
.Dv NULL
argument.
.Sh SEE ALSO
.Xr crypto 3 ,
.Xr des_read_pw 3 ,
.Xr UI_create_method 3 ,
.Xr UI_get_string_type 3 ,
.Xr UI_UTIL_read_pw 3
.Sh HISTORY
These functions first appeared in  OpenSSL 0.9.7
and have been available since
.Ox 3.2 .
.Sh AUTHORS
.An Richard Levitte Aq Mt richard@levitte.org
for the OpenSSL project.
Changes to jni/libressl/man/X25519.3.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
.\" $OpenBSD: X25519.3,v 1.4 2018/08/10 17:28:48 jsing Exp $
.\" contains some text from: BoringSSL curve25519.h, curve25519.c
.\" content also checked up to: OpenSSL f929439f Mar 15 12:19:16 2018 +0000
.\"
.\" Copyright (c) 2015 Google Inc.
.\" Copyright (c) 2018 Ingo Schwarze <schwarze@openbsd.org>
.\"
.\" Permission to use, copy, modify, and/or distribute this software for any
.\" purpose with or without fee is hereby granted, provided that the above
.\" copyright notice and this permission notice appear in all copies.
.\"
.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHORS DISCLAIM ALL WARRANTIES
.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR
.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
.Dd $Mdocdate: August 10 2018 $
.Dt X25519 3
.Os
.Sh NAME
.Nm X25519 ,
.Nm X25519_keypair
.Nd Elliptic Curve Diffie-Hellman primitive based on Curve25519
.Sh SYNOPSIS
|


















|







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
.\" $OpenBSD: X25519.3,v 1.5 2019/08/19 13:08:26 schwarze Exp $
.\" contains some text from: BoringSSL curve25519.h, curve25519.c
.\" content also checked up to: OpenSSL f929439f Mar 15 12:19:16 2018 +0000
.\"
.\" Copyright (c) 2015 Google Inc.
.\" Copyright (c) 2018 Ingo Schwarze <schwarze@openbsd.org>
.\"
.\" Permission to use, copy, modify, and/or distribute this software for any
.\" purpose with or without fee is hereby granted, provided that the above
.\" copyright notice and this permission notice appear in all copies.
.\"
.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHORS DISCLAIM ALL WARRANTIES
.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR
.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
.Dd $Mdocdate: August 19 2019 $
.Dt X25519 3
.Os
.Sh NAME
.Nm X25519 ,
.Nm X25519_keypair
.Nd Elliptic Curve Diffie-Hellman primitive based on Curve25519
.Sh SYNOPSIS
86
87
88
89
90
91
92

93
94
95
96
97
98
99
100
.Dv X25519_KEY_LENGTH No = 32
bytes each.
.Sh RETURN VALUES
.Fn X25519
returns 1 on success or 0 on error.
Failure can occur when the input is a point of small order.
.Sh SEE ALSO

.Rs
.%A D. J. Bernstein
.%R A state-of-the-art Diffie-Hellman function:\
    How do I use Curve25519 in my own software?
.%U http://cr.yp.to/ecdh.html
.Re
.Sh STANDARDS
RFC 7748: Elliptic Curves for Security







>








86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
.Dv X25519_KEY_LENGTH No = 32
bytes each.
.Sh RETURN VALUES
.Fn X25519
returns 1 on success or 0 on error.
Failure can occur when the input is a point of small order.
.Sh SEE ALSO
.Xr ECDH_compute_key 3
.Rs
.%A D. J. Bernstein
.%R A state-of-the-art Diffie-Hellman function:\
    How do I use Curve25519 in my own software?
.%U http://cr.yp.to/ecdh.html
.Re
.Sh STANDARDS
RFC 7748: Elliptic Curves for Security
Changes to jni/libressl/man/X509V3_get_d2i.3.
1
2
3
4
5
6
7
8
.\" $OpenBSD: X509V3_get_d2i.3,v 1.14 2018/03/23 23:18:17 schwarze Exp $
.\" full merge up to: OpenSSL ff7fbfd5 Nov 2 11:52:01 2015 +0000
.\" selective merge up to: OpenSSL 99d63d46 Oct 26 13:56:48 2016 -0400
.\"
.\" This file was written by Dr. Stephen Henson <steve@openssl.org>.
.\" Copyright (c) 2014, 2015, 2016 The OpenSSL Project.  All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
|







1
2
3
4
5
6
7
8
.\" $OpenBSD: X509V3_get_d2i.3,v 1.17 2019/08/22 15:15:35 schwarze Exp $
.\" full merge up to: OpenSSL ff7fbfd5 Nov 2 11:52:01 2015 +0000
.\" selective merge up to: OpenSSL 99d63d46 Oct 26 13:56:48 2016 -0400
.\"
.\" This file was written by Dr. Stephen Henson <steve@openssl.org>.
.\" Copyright (c) 2014, 2015, 2016 The OpenSSL Project.  All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: March 23 2018 $
.Dt X509V3_GET_D2I 3
.Os
.Sh NAME
.Nm X509V3_get_d2i ,
.Nm X509V3_add1_i2d ,
.Nm X509V3_EXT_d2i ,
.Nm X509V3_EXT_i2d ,







|







45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: August 22 2019 $
.Dt X509V3_GET_D2I 3
.Os
.Sh NAME
.Nm X509V3_get_d2i ,
.Nm X509V3_add1_i2d ,
.Nm X509V3_EXT_d2i ,
.Nm X509V3_EXT_i2d ,
364
365
366
367
368
369
370
371



372
373
374
375
376
377












378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401

402
403
404
405
406
407
408
.It Acceptable OCSP Responses     Ta Dv NID_id_pkix_OCSP_acceptableResponses
.It OCSP No Check                 Ta Dv NID_id_pkix_OCSP_noCheck
.It OCSP Archive Cutoff           Ta Dv NID_id_pkix_OCSP_archiveCutoff
.It OCSP Service Locator          Ta Dv NID_id_pkix_OCSP_serviceLocator
.It Hold Instruction Code         Ta Dv NID_hold_instruction_code
.El
.Sh RETURN VALUES
.Fn X509V3_get_d2i



and
.Fn X509V3_EXT_d2i
return a pointer to an extension specific structure or
.Dv NULL
if an error occurs.
.Pp












.Fn X509V3_EXT_i2d
returns a pointer to an
.Vt X509_EXTENSION
structure or
.Dv NULL
if an error occurs.
.Pp
.Fn X509V3_add1_i2d
returns 1 if the operation is successful, 0 if it fails due to a
non-fatal error (extension not found, already exists, cannot be encoded),
or -1 due to a fatal error such as a memory allocation failure.
.Pp
.Fn X509_get0_extensions ,
.Fn X509_CRL_get0_extensions ,
and
.Fn X509_REVOKED_get0_extensions
return a stack of extensions, or
.Dv NULL
if no extensions are present.
.Sh SEE ALSO
.Xr d2i_X509 3 ,
.Xr d2i_X509_EXTENSION 3 ,
.Xr ERR_get_error 3 ,
.Xr X509_CRL_get0_by_serial 3 ,

.Xr X509_EXTENSION_new 3 ,
.Xr X509_get_pubkey 3 ,
.Xr X509_get_subject_name 3 ,
.Xr X509_get_version 3 ,
.Xr X509_new 3 ,
.Xr X509_REVOKED_new 3
.Sh HISTORY







|
>
>
>

|




>
>
>
>
>
>
>
>
>
>
>
>

|

|

|
<
<
<
|
<











|

>







364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398



399

400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
.It Acceptable OCSP Responses     Ta Dv NID_id_pkix_OCSP_acceptableResponses
.It OCSP No Check                 Ta Dv NID_id_pkix_OCSP_noCheck
.It OCSP Archive Cutoff           Ta Dv NID_id_pkix_OCSP_archiveCutoff
.It OCSP Service Locator          Ta Dv NID_id_pkix_OCSP_serviceLocator
.It Hold Instruction Code         Ta Dv NID_hold_instruction_code
.El
.Sh RETURN VALUES
.Fn X509V3_get_d2i ,
.Fn X509V3_EXT_d2i ,
.Fn X509_get_ext_d2i ,
.Fn X509_CRL_get_ext_d2i ,
and
.Fn X509_REVOKED_get_ext_d2i
return a pointer to an extension specific structure or
.Dv NULL
if an error occurs.
.Pp
.Fn X509V3_add1_i2d ,
.Fn X509_add1_ext_i2d ,
.Fn X509_CRL_add1_ext_i2d ,
and
.Fn X509_REVOKED_add1_ext_i2d
return 1 if the operation is successful, 0 if it fails due to a
non-fatal error (extension not found, already exists, cannot be encoded),
or -1 due to a fatal error such as a memory allocation failure.
In some cases of failure, the reason can be determined with
.Xr ERR_get_error 3 .
.Pp
The
.Fn X509V3_EXT_i2d
function returns a pointer to an
.Vt X509_EXTENSION
structure if successful; otherwise
.Dv NULL
is returned and an error code can be retrieved with



.Xr ERR_get_error 3 .

.Pp
.Fn X509_get0_extensions ,
.Fn X509_CRL_get0_extensions ,
and
.Fn X509_REVOKED_get0_extensions
return a stack of extensions, or
.Dv NULL
if no extensions are present.
.Sh SEE ALSO
.Xr d2i_X509 3 ,
.Xr d2i_X509_EXTENSION 3 ,
.Xr X509_check_purpose 3 ,
.Xr X509_CRL_get0_by_serial 3 ,
.Xr X509_CRL_new 3 ,
.Xr X509_EXTENSION_new 3 ,
.Xr X509_get_pubkey 3 ,
.Xr X509_get_subject_name 3 ,
.Xr X509_get_version 3 ,
.Xr X509_new 3 ,
.Xr X509_REVOKED_new 3
.Sh HISTORY
Changes to jni/libressl/man/X509_ALGOR_dup.3.
1
2
3
4
5
6
7
8
.\"	$OpenBSD: X509_ALGOR_dup.3,v 1.13 2018/05/01 19:42:58 schwarze Exp $
.\"	OpenSSL 4692340e Jun 7 15:49:08 2016 -0400
.\"
.\" This file is a derived work.
.\" The changes are covered by the following Copyright and license:
.\"
.\" Copyright (c) 2016 Ingo Schwarze <schwarze@openbsd.org>
.\"
|







1
2
3
4
5
6
7
8
.\"	$OpenBSD: X509_ALGOR_dup.3,v 1.14 2019/06/06 01:06:59 schwarze Exp $
.\"	OpenSSL 4692340e Jun 7 15:49:08 2016 -0400
.\"
.\" This file is a derived work.
.\" The changes are covered by the following Copyright and license:
.\"
.\" Copyright (c) 2016 Ingo Schwarze <schwarze@openbsd.org>
.\"
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: May 1 2018 $
.Dt X509_ALGOR_DUP 3
.Os
.Sh NAME
.Nm X509_ALGOR_new ,
.Nm X509_ALGOR_free ,
.Nm X509_ALGOR_dup ,
.Nm X509_ALGOR_set0 ,







|







61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: June 6 2019 $
.Dt X509_ALGOR_DUP 3
.Os
.Sh NAME
.Nm X509_ALGOR_new ,
.Nm X509_ALGOR_free ,
.Nm X509_ALGOR_dup ,
.Nm X509_ALGOR_set0 ,
203
204
205
206
207
208
209

210

211
212
213
214
215
216
217
.Fa a
and
.Fa b
have identical encodings or non-zero otherwise.
.Sh SEE ALSO
.Xr ASN1_TYPE_set 3 ,
.Xr d2i_X509_ALGOR 3 ,

.Xr X509_get0_signature 3 ,

.Xr X509_PUBKEY_get0_param 3
.Sh STANDARDS
RFC 5280: Internet X.509 Public Key Infrastructure Certificate and
Certificate Revocation List (CRL) Profile
.Sh HISTORY
.Fn X509_ALGOR_new
and







>

>







203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
.Fa a
and
.Fa b
have identical encodings or non-zero otherwise.
.Sh SEE ALSO
.Xr ASN1_TYPE_set 3 ,
.Xr d2i_X509_ALGOR 3 ,
.Xr EVP_DigestInit 3 ,
.Xr X509_get0_signature 3 ,
.Xr X509_new 3 ,
.Xr X509_PUBKEY_get0_param 3
.Sh STANDARDS
RFC 5280: Internet X.509 Public Key Infrastructure Certificate and
Certificate Revocation List (CRL) Profile
.Sh HISTORY
.Fn X509_ALGOR_new
and
Changes to jni/libressl/man/X509_ATTRIBUTE_new.3.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
.\"	$OpenBSD: X509_ATTRIBUTE_new.3,v 1.6 2018/03/27 17:35:50 schwarze Exp $
.\"
.\" Copyright (c) 2016 Ingo Schwarze <schwarze@openbsd.org>
.\"
.\" Permission to use, copy, modify, and distribute this software for any
.\" purpose with or without fee is hereby granted, provided that the above
.\" copyright notice and this permission notice appear in all copies.
.\"
.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
.Dd $Mdocdate: March 27 2018 $
.Dt X509_ATTRIBUTE_NEW 3
.Os
.Sh NAME
.Nm X509_ATTRIBUTE_new ,
.Nm X509_ATTRIBUTE_free
.\" In the following line, "X.501" and "Attribute" are not typos.
.\" The "Attribute" type is defined in X.501, not in X.509.
|















|







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
.\"	$OpenBSD: X509_ATTRIBUTE_new.3,v 1.7 2019/06/06 01:06:59 schwarze Exp $
.\"
.\" Copyright (c) 2016 Ingo Schwarze <schwarze@openbsd.org>
.\"
.\" Permission to use, copy, modify, and distribute this software for any
.\" purpose with or without fee is hereby granted, provided that the above
.\" copyright notice and this permission notice appear in all copies.
.\"
.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
.Dd $Mdocdate: June 6 2019 $
.Dt X509_ATTRIBUTE_NEW 3
.Os
.Sh NAME
.Nm X509_ATTRIBUTE_new ,
.Nm X509_ATTRIBUTE_free
.\" In the following line, "X.501" and "Attribute" are not typos.
.\" The "Attribute" type is defined in X.501, not in X.509.
63
64
65
66
67
68
69

70
71
72
73
74
75
76
.Dv NULL
if an error occurs.
.Sh SEE ALSO
.Xr d2i_X509_ATTRIBUTE 3 ,
.Xr PKCS12_SAFEBAG_new 3 ,
.Xr PKCS8_PRIV_KEY_INFO_new 3 ,
.Xr X509_EXTENSION_new 3 ,

.Xr X509_REQ_new 3
.Sh STANDARDS
.Bl -ohang
.It Xo
For the general definition of the
.Vt Attribute
data type:







>







63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
.Dv NULL
if an error occurs.
.Sh SEE ALSO
.Xr d2i_X509_ATTRIBUTE 3 ,
.Xr PKCS12_SAFEBAG_new 3 ,
.Xr PKCS8_PRIV_KEY_INFO_new 3 ,
.Xr X509_EXTENSION_new 3 ,
.Xr X509_new 3 ,
.Xr X509_REQ_new 3
.Sh STANDARDS
.Bl -ohang
.It Xo
For the general definition of the
.Vt Attribute
data type:
Changes to jni/libressl/man/X509_CINF_new.3.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
.\"	$OpenBSD: X509_CINF_new.3,v 1.5 2018/03/27 17:35:50 schwarze Exp $
.\"
.\" Copyright (c) 2016 Ingo Schwarze <schwarze@openbsd.org>
.\"
.\" Permission to use, copy, modify, and distribute this software for any
.\" purpose with or without fee is hereby granted, provided that the above
.\" copyright notice and this permission notice appear in all copies.
.\"
.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
.Dd $Mdocdate: March 27 2018 $
.Dt X509_CINF_NEW 3
.Os
.Sh NAME
.Nm X509_CINF_new ,
.Nm X509_CINF_free ,
.Nm X509_VAL_new ,
.Nm X509_VAL_free ,
|















|







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
.\"	$OpenBSD: X509_CINF_new.3,v 1.6 2019/06/06 01:06:59 schwarze Exp $
.\"
.\" Copyright (c) 2016 Ingo Schwarze <schwarze@openbsd.org>
.\"
.\" Permission to use, copy, modify, and distribute this software for any
.\" purpose with or without fee is hereby granted, provided that the above
.\" copyright notice and this permission notice appear in all copies.
.\"
.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
.Dd $Mdocdate: June 6 2019 $
.Dt X509_CINF_NEW 3
.Os
.Sh NAME
.Nm X509_CINF_new ,
.Nm X509_CINF_free ,
.Nm X509_VAL_new ,
.Nm X509_VAL_free ,
89
90
91
92
93
94
95

96
97
98
99
100
101
102
.Vt X509_VAL ,
or
.Vt X509_CERT_AUX
object, respectively, or
.Dv NULL
if an error occurs.
.Sh SEE ALSO

.Xr X509_new 3
.Sh STANDARDS
RFC 5280: Internet X.509 Public Key Infrastructure Certificate and
Certificate Revocation List (CRL) Profile
.Sh HISTORY
.Fn X509_CINF_new ,
.Fn X509_CINF_free ,







>







89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
.Vt X509_VAL ,
or
.Vt X509_CERT_AUX
object, respectively, or
.Dv NULL
if an error occurs.
.Sh SEE ALSO
.Xr d2i_X509_CINF 3 ,
.Xr X509_new 3
.Sh STANDARDS
RFC 5280: Internet X.509 Public Key Infrastructure Certificate and
Certificate Revocation List (CRL) Profile
.Sh HISTORY
.Fn X509_CINF_new ,
.Fn X509_CINF_free ,
Changes to jni/libressl/man/X509_CRL_get0_by_serial.3.
1
2
3
4
5
6
7
8
.\"	$OpenBSD: X509_CRL_get0_by_serial.3,v 1.8 2018/03/23 04:34:23 schwarze Exp $
.\"	OpenSSL X509_CRL_get0_by_serial.pod cdd6c8c5 Mar 20 12:29:37 2017 +0100
.\"
.\" This file was written by Dr. Stephen Henson <steve@openssl.org>.
.\" Copyright (c) 2015, 2017 The OpenSSL Project.  All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
|







1
2
3
4
5
6
7
8
.\"	$OpenBSD: X509_CRL_get0_by_serial.3,v 1.10 2019/06/14 13:59:32 schwarze Exp $
.\"	OpenSSL X509_CRL_get0_by_serial.pod cdd6c8c5 Mar 20 12:29:37 2017 +0100
.\"
.\" This file was written by Dr. Stephen Henson <steve@openssl.org>.
.\" Copyright (c) 2015, 2017 The OpenSSL Project.  All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: March 23 2018 $
.Dt X509_CRL_GET0_BY_SERIAL 3
.Os
.Sh NAME
.Nm X509_CRL_get0_by_serial ,
.Nm X509_CRL_get0_by_cert ,
.Nm X509_CRL_get_REVOKED ,
.Nm X509_CRL_add0_revoked ,







|







44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: June 14 2019 $
.Dt X509_CRL_GET0_BY_SERIAL 3
.Os
.Sh NAME
.Nm X509_CRL_get0_by_serial ,
.Nm X509_CRL_get0_by_cert ,
.Nm X509_CRL_get_REVOKED ,
.Nm X509_CRL_add0_revoked ,
138
139
140
141
142
143
144

145
146




147
148

149
150
151
152
153
154
155
156
157

158
159
160
161
162
163
164
and
.Fn X509_CRL_get0_by_cert
return 0 for failure or 1 for success, except if the revoked entry
has the reason
.Qq removeFromCRL ,
in which case 2 is returned.
.Pp

.Fn X509_CRL_add0_revoked
and




.Fn X509_CRL_sort
return 1 for success or 0 for failure.

.Pp
.Fn X509_CRL_get_REVOKED
returns a STACK of revoked entries.
.Sh SEE ALSO
.Xr d2i_X509_CRL 3 ,
.Xr ERR_get_error 3 ,
.Xr X509_CRL_get_ext 3 ,
.Xr X509_CRL_get_issuer 3 ,
.Xr X509_CRL_get_version 3 ,

.Xr X509_REVOKED_new 3 ,
.Xr X509V3_get_d2i 3
.Sh HISTORY
.Fn X509_CRL_get_REVOKED
first appeared in OpenSSL 0.9.2b and has been available since
.Ox 2.6 .
.Pp







>

<
>
>
>
>

|
>





<



>







138
139
140
141
142
143
144
145
146

147
148
149
150
151
152
153
154
155
156
157
158

159
160
161
162
163
164
165
166
167
168
169
and
.Fn X509_CRL_get0_by_cert
return 0 for failure or 1 for success, except if the revoked entry
has the reason
.Qq removeFromCRL ,
in which case 2 is returned.
.Pp
The
.Fn X509_CRL_add0_revoked

function returns 1 if successful;
otherwise 0 is returned and an error code can be retrieved with
.Xr ERR_get_error 3 .
.Pp
.Fn X509_CRL_sort
returns 1 for success or 0 for failure.
The current implementation cannot fail.
.Pp
.Fn X509_CRL_get_REVOKED
returns a STACK of revoked entries.
.Sh SEE ALSO
.Xr d2i_X509_CRL 3 ,

.Xr X509_CRL_get_ext 3 ,
.Xr X509_CRL_get_issuer 3 ,
.Xr X509_CRL_get_version 3 ,
.Xr X509_CRL_new 3 ,
.Xr X509_REVOKED_new 3 ,
.Xr X509V3_get_d2i 3
.Sh HISTORY
.Fn X509_CRL_get_REVOKED
first appeared in OpenSSL 0.9.2b and has been available since
.Ox 2.6 .
.Pp
Changes to jni/libressl/man/X509_CRL_new.3.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
.\"	$OpenBSD: X509_CRL_new.3,v 1.7 2018/03/27 17:35:50 schwarze Exp $
.\"
.\" Copyright (c) 2016, 2018 Ingo Schwarze <schwarze@openbsd.org>
.\"
.\" Permission to use, copy, modify, and distribute this software for any
.\" purpose with or without fee is hereby granted, provided that the above
.\" copyright notice and this permission notice appear in all copies.
.\"
.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
.Dd $Mdocdate: March 27 2018 $
.Dt X509_CRL_NEW 3
.Os
.Sh NAME
.Nm X509_CRL_new ,
.Nm X509_CRL_dup ,
.Nm X509_CRL_up_ref ,
.Nm X509_CRL_free ,
|















|







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
.\" $OpenBSD: X509_CRL_new.3,v 1.10 2019/08/20 13:27:19 schwarze Exp $
.\"
.\" Copyright (c) 2016, 2018 Ingo Schwarze <schwarze@openbsd.org>
.\"
.\" Permission to use, copy, modify, and distribute this software for any
.\" purpose with or without fee is hereby granted, provided that the above
.\" copyright notice and this permission notice appear in all copies.
.\"
.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
.Dd $Mdocdate: August 20 2019 $
.Dt X509_CRL_NEW 3
.Os
.Sh NAME
.Nm X509_CRL_new ,
.Nm X509_CRL_dup ,
.Nm X509_CRL_up_ref ,
.Nm X509_CRL_free ,
99
100
101
102
103
104
105

106


107
108
109
110

111
112

113
114

115
116
117
118
119
120
121
returns 1 on success or 0 on error.
.Sh SEE ALSO
.Xr ACCESS_DESCRIPTION_new 3 ,
.Xr AUTHORITY_KEYID_new 3 ,
.Xr d2i_X509_CRL 3 ,
.Xr DIST_POINT_new 3 ,
.Xr PEM_read_X509_CRL 3 ,

.Xr X509_CRL_get0_by_serial 3 ,


.Xr X509_CRL_get_ext 3 ,
.Xr X509_CRL_get_ext_d2i 3 ,
.Xr X509_CRL_get_issuer 3 ,
.Xr X509_CRL_get_version 3 ,

.Xr X509_CRL_sign 3 ,
.Xr X509_EXTENSION_new 3 ,

.Xr X509_load_crl_file 3 ,
.Xr X509_new 3 ,

.Xr X509_REVOKED_new 3 ,
.Xr X509_STORE_CTX_set0_crls 3
.Sh STANDARDS
RFC 5280: Internet X.509 Public Key Infrastructure Certificate and
Certificate Revocation List (CRL) Profile, section 5: CRL and CRL
Extensions Profile
.Sh HISTORY







>

>
>




>


>


>







99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
returns 1 on success or 0 on error.
.Sh SEE ALSO
.Xr ACCESS_DESCRIPTION_new 3 ,
.Xr AUTHORITY_KEYID_new 3 ,
.Xr d2i_X509_CRL 3 ,
.Xr DIST_POINT_new 3 ,
.Xr PEM_read_X509_CRL 3 ,
.Xr X509_CRL_digest 3 ,
.Xr X509_CRL_get0_by_serial 3 ,
.Xr X509_CRL_get0_lastUpdate 3 ,
.Xr X509_CRL_get0_signature 3 ,
.Xr X509_CRL_get_ext 3 ,
.Xr X509_CRL_get_ext_d2i 3 ,
.Xr X509_CRL_get_issuer 3 ,
.Xr X509_CRL_get_version 3 ,
.Xr X509_CRL_match 3 ,
.Xr X509_CRL_sign 3 ,
.Xr X509_EXTENSION_new 3 ,
.Xr X509_INFO_new 3 ,
.Xr X509_load_crl_file 3 ,
.Xr X509_new 3 ,
.Xr X509_OBJECT_get0_X509_CRL 3 ,
.Xr X509_REVOKED_new 3 ,
.Xr X509_STORE_CTX_set0_crls 3
.Sh STANDARDS
RFC 5280: Internet X.509 Public Key Infrastructure Certificate and
Certificate Revocation List (CRL) Profile, section 5: CRL and CRL
Extensions Profile
.Sh HISTORY
Changes to jni/libressl/man/X509_EXTENSION_set_object.3.
1
2
3
4
5
6
7
8
.\"	$OpenBSD: X509_EXTENSION_set_object.3,v 1.9 2018/05/19 21:09:19 schwarze Exp $
.\"	OpenSSL bb9ad09e Jun 6 00:43:05 2016 -0400
.\"
.\" This file is a derived work.
.\" The changes are covered by the following Copyright and license:
.\"
.\" Copyright (c) 2016 Ingo Schwarze <schwarze@openbsd.org>
.\"
|







1
2
3
4
5
6
7
8
.\"	$OpenBSD: X509_EXTENSION_set_object.3,v 1.10 2019/06/06 01:06:59 schwarze Exp $
.\"	OpenSSL bb9ad09e Jun 6 00:43:05 2016 -0400
.\"
.\" This file is a derived work.
.\" The changes are covered by the following Copyright and license:
.\"
.\" Copyright (c) 2016 Ingo Schwarze <schwarze@openbsd.org>
.\"
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: May 19 2018 $
.Dt X509_EXTENSION_SET_OBJECT 3
.Os
.Sh NAME
.Nm X509_EXTENSION_new ,
.Nm X509_EXTENSION_free ,
.Nm X509_EXTENSION_create_by_NID ,
.Nm X509_EXTENSION_create_by_OBJ ,







|







61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: June 6 2019 $
.Dt X509_EXTENSION_SET_OBJECT 3
.Os
.Sh NAME
.Nm X509_EXTENSION_new ,
.Nm X509_EXTENSION_free ,
.Nm X509_EXTENSION_create_by_NID ,
.Nm X509_EXTENSION_create_by_OBJ ,
269
270
271
272
273
274
275

276

277
278
279
280
281
282
283




284
285
286
287
288
289
290
pointer.
.Sh SEE ALSO
.Xr ACCESS_DESCRIPTION_new 3 ,
.Xr AUTHORITY_KEYID_new 3 ,
.Xr BASIC_CONSTRAINTS_new 3 ,
.Xr d2i_X509_EXTENSION 3 ,
.Xr DIST_POINT_new 3 ,

.Xr EXTENDED_KEY_USAGE_new 3 ,

.Xr NAME_CONSTRAINTS_new 3 ,
.Xr OCSP_CRLID_new 3 ,
.Xr OCSP_SERVICELOC_new 3 ,
.Xr PKEY_USAGE_PERIOD_new 3 ,
.Xr POLICYINFO_new 3 ,
.Xr PROXY_POLICY_new 3 ,
.Xr SXNET_new 3 ,




.Xr X509V3_get_d2i 3 ,
.Xr X509v3_get_ext_by_NID 3
.Sh STANDARDS
RFC 5280: Internet X.509 Public Key Infrastructure Certificate and
Certificate Revocation List (CRL) Profile
.Sh HISTORY
.Fn X509_EXTENSION_new







>

>







>
>
>
>







269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
pointer.
.Sh SEE ALSO
.Xr ACCESS_DESCRIPTION_new 3 ,
.Xr AUTHORITY_KEYID_new 3 ,
.Xr BASIC_CONSTRAINTS_new 3 ,
.Xr d2i_X509_EXTENSION 3 ,
.Xr DIST_POINT_new 3 ,
.Xr ESS_SIGNING_CERT_new 3 ,
.Xr EXTENDED_KEY_USAGE_new 3 ,
.Xr GENERAL_NAME_new 3 ,
.Xr NAME_CONSTRAINTS_new 3 ,
.Xr OCSP_CRLID_new 3 ,
.Xr OCSP_SERVICELOC_new 3 ,
.Xr PKEY_USAGE_PERIOD_new 3 ,
.Xr POLICYINFO_new 3 ,
.Xr PROXY_POLICY_new 3 ,
.Xr SXNET_new 3 ,
.Xr TS_REQ_new 3 ,
.Xr X509_check_ca 3 ,
.Xr X509_check_host 3 ,
.Xr X509_check_issued 3 ,
.Xr X509V3_get_d2i 3 ,
.Xr X509v3_get_ext_by_NID 3
.Sh STANDARDS
RFC 5280: Internet X.509 Public Key Infrastructure Certificate and
Certificate Revocation List (CRL) Profile
.Sh HISTORY
.Fn X509_EXTENSION_new
Added jni/libressl/man/X509_INFO_new.3.












































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
.\" $OpenBSD: X509_INFO_new.3,v 1.1 2019/08/19 13:52:53 schwarze Exp $
.\" Copyright (c) 2019 Ingo Schwarze <schwarze@openbsd.org>
.\"
.\" Permission to use, copy, modify, and distribute this software for any
.\" purpose with or without fee is hereby granted, provided that the above
.\" copyright notice and this permission notice appear in all copies.
.\"
.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
.Dd $Mdocdate: August 19 2019 $
.Dt X509_INFO_NEW 3
.Os
.Sh NAME
.Nm X509_INFO_new ,
.Nm X509_INFO_free
.Nd X.509 certificate wrapper object
.Sh SYNOPSIS
.In openssl/x509.h
.Ft X509_INFO *
.Fn X509_INFO_new void
.Ft void
.Fn X509_INFO_free "X509_INFO *info"
.Sh DESCRIPTION
.Vt X509_INFO
is a reference-counted wrapper object storing a pointer to an X.509
certificate together with pointers to the associated private key
and to an associated certificate revocation list.
It is for example used internally by
.Xr X509_load_cert_crl_file 3 .
.Pp
.Fn X509_INFO_new
allocates and initializes an empty
.Vt X509_INFO
object and sets its reference count to 1.
.Pp
.Fn X509_INFO_free
decrements the reference count of
.Fa info
by 1.
If the reference count reaches 0, it frees all referenced objects
as well as the storage needed for
.Fa info
itself.
If
.Fa info
is a
.Dv NULL
pointer, no action occurs.
.Sh RETURN VALUES
.Fn X509_INFO_new
returns the newly allocated
.Vt X509_INFO
object or
.Dv NULL
if an error occurs.
.Sh SEE ALSO
.Xr X509_CRL_new 3 ,
.Xr X509_new 3
.Sh HISTORY
.Fn X509_INFO_new
and
.Fn X509_INFO_free
first appeared in SSLeay 0.5.1 and have been available since
.Ox 2.4 .
Changes to jni/libressl/man/X509_LOOKUP_hash_dir.3.
1
2
3
4
5
6
7
8
.\" $OpenBSD: X509_LOOKUP_hash_dir.3,v 1.8 2018/03/27 17:35:50 schwarze Exp $
.\" full merge up to: OpenSSL 61f805c1 Jan 16 01:01:46 2018 +0800
.\"
.\" This file was written by Victor B. Wagner <vitus@cryptocom.ru>
.\" and Claus Assmann.
.\" Copyright (c) 2015, 2016, 2017 The OpenSSL Project.  All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
|







1
2
3
4
5
6
7
8
.\" $OpenBSD: X509_LOOKUP_hash_dir.3,v 1.9 2019/06/06 01:06:59 schwarze Exp $
.\" full merge up to: OpenSSL 61f805c1 Jan 16 01:01:46 2018 +0800
.\"
.\" This file was written by Victor B. Wagner <vitus@cryptocom.ru>
.\" and Claus Assmann.
.\" Copyright (c) 2015, 2016, 2017 The OpenSSL Project.  All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: March 27 2018 $
.Dt X509_LOOKUP_HASH_DIR 3
.Os
.Sh NAME
.Nm X509_LOOKUP_hash_dir ,
.Nm X509_LOOKUP_file ,
.Nm X509_load_cert_file ,
.Nm X509_load_crl_file ,







|







45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: June 6 2019 $
.Dt X509_LOOKUP_HASH_DIR 3
.Os
.Sh NAME
.Nm X509_LOOKUP_hash_dir ,
.Nm X509_LOOKUP_file ,
.Nm X509_load_cert_file ,
.Nm X509_load_crl_file ,
223
224
225
226
227
228
229

230

231
232
233
234
235
236
237
return the number of objects loaded from the
.Fa file
or 0 on error.
.Sh SEE ALSO
.Xr d2i_X509_bio 3 ,
.Xr PEM_read_PrivateKey 3 ,
.Xr SSL_CTX_load_verify_locations 3 ,

.Xr X509_STORE_load_locations 3

.Sh HISTORY
.Fn X509_LOOKUP_hash_dir ,
.Fn X509_LOOKUP_file ,
and
.Fn X509_load_cert_file
first appeared in SSLeay 0.8.0.
.Fn X509_load_crl_file







>
|
>







223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
return the number of objects loaded from the
.Fa file
or 0 on error.
.Sh SEE ALSO
.Xr d2i_X509_bio 3 ,
.Xr PEM_read_PrivateKey 3 ,
.Xr SSL_CTX_load_verify_locations 3 ,
.Xr X509_OBJECT_get0_X509 3 ,
.Xr X509_STORE_load_locations 3 ,
.Xr X509_STORE_new 3
.Sh HISTORY
.Fn X509_LOOKUP_hash_dir ,
.Fn X509_LOOKUP_file ,
and
.Fn X509_load_cert_file
first appeared in SSLeay 0.8.0.
.Fn X509_load_crl_file
Changes to jni/libressl/man/X509_NAME_ENTRY_get_object.3.
1
2
3
4
5
6
7
8
.\" $OpenBSD: X509_NAME_ENTRY_get_object.3,v 1.12 2018/05/19 21:25:51 schwarze Exp $
.\" full merge up to: OpenSSL aebb9aac Jul 19 09:27:53 2016 -0400
.\" selective merge up to: OpenSSL 61f805c1 Jan 16 01:01:46 2018 +0800
.\"
.\" This file is a derived work.
.\" The changes are covered by the following Copyright and license:
.\"
.\" Copyright (c) 2016 Ingo Schwarze <schwarze@openbsd.org>
|







1
2
3
4
5
6
7
8
.\" $OpenBSD: X509_NAME_ENTRY_get_object.3,v 1.13 2019/06/14 13:59:32 schwarze Exp $
.\" full merge up to: OpenSSL aebb9aac Jul 19 09:27:53 2016 -0400
.\" selective merge up to: OpenSSL 61f805c1 Jan 16 01:01:46 2018 +0800
.\"
.\" This file is a derived work.
.\" The changes are covered by the following Copyright and license:
.\"
.\" Copyright (c) 2016 Ingo Schwarze <schwarze@openbsd.org>
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: May 19 2018 $
.Dt X509_NAME_ENTRY_GET_OBJECT 3
.Os
.Sh NAME
.Nm X509_NAME_ENTRY_new ,
.Nm X509_NAME_ENTRY_free ,
.Nm X509_NAME_ENTRY_get_object ,
.Nm X509_NAME_ENTRY_get_data ,







|







63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: June 14 2019 $
.Dt X509_NAME_ENTRY_GET_OBJECT 3
.Os
.Sh NAME
.Nm X509_NAME_ENTRY_new ,
.Nm X509_NAME_ENTRY_free ,
.Nm X509_NAME_ENTRY_get_object ,
.Nm X509_NAME_ENTRY_get_data ,
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234

235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250

251











252
253


254
255


256

257
258
259
260
261
262
263
can be set to
.Dv MBSTRING_ASC ,
but in the case of
.Fn X509_NAME_ENTRY_set_data
the field type must be set first so the relevant field information
can be looked up internally.
.Sh RETURN VALUES
.Fn X509_NAME_ENTRY_new ,
.Fn X509_NAME_ENTRY_create_by_txt ,
.Fn X509_NAME_ENTRY_create_by_NID ,
and
.Fn X509_NAME_ENTRY_create_by_OBJ
return a valid
.Vt X509_NAME_ENTRY
structure on success or
.Dv NULL

if an error occurred.
.Pp
.Fn X509_NAME_ENTRY_get_object
returns a valid
.Vt ASN1_OBJECT
structure if it is set or
.Dv NULL
if an error occurred.
.Pp
.Fn X509_NAME_ENTRY_get_data
returns a valid
.Vt ASN1_STRING
structure if it is set or
.Dv NULL
if an error occurred.
.Pp

.Fn X509_NAME_ENTRY_set_object











and
.Fn X509_NAME_ENTRY_set_data


return 1 on success or 0 on error.
.Sh SEE ALSO


.Xr ERR_get_error 3 ,

.Xr OBJ_nid2obj 3 ,
.Xr X509_NAME_add_entry 3 ,
.Xr X509_NAME_get_entry 3 ,
.Xr X509_NAME_new 3
.Sh STANDARDS
RFC 5280: Internet X.509 Public Key Infrastructure Certificate and
Certificate Revocation List (CRL) Profile







|
|
<
<
<
|

|

>
|















>

>
>
>
>
>
>
>
>
>
>
>

|
>
>
|
|
>
>
|
>







219
220
221
222
223
224
225
226
227



228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
can be set to
.Dv MBSTRING_ASC ,
but in the case of
.Fn X509_NAME_ENTRY_set_data
the field type must be set first so the relevant field information
can be looked up internally.
.Sh RETURN VALUES
The
.Fn X509_NAME_ENTRY_new



function returns a valid
.Vt X509_NAME_ENTRY
structure if successful; otherwise
.Dv NULL
is returned and an error code can be retrieved with
.Xr ERR_get_error 3 .
.Pp
.Fn X509_NAME_ENTRY_get_object
returns a valid
.Vt ASN1_OBJECT
structure if it is set or
.Dv NULL
if an error occurred.
.Pp
.Fn X509_NAME_ENTRY_get_data
returns a valid
.Vt ASN1_STRING
structure if it is set or
.Dv NULL
if an error occurred.
.Pp
The
.Fn X509_NAME_ENTRY_set_object
function returns 1 if successful;
otherwise 0 is returned and an error code can be retrieved with
.Xr ERR_get_error 3 .
.Pp
.Fn X509_NAME_ENTRY_set_data
return 1 on success or 0 on error.
In some cases of failure, the reason can be determined with
.Xr ERR_get_error 3 .
.Pp
.Fn X509_NAME_ENTRY_create_by_txt ,
.Fn X509_NAME_ENTRY_create_by_NID ,
and
.Fn X509_NAME_ENTRY_create_by_OBJ
return a valid
.Vt X509_NAME_ENTRY
structure on success or
.Dv NULL
if an error occurred.
In some cases of failure, the reason can be determined with
.Xr ERR_get_error 3 .
.Sh SEE ALSO
.Xr OBJ_nid2obj 3 ,
.Xr X509_NAME_add_entry 3 ,
.Xr X509_NAME_get_entry 3 ,
.Xr X509_NAME_new 3
.Sh STANDARDS
RFC 5280: Internet X.509 Public Key Infrastructure Certificate and
Certificate Revocation List (CRL) Profile
Changes to jni/libressl/man/X509_NAME_add_entry_by_txt.3.
1
2
3
4
5
6
7
8
.\"	$OpenBSD: X509_NAME_add_entry_by_txt.3,v 1.12 2018/05/19 23:02:00 schwarze Exp $
.\"	OpenSSL aebb9aac Jul 19 09:27:53 2016 -0400
.\"
.\" This file was written by Dr. Stephen Henson <steve@openssl.org>.
.\" Copyright (c) 2002, 2005, 2006, 2013, 2014 The OpenSSL Project.
.\" All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
|







1
2
3
4
5
6
7
8
.\"	$OpenBSD: X509_NAME_add_entry_by_txt.3,v 1.14 2019/06/14 13:59:32 schwarze Exp $
.\"	OpenSSL aebb9aac Jul 19 09:27:53 2016 -0400
.\"
.\" This file was written by Dr. Stephen Henson <steve@openssl.org>.
.\" Copyright (c) 2002, 2005, 2006, 2013, 2014 The OpenSSL Project.
.\" All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: May 19 2018 $
.Dt X509_NAME_ADD_ENTRY_BY_TXT 3
.Os
.Sh NAME
.Nm X509_NAME_add_entry_by_txt ,
.Nm X509_NAME_add_entry_by_OBJ ,
.Nm X509_NAME_add_entry_by_NID ,
.Nm X509_NAME_add_entry ,







|







45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: June 14 2019 $
.Dt X509_NAME_ADD_ENTRY_BY_TXT 3
.Os
.Sh NAME
.Nm X509_NAME_add_entry_by_txt ,
.Nm X509_NAME_add_entry_by_OBJ ,
.Nm X509_NAME_add_entry_by_NID ,
.Nm X509_NAME_add_entry ,
225
226
227
228
229
230
231



232
233
234
235
236
237
238
.Pp
.Fn X509_NAME_delete_entry
returns either the deleted
.Vt X509_NAME_ENTRY
structure or
.Dv NULL
if an error occurred.



.Sh EXAMPLES
Create an
.Vt X509_NAME
structure:
.Bd -literal -offset indent
C=UK, O=Disorganized Organization, CN=Joe Bloggs








>
>
>







225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
.Pp
.Fn X509_NAME_delete_entry
returns either the deleted
.Vt X509_NAME_ENTRY
structure or
.Dv NULL
if an error occurred.
.Pp
In some cases of failure, the reason can be determined with
.Xr ERR_get_error 3 .
.Sh EXAMPLES
Create an
.Vt X509_NAME
structure:
.Bd -literal -offset indent
C=UK, O=Disorganized Organization, CN=Joe Bloggs

248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
	/* Error */
if (!X509_NAME_add_entry_by_txt(nm, "CN", MBSTRING_ASC,
		"Joe Bloggs", -1, -1, 0))
	/* Error */
.Ed
.Sh SEE ALSO
.Xr d2i_X509_NAME 3 ,
.Xr ERR_get_error 3 ,
.Xr X509_NAME_get_index_by_NID 3 ,
.Xr X509_NAME_new 3
.Sh HISTORY
.Fn X509_NAME_add_entry
and
.Fn X509_NAME_delete_entry
first appeared in SSLeay 0.8.0 and have been available since







|







251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
	/* Error */
if (!X509_NAME_add_entry_by_txt(nm, "CN", MBSTRING_ASC,
		"Joe Bloggs", -1, -1, 0))
	/* Error */
.Ed
.Sh SEE ALSO
.Xr d2i_X509_NAME 3 ,
.Xr X509_NAME_ENTRY_get_object 3 ,
.Xr X509_NAME_get_index_by_NID 3 ,
.Xr X509_NAME_new 3
.Sh HISTORY
.Fn X509_NAME_add_entry
and
.Fn X509_NAME_delete_entry
first appeared in SSLeay 0.8.0 and have been available since
Changes to jni/libressl/man/X509_NAME_get_index_by_NID.3.
1
2
3
4
5
6
7
8
.\"	$OpenBSD: X509_NAME_get_index_by_NID.3,v 1.10 2018/07/09 09:57:41 tb Exp $
.\"	OpenSSL aebb9aac Jul 19 09:27:53 2016 -0400
.\"
.\" This file was written by Dr. Stephen Henson <steve@openssl.org>.
.\" Copyright (c) 2002, 2006, 2014, 2015, 2016 The OpenSSL Project.
.\" All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
|







1
2
3
4
5
6
7
8
.\"	$OpenBSD: X509_NAME_get_index_by_NID.3,v 1.12 2019/06/14 13:59:32 schwarze Exp $
.\"	OpenSSL aebb9aac Jul 19 09:27:53 2016 -0400
.\"
.\" This file was written by Dr. Stephen Henson <steve@openssl.org>.
.\" Copyright (c) 2002, 2006, 2014, 2015, 2016 The OpenSSL Project.
.\" All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: July 9 2018 $
.Dt X509_NAME_GET_INDEX_BY_NID 3
.Os
.Sh NAME
.Nm X509_NAME_get_index_by_NID ,
.Nm X509_NAME_get_index_by_OBJ ,
.Nm X509_NAME_entry_count ,
.Nm X509_NAME_get_entry ,







|







45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: June 14 2019 $
.Dt X509_NAME_GET_INDEX_BY_NID 3
.Os
.Sh NAME
.Nm X509_NAME_get_index_by_NID ,
.Nm X509_NAME_get_index_by_OBJ ,
.Nm X509_NAME_entry_count ,
.Nm X509_NAME_get_entry ,
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187

188


189
190
191
192
193

194
195
196
197
198
199
200













201
202
203
204
205
206
207
.Fa nid
or
.Fa obj
after
.Fa lastpos .
.Fa lastpos
should initially be set to -1.
If there are no more entries, -1 is returned.
If
.Fa nid
is invalid (doesn't correspond to a valid OID), -2 is returned.
.Pp
.Fn X509_NAME_entry_count
returns the total number of entries in
.Fa name .
.Pp
.Fn X509_NAME_get_entry
retrieves the
.Vt X509_NAME_ENTRY
from
.Fa name
corresponding to index
.Fa loc .
Acceptable values for
.Fa loc
run from 0 to
.Fn X509_NAME_entry_count name
- 1.
The value returned is an internal pointer which must not be freed.
.Pp
.Fn X509_NAME_get_text_by_NID
and
.Fn X509_NAME_get_text_by_OBJ
retrieve the "text" from the first entry in
.Fa name
which matches
.Fa nid
or
.Fa obj .
If no such entry exists, -1 is returned.
At most
.Fa len
bytes will be written and the text written to
.Fa buf
will be NUL terminated.
The length of the output string written is returned excluding the
terminating NUL.
If
.Fa buf
is
.Dv NULL
then the amount of space needed in
.Fa buf
(excluding the final NUL) is returned.
.Pp
All relevant
.Dv NID_*
and
.Dv OBJ_*
codes can be found in the header files
.In openssl/obj_mac.h
and
.In openssl/objects.h .
.Pp
Applications which could pass invalid NIDs to
.Fn X509_NAME_get_index_by_NID
should check for the return value of -2.
Alternatively the NID validity can be determined first by checking that
.Fn OBJ_nid2obj nid
is not
.Dv NULL .
.Sh RETURN VALUES
.Fn X509_NAME_get_index_by_NID

and


.Fn X509_NAME_get_index_by_OBJ
return the index of the next matching entry or -1 if not found.
.Pp
.Fn X509_NAME_entry_count
returns the total number of entries.

.Pp
.Fn X509_NAME_get_entry
returns an
.Vt X509_NAME
pointer to the requested entry or
.Dv NULL
if the index is invalid.













.Sh EXAMPLES
Process all entries:
.Bd -literal
int i;
X509_NAME_ENTRY *e;

for (i = 0; i < X509_NAME_entry_count(nm); i++) {







<
<
<
<
<
<
<
<













<










<





<
<



|
|
<
<



















>
|
>
>

|


|
>


|
<
<


>
>
>
>
>
>
>
>
>
>
>
>
>







115
116
117
118
119
120
121








122
123
124
125
126
127
128
129
130
131
132
133
134

135
136
137
138
139
140
141
142
143
144

145
146
147
148
149


150
151
152
153
154


155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186


187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
.Fa nid
or
.Fa obj
after
.Fa lastpos .
.Fa lastpos
should initially be set to -1.








.Pp
.Fn X509_NAME_get_entry
retrieves the
.Vt X509_NAME_ENTRY
from
.Fa name
corresponding to index
.Fa loc .
Acceptable values for
.Fa loc
run from 0 to
.Fn X509_NAME_entry_count name
- 1.

.Pp
.Fn X509_NAME_get_text_by_NID
and
.Fn X509_NAME_get_text_by_OBJ
retrieve the "text" from the first entry in
.Fa name
which matches
.Fa nid
or
.Fa obj .

At most
.Fa len
bytes will be written and the text written to
.Fa buf
will be NUL terminated.


If
.Fa buf
is
.Dv NULL ,
nothing is written, but the return value is calculated as usual.


.Pp
All relevant
.Dv NID_*
and
.Dv OBJ_*
codes can be found in the header files
.In openssl/obj_mac.h
and
.In openssl/objects.h .
.Pp
Applications which could pass invalid NIDs to
.Fn X509_NAME_get_index_by_NID
should check for the return value of -2.
Alternatively the NID validity can be determined first by checking that
.Fn OBJ_nid2obj nid
is not
.Dv NULL .
.Sh RETURN VALUES
.Fn X509_NAME_get_index_by_NID
returns the index of the next matching entry, -1 if not found, or -2 if the
.Fa nid
does not correspond to a valid OID.
.Pp
.Fn X509_NAME_get_index_by_OBJ
returns the index of the next matching entry or -1 if not found.
.Pp
.Fn X509_NAME_entry_count
returns the total number of entries in
.Fa name .
.Pp
.Fn X509_NAME_get_entry
returns an internal pointer which must not be freed by the caller or


.Dv NULL
if the index is invalid.
.Pp
.Fn X509_NAME_get_text_by_NID
and
.Fn X509_NAME_get_text_by_OBJ
return the length of the output string written, not counting the
terminating NUL, or -1 if no match is found.
.Pp
In some cases of failure of
.Fn X509_NAME_get_index_by_NID
and
.Fn X509_NAME_get_text_by_NID ,
the reason can be determined with
.Xr ERR_get_error 3 .
.Sh EXAMPLES
Process all entries:
.Bd -literal
int i;
X509_NAME_ENTRY *e;

for (i = 0; i < X509_NAME_entry_count(nm); i++) {
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
		break;
	e = X509_NAME_get_entry(nm, lastpos);
	/* Do something with e */
}
.Ed
.Sh SEE ALSO
.Xr d2i_X509_NAME 3 ,
.Xr ERR_get_error 3 ,
.Xr X509_NAME_new 3
.Sh HISTORY
These functions first appeared in SSLeay 0.8.0
and have been available since
.Ox 2.4 .
.Sh CAVEATS
.Fn X509_NAME_get_text_by_NID







|







222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
		break;
	e = X509_NAME_get_entry(nm, lastpos);
	/* Do something with e */
}
.Ed
.Sh SEE ALSO
.Xr d2i_X509_NAME 3 ,
.Xr X509_NAME_ENTRY_get_object 3 ,
.Xr X509_NAME_new 3
.Sh HISTORY
These functions first appeared in SSLeay 0.8.0
and have been available since
.Ox 2.4 .
.Sh CAVEATS
.Fn X509_NAME_get_text_by_NID
Changes to jni/libressl/man/X509_NAME_new.3.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
.\"	$OpenBSD: X509_NAME_new.3,v 1.6 2018/07/29 20:29:32 tb Exp $
.\"
.\" Copyright (c) 2016 Ingo Schwarze <schwarze@openbsd.org>
.\"
.\" Permission to use, copy, modify, and distribute this software for any
.\" purpose with or without fee is hereby granted, provided that the above
.\" copyright notice and this permission notice appear in all copies.
.\"
.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
.Dd $Mdocdate: July 29 2018 $
.Dt X509_NAME_NEW 3
.Os
.Sh NAME
.Nm X509_NAME_new ,
.Nm X509_NAME_free
.\" In the following line, "X.501" and "Name" are not typos.
.\" The "Name" type is defined in X.501, not in X.509.
|















|







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
.\" $OpenBSD: X509_NAME_new.3,v 1.8 2019/08/20 13:27:19 schwarze Exp $
.\"
.\" Copyright (c) 2016 Ingo Schwarze <schwarze@openbsd.org>
.\"
.\" Permission to use, copy, modify, and distribute this software for any
.\" purpose with or without fee is hereby granted, provided that the above
.\" copyright notice and this permission notice appear in all copies.
.\"
.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
.Dd $Mdocdate: August 20 2019 $
.Dt X509_NAME_NEW 3
.Os
.Sh NAME
.Nm X509_NAME_new ,
.Nm X509_NAME_free
.\" In the following line, "X.501" and "Name" are not typos.
.\" The "Name" type is defined in X.501, not in X.509.
77
78
79
80
81
82
83


84
85
86

87
88
89
90
91
92
93
94
95
96
97
98
99
.Sh SEE ALSO
.Xr d2i_X509_NAME 3 ,
.Xr GENERAL_NAME_new 3 ,
.Xr NAME_CONSTRAINTS_new 3 ,
.Xr SSL_load_client_CA_file 3 ,
.Xr X509_get_subject_name 3 ,
.Xr X509_NAME_add_entry_by_txt 3 ,


.Xr X509_NAME_ENTRY_new 3 ,
.Xr X509_NAME_get_index_by_NID 3 ,
.Xr X509_NAME_print_ex 3

.Sh STANDARDS
RFC 5280: Internet X.509 Public Key Infrastructure Certificate and
Certificate Revocation List (CRL) Profile
.Pp
ITU-T Recommendation X.501, also known as ISO/IEC 9594-2:
Information Technology \(en Open Systems Interconnection \(en
The Directory: Models, section 9: Names
.Sh HISTORY
.Fn X509_NAME_new
and
.Fn X509_NAME_free
appeared in SSLeay 0.4 or earlier and have been available since
.Ox 2.4 .







>
>


|
>













77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
.Sh SEE ALSO
.Xr d2i_X509_NAME 3 ,
.Xr GENERAL_NAME_new 3 ,
.Xr NAME_CONSTRAINTS_new 3 ,
.Xr SSL_load_client_CA_file 3 ,
.Xr X509_get_subject_name 3 ,
.Xr X509_NAME_add_entry_by_txt 3 ,
.Xr X509_NAME_cmp 3 ,
.Xr X509_NAME_digest 3 ,
.Xr X509_NAME_ENTRY_new 3 ,
.Xr X509_NAME_get_index_by_NID 3 ,
.Xr X509_NAME_print_ex 3 ,
.Xr X509_new 3
.Sh STANDARDS
RFC 5280: Internet X.509 Public Key Infrastructure Certificate and
Certificate Revocation List (CRL) Profile
.Pp
ITU-T Recommendation X.501, also known as ISO/IEC 9594-2:
Information Technology \(en Open Systems Interconnection \(en
The Directory: Models, section 9: Names
.Sh HISTORY
.Fn X509_NAME_new
and
.Fn X509_NAME_free
appeared in SSLeay 0.4 or earlier and have been available since
.Ox 2.4 .
Changes to jni/libressl/man/X509_OBJECT_get0_X509.3.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
.\" $OpenBSD: X509_OBJECT_get0_X509.3,v 1.8 2018/08/24 19:23:07 tb Exp $
.\" Copyright (c) 2018 Ingo Schwarze <schwarze@openbsd.org>
.\"
.\" Permission to use, copy, modify, and distribute this software for any
.\" purpose with or without fee is hereby granted, provided that the above
.\" copyright notice and this permission notice appear in all copies.
.\"
.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
.Dd $Mdocdate: August 24 2018 $
.Dt X509_OBJECT_GET0_X509 3
.Os
.Sh NAME
.Nm X509_OBJECT_get_type ,
.Nm X509_OBJECT_up_ref_count ,
.Nm X509_OBJECT_free_contents ,
.Nm X509_OBJECT_get0_X509 ,
|














|







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
.\" $OpenBSD: X509_OBJECT_get0_X509.3,v 1.9 2019/06/06 01:06:59 schwarze Exp $
.\" Copyright (c) 2018 Ingo Schwarze <schwarze@openbsd.org>
.\"
.\" Permission to use, copy, modify, and distribute this software for any
.\" purpose with or without fee is hereby granted, provided that the above
.\" copyright notice and this permission notice appear in all copies.
.\"
.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
.Dd $Mdocdate: June 6 2019 $
.Dt X509_OBJECT_GET0_X509 3
.Os
.Sh NAME
.Nm X509_OBJECT_get_type ,
.Nm X509_OBJECT_up_ref_count ,
.Nm X509_OBJECT_free_contents ,
.Nm X509_OBJECT_get0_X509 ,
220
221
222
223
224
225
226


227
228
229
230
231
232
233
.Fa stack
or
.Fa obj
is
.Dv NULL
or no match is found.
.Sh SEE ALSO


.Xr X509_STORE_get0_objects 3 ,
.Xr X509_STORE_load_locations 3 ,
.Xr X509_STORE_new 3
.\" The type X509_OBJECT is also used
.\" by the following undocumented public functions:
.\" X509_STORE_get_by_subject
.\" X509_LOOKUP_by_subject







>
>







220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
.Fa stack
or
.Fa obj
is
.Dv NULL
or no match is found.
.Sh SEE ALSO
.Xr X509_CRL_new 3 ,
.Xr X509_NAME_new 3 ,
.Xr X509_STORE_get0_objects 3 ,
.Xr X509_STORE_load_locations 3 ,
.Xr X509_STORE_new 3
.\" The type X509_OBJECT is also used
.\" by the following undocumented public functions:
.\" X509_STORE_get_by_subject
.\" X509_LOOKUP_by_subject
Changes to jni/libressl/man/X509_PUBKEY_new.3.
1
2
3
4
5
6
7
8
.\" $OpenBSD: X509_PUBKEY_new.3,v 1.13 2018/03/27 17:35:50 schwarze Exp $
.\" full merge up to: OpenSSL 99d63d46 Oct 26 13:56:48 2016 -0400
.\"
.\" This file was written by Dr. Stephen Henson <steve@openssl.org>.
.\" Copyright (c) 2016 The OpenSSL Project.  All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
|







1
2
3
4
5
6
7
8
.\" $OpenBSD: X509_PUBKEY_new.3,v 1.15 2019/06/10 14:58:48 schwarze Exp $
.\" full merge up to: OpenSSL 99d63d46 Oct 26 13:56:48 2016 -0400
.\"
.\" This file was written by Dr. Stephen Henson <steve@openssl.org>.
.\" Copyright (c) 2016 The OpenSSL Project.  All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: March 27 2018 $
.Dt X509_PUBKEY_NEW 3
.Os
.Sh NAME
.Nm X509_PUBKEY_new ,
.Nm X509_PUBKEY_free ,
.Nm X509_PUBKEY_set ,
.Nm X509_PUBKEY_get0 ,







|







44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: June 10 2019 $
.Dt X509_PUBKEY_NEW 3
.Os
.Sh NAME
.Nm X509_PUBKEY_new ,
.Nm X509_PUBKEY_free ,
.Nm X509_PUBKEY_set ,
.Nm X509_PUBKEY_get0 ,
271
272
273
274
275
276
277
278
279
280
281

282
283
284
285
286
287
288
.Fn X509_PUBKEY_get0_param ,
.Fn i2d_PUBKEY_fp ,
and
.Fn i2d_PUBKEY_bio
return 1 for success and 0 if an error occurred.
.Sh SEE ALSO
.Xr d2i_X509 3 ,
.Xr ERR_get_error 3 ,
.Xr EVP_PKEY_asn1_set_public 3 ,
.Xr X509_ALGOR_new 3 ,
.Xr X509_get_pubkey 3

.Sh STANDARDS
RFC 5280: Internet X.509 Public Key Infrastructure Certificate and
Certificate Revocation List (CRL) Profile
.Sh HISTORY
.Fn X509_PUBKEY_new
and
.Fn X509_PUBKEY_free







<


|
>







271
272
273
274
275
276
277

278
279
280
281
282
283
284
285
286
287
288
.Fn X509_PUBKEY_get0_param ,
.Fn i2d_PUBKEY_fp ,
and
.Fn i2d_PUBKEY_bio
return 1 for success and 0 if an error occurred.
.Sh SEE ALSO
.Xr d2i_X509 3 ,

.Xr EVP_PKEY_asn1_set_public 3 ,
.Xr X509_ALGOR_new 3 ,
.Xr X509_get_pubkey 3 ,
.Xr X509_new 3
.Sh STANDARDS
RFC 5280: Internet X.509 Public Key Infrastructure Certificate and
Certificate Revocation List (CRL) Profile
.Sh HISTORY
.Fn X509_PUBKEY_new
and
.Fn X509_PUBKEY_free
Changes to jni/libressl/man/X509_REQ_new.3.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
.\"	$OpenBSD: X509_REQ_new.3,v 1.5 2018/07/29 20:29:32 tb Exp $
.\"
.\" Copyright (c) 2016 Ingo Schwarze <schwarze@openbsd.org>
.\"
.\" Permission to use, copy, modify, and distribute this software for any
.\" purpose with or without fee is hereby granted, provided that the above
.\" copyright notice and this permission notice appear in all copies.
.\"
.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
.Dd $Mdocdate: July 29 2018 $
.Dt X509_REQ_NEW 3
.Os
.Sh NAME
.Nm X509_REQ_new ,
.Nm X509_REQ_free ,
.Nm X509_REQ_INFO_new ,
.Nm X509_REQ_INFO_free
|















|







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
.\"	$OpenBSD: X509_REQ_new.3,v 1.6 2019/06/06 01:06:59 schwarze Exp $
.\"
.\" Copyright (c) 2016 Ingo Schwarze <schwarze@openbsd.org>
.\"
.\" Permission to use, copy, modify, and distribute this software for any
.\" purpose with or without fee is hereby granted, provided that the above
.\" copyright notice and this permission notice appear in all copies.
.\"
.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
.Dd $Mdocdate: June 6 2019 $
.Dt X509_REQ_NEW 3
.Os
.Sh NAME
.Nm X509_REQ_new ,
.Nm X509_REQ_free ,
.Nm X509_REQ_INFO_new ,
.Nm X509_REQ_INFO_free
82
83
84
85
86
87
88



89
90
91
92
93
94
95
object, respectively, or
.Dv NULL
if an error occurs.
.Sh SEE ALSO
.Xr d2i_X509_REQ 3 ,
.Xr PEM_read_X509_REQ 3 ,
.Xr X509_new 3 ,



.Xr X509_REQ_get_pubkey 3 ,
.Xr X509_REQ_get_subject_name 3 ,
.Xr X509_REQ_get_version 3 ,
.Xr X509_REQ_sign 3
.Sh STANDARDS
RFC 2986: PKCS #10: Certification Request Syntax Specification
.Sh HISTORY







>
>
>







82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
object, respectively, or
.Dv NULL
if an error occurs.
.Sh SEE ALSO
.Xr d2i_X509_REQ 3 ,
.Xr PEM_read_X509_REQ 3 ,
.Xr X509_new 3 ,
.Xr X509_REQ_check_private_key 3 ,
.Xr X509_REQ_digest 3 ,
.Xr X509_REQ_get0_signature 3 ,
.Xr X509_REQ_get_pubkey 3 ,
.Xr X509_REQ_get_subject_name 3 ,
.Xr X509_REQ_get_version 3 ,
.Xr X509_REQ_sign 3
.Sh STANDARDS
RFC 2986: PKCS #10: Certification Request Syntax Specification
.Sh HISTORY
Changes to jni/libressl/man/X509_REVOKED_new.3.
1
2
3
4
5
6
7
8
.\" $OpenBSD: X509_REVOKED_new.3,v 1.9 2018/03/27 17:35:50 schwarze Exp $
.\" full merge up to:
.\" OpenSSL man3/X509_CRL_get0_by_serial cdd6c8c5 Mar 20 12:29:37 2017 +0100
.\"
.\" This file is a derived work.
.\" The changes are covered by the following Copyright and license:
.\"
.\" Copyright (c) 2016 Ingo Schwarze <schwarze@openbsd.org>
|







1
2
3
4
5
6
7
8
.\" $OpenBSD: X509_REVOKED_new.3,v 1.11 2019/06/14 13:59:32 schwarze Exp $
.\" full merge up to:
.\" OpenSSL man3/X509_CRL_get0_by_serial cdd6c8c5 Mar 20 12:29:37 2017 +0100
.\"
.\" This file is a derived work.
.\" The changes are covered by the following Copyright and license:
.\"
.\" Copyright (c) 2016 Ingo Schwarze <schwarze@openbsd.org>
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: March 27 2018 $
.Dt X509_REVOKED_NEW 3
.Os
.Sh NAME
.Nm X509_REVOKED_new ,
.Nm X509_REVOKED_dup ,
.Nm X509_REVOKED_free ,
.Nm X509_REVOKED_get0_serialNumber ,







|







62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: June 14 2019 $
.Dt X509_REVOKED_NEW 3
.Os
.Sh NAME
.Nm X509_REVOKED_new ,
.Nm X509_REVOKED_dup ,
.Nm X509_REVOKED_free ,
.Nm X509_REVOKED_get0_serialNumber ,
142
143
144
145
146
147
148

149




150


151
152
153
154
155
156


157
158
159
160
161
162
163
164
165
166
167
168
169


170
171
172
173
174

175
176
177
178
179
180
181
.Fa r
to
.Fa tm .
The supplied
.Fa tm
pointer is not used internally so it should be freed up after use.
.Sh RETURN VALUES

.Fn X509_REVOKED_new




and


.Fn X509_REVOKED_dup
return the new
.Vt X509_REVOKED
object or
.Dv NULL
if an error occurs.


.Pp
.Fn X509_REVOKED_get0_serialNumber
returns an internal pointer to the serial number of
.Fa r .
.Pp
.Fn X509_REVOKED_get0_revocationDate
returns an internal pointer to the revocation date of
.Fa r .
.Pp
.Fn X509_REVOKED_set_serialNumber
and
.Fn X509_REVOKED_set_revocationDate
return 1 for success or 0 for failure.


.Sh SEE ALSO
.Xr d2i_X509_CRL 3 ,
.Xr ERR_get_error 3 ,
.Xr PEM_read_X509_CRL 3 ,
.Xr X509_CRL_get0_by_serial 3 ,

.Xr X509_EXTENSION_new 3 ,
.Xr X509_REVOKED_get_ext 3 ,
.Xr X509_REVOKED_get_ext_d2i 3
.Sh STANDARDS
RFC 5280: Internet X.509 Public Key Infrastructure Certificate and
Certificate Revocation List (CRL) Profile, section 5.1: CRL Fields
.Sh HISTORY







>

>
>
>
>
|
>
>






>
>













>
>


<


>







142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182

183
184
185
186
187
188
189
190
191
192
.Fa r
to
.Fa tm .
The supplied
.Fa tm
pointer is not used internally so it should be freed up after use.
.Sh RETURN VALUES
The
.Fn X509_REVOKED_new
function returns the new
.Vt X509_REVOKED
object if successful; otherwise
.Dv NULL
is returned and an error code can be retrieved with
.Xr ERR_get_error 3 .
.Pp
.Fn X509_REVOKED_dup
return the new
.Vt X509_REVOKED
object or
.Dv NULL
if an error occurs.
In some cases of failure, the reason can be determined with
.Xr ERR_get_error 3 .
.Pp
.Fn X509_REVOKED_get0_serialNumber
returns an internal pointer to the serial number of
.Fa r .
.Pp
.Fn X509_REVOKED_get0_revocationDate
returns an internal pointer to the revocation date of
.Fa r .
.Pp
.Fn X509_REVOKED_set_serialNumber
and
.Fn X509_REVOKED_set_revocationDate
return 1 for success or 0 for failure.
In some cases of failure, the reason can be determined with
.Xr ERR_get_error 3 .
.Sh SEE ALSO
.Xr d2i_X509_CRL 3 ,

.Xr PEM_read_X509_CRL 3 ,
.Xr X509_CRL_get0_by_serial 3 ,
.Xr X509_CRL_new 3 ,
.Xr X509_EXTENSION_new 3 ,
.Xr X509_REVOKED_get_ext 3 ,
.Xr X509_REVOKED_get_ext_d2i 3
.Sh STANDARDS
RFC 5280: Internet X.509 Public Key Infrastructure Certificate and
Certificate Revocation List (CRL) Profile, section 5.1: CRL Fields
.Sh HISTORY
Changes to jni/libressl/man/X509_STORE_CTX_get_error.3.
1
2
3
4
5
6
7
8
9
10
11
12
.\" $OpenBSD: X509_STORE_CTX_get_error.3,v 1.11 2018/03/27 17:35:50 schwarze Exp $
.\" full merge up to:
.\" OpenSSL crypto/X509_STORE_CTX_get_error f0e0fd51 Apr 14 23:59:26 2016 -0400
.\" selective merge up to:
.\" OpenSSL man3/X509_STORE_CTX_get_error 2947af32 Nov 19 00:10:05 2016 +0100
.\" OpenSSL man3/X509_STORE_CTX_new 7643a172 Apr 21 13:35:51 2017 +0200
.\"
.\" This file was written by Dr. Stephen Henson <steve@openssl.org>.
.\" Copyright (c) 2009, 2013, 2015, 2016 The OpenSSL Project.
.\" All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
|



|







1
2
3
4
5
6
7
8
9
10
11
12
.\" $OpenBSD: X509_STORE_CTX_get_error.3,v 1.13 2019/08/25 15:39:10 schwarze Exp $
.\" full merge up to:
.\" OpenSSL crypto/X509_STORE_CTX_get_error f0e0fd51 Apr 14 23:59:26 2016 -0400
.\" selective merge up to:
.\" OpenSSL man3/X509_STORE_CTX_get_error bb00b040 Aug 5 14:14:54 2019 +0200
.\" OpenSSL man3/X509_STORE_CTX_new 7643a172 Apr 21 13:35:51 2017 +0200
.\"
.\" This file was written by Dr. Stephen Henson <steve@openssl.org>.
.\" Copyright (c) 2009, 2013, 2015, 2016 The OpenSSL Project.
.\" All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: March 27 2018 $
.Dt X509_STORE_CTX_GET_ERROR 3
.Os
.Sh NAME
.Nm X509_STORE_CTX_get_error ,
.Nm X509_STORE_CTX_set_error ,
.Nm X509_STORE_CTX_get_error_depth ,
.Nm X509_STORE_CTX_get_current_cert ,
.Nm X509_STORE_CTX_get0_cert ,
.Nm X509_STORE_CTX_get0_chain ,
.Nm X509_STORE_CTX_get1_chain ,
.Nm X509_verify_cert_error_string
.Nd get or set certificate verification status information
.Sh SYNOPSIS
.In openssl/x509.h
.Ft int
.Fo X509_STORE_CTX_get_error
.Fa "X509_STORE_CTX *ctx"
.Fc
.Ft void
.Fo X509_STORE_CTX_set_error
.Fa "X509_STORE_CTX *ctx"







|













|







49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: August 25 2019 $
.Dt X509_STORE_CTX_GET_ERROR 3
.Os
.Sh NAME
.Nm X509_STORE_CTX_get_error ,
.Nm X509_STORE_CTX_set_error ,
.Nm X509_STORE_CTX_get_error_depth ,
.Nm X509_STORE_CTX_get_current_cert ,
.Nm X509_STORE_CTX_get0_cert ,
.Nm X509_STORE_CTX_get0_chain ,
.Nm X509_STORE_CTX_get1_chain ,
.Nm X509_verify_cert_error_string
.Nd get or set certificate verification status information
.Sh SYNOPSIS
.In openssl/x509_vfy.h
.Ft int
.Fo X509_STORE_CTX_get_error
.Fa "X509_STORE_CTX *ctx"
.Fc
.Ft void
.Fo X509_STORE_CTX_set_error
.Fa "X509_STORE_CTX *ctx"
93
94
95
96
97
98
99

100
101
102
103
104
105
106
.Fo X509_STORE_CTX_get0_chain
.Fa "X509_STORE_CTX *ctx"
.Fc
.Ft STACK_OF(X509) *
.Fo X509_STORE_CTX_get1_chain
.Fa "X509_STORE_CTX *ctx"
.Fc

.Ft const char *
.Fo X509_verify_cert_error_string
.Fa "long n"
.Fc
.Sh DESCRIPTION
These functions are typically called after
.Xr X509_verify_cert 3







>







93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
.Fo X509_STORE_CTX_get0_chain
.Fa "X509_STORE_CTX *ctx"
.Fc
.Ft STACK_OF(X509) *
.Fo X509_STORE_CTX_get1_chain
.Fa "X509_STORE_CTX *ctx"
.Fc
.In openssl/x509.h
.Ft const char *
.Fo X509_verify_cert_error_string
.Fa "long n"
.Fc
.Sh DESCRIPTION
These functions are typically called after
.Xr X509_verify_cert 3
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
Some of the error codes are defined but currently never returned:
these are described as "unused".
.Bl -tag -width Ds
.It Dv X509_V_OK : No ok
The operation was successful.
.It Dv X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT : \
 No unable to get issuer certificate
The issuer certificate could not be found: this occurs if the issuer
certificate of an untrusted certificate cannot be found.
.It Dv X509_V_ERR_UNABLE_TO_GET_CRL : No unable to get certificate CRL
The CRL of a certificate could not be found.
.It Dv X509_V_ERR_UNABLE_TO_DECRYPT_CERT_SIGNATURE : \
 No unable to decrypt certificate's signature
The certificate signature could not be decrypted.
This means that the actual signature value could not be determined
rather than it not matching the expected value.







|
|







206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
Some of the error codes are defined but currently never returned:
these are described as "unused".
.Bl -tag -width Ds
.It Dv X509_V_OK : No ok
The operation was successful.
.It Dv X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT : \
 No unable to get issuer certificate
The issuer certificate of a locally looked up certificate could not be found.
This normally means the list of trusted certificates is not complete.
.It Dv X509_V_ERR_UNABLE_TO_GET_CRL : No unable to get certificate CRL
The CRL of a certificate could not be found.
.It Dv X509_V_ERR_UNABLE_TO_DECRYPT_CERT_SIGNATURE : \
 No unable to decrypt certificate's signature
The certificate signature could not be decrypted.
This means that the actual signature value could not be determined
rather than it not matching the expected value.
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
found in the list of trusted certificates.
.It Dv X509_V_ERR_SELF_SIGNED_CERT_IN_CHAIN : \
 No self signed certificate in certificate chain
The certificate chain could be built up using the untrusted certificates
but the root could not be found locally.
.It Dv X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT_LOCALLY : \
 No unable to get local issuer certificate
The issuer certificate of a locally looked up certificate could not be found.
This normally means the list of trusted certificates is not complete.
.It Dv X509_V_ERR_UNABLE_TO_VERIFY_LEAF_SIGNATURE : \
 No unable to verify the first certificate
No signatures could be verified because the chain contains only one
certificate and it is not self signed.
.It Dv X509_V_ERR_CERT_CHAIN_TOO_LONG : No certificate chain too long
The certificate chain length is greater than the supplied maximum depth.
Unused.







|
|







265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
found in the list of trusted certificates.
.It Dv X509_V_ERR_SELF_SIGNED_CERT_IN_CHAIN : \
 No self signed certificate in certificate chain
The certificate chain could be built up using the untrusted certificates
but the root could not be found locally.
.It Dv X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT_LOCALLY : \
 No unable to get local issuer certificate
The issuer certificate could not be found: this occurs if the issuer
certificate of an untrusted certificate cannot be found.
.It Dv X509_V_ERR_UNABLE_TO_VERIFY_LEAF_SIGNATURE : \
 No unable to verify the first certificate
No signatures could be verified because the chain contains only one
certificate and it is not self signed.
.It Dv X509_V_ERR_CERT_CHAIN_TOO_LONG : No certificate chain too long
The certificate chain length is greater than the supplied maximum depth.
Unused.
Changes to jni/libressl/man/X509_STORE_CTX_get_ex_new_index.3.
1
2
3
4
5
6
7
8
.\"	$OpenBSD: X509_STORE_CTX_get_ex_new_index.3,v 1.4 2018/03/21 07:41:44 schwarze Exp $
.\"	OpenSSL a528d4f0 Oct 27 13:40:11 2015 -0400
.\"
.\" This file was written by Dr. Stephen Henson <steve@openssl.org>.
.\" Copyright (c) 2009, 2014 The OpenSSL Project.  All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
|







1
2
3
4
5
6
7
8
.\"	$OpenBSD: X509_STORE_CTX_get_ex_new_index.3,v 1.5 2019/06/06 01:06:59 schwarze Exp $
.\"	OpenSSL a528d4f0 Oct 27 13:40:11 2015 -0400
.\"
.\" This file was written by Dr. Stephen Henson <steve@openssl.org>.
.\" Copyright (c) 2009, 2014 The OpenSSL Project.  All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: March 21 2018 $
.Dt X509_STORE_CTX_GET_EX_NEW_INDEX 3
.Os
.Sh NAME
.Nm X509_STORE_CTX_get_ex_new_index ,
.Nm X509_STORE_CTX_set_ex_data ,
.Nm X509_STORE_CTX_get_ex_data
.Nd add application specific data to X509_STORE_CTX structures







|







44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: June 6 2019 $
.Dt X509_STORE_CTX_GET_EX_NEW_INDEX 3
.Os
.Sh NAME
.Nm X509_STORE_CTX_get_ex_new_index ,
.Nm X509_STORE_CTX_set_ex_data ,
.Nm X509_STORE_CTX_get_ex_data
.Nd add application specific data to X509_STORE_CTX structures
91
92
93
94
95
96
97
98

99
100
101
102
103
104
105
.Xr ssl 3
library to store the
.Vt SSL
structure associated with a verification operation in an
.Vt X509_STORE_CTX
structure.
.Sh SEE ALSO
.Xr RSA_get_ex_new_index 3

.Sh HISTORY
.Fn X509_STORE_CTX_get_ex_new_index ,
.Fn X509_STORE_CTX_set_ex_data ,
and
.Fn X509_STORE_CTX_get_ex_data
first appeared in SSLeay 0.9.0 and have been available since
.Ox 2.4 .







|
>







91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
.Xr ssl 3
library to store the
.Vt SSL
structure associated with a verification operation in an
.Vt X509_STORE_CTX
structure.
.Sh SEE ALSO
.Xr RSA_get_ex_new_index 3 ,
.Xr X509_STORE_CTX_new 3
.Sh HISTORY
.Fn X509_STORE_CTX_get_ex_new_index ,
.Fn X509_STORE_CTX_set_ex_data ,
and
.Fn X509_STORE_CTX_get_ex_data
first appeared in SSLeay 0.9.0 and have been available since
.Ox 2.4 .
Changes to jni/libressl/man/X509_STORE_CTX_new.3.
1
2
3
4
5
6
7
8
.\" $OpenBSD: X509_STORE_CTX_new.3,v 1.18 2018/03/27 17:35:50 schwarze Exp $
.\" full merge up to: OpenSSL 186bb907 Apr 13 11:05:13 2015 -0700
.\" selective merge up to: OpenSSL 7643a172 Apr 21 13:35:51 2017 +0200
.\"
.\" This file was written by Dr. Stephen Henson <steve@openssl.org>
.\" and Rich Salz <rsalz@openssl.org>.
.\" Copyright (c) 2009, 2015, 2016 The OpenSSL Project.  All rights reserved.
.\"
|







1
2
3
4
5
6
7
8
.\" $OpenBSD: X509_STORE_CTX_new.3,v 1.19 2019/06/06 01:06:59 schwarze Exp $
.\" full merge up to: OpenSSL 186bb907 Apr 13 11:05:13 2015 -0700
.\" selective merge up to: OpenSSL 7643a172 Apr 21 13:35:51 2017 +0200
.\"
.\" This file was written by Dr. Stephen Henson <steve@openssl.org>
.\" and Rich Salz <rsalz@openssl.org>.
.\" Copyright (c) 2009, 2015, 2016 The OpenSSL Project.  All rights reserved.
.\"
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: March 27 2018 $
.Dt X509_STORE_CTX_NEW 3
.Os
.Sh NAME
.Nm X509_STORE_CTX_new ,
.Nm X509_STORE_CTX_cleanup ,
.Nm X509_STORE_CTX_free ,
.Nm X509_STORE_CTX_init ,







|







46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: June 6 2019 $
.Dt X509_STORE_CTX_NEW 3
.Os
.Sh NAME
.Nm X509_STORE_CTX_new ,
.Nm X509_STORE_CTX_cleanup ,
.Nm X509_STORE_CTX_free ,
.Nm X509_STORE_CTX_init ,
312
313
314
315
316
317
318

319

320
321
322
323
324
325
326
.Pp
.Fn X509_STORE_CTX_set_default
returns 1 for success or 0 if an error occurred.
.Pp
.Fn X509_STORE_CTX_get0_untrusted
returns an internal pointer.
.Sh SEE ALSO

.Xr X509_STORE_CTX_get_error 3 ,

.Xr X509_STORE_new 3 ,
.Xr X509_STORE_set1_param 3 ,
.Xr X509_verify_cert 3 ,
.Xr X509_VERIFY_PARAM_set_flags 3
.Sh HISTORY
.Fn X509_STORE_CTX_cleanup ,
.Fn X509_STORE_CTX_init ,







>

>







312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
.Pp
.Fn X509_STORE_CTX_set_default
returns 1 for success or 0 if an error occurred.
.Pp
.Fn X509_STORE_CTX_get0_untrusted
returns an internal pointer.
.Sh SEE ALSO
.Xr X509_CRL_new 3 ,
.Xr X509_STORE_CTX_get_error 3 ,
.Xr X509_STORE_CTX_get_ex_new_index 3 ,
.Xr X509_STORE_new 3 ,
.Xr X509_STORE_set1_param 3 ,
.Xr X509_verify_cert 3 ,
.Xr X509_VERIFY_PARAM_set_flags 3
.Sh HISTORY
.Fn X509_STORE_CTX_cleanup ,
.Fn X509_STORE_CTX_init ,
Changes to jni/libressl/man/X509_STORE_new.3.
1
2
3
4
5
6
7
8
.\" $OpenBSD: X509_STORE_new.3,v 1.4 2018/03/27 17:35:50 schwarze Exp $
.\" full merge up to: OpenSSL 05ea606a May 20 20:52:46 2016 -0400
.\" selective merge up to: OpenSSL 99d63d46 Oct 26 13:56:48 2016 -0400
.\"
.\" This file is a derived work.
.\" The changes are covered by the following Copyright and license:
.\"
.\" Copyright (c) 2018 Ingo Schwarze <schwarze@openbsd.org>
|







1
2
3
4
5
6
7
8
.\" $OpenBSD: X509_STORE_new.3,v 1.5 2019/06/06 01:06:59 schwarze Exp $
.\" full merge up to: OpenSSL 05ea606a May 20 20:52:46 2016 -0400
.\" selective merge up to: OpenSSL 99d63d46 Oct 26 13:56:48 2016 -0400
.\"
.\" This file is a derived work.
.\" The changes are covered by the following Copyright and license:
.\"
.\" Copyright (c) 2018 Ingo Schwarze <schwarze@openbsd.org>
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: March 27 2018 $
.Dt X509_STORE_NEW 3
.Os
.Sh NAME
.Nm X509_STORE_new ,
.Nm X509_STORE_up_ref ,
.Nm X509_STORE_free
.Nd allocate and free X.509 certificate stores







|







63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: June 6 2019 $
.Dt X509_STORE_NEW 3
.Os
.Sh NAME
.Nm X509_STORE_new ,
.Nm X509_STORE_up_ref ,
.Nm X509_STORE_free
.Nd allocate and free X.509 certificate stores
120
121
122
123
124
125
126


127

128
129
130
131
132
133
134
135
136
137
138
139
140
if an error occurs.
.Pp
.Fn X509_STORE_up_ref
returns 1 for success and 0 for failure.
.Sh SEE ALSO
.Xr PKCS7_verify 3 ,
.Xr SSL_CTX_set_cert_store 3 ,


.Xr X509_STORE_CTX_new 3 ,

.Xr X509_STORE_load_locations 3 ,
.Xr X509_STORE_set1_param 3 ,
.Xr X509_STORE_set_verify_cb 3
.Sh HISTORY
.Fn X509_STORE_new
and
.Fn X509_STORE_free
first appeared in SSLeay 0.8.0 and have been available since
.Ox 2.4 .
.Pp
.Fn X509_STORE_up_ref
first appeared in OpenSSL 1.1.0 and has been available since
.Ox 6.3 .







>
>

>













120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
if an error occurs.
.Pp
.Fn X509_STORE_up_ref
returns 1 for success and 0 for failure.
.Sh SEE ALSO
.Xr PKCS7_verify 3 ,
.Xr SSL_CTX_set_cert_store 3 ,
.Xr X509_LOOKUP_hash_dir 3 ,
.Xr X509_OBJECT_get0_X509 3 ,
.Xr X509_STORE_CTX_new 3 ,
.Xr X509_STORE_get_ex_new_index 3 ,
.Xr X509_STORE_load_locations 3 ,
.Xr X509_STORE_set1_param 3 ,
.Xr X509_STORE_set_verify_cb 3
.Sh HISTORY
.Fn X509_STORE_new
and
.Fn X509_STORE_free
first appeared in SSLeay 0.8.0 and have been available since
.Ox 2.4 .
.Pp
.Fn X509_STORE_up_ref
first appeared in OpenSSL 1.1.0 and has been available since
.Ox 6.3 .
Changes to jni/libressl/man/X509_STORE_set1_param.3.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
.\" $OpenBSD: X509_STORE_set1_param.3,v 1.15 2018/04/02 01:35:37 schwarze Exp $
.\" content checked up to:
.\" OpenSSL man3/X509_STORE_add_cert b0edda11 Mar 20 13:00:17 2018 +0000
.\" OpenSSL man3/X509_STORE_get0_param e90fc053 Jul 15 09:39:45 2017 -0400
.\"
.\" Copyright (c) 2018 Ingo Schwarze <schwarze@openbsd.org>
.\"
.\" Permission to use, copy, modify, and distribute this software for any
.\" purpose with or without fee is hereby granted, provided that the above
.\" copyright notice and this permission notice appear in all copies.
.\"
.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
.Dd $Mdocdate: April 2 2018 $
.Dt X509_STORE_SET1_PARAM 3
.Os
.Sh NAME
.Nm X509_STORE_set1_param ,
.Nm X509_STORE_set_flags ,
.Nm X509_STORE_set_purpose ,
.Nm X509_STORE_set_trust ,
|


















|







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
.\" $OpenBSD: X509_STORE_set1_param.3,v 1.16 2019/06/06 01:06:59 schwarze Exp $
.\" content checked up to:
.\" OpenSSL man3/X509_STORE_add_cert b0edda11 Mar 20 13:00:17 2018 +0000
.\" OpenSSL man3/X509_STORE_get0_param e90fc053 Jul 15 09:39:45 2017 -0400
.\"
.\" Copyright (c) 2018 Ingo Schwarze <schwarze@openbsd.org>
.\"
.\" Permission to use, copy, modify, and distribute this software for any
.\" purpose with or without fee is hereby granted, provided that the above
.\" copyright notice and this permission notice appear in all copies.
.\"
.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
.Dd $Mdocdate: June 6 2019 $
.Dt X509_STORE_SET1_PARAM 3
.Os
.Sh NAME
.Nm X509_STORE_set1_param ,
.Nm X509_STORE_set_flags ,
.Nm X509_STORE_set_purpose ,
.Nm X509_STORE_set_trust ,
186
187
188
189
190
191
192

193
194
195
196
197
198
199
returns a new index or \-1 on failure.
.Pp
.Fn X509_STORE_get_ex_data
returns the application data or
.Dv NULL
on failure.
.Sh SEE ALSO

.Xr SSL_set1_param 3 ,
.Xr X509_OBJECT_get0_X509 3 ,
.Xr X509_STORE_CTX_set0_param 3 ,
.Xr X509_STORE_load_locations 3 ,
.Xr X509_STORE_new 3 ,
.Xr X509_VERIFY_PARAM_set_flags 3
.Sh HISTORY







>







186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
returns a new index or \-1 on failure.
.Pp
.Fn X509_STORE_get_ex_data
returns the application data or
.Dv NULL
on failure.
.Sh SEE ALSO
.Xr RSA_get_ex_new_index 3 ,
.Xr SSL_set1_param 3 ,
.Xr X509_OBJECT_get0_X509 3 ,
.Xr X509_STORE_CTX_set0_param 3 ,
.Xr X509_STORE_load_locations 3 ,
.Xr X509_STORE_new 3 ,
.Xr X509_VERIFY_PARAM_set_flags 3
.Sh HISTORY
Changes to jni/libressl/man/X509_check_ca.3.
1
2
3
4
5
6
7
8
.\"	$OpenBSD: X509_check_ca.3,v 1.4 2018/03/22 22:07:12 schwarze Exp $
.\"	OpenSSL 99d63d46 Oct 26 13:56:48 2016 -0400
.\"
.\" This file was written by Victor B. Wagner <vitus@cryptocom.ru>.
.\" Copyright (c) 2015, 2016 The OpenSSL Project.  All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
|







1
2
3
4
5
6
7
8
.\"	$OpenBSD: X509_check_ca.3,v 1.5 2019/06/06 01:06:59 schwarze Exp $
.\"	OpenSSL 99d63d46 Oct 26 13:56:48 2016 -0400
.\"
.\" This file was written by Victor B. Wagner <vitus@cryptocom.ru>.
.\" Copyright (c) 2015, 2016 The OpenSSL Project.  All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: March 22 2018 $
.Dt X509_CHECK_CA 3
.Os
.Sh NAME
.Nm X509_check_ca
.Nd check whether a certificate is a CA certificate
.Sh SYNOPSIS
.In openssl/x509v3.h







|







44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: June 6 2019 $
.Dt X509_CHECK_CA 3
.Os
.Sh NAME
.Nm X509_check_ca
.Nd check whether a certificate is a CA certificate
.Sh SYNOPSIS
.In openssl/x509v3.h
84
85
86
87
88
89
90


91


92
93
94
95
96
set, but without
.Sy basicConstraints
.It 5
a certificate with an outdated Netscape Certificate Type extension telling
that it is a CA certificate
.El
.Sh SEE ALSO


.Xr X509_check_issued 3 ,


.Xr X509_verify_cert 3
.Sh HISTORY
.Fn X509_check_ca
first appeared in OpenSSL 0.9.7f and has been available since
.Ox 3.8 .







>
>

>
>





84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
set, but without
.Sy basicConstraints
.It 5
a certificate with an outdated Netscape Certificate Type extension telling
that it is a CA certificate
.El
.Sh SEE ALSO
.Xr BASIC_CONSTRAINTS_new 3 ,
.Xr EXTENDED_KEY_USAGE_new 3 ,
.Xr X509_check_issued 3 ,
.Xr X509_EXTENSION_new 3 ,
.Xr X509_new 3 ,
.Xr X509_verify_cert 3
.Sh HISTORY
.Fn X509_check_ca
first appeared in OpenSSL 0.9.7f and has been available since
.Ox 3.8 .
Changes to jni/libressl/man/X509_check_host.3.
1
2
3
4
5
6

7
8
9
10
11
12
13
.\"	$OpenBSD: X509_check_host.3,v 1.3 2018/03/23 14:26:40 schwarze Exp $
.\"	OpenSSL 99d63d46 Oct 26 13:56:48 2016 -0400
.\"
.\" This file was written by Florian Weimer <fweimer@redhat.com> and
.\" Viktor Dukhovni <openssl-users@dukhovni.org>.
.\" Copyright (c) 2012, 2014, 2015, 2016 The OpenSSL Project.  All rights reserved.

.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\"
.\" 1. Redistributions of source code must retain the above copyright
.\"    notice, this list of conditions and the following disclaimer.
|
|



|
>







1
2
3
4
5
6
7
8
9
10
11
12
13
14
.\" $OpenBSD: X509_check_host.3,v 1.5 2019/08/23 12:23:39 schwarze Exp $
.\" full merge up to: OpenSSL 6738bf14 Feb 13 12:51:29 2018 +0000
.\"
.\" This file was written by Florian Weimer <fweimer@redhat.com> and
.\" Viktor Dukhovni <openssl-users@dukhovni.org>.
.\" Copyright (c) 2012, 2014, 2015, 2016 The OpenSSL Project.
.\" All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\"
.\" 1. Redistributions of source code must retain the above copyright
.\"    notice, this list of conditions and the following disclaimer.
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: March 23 2018 $
.Dt X509_CHECK_HOST 3
.Os
.Sh NAME
.Nm X509_check_host ,
.Nm X509_check_email ,
.Nm X509_check_ip ,
.Nm X509_check_ip_asc







|







46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: August 23 2019 $
.Dt X509_CHECK_HOST 3
.Os
.Sh NAME
.Nm X509_check_host ,
.Nm X509_check_email ,
.Nm X509_check_ip ,
.Nm X509_check_ip_asc
228
229
230
231
232
233
234




235
236
237
238
.Pp
All functions can also return -2 if the input is malformed.
For example,
.Fn X509_check_host
returns -2 if the provided
.Fa name
contains embedded NUL bytes.




.Sh HISTORY
These functions first appeared in OpenSSL 1.0.2
and have been available since
.Ox 6.1 .







>
>
>
>




229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
.Pp
All functions can also return -2 if the input is malformed.
For example,
.Fn X509_check_host
returns -2 if the provided
.Fa name
contains embedded NUL bytes.
.Sh SEE ALSO
.Xr X509_EXTENSION_new 3 ,
.Xr X509_get1_email 3 ,
.Xr X509_new 3
.Sh HISTORY
These functions first appeared in OpenSSL 1.0.2
and have been available since
.Ox 6.1 .
Changes to jni/libressl/man/X509_check_issued.3.
1
2
3
4
5
6
7
8
.\"	$OpenBSD: X509_check_issued.3,v 1.3 2018/03/22 17:11:04 schwarze Exp $
.\"	OpenSSL 99d63d46 Oct 26 13:56:48 2016 -0400
.\"
.\" This file was written by Victor B. Wagner <vitus@cryptocom.ru>.
.\" Copyright (c) 2015 The OpenSSL Project.  All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
|







1
2
3
4
5
6
7
8
.\"	$OpenBSD: X509_check_issued.3,v 1.4 2019/06/06 01:06:59 schwarze Exp $
.\"	OpenSSL 99d63d46 Oct 26 13:56:48 2016 -0400
.\"
.\" This file was written by Victor B. Wagner <vitus@cryptocom.ru>.
.\" Copyright (c) 2015 The OpenSSL Project.  All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: March 22 2018 $
.Dt X509_CHECK_ISSUED 3
.Os
.Sh NAME
.Nm X509_check_issued
.Nd check whether a certificate was issued using a given CA certificate
.Sh SYNOPSIS
.In openssl/x509v3.h







|







44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: June 6 2019 $
.Dt X509_CHECK_ISSUED 3
.Os
.Sh NAME
.Nm X509_check_issued
.Nd check whether a certificate was issued using a given CA certificate
.Sh SYNOPSIS
.In openssl/x509v3.h
97
98
99
100
101
102
103

104
105
106
107
108
is issued by
.Fa issuer ,
or some
.Dv X509_V_ERR*
constant to indicate an error.
.Sh SEE ALSO
.Xr X509_check_ca 3 ,

.Xr X509_verify_cert 3
.Sh HISTORY
.Fn X509_check_issued
first appeared in OpenSSL 0.9.6 and has been available since
.Ox 2.9 .







>





97
98
99
100
101
102
103
104
105
106
107
108
109
is issued by
.Fa issuer ,
or some
.Dv X509_V_ERR*
constant to indicate an error.
.Sh SEE ALSO
.Xr X509_check_ca 3 ,
.Xr X509_new 3 ,
.Xr X509_verify_cert 3
.Sh HISTORY
.Fn X509_check_issued
first appeared in OpenSSL 0.9.6 and has been available since
.Ox 2.9 .
Changes to jni/libressl/man/X509_check_private_key.3.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
.\"	$OpenBSD: X509_check_private_key.3,v 1.5 2018/05/19 22:40:34 schwarze Exp $
.\"	OpenSSL X509_check_private_key.pod 09ddb878 Jun 5 03:56:07 2017 +0800
.\"
.\" Copyright (c) 2017 Ingo Schwarze <schwarze@openbsd.org>
.\"
.\" Permission to use, copy, modify, and distribute this software for any
.\" purpose with or without fee is hereby granted, provided that the above
.\" copyright notice and this permission notice appear in all copies.
.\"
.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
.Dd $Mdocdate: May 19 2018 $
.Dt X509_CHECK_PRIVATE_KEY 3
.Os
.Sh NAME
.Nm X509_check_private_key ,
.Nm X509_REQ_check_private_key
.Nd compare public key components
.Sh SYNOPSIS
|
















|







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
.\"	$OpenBSD: X509_check_private_key.3,v 1.6 2019/06/06 01:06:59 schwarze Exp $
.\"	OpenSSL X509_check_private_key.pod 09ddb878 Jun 5 03:56:07 2017 +0800
.\"
.\" Copyright (c) 2017 Ingo Schwarze <schwarze@openbsd.org>
.\"
.\" Permission to use, copy, modify, and distribute this software for any
.\" purpose with or without fee is hereby granted, provided that the above
.\" copyright notice and this permission notice appear in all copies.
.\"
.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
.Dd $Mdocdate: June 6 2019 $
.Dt X509_CHECK_PRIVATE_KEY 3
.Os
.Sh NAME
.Nm X509_check_private_key ,
.Nm X509_REQ_check_private_key
.Nd compare public key components
.Sh SYNOPSIS
56
57
58
59
60
61
62
63


64
65
66
67
68
69
70
71
contained in a certificate request.
.Sh RETURN VALUES
These functions return 1 if the public key components and parameters
match, or 0 if they do not or if an error occurs.
On error or mismatch, a reason code can be obtained using
.Xr ERR_get_error 3 .
.Sh SEE ALSO
.Xr SSL_check_private_key 3


.Sh HISTORY
.Fn X509_check_private_key
first appeared in SSLeay 0.6.5 and has been available since
.Ox 2.4 .
.Pp
.Fn X509_REQ_check_private_key
first appeared in OpenSSL 0.9.8 and has been available since
.Ox 4.5 .







|
>
>








56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
contained in a certificate request.
.Sh RETURN VALUES
These functions return 1 if the public key components and parameters
match, or 0 if they do not or if an error occurs.
On error or mismatch, a reason code can be obtained using
.Xr ERR_get_error 3 .
.Sh SEE ALSO
.Xr SSL_check_private_key 3 ,
.Xr X509_new 3 ,
.Xr X509_REQ_new 3
.Sh HISTORY
.Fn X509_check_private_key
first appeared in SSLeay 0.6.5 and has been available since
.Ox 2.4 .
.Pp
.Fn X509_REQ_check_private_key
first appeared in OpenSSL 0.9.8 and has been available since
.Ox 4.5 .
Added jni/libressl/man/X509_check_purpose.3.










































































































































































































































































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
.\" $OpenBSD: X509_check_purpose.3,v 1.1 2019/08/22 15:15:35 schwarze Exp $
.\" Copyright (c) 2019 Ingo Schwarze <schwarze@openbsd.org>
.\"
.\" Permission to use, copy, modify, and distribute this software for any
.\" purpose with or without fee is hereby granted, provided that the above
.\" copyright notice and this permission notice appear in all copies.
.\"
.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
.Dd $Mdocdate: August 22 2019 $
.Dt X509_CHECK_PURPOSE 3
.Os
.Sh NAME
.Nm X509_check_purpose
.Nd check intended usage of a public key
.Sh SYNOPSIS
.In openssl/x509v3.h
.Ft int
.Fo X509_check_purpose
.Fa "X509 *certificate"
.Fa "int purpose"
.Fa "int ca"
.Fc
.Sh DESCRIPTION
If the
.Fa ca
flag is 0,
.Fn X509_check_purpose
checks whether the public key contained in the
.Fa certificate
is intended to be used for the given
.Fa purpose ,
which can be one of the following integer constants.
The check succeeds if none of the conditions given in the list below
are violated.
.Bl -tag -width 1n
.It Dv X509_PURPOSE_SSL_CLIENT
.Bl -dash -width 1n -compact
.It
If the
.Fa certificate
contains an Extended Key Usage extension, it contains the RFC 5280
.Dq TLS WWW client authentication
purpose
.Pq Dv NID_client_auth .
.It
If the
.Fa certificate
contains a Key Usage extension, the
.Dv digitalSignature
bit is set.
.It
If the
.Fa certificate
contains a Netscape Cert Type extension, the
.Dq SSL client certificate
bit is set
.Pq Dv NS_SSL_CLIENT .
.El
.It Dv X509_PURPOSE_SSL_SERVER
.Bl -dash -width 1n -compact
.It
If the
.Fa certificate
contains an Extended Key Usage extension, it contains the RFC 5280
.Dq TLS WWW server authentication
purpose
.Pq Dv NID_server_auth
or the private
.Dq Netscape Server Gated Crypto
.Pq Dv NID_ns_sgc
or
.Dq Microsoft Server Gated Crypto
.Pq Dv NID_ms_sgc
purpose.
.It
If the
.Fa certificate
contains a Key Usage extension, at least one of the
.Dv digitalSignature
and
.Dv keyEncipherment
bits is set.
.It
If the
.Fa certificate
contains a Netscape Cert Type extension, the
.Dq SSL server certificate
bit is set
.Pq Dv NS_SSL_SERVER
.El
.It Dv X509_PURPOSE_NS_SSL_SERVER
.\" check_purpose_ns_ssl_server, "Netscape SSL server"
This does the same checks as
.Dv X509_PURPOSE_SSL_SERVER
and additionally requires that a Key Usage extension, if present,
has the
.Dv keyEncipherment
bit set.
.It Dv X509_PURPOSE_SMIME_SIGN
.\" check_purpose_smime_sign, "S/MIME signing"
.Bl -dash -width 1n -compact
.It
If the
.Fa certificate
contains an Extended Key Usage extension, it contains the RFC 5280
.Dq Email protection
purpose
.Pq Dv NID_email_protect .
.It
If the
.Fa certificate
contains a Key Usage extension, at least one of the
.Dv digitalSignature
and
.Dv nonRepudiation
bits is set.
.It
If the
.Fa certificate
contains a Netscape Cert Type extension, it has the
.Dq S/MIME certificate
bit set.
If the
.Dq SSL client certificate
bit is set but the
.Dq S/MIME certificate
bit is not, no decision is made.
.El
.It Dv X509_PURPOSE_SMIME_ENCRYPT
.\" check_purpose_smime_encrypt, "S/MIME encryption"
.Bl -dash -width 1n -compact
.It
If the
.Fa certificate
contains an Extended Key Usage extension, it contains the RFC 5280
.Dq Email protection
purpose
.Pq Dv NID_email_protect .
.It
If the
.Fa certificate
contains a Key Usage extension, the
.Dv keyEncipherment
bit is set.
.It
If the
.Fa certificate
contains a Netscape Cert Type extension, it has the
.Dq S/MIME certificate
bit set.
If the
.Dq SSL client certificate
bit is set but the
.Dq S/MIME certificate
bit is not, no decision is made.
.El
.It Dv X509_PURPOSE_CRL_SIGN
.\" check_purpose_crl_sign, "CRL signing"
.Bl -dash -width 1n -compact
.It
If the
.Fa certificate
contains a Key Usage extension, the
.Dv cRLSign
bit is set.
.El
.It Dv X509_PURPOSE_ANY
The check always succeeds.
.It Dv X509_PURPOSE_OCSP_HELPER
.\" ocsp_helper, "OCSP helper"
The check always succeeds.
The application program is expected
to do the actual checking by other means.
.It Dv X509_PURPOSE_TIMESTAMP_SIGN
.\" check_purpose_timestamp_sign, "Time Stamp signing"
.Bl -dash -width 1n -compact
.It
The
.Fa certificate
contains an Extended Key Usage extension containing the RFC 5280
.Dq Time Stamping
purpose and no other purpose.
This extension is marked as critical.
.It
If the
.Fa certificate
contains a Key Usage extension, at least one of the
.Dv digitalSignature
and
.Dv nonRepudiation
bits is set, and no other bits are set.
.El
.El
.Pp
If the
.Fa ca
flag is non-zero,
.Fn X509_check_purpose
instead checks whether the
.Fa certificate
can be used as a certificate authority certificate
in the context of the given
.Fa purpose .
To succeed, the check always requires that none of the following
conditions are violated:
.Pp
.Bl -dash -width 1n -compact
.It
If the
.Fa certificate
contains a Key Usage extension, the
.Dv keyCertSign
bit is set.
.It
If the
.Fa certificate
contains a Basic Constraints extension, the
.Fa cA
field is set.
.It
If the
.Fa certificate
is a version 1 certificate, the subject name matches the issuer name
and the certificate is self signed.
.El
.Pp
The check succeeds if none of the additional conditions given in
the list below are violated.
.Bl -tag -width 1n
.It Dv X509_PURPOSE_SSL_CLIENT
.Bl -dash -width 1n -compact
.It
If the
.Fa certificate
contains an Extended Key Usage extension, it contains the RFC 5280
.Dq TLS WWW client authentication
purpose
.Pq Dv NID_client_auth .
.It
If the
.Fa certificate
is not a version 1 certificate and does not contain a Basic Constraints
extension, it contains a Key Usage extension with the
.Dv keyCertSign
bit set or a Netscape Cert Type extension with the
.Dq SSL CA certificate
bit set.
.El
.It Dv X509_PURPOSE_SSL_SERVER No or Dv X509_PURPOSE_NS_SSL_SERVER
.Bl -dash -width 1n -compact
.It
If the
.Fa certificate
contains an Extended Key Usage extension, it contains the RFC 5280
.Dq TLS WWW server authentication
purpose
.Pq Dv NID_server_auth
or the private
.Dq Netscape Server Gated Crypto
.Pq Dv NID_ns_sgc
or
.Dq Microsoft Server Gated Crypto
.Pq Dv NID_ms_sgc
purpose.
.It
If the
.Fa certificate
is not a version 1 certificate and does not contain a Basic Constraints
extension, it contains a Key Usage extension with the
.Dv keyCertSign
bit set or a Netscape Cert Type extension with the
.Dq SSL CA certificate
bit set.
.El
.It Dv X509_PURPOSE_SMIME_SIGN No or Dv X509_PURPOSE_SMIME_ENCRYPT
.Bl -dash -width 1n -compact
.It
If the
.Fa certificate
contains an Extended Key Usage extension, it contains the RFC 5280
.Dq Email protection
purpose
.Pq Dv NID_email_protect .
.It
If the
.Fa certificate
is not a version 1 certificate and does not contain a Basic Constraints
extension, it contains a Key Usage extension with the
.Dv keyCertSign
bit set or a Netscape Cert Type extension with the
.Dq S/MIME CA certificate
bit set.
.El
.It Xo
.Dv X509_PURPOSE_CRL_SIGN ,
.Dv X509_PURPOSE_OCSP_HELPER ,
or
.Dv X509_PURPOSE_TIMESTAMP_SIGN
.Xc
.Bl -dash -width 1n -compact
.It
If the
.Fa certificate
is not a version 1 certificate and does not contain a Basic Constraints
extension, it contains a Key Usage extension with the
.Dv keyCertSign
bit set or a Netscape Cert Type extension with at least one of the
.Dq SSL CA certificate ,
.Dq S/MIME CA certificate ,
or
.Dq Object-signing CA certificate
bits set.
.El
.It Dv X509_PURPOSE_ANY
The check always succeeds, even if the three common conditions
cited above this list are violated.
.El
.Pp
If the
.Fa purpose
is -1,
.Fn X509_check_purpose
always succeeds, no matter whether or not the
.Fa ca
flag is set.
.Sh RETURN VALUES
.Fn X509_check_purpose
returns the following values:
.Bl -column -1 Failure -compact
.It -1 Ta Error Ta The
.Fa purpose
is invalid.
.It 0 Ta Failure Ta The
.Fa certificate
cannot be used for the
.Fa purpose .
.El
.Pp
If
.Fa ca
is 0, the following values can also be returned:
.Bl -column -1 Failure -compact
.It 1 Ta Success Ta The
.Fa certificate
can be used for the
.Fa purpose .
.It 2 Ta Unknown Ta \&No decision can be made.
.El
.Pp
If
.Fa ca
is non-zero, the following values can also be returned:
.Bl -column -1 Failure -compact
.It 1 Ta Success Ta The
.Fa certificate
can be used as a CA for the
.Fa purpose .
.It 3 Ta Success Ta The Fa certificate No is a version 1 CA.
.It 4 Ta Success Ta The Key Usage allows Dv keyCertSign .
.It 5 Ta Success Ta A Netscape Cert Type allows usage as a CA.
.El
.Sh SEE ALSO
.Xr BASIC_CONSTRAINTS_new 3 ,
.Xr EXTENDED_KEY_USAGE_new 3 ,
.Xr X509_new 3 ,
.Xr X509V3_get_d2i 3 ,
.Xr x509v3.cnf 5
.Sh STANDARDS
RFC 5280: Internet X.509 Public Key Infrastructure Certificate and
Certificate Revocation List (CRL) Profile
.Bl -dash -offset indent -compact
.It
section 4.2.1.3: Key Usage
.It
section 4.2.1.9: Basic Constraints
.It
section 4.2.1.12: Extended Key Usage
.El
.Sh HISTORY
.Fn X509_check_purpose
first appeared in OpenSSL 0.9.5 and has been available since
.Ox 2.7 .
Added jni/libressl/man/X509_cmp.3.




































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
.\" $OpenBSD: X509_cmp.3,v 1.1 2019/08/20 13:27:19 schwarze Exp $
.\" full merge up to: OpenSSL ea5d4b89 Jun 6 11:42:02 2019 +0800
.\"
.\" This file is a derived work.
.\" The changes are covered by the following Copyright and license:
.\"
.\" Copyright (c) 2019 Ingo Schwarze <schwarze@openbsd.org>
.\"
.\" Permission to use, copy, modify, and distribute this software for any
.\" purpose with or without fee is hereby granted, provided that the above
.\" copyright notice and this permission notice appear in all copies.
.\"
.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
.\" The original file was written by Paul Yang <yang.yang@baishancloud.com>.
.\" Copyright (c) 2019 The OpenSSL Project.  All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\"
.\" 1. Redistributions of source code must retain the above copyright
.\"    notice, this list of conditions and the following disclaimer.
.\"
.\" 2. Redistributions in binary form must reproduce the above copyright
.\"    notice, this list of conditions and the following disclaimer in
.\"    the documentation and/or other materials provided with the
.\"    distribution.
.\"
.\" 3. All advertising materials mentioning features or use of this
.\"    software must display the following acknowledgment:
.\"    "This product includes software developed by the OpenSSL Project
.\"    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
.\"
.\" 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
.\"    endorse or promote products derived from this software without
.\"    prior written permission. For written permission, please contact
.\"    openssl-core@openssl.org.
.\"
.\" 5. Products derived from this software may not be called "OpenSSL"
.\"    nor may "OpenSSL" appear in their names without prior written
.\"    permission of the OpenSSL Project.
.\"
.\" 6. Redistributions of any form whatsoever must retain the following
.\"    acknowledgment:
.\"    "This product includes software developed by the OpenSSL Project
.\"    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
.\"
.\" THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
.\" EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
.\" PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
.\" ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
.\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: August 20 2019 $
.Dt X509_CMP 3
.Os
.Sh NAME
.Nm X509_cmp ,
.Nm X509_NAME_cmp ,
.Nm X509_issuer_and_serial_cmp ,
.Nm X509_issuer_name_cmp ,
.Nm X509_subject_name_cmp ,
.Nm X509_CRL_cmp ,
.Nm X509_CRL_match
.Nd compare X.509 certificates and related values
.Sh SYNOPSIS
.In openssl/x509.h
.Ft int
.Fo X509_cmp
.Fa "const X509 *a"
.Fa "const X509 *b"
.Fc
.Ft int
.Fo X509_NAME_cmp
.Fa "const X509_NAME *a"
.Fa "const X509_NAME *b"
.Fc
.Ft int
.Fo X509_issuer_and_serial_cmp
.Fa "const X509 *a"
.Fa "const X509 *b"
.Fc
.Ft int
.Fo X509_issuer_name_cmp
.Fa "const X509 *a"
.Fa "const X509 *b"
.Fc
.Ft int
.Fo X509_subject_name_cmp
.Fa "const X509 *a"
.Fa "const X509 *b"
.Fc
.Ft int
.Fo X509_CRL_cmp
.Fa "const X509_CRL *a"
.Fa "const X509_CRL *b"
.Fc
.Ft int
.Fo X509_CRL_match
.Fa "const X509_CRL *a"
.Fa "const X509_CRL *b"
.Fc
.Sh DESCRIPTION
.Fn X509_cmp
compares two X.509 certificates using
.Xr memcmp 3
on the SHA1 hashes of their canonical (DER) representations as generated with
.Xr X509_digest 3 .
.Pp
.Fn X509_NAME_cmp
compares two X.501
.Vt Name
objects using their canonical (DER) representations generated with
.Xr i2d_X509_NAME 3 .
.Pp
.Fn X509_issuer_and_serial_cmp
compares the
.Fa issuer
and
.Fa serialNumber
fields of two
.Vt TBSCertificate
structures, using
.Fn X509_NAME_cmp
for the
.Fa issuer
fields.
.Pp
.Fn X509_issuer_name_cmp
compares the
.Fa issuer
fields of two
.Vt TBSCertificate
structures using
.Fn X509_NAME_cmp .
.Pp
.Fn X509_subject_name_cmp
compares the
.Fa subject
fields of two
.Vt TBSCertificate
structures using
.Fn X509_NAME_cmp .
.Pp
.Fn X509_CRL_cmp
is misnamed; it only compares the
.Fa issuer
fields of two
.Vt TBSCertList
structures using
.Fn X509_NAME_cmp .
.Pp
.Fn X509_CRL_match
compares two certificate revocation lists using
.Xr memcmp 3
on the SHA1 hashes of their canonical (DER) representations as generated with
.Xr X509_CRL_digest 3 .
.Sh RETURN VALUES
All these functions return 0 to indicate a match or a non-zero value
to indicate a mismatch.
.Pp
.Fn X509_NAME_cmp ,
.Fn X509_issuer_and_serial_cmp ,
.Fn X509_issuer_name_cmp ,
.Fn X509_subject_name_cmp
and
.Fn X509_CRL_cmp
may return -2 to indicate an error.
.Sh SEE ALSO
.Xr i2d_X509_NAME 3 ,
.Xr X509_CRL_new 3 ,
.Xr X509_digest 3 ,
.Xr X509_NAME_new 3 ,
.Xr X509_new 3
.Sh STANDARDS
RFC 5280: Internet X.509 Public Key Infrastructure Certificate
and Certificate Revocation List (CRL) Profile
.Bl -dash -compact -offset indent
.It
section 4.1: Basic Certificate Fields
.It
section 5.1: CRL Fields
.El
.Sh HISTORY
.Fn X509_issuer_and_serial_cmp ,
.Fn X509_issuer_name_cmp ,
and
.Fn X509_subject_name_cmp
first appeared in SSLeay 0.5.1 and
.Fn X509_NAME_cmp
and
.Fn X509_CRL_cmp
in SSLeay 0.8.0.
These functions have been available since
.Ox 2.4 .
.Pp
.Fn X509_cmp
first appeared in OpenSSL 0.9.5 and has been available since
.Ox 2.7 .
.Pp
.Fn X509_CRL_match
first appeared in OpenSSL 1.0.0 and has been available since
.Ox 4.9 .
.Sh BUGS
For
.Fn X509_NAME_cmp ,
.Fn X509_issuer_and_serial_cmp ,
.Fn X509_issuer_name_cmp ,
.Fn X509_subject_name_cmp
and
.Fn X509_CRL_cmp ,
the return value -2 sometimes indicates a mismatch and sometimes an error.
Changes to jni/libressl/man/X509_cmp_time.3.
1
2
3
4
5
6
7
8
.\"	$OpenBSD: X509_cmp_time.3,v 1.8 2018/03/27 17:35:50 schwarze Exp $
.\"	OpenSSL X509_cmp_time.pod 24053693 Mar 28 14:27:37 2017 +0200
.\"
.\" This file was written by Emilia Kasper <emilia@openssl.org>
.\" Copyright (c) 2017 The OpenSSL Project.  All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
|







1
2
3
4
5
6
7
8
.\"	$OpenBSD: X509_cmp_time.3,v 1.9 2019/06/06 01:06:59 schwarze Exp $
.\"	OpenSSL X509_cmp_time.pod 24053693 Mar 28 14:27:37 2017 +0200
.\"
.\" This file was written by Emilia Kasper <emilia@openssl.org>
.\" Copyright (c) 2017 The OpenSSL Project.  All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: March 27 2018 $
.Dt X509_CMP_TIME 3
.Os
.Sh NAME
.Nm X509_cmp_time ,
.Nm X509_cmp_current_time ,
.Nm X509_time_adj_ex ,
.Nm X509_time_adj







|







44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: June 6 2019 $
.Dt X509_CMP_TIME 3
.Os
.Sh NAME
.Nm X509_cmp_time ,
.Nm X509_cmp_current_time ,
.Nm X509_time_adj_ex ,
.Nm X509_time_adj
131
132
133
134
135
136
137

138

139
140
141
142
143
144
145
.Fn X509_time_adj
return a pointer to the updated
.Vt ASN1_TIME
structure or
.Dv NULL
on error.
.Sh SEE ALSO

.Xr ASN1_time_parse 3 ,

.Xr time 3
.Sh HISTORY
.Fn X509_cmp_current_time
first appeared in SSLeay 0.6.0 and has been available since
.Ox 2.4 .
.Pp
.Fn X509_cmp_time







>

>







131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
.Fn X509_time_adj
return a pointer to the updated
.Vt ASN1_TIME
structure or
.Dv NULL
on error.
.Sh SEE ALSO
.Xr ASN1_TIME_new 3 ,
.Xr ASN1_time_parse 3 ,
.Xr ASN1_TIME_set 3 ,
.Xr time 3
.Sh HISTORY
.Fn X509_cmp_current_time
first appeared in SSLeay 0.6.0 and has been available since
.Ox 2.4 .
.Pp
.Fn X509_cmp_time
Changes to jni/libressl/man/X509_digest.3.
1
2
3
4
5
6
7
8
9
.\"	$OpenBSD: X509_digest.3,v 1.6 2018/03/27 17:35:50 schwarze Exp $
.\"	OpenSSL X509_digest.pod 3ba4dac6 Mar 23 13:04:52 2017 -0400
.\"
.\" This file was written by Rich Salz <rsalz@openssl.org>
.\" Copyright (c) 2017 The OpenSSL Project.  All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
|
|







1
2
3
4
5
6
7
8
9
.\" $OpenBSD: X509_digest.3,v 1.8 2019/08/20 13:27:19 schwarze Exp $
.\" full merge up to: OpenSSL 1212818e Sep 11 13:22:14 2018 +0100
.\"
.\" This file was written by Rich Salz <rsalz@openssl.org>
.\" Copyright (c) 2017 The OpenSSL Project.  All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: March 27 2018 $
.Dt X509_DIGEST 3
.Os
.Sh NAME
.Nm X509_digest ,
.Nm X509_CRL_digest ,
.Nm X509_pubkey_digest ,
.Nm X509_NAME_digest ,







|







44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: August 20 2019 $
.Dt X509_DIGEST 3
.Os
.Sh NAME
.Nm X509_digest ,
.Nm X509_CRL_digest ,
.Nm X509_pubkey_digest ,
.Nm X509_NAME_digest ,
126
127
128
129
130
131
132
133





134
135
136
137
138
139
140
.Fa len
parameter, if not
.Dv NULL ,
points to a place where the digest size will be stored.
.Sh RETURN VALUES
These functions return 1 for success or 0 for failure.
.Sh SEE ALSO
.Xr EVP_get_digestbyname 3





.Sh HISTORY
.Fn X509_digest ,
.Fn X509_NAME_digest ,
and
.Fn PKCS7_ISSUER_AND_SERIAL_digest
first appeared in SSLeay 0.6.5 and have been available since
.Ox 2.4 .







|
>
>
>
>
>







126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
.Fa len
parameter, if not
.Dv NULL ,
points to a place where the digest size will be stored.
.Sh RETURN VALUES
These functions return 1 for success or 0 for failure.
.Sh SEE ALSO
.Xr EVP_get_digestbyname 3 ,
.Xr X509_cmp 3 ,
.Xr X509_CRL_new 3 ,
.Xr X509_NAME_new 3 ,
.Xr X509_new 3 ,
.Xr X509_REQ_new 3
.Sh HISTORY
.Fn X509_digest ,
.Fn X509_NAME_digest ,
and
.Fn PKCS7_ISSUER_AND_SERIAL_digest
first appeared in SSLeay 0.6.5 and have been available since
.Ox 2.4 .
Added jni/libressl/man/X509_get1_email.3.






















































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
.\" $OpenBSD: X509_get1_email.3,v 1.1 2019/08/23 12:23:39 schwarze Exp $
.\"
.\" Copyright (c) 2019 Ingo Schwarze <schwarze@openbsd.org>
.\"
.\" Permission to use, copy, modify, and distribute this software for any
.\" purpose with or without fee is hereby granted, provided that the above
.\" copyright notice and this permission notice appear in all copies.
.\"
.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
.Dd $Mdocdate: August 23 2019 $
.Dt X509_GET1_EMAIL 3
.Os
.Sh NAME
.Nm X509_get1_email ,
.Nm X509_get1_ocsp ,
.Nm X509_email_free
.Nd utilities for stacks of strings
.Sh SYNOPSIS
.In openssl/x509v3.h
.Vt typedef char *OPENSSL_STRING ;
.Ft STACK_OF(OPENSSL_STRING) *
.Fo X509_get1_email
.Fa "X509 *certificate"
.Fc
.Ft STACK_OF(OPENSSL_STRING) *
.Fo X509_get1_ocsp
.Fa "X509 *certificate"
.Fc
.Ft void
.Fo X509_email_free
.Fa "STACK_OF(OPENSSL_STRING) *stack"
.Fc
.Sh DESCRIPTION
.Fn X509_get1_email
retrieves all email addresses from the
.Fa subject
field and from any
Subject Alternative Name extension of the
.Fa certificate .
.Pp
.Fn X509_get1_ocsp
retrieves all uniform resource identifiers
from all
.Vt AccessDescription
objects having an
.Fa accessMethod
of OCSP which are contained in the Authority Information Access extension
of the
.Fa certificate .
.Pp
.Fn X509_email_free
frees all strings stored in the
.Fa stack
as well as the stack itself.
If
.Fa stack
is a
.Dv NULL
pointer, no action occurs.
.Sh RETURN VALUES
.Fn X509_REQ_get1_email
and
.Fn X509_get1_ocsp
return newly allocated stacks of
.Vt char *
containing copies of the addresses in question, or
.Dv NULL
if there are no addresses or if an error occurs.
.Sh SEE ALSO
.Xr OCSP_sendreq_new 3 ,
.Xr OCSP_SERVICELOC_new 3 ,
.Xr OPENSSL_sk_new 3 ,
.Xr STACK_OF 3 ,
.Xr X509_check_email 3 ,
.Xr X509_get_ext_d2i 3 ,
.Xr X509_get_subject_name 3 ,
.Xr X509_new 3 ,
.Xr x509v3.cnf 5
.Sh STANDARDS
RFC 5280: Internet X.509 Public Key Infrastructure Certificate and
Certificate Revocation List (CRL) Profile
.Bl -dash -offset indent -compact
.It
section 4.1: Basic Certificate Fields
.It
section 4.1.2.6: Subject
.It
section 4.2.1.6: Subject Alternative Name
.It
section 4.2.2.1: Authority Information Access
.El
.Pp
RFC 2985: PKCS #9: Selected Object Classes and Attribute Types
.Bl -dash -offset indent -compact
.It
section 5.2.1: Electronic-mail address
.It
appendix B.3.5: emailAddress
.El
.Sh HISTORY
.Fn X509_get1_email
and
.Fn X509_email_free
first appeared in OpenSSL 0.9.6 and have been available since
.Ox 2.9 .
.Pp
.Fn X509_get1_ocsp
first appeared in OpenSSL 0.9.8h and has been available since
.Ox 4.5 .
.Sh BUGS
.Fn X509_email_free
is utterly misnamed.
It does not operate on any
.Vt X509
object, nor is it in any way restricted to email addresses;
instead, it simply frees a stack of strings.
Changes to jni/libressl/man/X509_get_pubkey.3.
1
2
3
4
5
6
7
8
.\" $OpenBSD: X509_get_pubkey.3,v 1.5 2018/03/27 17:35:50 schwarze Exp $
.\" selective merge up to: OpenSSL 99d63d46 Oct 26 13:56:48 2016 -0400
.\"
.\" This file was written by Dr. Stephen Henson <steve@openssl.org>.
.\" Copyright (c) 2015 The OpenSSL Project.  All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
|







1
2
3
4
5
6
7
8
.\" $OpenBSD: X509_get_pubkey.3,v 1.7 2019/06/14 13:59:32 schwarze Exp $
.\" selective merge up to: OpenSSL 99d63d46 Oct 26 13:56:48 2016 -0400
.\"
.\" This file was written by Dr. Stephen Henson <steve@openssl.org>.
.\" Copyright (c) 2015 The OpenSSL Project.  All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: March 27 2018 $
.Dt X509_GET_PUBKEY 3
.Os
.Sh NAME
.Nm X509_get_pubkey ,
.Nm X509_get0_pubkey ,
.Nm X509_set_pubkey ,
.Nm X509_get_X509_PUBKEY ,







|







44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: June 14 2019 $
.Dt X509_GET_PUBKEY 3
.Os
.Sh NAME
.Nm X509_get_pubkey ,
.Nm X509_get0_pubkey ,
.Nm X509_set_pubkey ,
.Nm X509_get_X509_PUBKEY ,
140
141
142
143
144
145
146









147
148
149
150
151
152
153
154
155


156
157
158
159
160
161
162
.Dv NULL
if an error occurred.
.Pp
.Fn X509_set_pubkey
and
.Fn X509_REQ_set_pubkey
return 1 for success or 0 for failure.









.Sh SEE ALSO
.Xr d2i_X509 3 ,
.Xr ERR_get_error 3 ,
.Xr X509_CRL_get0_by_serial 3 ,
.Xr X509_NAME_add_entry_by_txt 3 ,
.Xr X509_NAME_ENTRY_get_object 3 ,
.Xr X509_NAME_get_index_by_NID 3 ,
.Xr X509_NAME_print_ex 3 ,
.Xr X509_new 3 ,


.Xr X509_sign 3 ,
.Xr X509_verify_cert 3 ,
.Xr X509V3_get_d2i 3
.Sh HISTORY
.Fn X509_get_pubkey ,
.Fn X509_set_pubkey ,
.Fn X509_REQ_get_pubkey ,







>
>
>
>
>
>
>
>
>


<






>
>







140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157

158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
.Dv NULL
if an error occurred.
.Pp
.Fn X509_set_pubkey
and
.Fn X509_REQ_set_pubkey
return 1 for success or 0 for failure.
.Pp
In some cases of failure of
.Fn X509_get0_pubkey ,
.Fn X509_set_pubkey ,
.Fn X509_REQ_get_pubkey ,
and
.Fn X509_REQ_set_pubkey ,
the reason can be determined with
.Xr ERR_get_error 3 .
.Sh SEE ALSO
.Xr d2i_X509 3 ,

.Xr X509_CRL_get0_by_serial 3 ,
.Xr X509_NAME_add_entry_by_txt 3 ,
.Xr X509_NAME_ENTRY_get_object 3 ,
.Xr X509_NAME_get_index_by_NID 3 ,
.Xr X509_NAME_print_ex 3 ,
.Xr X509_new 3 ,
.Xr X509_PUBKEY_new 3 ,
.Xr X509_REQ_new 3 ,
.Xr X509_sign 3 ,
.Xr X509_verify_cert 3 ,
.Xr X509V3_get_d2i 3
.Sh HISTORY
.Fn X509_get_pubkey ,
.Fn X509_set_pubkey ,
.Fn X509_REQ_get_pubkey ,
Changes to jni/libressl/man/X509_get_serialNumber.3.
1
2
3
4
5
6
7
8
.\"	$OpenBSD: X509_get_serialNumber.3,v 1.3 2018/03/27 17:35:50 schwarze Exp $
.\"	OpenSSL bb9ad09e Jun 6 00:43:05 2016 -0400
.\"
.\" This file was written by Dr. Stephen Henson <steve@openssl.org>.
.\" Copyright (c) 2016 The OpenSSL Project.  All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
|







1
2
3
4
5
6
7
8
.\"	$OpenBSD: X509_get_serialNumber.3,v 1.4 2019/06/14 13:59:32 schwarze Exp $
.\"	OpenSSL bb9ad09e Jun 6 00:43:05 2016 -0400
.\"
.\" This file was written by Dr. Stephen Henson <steve@openssl.org>.
.\" Copyright (c) 2016 The OpenSSL Project.  All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: March 27 2018 $
.Dt X509_GET_SERIALNUMBER 3
.Os
.Sh NAME
.Nm X509_get_serialNumber ,
.Nm X509_set_serialNumber
.Nd get or set certificate serial number
.Sh SYNOPSIS







|







44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: June 14 2019 $
.Dt X509_GET_SERIALNUMBER 3
.Os
.Sh NAME
.Nm X509_get_serialNumber ,
.Nm X509_set_serialNumber
.Nd get or set certificate serial number
.Sh SYNOPSIS
87
88
89
90
91
92
93
94


95
96
97
98
99
100
101
102
103
104
.Sh RETURN VALUES
.Fn X509_get_serialNumber
returns an
.Vt ASN1_INTEGER
structure.
.Pp
.Fn X509_set_serialNumber
returns 1 for success and 0 for failure.


.Sh SEE ALSO
.Xr d2i_X509 3 ,
.Xr ERR_get_error 3 ,
.Xr X509_CRL_get0_by_serial 3 ,
.Xr X509_get_pubkey 3 ,
.Xr X509_NAME_add_entry_by_txt 3 ,
.Xr X509_NAME_ENTRY_get_object 3 ,
.Xr X509_NAME_get_index_by_NID 3 ,
.Xr X509_NAME_print_ex 3 ,
.Xr X509_new 3 ,







|
>
>


<







87
88
89
90
91
92
93
94
95
96
97
98

99
100
101
102
103
104
105
.Sh RETURN VALUES
.Fn X509_get_serialNumber
returns an
.Vt ASN1_INTEGER
structure.
.Pp
.Fn X509_set_serialNumber
returns 1 for success or 0 for failure.
In some cases of failure, the reason can be determined with
.Xr ERR_get_error 3 .
.Sh SEE ALSO
.Xr d2i_X509 3 ,

.Xr X509_CRL_get0_by_serial 3 ,
.Xr X509_get_pubkey 3 ,
.Xr X509_NAME_add_entry_by_txt 3 ,
.Xr X509_NAME_ENTRY_get_object 3 ,
.Xr X509_NAME_get_index_by_NID 3 ,
.Xr X509_NAME_print_ex 3 ,
.Xr X509_new 3 ,
Changes to jni/libressl/man/X509_get_subject_name.3.
1
2
3
4
5
6
7
8
.\"	$OpenBSD: X509_get_subject_name.3,v 1.7 2018/05/13 14:25:40 schwarze Exp $
.\"	OpenSSL 0ad69cd6 Jun 14 23:02:16 2016 +0200
.\"
.\" This file was written by Dr. Stephen Henson <steve@openssl.org>.
.\" Copyright (c) 2015 The OpenSSL Project.  All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
|







1
2
3
4
5
6
7
8
.\"	$OpenBSD: X509_get_subject_name.3,v 1.9 2019/06/14 13:59:32 schwarze Exp $
.\"	OpenSSL 0ad69cd6 Jun 14 23:02:16 2016 +0200
.\"
.\" This file was written by Dr. Stephen Henson <steve@openssl.org>.
.\" Copyright (c) 2015 The OpenSSL Project.  All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: May 13 2018 $
.Dt X509_GET_SUBJECT_NAME 3
.Os
.Sh NAME
.Nm X509_get_subject_name ,
.Nm X509_set_subject_name ,
.Nm X509_get_issuer_name ,
.Nm X509_set_issuer_name ,







|







44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: June 14 2019 $
.Dt X509_GET_SUBJECT_NAME 3
.Os
.Sh NAME
.Nm X509_get_subject_name ,
.Nm X509_set_subject_name ,
.Nm X509_get_issuer_name ,
.Nm X509_set_issuer_name ,
150
151
152
153
154
155
156


157
158
159
160

161
162
163
164
165
166
167

168
169
170
171
172
173
174
.Pp
.Fn X509_set_subject_name ,
.Fn X509_set_issuer_name ,
.Fn X509_REQ_set_subject_name ,
and
.Fn X509_CRL_set_issuer_name
return 1 for success or 0 for failure.


.Sh SEE ALSO
.Xr d2i_X509_NAME 3 ,
.Xr ERR_get_error 3 ,
.Xr X509_CRL_get0_by_serial 3 ,

.Xr X509_get_pubkey 3 ,
.Xr X509_NAME_add_entry_by_txt 3 ,
.Xr X509_NAME_ENTRY_get_object 3 ,
.Xr X509_NAME_get_index_by_NID 3 ,
.Xr X509_NAME_new 3 ,
.Xr X509_NAME_print_ex 3 ,
.Xr X509_new 3 ,

.Xr X509_sign 3 ,
.Xr X509_verify_cert 3 ,
.Xr X509V3_get_d2i 3
.Sh HISTORY
.Fn X509_get_subject_name
and
.Fn X509_get_issuer_name







>
>


<

>







>







150
151
152
153
154
155
156
157
158
159
160

161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
.Pp
.Fn X509_set_subject_name ,
.Fn X509_set_issuer_name ,
.Fn X509_REQ_set_subject_name ,
and
.Fn X509_CRL_set_issuer_name
return 1 for success or 0 for failure.
In some cases of failure, the reason can be determined with
.Xr ERR_get_error 3 .
.Sh SEE ALSO
.Xr d2i_X509_NAME 3 ,

.Xr X509_CRL_get0_by_serial 3 ,
.Xr X509_CRL_new 3 ,
.Xr X509_get_pubkey 3 ,
.Xr X509_NAME_add_entry_by_txt 3 ,
.Xr X509_NAME_ENTRY_get_object 3 ,
.Xr X509_NAME_get_index_by_NID 3 ,
.Xr X509_NAME_new 3 ,
.Xr X509_NAME_print_ex 3 ,
.Xr X509_new 3 ,
.Xr X509_REQ_new 3 ,
.Xr X509_sign 3 ,
.Xr X509_verify_cert 3 ,
.Xr X509V3_get_d2i 3
.Sh HISTORY
.Fn X509_get_subject_name
and
.Fn X509_get_issuer_name
Changes to jni/libressl/man/X509_get_version.3.
1
2
3
4
5
6
7
8
.\"	$OpenBSD: X509_get_version.3,v 1.5 2018/03/27 17:35:50 schwarze Exp $
.\"	OpenSSL 99d63d46 Oct 26 13:56:48 2016 -0400
.\"
.\" This file was written by Dr. Stephen Henson <steve@openssl.org>.
.\" Copyright (c) 2015, 2016 The OpenSSL Project.  All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
|







1
2
3
4
5
6
7
8
.\"	$OpenBSD: X509_get_version.3,v 1.7 2019/06/14 13:59:32 schwarze Exp $
.\"	OpenSSL 99d63d46 Oct 26 13:56:48 2016 -0400
.\"
.\" This file was written by Dr. Stephen Henson <steve@openssl.org>.
.\" Copyright (c) 2015, 2016 The OpenSSL Project.  All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: March 27 2018 $
.Dt X509_GET_VERSION 3
.Os
.Sh NAME
.Nm X509_get_version ,
.Nm X509_set_version ,
.Nm X509_REQ_get_version ,
.Nm X509_REQ_set_version ,







|







44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: June 14 2019 $
.Dt X509_GET_VERSION 3
.Os
.Sh NAME
.Nm X509_get_version ,
.Nm X509_set_version ,
.Nm X509_REQ_get_version ,
.Nm X509_REQ_set_version ,
129
130
131
132
133
134
135


136
137
138
139

140
141
142
143
144
145
146

147
148
149
150
151
152
153
return the numerical value of the version field.
.Pp
.Fn X509_set_version ,
.Fn X509_REQ_set_version ,
and
.Fn X509_CRL_set_version
return 1 for success or 0 for failure.


.Sh SEE ALSO
.Xr d2i_X509 3 ,
.Xr ERR_get_error 3 ,
.Xr X509_CRL_get0_by_serial 3 ,

.Xr X509_get_pubkey 3 ,
.Xr X509_get_subject_name 3 ,
.Xr X509_NAME_add_entry_by_txt 3 ,
.Xr X509_NAME_ENTRY_get_object 3 ,
.Xr X509_NAME_get_index_by_NID 3 ,
.Xr X509_NAME_print_ex 3 ,
.Xr X509_new 3 ,

.Xr X509_sign 3 ,
.Xr X509_verify_cert 3 ,
.Xr X509V3_get_d2i 3
.Sh HISTORY
.Fn X509_get_version ,
.Fn X509_set_version ,
.Fn X509_REQ_get_version ,







>
>


<

>







>







129
130
131
132
133
134
135
136
137
138
139

140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
return the numerical value of the version field.
.Pp
.Fn X509_set_version ,
.Fn X509_REQ_set_version ,
and
.Fn X509_CRL_set_version
return 1 for success or 0 for failure.
In some cases of failure, the reason can be determined with
.Xr ERR_get_error 3 .
.Sh SEE ALSO
.Xr d2i_X509 3 ,

.Xr X509_CRL_get0_by_serial 3 ,
.Xr X509_CRL_new 3 ,
.Xr X509_get_pubkey 3 ,
.Xr X509_get_subject_name 3 ,
.Xr X509_NAME_add_entry_by_txt 3 ,
.Xr X509_NAME_ENTRY_get_object 3 ,
.Xr X509_NAME_get_index_by_NID 3 ,
.Xr X509_NAME_print_ex 3 ,
.Xr X509_new 3 ,
.Xr X509_REQ_new 3 ,
.Xr X509_sign 3 ,
.Xr X509_verify_cert 3 ,
.Xr X509V3_get_d2i 3
.Sh HISTORY
.Fn X509_get_version ,
.Fn X509_set_version ,
.Fn X509_REQ_get_version ,
Changes to jni/libressl/man/X509_new.3.
1
2
3

















4
5
6
7
8
9
10
11
.\" $OpenBSD: X509_new.3,v 1.15 2018/03/27 17:35:50 schwarze Exp $
.\" full merge up to: OpenSSL 99d63d46 Oct 26 13:56:48 2016 -0400
.\"

















.\" This file was written by Dr. Stephen Henson <steve@openssl.org>.
.\" Copyright (c) 2002, 2006, 2015, 2016 The OpenSSL Project.
.\" All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\"
|


>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
|







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
.\" $OpenBSD: X509_new.3,v 1.22 2019/08/23 12:23:39 schwarze Exp $
.\" full merge up to: OpenSSL 99d63d46 Oct 26 13:56:48 2016 -0400
.\"
.\" This file is a derived work.
.\" The changes are covered by the following Copyright and license:
.\"
.\" Copyright (c) 2016, 2018, 2019 Ingo Schwarze <schwarze@openbsd.org>
.\"
.\" Permission to use, copy, modify, and distribute this software for any
.\" purpose with or without fee is hereby granted, provided that the above
.\" copyright notice and this permission notice appear in all copies.
.\"
.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
.\" The original file was written by Dr. Stephen Henson <steve@openssl.org>.
.\" Copyright (c) 2002, 2006, 2015, 2016 The OpenSSL Project.
.\" All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\"
45
46
47
48
49
50
51
52
53
54
55
56

57
58
59
60
61
62
63
64




65
66
67
68
69
70
71
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: March 27 2018 $
.Dt X509_NEW 3
.Os
.Sh NAME
.Nm X509_new ,

.Nm X509_free ,
.Nm X509_up_ref ,
.Nm X509_chain_up_ref
.Nd X.509 certificate object
.Sh SYNOPSIS
.In openssl/x509.h
.Ft X509 *
.Fn X509_new void




.Ft void
.Fo X509_free
.Fa "X509 *a"
.Fc
.Ft int
.Fo X509_up_ref
.Fa "X509 *a"







|




>








>
>
>
>







62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: August 23 2019 $
.Dt X509_NEW 3
.Os
.Sh NAME
.Nm X509_new ,
.Nm X509_dup ,
.Nm X509_free ,
.Nm X509_up_ref ,
.Nm X509_chain_up_ref
.Nd X.509 certificate object
.Sh SYNOPSIS
.In openssl/x509.h
.Ft X509 *
.Fn X509_new void
.Ft X509 *
.Fo X509_dup
.Fa "X509 *a"
.Fc
.Ft void
.Fo X509_free
.Fa "X509 *a"
.Fc
.Ft int
.Fo X509_up_ref
.Fa "X509 *a"
81
82
83
84
85
86
87







88
89
90
91
92
93
94
object with reference count 1.
It represents an ASN.1
.Vt Certificate
structure defined in RFC 5280 section 4.1.
It can hold a public key together with information about the person,
organization, device, or function the associated private key belongs to.
.Pp







.Fn X509_free
decrements the reference count of the
.Vt X509
structure
.Fa a
and frees it up if the reference count reaches 0.
If







>
>
>
>
>
>
>







103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
object with reference count 1.
It represents an ASN.1
.Vt Certificate
structure defined in RFC 5280 section 4.1.
It can hold a public key together with information about the person,
organization, device, or function the associated private key belongs to.
.Pp
.Fn X509_dup
creates a deep copy of
.Fa a
using
.Xr ASN1_item_dup 3 ,
setting the reference count of the copy to 1.
.Pp
.Fn X509_free
decrements the reference count of the
.Vt X509
structure
.Fa a
and frees it up if the reference count reaches 0.
If
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126


127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148








149

150









151

152
153



154
155
156
157
158
159
160
161



162
163
164
165
166
167
168
using
.Fn sk_X509_dup
and increments the reference count of each contained certificate
by 1.
Its purpose is similar to
.Fn X509_up_ref :
The returned chain persists after the original is freed.
.Pp
The object
.Vt X509_INFO ,
which can hold a certificate, the corresponding private key,
and a certificate revocation list, is not yet documented.
.Sh RETURN VALUES
If the allocation fails,
.Fn X509_new


returns
.Dv NULL
and sets an error code that can be obtained by
.Xr ERR_get_error 3 .
Otherwise it returns a pointer to the newly allocated structure.
.Pp
.Fn X509_up_ref
returns 1 for success or 0 for failure.
.Pp
.Fn X509_chain_up_ref
returns the copy of the
.Fa chain
or
.Dv NULL
if an error occurs.
.Sh SEE ALSO
.Xr AUTHORITY_KEYID_new 3 ,
.Xr BASIC_CONSTRAINTS_new 3 ,
.Xr crypto 3 ,
.Xr d2i_X509 3 ,
.Xr ERR_get_error 3 ,
.Xr X509_ALGOR_new 3 ,








.Xr X509_CRL_new 3 ,

.Xr X509_EXTENSION_new 3 ,









.Xr X509_NAME_new 3 ,

.Xr X509_REQ_new 3 ,
.Xr X509_SIG_new 3



.Sh STANDARDS
RFC 5280: Internet X.509 Public Key Infrastructure Certificate and
Certificate Revocation List (CRL) Profile
.Sh HISTORY
.Fn X509_new
and
.Fn X509_free
appeared in SSLeay 0.4 or earlier and have been available since



.Ox 2.4 .
.Pp
.Fn X509_up_ref
first appeared in OpenSSL 1.1.0 and has been available since
.Ox 6.1 .
.Pp
.Fn X509_chain_up_ref







<
<
<
<
<

<

>
>
|

|

<















|

>
>
>
>
>
>
>
>

>

>
>
>
>
>
>
>
>
>

>

|
>
>
>







|
>
>
>







141
142
143
144
145
146
147





148

149
150
151
152
153
154
155

156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
using
.Fn sk_X509_dup
and increments the reference count of each contained certificate
by 1.
Its purpose is similar to
.Fn X509_up_ref :
The returned chain persists after the original is freed.





.Sh RETURN VALUES

.Fn X509_new
and
.Fn X509_dup
return a pointer to the newly allocated object or
.Dv NULL
if an error occurs; an error code can be obtained by
.Xr ERR_get_error 3 .

.Pp
.Fn X509_up_ref
returns 1 for success or 0 for failure.
.Pp
.Fn X509_chain_up_ref
returns the copy of the
.Fa chain
or
.Dv NULL
if an error occurs.
.Sh SEE ALSO
.Xr AUTHORITY_KEYID_new 3 ,
.Xr BASIC_CONSTRAINTS_new 3 ,
.Xr crypto 3 ,
.Xr d2i_X509 3 ,
.Xr PKCS8_PRIV_KEY_INFO_new 3 ,
.Xr X509_ALGOR_new 3 ,
.Xr X509_ATTRIBUTE_new 3 ,
.Xr X509_check_ca 3 ,
.Xr X509_check_host 3 ,
.Xr X509_check_issued 3 ,
.Xr X509_check_private_key 3 ,
.Xr X509_check_purpose 3 ,
.Xr X509_CINF_new 3 ,
.Xr X509_cmp 3 ,
.Xr X509_CRL_new 3 ,
.Xr X509_digest 3 ,
.Xr X509_EXTENSION_new 3 ,
.Xr X509_get0_notBefore 3 ,
.Xr X509_get0_signature 3 ,
.Xr X509_get1_email 3 ,
.Xr X509_get_ex_new_index 3 ,
.Xr X509_get_pubkey 3 ,
.Xr X509_get_serialNumber 3 ,
.Xr X509_get_subject_name 3 ,
.Xr X509_get_version 3 ,
.Xr X509_INFO_new 3 ,
.Xr X509_NAME_new 3 ,
.Xr X509_PUBKEY_new 3 ,
.Xr X509_REQ_new 3 ,
.Xr X509_SIG_new 3 ,
.Xr X509_sign 3 ,
.Xr X509_STORE_CTX_new 3 ,
.Xr X509_STORE_new 3
.Sh STANDARDS
RFC 5280: Internet X.509 Public Key Infrastructure Certificate and
Certificate Revocation List (CRL) Profile
.Sh HISTORY
.Fn X509_new
and
.Fn X509_free
appeared in SSLeay 0.4 or earlier.
.Fn X509_dup
first appeared in SSLeay 0.4.4.
These functions have been available since
.Ox 2.4 .
.Pp
.Fn X509_up_ref
first appeared in OpenSSL 1.1.0 and has been available since
.Ox 6.1 .
.Pp
.Fn X509_chain_up_ref
Changes to jni/libressl/man/X509_sign.3.
1
2
3
4
5
6
7
8
.\"	$OpenBSD: X509_sign.3,v 1.5 2018/03/27 17:35:50 schwarze Exp $
.\"	OpenSSL 99d63d46 Oct 26 13:56:48 2016 -0400
.\"
.\" This file was written by Dr. Stephen Henson <steve@openssl.org>.
.\" Copyright (c) 2015, 2016 The OpenSSL Project.  All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
|







1
2
3
4
5
6
7
8
.\"	$OpenBSD: X509_sign.3,v 1.8 2019/06/14 13:59:32 schwarze Exp $
.\"	OpenSSL 99d63d46 Oct 26 13:56:48 2016 -0400
.\"
.\" This file was written by Dr. Stephen Henson <steve@openssl.org>.
.\" Copyright (c) 2015, 2016 The OpenSSL Project.  All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: March 27 2018 $
.Dt X509_SIGN 3
.Os
.Sh NAME
.Nm X509_sign ,
.Nm X509_sign_ctx ,
.Nm X509_verify ,
.Nm X509_REQ_sign ,







|







44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: June 14 2019 $
.Dt X509_SIGN 3
.Os
.Sh NAME
.Nm X509_sign ,
.Nm X509_sign_ctx ,
.Nm X509_verify ,
.Nm X509_REQ_sign ,
170
171
172
173
174
175
176



177
178
179
180

181
182
183
184
185
186
187
188

189
190
191
192
193
194
195
.Fn X509_verify ,
.Fn X509_REQ_verify ,
and
.Fn X509_CRL_verify
return 1 if the signature is valid or 0 if the signature check fails.
If the signature could not be checked at all because it was invalid or
some other error occurred, then -1 is returned.



.Sh SEE ALSO
.Xr d2i_X509 3 ,
.Xr ERR_get_error 3 ,
.Xr X509_CRL_get0_by_serial 3 ,

.Xr X509_get_pubkey 3 ,
.Xr X509_get_subject_name 3 ,
.Xr X509_get_version 3 ,
.Xr X509_NAME_add_entry_by_txt 3 ,
.Xr X509_NAME_ENTRY_get_object 3 ,
.Xr X509_NAME_get_index_by_NID 3 ,
.Xr X509_NAME_print_ex 3 ,
.Xr X509_new 3 ,

.Xr X509_verify_cert 3 ,
.Xr X509V3_get_d2i 3
.Sh HISTORY
.Fn X509_verify
appeared in SSLeay 0.4 or earlier.
.Fn X509_sign
and







>
>
>


|

>








>







170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
.Fn X509_verify ,
.Fn X509_REQ_verify ,
and
.Fn X509_CRL_verify
return 1 if the signature is valid or 0 if the signature check fails.
If the signature could not be checked at all because it was invalid or
some other error occurred, then -1 is returned.
.Pp
In some cases of failure, the reason can be determined with
.Xr ERR_get_error 3 .
.Sh SEE ALSO
.Xr d2i_X509 3 ,
.Xr EVP_DigestInit 3 ,
.Xr X509_CRL_get0_by_serial 3 ,
.Xr X509_CRL_new 3 ,
.Xr X509_get_pubkey 3 ,
.Xr X509_get_subject_name 3 ,
.Xr X509_get_version 3 ,
.Xr X509_NAME_add_entry_by_txt 3 ,
.Xr X509_NAME_ENTRY_get_object 3 ,
.Xr X509_NAME_get_index_by_NID 3 ,
.Xr X509_NAME_print_ex 3 ,
.Xr X509_new 3 ,
.Xr X509_REQ_new 3 ,
.Xr X509_verify_cert 3 ,
.Xr X509V3_get_d2i 3
.Sh HISTORY
.Fn X509_verify
appeared in SSLeay 0.4 or earlier.
.Fn X509_sign
and
Changes to jni/libressl/man/X509_verify_cert.3.
1
2
3
4
5
6
7
8
.\"	$OpenBSD: X509_verify_cert.3,v 1.7 2018/03/27 17:35:50 schwarze Exp $
.\"	OpenSSL 99d63d46 Oct 26 13:56:48 2016 -0400
.\"
.\" This file was written by Dr. Stephen Henson <steve@openssl.org>.
.\" Copyright (c) 2009, 2015 The OpenSSL Project.  All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
|







1
2
3
4
5
6
7
8
.\"	$OpenBSD: X509_verify_cert.3,v 1.8 2019/06/06 01:06:59 schwarze Exp $
.\"	OpenSSL 99d63d46 Oct 26 13:56:48 2016 -0400
.\"
.\" This file was written by Dr. Stephen Henson <steve@openssl.org>.
.\" Copyright (c) 2009, 2015 The OpenSSL Project.  All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: March 27 2018 $
.Dt X509_VERIFY_CERT 3
.Os
.Sh NAME
.Nm X509_verify_cert
.Nd discover and verify X509 certificate chain
.Sh SYNOPSIS
.In openssl/x509.h







|







44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: June 6 2019 $
.Dt X509_VERIFY_CERT 3
.Os
.Sh NAME
.Nm X509_verify_cert
.Nd discover and verify X509 certificate chain
.Sh SYNOPSIS
.In openssl/x509.h
76
77
78
79
80
81
82
83

84
85
86
87
88
89
90
91
92
.Pp
Additional error information can be obtained by examining
.Fa ctx ,
using
.Xr X509_STORE_CTX_get_error 3 .
.Sh SEE ALSO
.Xr openssl 1 ,
.Xr X509_STORE_CTX_get_error 3

.Sh HISTORY
.Fn X509_verify_cert
first appeared in SSLeay 0.8.0 and has been available since
.Ox 2.4 .
.Sh BUGS
This function uses the header
.In openssl/x509.h
as opposed to most chain verification functions which use
.In openssl/x509_vfy.h .







|
>









76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
.Pp
Additional error information can be obtained by examining
.Fa ctx ,
using
.Xr X509_STORE_CTX_get_error 3 .
.Sh SEE ALSO
.Xr openssl 1 ,
.Xr X509_STORE_CTX_get_error 3 ,
.Xr X509_STORE_CTX_new 3
.Sh HISTORY
.Fn X509_verify_cert
first appeared in SSLeay 0.8.0 and has been available since
.Ox 2.4 .
.Sh BUGS
This function uses the header
.In openssl/x509.h
as opposed to most chain verification functions which use
.In openssl/x509_vfy.h .
Changes to jni/libressl/man/X509v3_get_ext_by_NID.3.
1
2
3
4
5
6
7
8
.\" $OpenBSD: X509v3_get_ext_by_NID.3,v 1.10 2019/03/15 13:33:30 schwarze Exp $
.\" full merge up to: OpenSSL fd38836b Jun 20 15:25:43 2018 +0100
.\"
.\" This file was written by Dr. Stephen Henson <steve@openssl.org>.
.\" Copyright (c) 2015 The OpenSSL Project.  All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
|







1
2
3
4
5
6
7
8
.\" $OpenBSD: X509v3_get_ext_by_NID.3,v 1.11 2019/06/06 01:06:59 schwarze Exp $
.\" full merge up to: OpenSSL fd38836b Jun 20 15:25:43 2018 +0100
.\"
.\" This file was written by Dr. Stephen Henson <steve@openssl.org>.
.\" Copyright (c) 2015 The OpenSSL Project.  All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: March 15 2019 $
.Dt X509V3_GET_EXT_BY_NID 3
.Os
.Sh NAME
.Nm X509v3_get_ext_count ,
.Nm X509v3_get_ext ,
.Nm X509v3_get_ext_by_NID ,
.Nm X509v3_get_ext_by_OBJ ,







|







44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: June 6 2019 $
.Dt X509V3_GET_EXT_BY_NID 3
.Os
.Sh NAME
.Nm X509v3_get_ext_count ,
.Nm X509v3_get_ext ,
.Nm X509v3_get_ext_by_NID ,
.Nm X509v3_get_ext_by_OBJ ,
384
385
386
387
388
389
390

391

392
393
394
395
396
397
returns a stack of extensions or
.Dv NULL
on error.
.Pp
.Fn X509_add_ext
returns 1 on success or 0 on error.
.Sh SEE ALSO

.Xr X509_EXTENSION_new 3 ,

.Xr X509_REVOKED_new 3 ,
.Xr X509V3_get_d2i 3
.Sh HISTORY
These functions first appeared in SSLeay 0.8.0
and have been available since
.Ox 2.4 .







>

>






384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
returns a stack of extensions or
.Dv NULL
on error.
.Pp
.Fn X509_add_ext
returns 1 on success or 0 on error.
.Sh SEE ALSO
.Xr X509_CRL_new 3 ,
.Xr X509_EXTENSION_new 3 ,
.Xr X509_new 3 ,
.Xr X509_REVOKED_new 3 ,
.Xr X509V3_get_d2i 3
.Sh HISTORY
These functions first appeared in SSLeay 0.8.0
and have been available since
.Ox 2.4 .
Changes to jni/libressl/man/crypto.3.
1
2
3
4
5
6
7
8
.\"	$OpenBSD: crypto.3,v 1.19 2019/03/10 14:50:05 schwarze Exp $
.\"	OpenSSL a9c85cea Nov 11 09:33:55 2016 +0100
.\"
.\" This file was written by Ulf Moeller <ulf@openssl.org> and
.\" Dr. Stephen Henson <steve@openssl.org>.
.\" Copyright (c) 2000, 2002 The OpenSSL Project.  All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
|







1
2
3
4
5
6
7
8
.\"	$OpenBSD: crypto.3,v 1.22 2019/08/28 10:37:42 schwarze Exp $
.\"	OpenSSL a9c85cea Nov 11 09:33:55 2016 +0100
.\"
.\" This file was written by Ulf Moeller <ulf@openssl.org> and
.\" Dr. Stephen Henson <steve@openssl.org>.
.\" Copyright (c) 2000, 2002 The OpenSSL Project.  All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69

70
71
72
73
74
75
76
77


78
79

80
81
82
83
84
85
86
87
88
89
90

91
92
93
94
95
96
97
98
99
100

101
102

103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119


120
121
122
123
124
125
126
127


128
129
130
131
132
133
134
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: March 10 2019 $
.Dt CRYPTO 3
.Os
.Sh NAME
.Nm crypto
.Nd OpenSSL cryptographic library
.Sh DESCRIPTION
The OpenSSL crypto library implements a wide range of cryptographic
algorithms used in various Internet standards.
The services provided by this library are used by the OpenSSL
implementations of TLS and S/MIME, and they have also been used to
implement SSH, OpenPGP, and other cryptographic standards.
.Pp
.Sy Symmetric ciphers
including AES, Blowfish, CAST, Chacha20, IDEA, DES, RC2, and RC4
are provided by the generic interface
.Xr EVP_EncryptInit 3 .
Low-level stand-alone interfaces include

.Xr BF_set_key 3 ,
.Xr DES_set_key 3 ,
and
.Xr RC4 3 .
.Pp
.Sy Public key cryptography and key agreement
are provided by
.Xr DH_new 3 ,


.Xr DSA_new 3 ,
.Xr ECDSA_SIG_new 3 ,

and
.Xr RSA_new 3 .
.Pp
.Sy Certificates
are handled by
.Xr X509_new 3
and
.Xr X509v3_add_ext 3 .
.Pp
.Sy Authentication codes and hash functions
offered include

.Xr HMAC 3 ,
.Xr MD4 3 ,
.Xr MD5 3 ,
.Xr RIPEMD160 3 ,
.Xr SHA1 3 ,
and
.Xr SHA256 3 .
.Pp
.Sy Input, output, and data encoding
facilities include ASN.1,

.Xr BIO_new 3 ,
.Xr evp 3 ,

.Xr PEM_read 3 ,
.Xr PKCS7_encrypt 3 ,
.Xr PKCS7_sign 3 ,
.Xr PKCS12_create 3 ,
and
.Xr SMIME_write_PKCS7 3 .
.Pp
.Sy Auxiliary features include:
.Bl -dash -compact
.It
configuration file handling: see
.Xr OPENSSL_config 3
.It
error reporting: see
.Xr ERR 3
.It
.Xr OCSP_REQUEST_new 3


.El
.Pp
.Sy Internal utilities
include
.Xr BIO_f_buffer 3 ,
.Xr BN_new 3 ,
.Xr EC_GROUP_new 3 ,
.Xr lh_new 3 .


.Pp
Some of the newer functions follow a naming convention using the numbers
.Sq 0
and
.Sq 1 .
For example consider the names of these functions:
.Pp







|

















>








>
>


>

|









>









|
>


>

















>
>







|
>
>







45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: August 28 2019 $
.Dt CRYPTO 3
.Os
.Sh NAME
.Nm crypto
.Nd OpenSSL cryptographic library
.Sh DESCRIPTION
The OpenSSL crypto library implements a wide range of cryptographic
algorithms used in various Internet standards.
The services provided by this library are used by the OpenSSL
implementations of TLS and S/MIME, and they have also been used to
implement SSH, OpenPGP, and other cryptographic standards.
.Pp
.Sy Symmetric ciphers
including AES, Blowfish, CAST, Chacha20, IDEA, DES, RC2, and RC4
are provided by the generic interface
.Xr EVP_EncryptInit 3 .
Low-level stand-alone interfaces include
.Xr AES_encrypt 3 ,
.Xr BF_set_key 3 ,
.Xr DES_set_key 3 ,
and
.Xr RC4 3 .
.Pp
.Sy Public key cryptography and key agreement
are provided by
.Xr DH_new 3 ,
.Xr ECDH_compute_key 3 ,
.Xr X25519 3 ,
.Xr DSA_new 3 ,
.Xr ECDSA_SIG_new 3 ,
.Xr RSA_new 3 ,
and
.Xr EVP_PKEY_new 3 .
.Pp
.Sy Certificates
are handled by
.Xr X509_new 3
and
.Xr X509v3_add_ext 3 .
.Pp
.Sy Authentication codes and hash functions
offered include
.Xr EVP_DigestInit 3 ,
.Xr HMAC 3 ,
.Xr MD4 3 ,
.Xr MD5 3 ,
.Xr RIPEMD160 3 ,
.Xr SHA1 3 ,
and
.Xr SHA256 3 .
.Pp
.Sy Input, output, and data encoding
facilities include
.Xr ASN1_TYPE_get 3 ,
.Xr BIO_new 3 ,
.Xr evp 3 ,
.Xr EVP_EncodeInit 3 ,
.Xr PEM_read 3 ,
.Xr PKCS7_encrypt 3 ,
.Xr PKCS7_sign 3 ,
.Xr PKCS12_create 3 ,
and
.Xr SMIME_write_PKCS7 3 .
.Pp
.Sy Auxiliary features include:
.Bl -dash -compact
.It
configuration file handling: see
.Xr OPENSSL_config 3
.It
error reporting: see
.Xr ERR 3
.It
.Xr OCSP_REQUEST_new 3
.It
.Xr UI_new 3
.El
.Pp
.Sy Internal utilities
include
.Xr BIO_f_buffer 3 ,
.Xr BN_new 3 ,
.Xr EC_GROUP_new 3 ,
.Xr lh_new 3 ,
and
.Xr STACK_OF 3 .
.Pp
Some of the newer functions follow a naming convention using the numbers
.Sq 0
and
.Sq 1 .
For example consider the names of these functions:
.Pp
Changes to jni/libressl/man/d2i_ASN1_NULL.3.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
.\"	$OpenBSD: d2i_ASN1_NULL.3,v 1.2 2018/03/22 16:06:33 schwarze Exp $
.\"
.\" Copyright (c) 2016 Ingo Schwarze <schwarze@openbsd.org>
.\"
.\" Permission to use, copy, modify, and distribute this software for any
.\" purpose with or without fee is hereby granted, provided that the above
.\" copyright notice and this permission notice appear in all copies.
.\"
.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
.Dd $Mdocdate: March 22 2018 $
.Dt D2I_ASN1_NULL 3
.Os
.Sh NAME
.Nm d2i_ASN1_NULL ,
.Nm i2d_ASN1_NULL
.Nd decode and encode an ASN.1 NULL type
.Sh SYNOPSIS
|















|







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
.\"	$OpenBSD: d2i_ASN1_NULL.3,v 1.3 2019/06/06 01:06:59 schwarze Exp $
.\"
.\" Copyright (c) 2016 Ingo Schwarze <schwarze@openbsd.org>
.\"
.\" Permission to use, copy, modify, and distribute this software for any
.\" purpose with or without fee is hereby granted, provided that the above
.\" copyright notice and this permission notice appear in all copies.
.\"
.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
.Dd $Mdocdate: June 6 2019 $
.Dt D2I_ASN1_NULL 3
.Os
.Sh NAME
.Nm d2i_ASN1_NULL ,
.Nm i2d_ASN1_NULL
.Nd decode and encode an ASN.1 NULL type
.Sh SYNOPSIS
71
72
73
74
75
76
77
78

79
80
81
82
83
84
85
86
87
88
89
90
.Dv NULL
if an error occurs.
.Pp
.Fn i2d_ASN1_NULL
returns 2 if successful or 0 if an error occurs.
.Sh SEE ALSO
.Xr ASN1_item_d2i 3 ,
.Xr ASN1_item_new 3

.Sh STANDARDS
ITU-T Recommendation X.690, also known as ISO/IEC 8825-1:
Information technology - ASN.1 encoding rules:
Specification of Basic Encoding Rules (BER), Canonical Encoding
Rules (CER) and Distinguished Encoding Rules (DER),
section 8.8: Encoding of null value
.Sh HISTORY
.Fn d2i_ASN1_NULL
and
.Fn i2d_ASN1_NULL
first appeared in OpenSSL 0.9.5 and have been available since
.Ox 2.7 .







|
>












71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
.Dv NULL
if an error occurs.
.Pp
.Fn i2d_ASN1_NULL
returns 2 if successful or 0 if an error occurs.
.Sh SEE ALSO
.Xr ASN1_item_d2i 3 ,
.Xr ASN1_item_new 3 ,
.Xr ASN1_TYPE_get 3
.Sh STANDARDS
ITU-T Recommendation X.690, also known as ISO/IEC 8825-1:
Information technology - ASN.1 encoding rules:
Specification of Basic Encoding Rules (BER), Canonical Encoding
Rules (CER) and Distinguished Encoding Rules (DER),
section 8.8: Encoding of null value
.Sh HISTORY
.Fn d2i_ASN1_NULL
and
.Fn i2d_ASN1_NULL
first appeared in OpenSSL 0.9.5 and have been available since
.Ox 2.7 .
Added jni/libressl/man/d2i_CMS_ContentInfo.3.
































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
.\" $OpenBSD: d2i_CMS_ContentInfo.3,v 1.2 2019/08/18 21:44:10 schwarze Exp $
.\" Copyright (c) 2019 Ingo Schwarze <schwarze@openbsd.org>
.\"
.\" Permission to use, copy, modify, and distribute this software for any
.\" purpose with or without fee is hereby granted, provided that the above
.\" copyright notice and this permission notice appear in all copies.
.\"
.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
.Dd $Mdocdate: August 18 2019 $
.Dt D2I_CMS_CONTENTINFO 3
.Os
.Sh NAME
.Nm d2i_CMS_ContentInfo ,
.Nm i2d_CMS_ContentInfo ,
.Nm d2i_CMS_bio ,
.Nm i2d_CMS_bio ,
.Nm d2i_CMS_ReceiptRequest ,
.Nm i2d_CMS_ReceiptRequest
.Nd decode and encode Cryptographic Message Syntax data
.Sh SYNOPSIS
.In openssl/cms.h
.Ft CMS_ContentInfo *
.Fo d2i_CMS_ContentInfo
.Fa "CMS_ContentInfo **val_out"
.Fa "const unsigned char **der_in"
.Fa "long length"
.Fc
.Ft int
.Fo i2d_CMS_ContentInfo
.Fa "CMS_ContentInfo *val_in"
.Fa "unsigned char **out"
.Fc
.Ft CMS_ContentInfo *
.Fo d2i_CMS_bio
.Fa "BIO *in_bio"
.Fa "CMS_ContentInfo **val_out"
.Fc
.Ft int
.Fo i2d_CMS_bio
.Fa "BIO *out_bio"
.Fa "CMS_ContentInfo *val_in"
.Fc
.Ft CMS_ReceiptRequest *
.Fo d2i_CMS_ReceiptRequest
.Fa "CMS_ReceiptRequest **val_out"
.Fa "const unsigned char **der_in"
.Fa "long length"
.Fc
.Ft int
.Fo i2d_CMS_ReceiptRequest
.Fa "CMS_ReceiptRequest *val_in"
.Fa "unsigned char **out"
.Fc
.Sh DESCRIPTION
These functions decode and encode Cryptographic Message Syntax
data structures.
For details about the semantics, examples, caveats, and bugs, see
.Xr ASN1_item_d2i 3 .
.Pp
.Fn d2i_CMS_ContentInfo
and
.Fn i2d_CMS_ContentInfo
decode and encode a
.Vt CMS_ContentInfo
structure defined in RFC 5652 section 3.
.Fn d2i_CMS_bio
and
.Fn i2d_CMS_bio
are similar except that they decode or encode using a
.Vt BIO
pointer.
.Pp
.Fn d2i_CMS_ReceiptRequest
and
.Fn i2d_CMS_ReceiptRequest
decode and encode a
.Vt CMS_ReceiptRequest
structure defined in RFC 2634 section 2.7.
.Sh RETURN VALUES
.Fn d2i_CMS_ContentInfo
and
.Fn d2i_CMS_bio
return a valid
.Vt CMS_ContentInfo
structure or
.Dv NULL
if an error occurs.
.Pp
.Fn d2i_CMS_ReceiptRequest
returns a valid
.Vt CMS_ReceiptRequest
structure or
.Dv NULL
if an error occurs.
.Pp
.Fn i2d_CMS_ContentInfo
and
.Fn i2d_CMS_ReceiptRequest
return the number of bytes successfully encoded
or a negative value if an error occurs.
.Pp
.Fn i2d_CMS_bio
returns 1 for success or 0 if an error occurs.
.Pp
For all functions, the error code can be obtained by
.Xr ERR_get_error 3 .
.Sh SEE ALSO
.Xr ASN1_item_d2i 3 ,
.Xr CMS_ContentInfo_new 3 ,
.Xr CMS_get0_type 3 ,
.Xr CMS_ReceiptRequest_create0 3 ,
.Xr i2d_CMS_bio_stream 3
.Sh STANDARDS
RFC 5652: Cryptographic Message Syntax, section 3: General Syntax
.Pp
RFC 2634: Enhanced Security Services for S/MIME,
section 2.7: Receipt Request Syntax
.Sh HISTORY
These functions first appeared in OpenSSL 0.9.8h
and have been available since
.Ox 6.6 .
Changes to jni/libressl/man/d2i_OCSP_RESPONSE.3.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
.\"	$OpenBSD: d2i_OCSP_RESPONSE.3,v 1.2 2018/03/22 21:08:22 schwarze Exp $
.\"
.\" Copyright (c) 2016 Ingo Schwarze <schwarze@openbsd.org>
.\"
.\" Permission to use, copy, modify, and distribute this software for any
.\" purpose with or without fee is hereby granted, provided that the above
.\" copyright notice and this permission notice appear in all copies.
.\"
.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
.Dd $Mdocdate: March 22 2018 $
.Dt D2I_OCSP_RESPONSE 3
.Os
.Sh NAME
.Nm d2i_OCSP_RESPONSE ,
.Nm i2d_OCSP_RESPONSE ,
.Nm d2i_OCSP_RESPBYTES ,
.Nm i2d_OCSP_RESPBYTES ,
|















|







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
.\"	$OpenBSD: d2i_OCSP_RESPONSE.3,v 1.3 2019/06/06 01:06:59 schwarze Exp $
.\"
.\" Copyright (c) 2016 Ingo Schwarze <schwarze@openbsd.org>
.\"
.\" Permission to use, copy, modify, and distribute this software for any
.\" purpose with or without fee is hereby granted, provided that the above
.\" copyright notice and this permission notice appear in all copies.
.\"
.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
.Dd $Mdocdate: June 6 2019 $
.Dt D2I_OCSP_RESPONSE 3
.Os
.Sh NAME
.Nm d2i_OCSP_RESPONSE ,
.Nm i2d_OCSP_RESPONSE ,
.Nm d2i_OCSP_RESPBYTES ,
.Nm i2d_OCSP_RESPBYTES ,
232
233
234
235
236
237
238

239
240
241
242
243
244
245
246
247
and
.Fn i2d_OCSP_CRLID
return the number of bytes successfully encoded or a negative value
if an error occurs.
.Sh SEE ALSO
.Xr ASN1_item_d2i 3 ,
.Xr OCSP_CRLID_new 3 ,

.Xr OCSP_RESPONSE_new 3 ,
.Xr OCSP_SINGLERESP_new 3
.Sh STANDARDS
RFC 6960: X.509 Internet Public Key Infrastructure Online Certificate
Status Protocol, section 4.2: Response Syntax
.Sh HISTORY
These functions first appeared in OpenSSL 0.9.7
and have been available since
.Ox 3.2 .







>









232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
and
.Fn i2d_OCSP_CRLID
return the number of bytes successfully encoded or a negative value
if an error occurs.
.Sh SEE ALSO
.Xr ASN1_item_d2i 3 ,
.Xr OCSP_CRLID_new 3 ,
.Xr OCSP_REQUEST_new 3 ,
.Xr OCSP_RESPONSE_new 3 ,
.Xr OCSP_SINGLERESP_new 3
.Sh STANDARDS
RFC 6960: X.509 Internet Public Key Infrastructure Online Certificate
Status Protocol, section 4.2: Response Syntax
.Sh HISTORY
These functions first appeared in OpenSSL 0.9.7
and have been available since
.Ox 3.2 .
Changes to jni/libressl/man/d2i_PKCS8PrivateKey_bio.3.
1
2
3
4
5
6
7
8
.\" $OpenBSD: d2i_PKCS8PrivateKey_bio.3,v 1.10 2018/03/22 16:06:33 schwarze Exp $
.\" full merge up to: OpenSSL 61f805c1 Jan 16 01:01:46 2018 +0800
.\"
.\" This file was written by Dr. Stephen Henson <steve@openssl.org>.
.\" Copyright (c) 2002, 2016, 2017 The OpenSSL Project.  All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
|







1
2
3
4
5
6
7
8
.\" $OpenBSD: d2i_PKCS8PrivateKey_bio.3,v 1.11 2019/06/07 19:28:52 schwarze Exp $
.\" full merge up to: OpenSSL 61f805c1 Jan 16 01:01:46 2018 +0800
.\"
.\" This file was written by Dr. Stephen Henson <steve@openssl.org>.
.\" Copyright (c) 2002, 2016, 2017 The OpenSSL Project.  All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: March 22 2018 $
.Dt D2I_PKCS8PRIVATEKEY_BIO 3
.Os
.Sh NAME
.Nm d2i_PKCS8PrivateKey_bio ,
.Nm d2i_PKCS8PrivateKey_fp ,
.Nm i2d_PKCS8PrivateKey_bio ,
.Nm i2d_PKCS8PrivateKey_fp ,







|







44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: June 7 2019 $
.Dt D2I_PKCS8PRIVATEKEY_BIO 3
.Os
.Sh NAME
.Nm d2i_PKCS8PrivateKey_bio ,
.Nm d2i_PKCS8PrivateKey_fp ,
.Nm i2d_PKCS8PrivateKey_bio ,
.Nm i2d_PKCS8PrivateKey_fp ,
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
using both PKCS#5 v1.5 and PKCS#5 v2.0 password based encryption
algorithms.
.Pp
Other than the use of DER as opposed to PEM these functions are
identical to the corresponding functions described in
.Xr PEM_read_PrivateKey 3 .
.Pp
Before using these functions,
.Xr OpenSSL_add_all_algorithms 3
should be called to initialize the internal algorithm lookup tables.
Otherwise errors about unknown algorithms will occur if an attempt is
made to decrypt a private key.
.Pp
These functions are currently the only way to store encrypted private
keys using DER format.
.Pp
Currently all the functions use
.Vt BIO
or
.Vt FILE







<
<
<
<
<
<







120
121
122
123
124
125
126






127
128
129
130
131
132
133
using both PKCS#5 v1.5 and PKCS#5 v2.0 password based encryption
algorithms.
.Pp
Other than the use of DER as opposed to PEM these functions are
identical to the corresponding functions described in
.Xr PEM_read_PrivateKey 3 .
.Pp






These functions are currently the only way to store encrypted private
keys using DER format.
.Pp
Currently all the functions use
.Vt BIO
or
.Vt FILE
Changes to jni/libressl/man/d2i_PrivateKey.3.
1
2
3
4
5
6
7
8
.\"	$OpenBSD: d2i_PrivateKey.3,v 1.8 2018/03/27 17:35:50 schwarze Exp $
.\"	OpenSSL b97fdb57 Nov 11 09:33:09 2016 +0100
.\"
.\" This file is a derived work.
.\" The changes are covered by the following Copyright and license:
.\"
.\" Copyright (c) 2016 Ingo Schwarze <schwarze@openbsd.org>
.\"
|







1
2
3
4
5
6
7
8
.\"	$OpenBSD: d2i_PrivateKey.3,v 1.9 2019/06/06 01:06:59 schwarze Exp $
.\"	OpenSSL b97fdb57 Nov 11 09:33:09 2016 +0100
.\"
.\" This file is a derived work.
.\" The changes are covered by the following Copyright and license:
.\"
.\" Copyright (c) 2016 Ingo Schwarze <schwarze@openbsd.org>
.\"
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: March 27 2018 $
.Dt D2I_PRIVATEKEY 3
.Os
.Sh NAME
.Nm d2i_PrivateKey ,
.Nm d2i_AutoPrivateKey ,
.Nm i2d_PrivateKey ,
.Nm d2i_PrivateKey_bio ,







|







61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: June 6 2019 $
.Dt D2I_PRIVATEKEY 3
.Os
.Sh NAME
.Nm d2i_PrivateKey ,
.Nm d2i_AutoPrivateKey ,
.Nm i2d_PrivateKey ,
.Nm d2i_PrivateKey_bio ,
255
256
257
258
259
260
261

262
263
264
265
266
267
268
return 1 for success or 0 if an error occurs.
.Pp
For all functions, the error code can be obtained by calling
.Xr ERR_get_error 3 .
.Sh SEE ALSO
.Xr d2i_PKCS8_PRIV_KEY_INFO 3 ,
.Xr d2i_PKCS8PrivateKey_bio 3 ,

.Xr EVP_PKEY_type 3 ,
.Xr PEM_write_PrivateKey 3 ,
.Xr PKCS8_PRIV_KEY_INFO_new 3
.Sh STANDARDS
RFC 5208: Public-Key Cryptography Standards (PKCS) #8: Private-Key
Information Syntax Specification
.Sh HISTORY







>







255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
return 1 for success or 0 if an error occurs.
.Pp
For all functions, the error code can be obtained by calling
.Xr ERR_get_error 3 .
.Sh SEE ALSO
.Xr d2i_PKCS8_PRIV_KEY_INFO 3 ,
.Xr d2i_PKCS8PrivateKey_bio 3 ,
.Xr EVP_PKEY_new 3 ,
.Xr EVP_PKEY_type 3 ,
.Xr PEM_write_PrivateKey 3 ,
.Xr PKCS8_PRIV_KEY_INFO_new 3
.Sh STANDARDS
RFC 5208: Public-Key Cryptography Standards (PKCS) #8: Private-Key
Information Syntax Specification
.Sh HISTORY
Changes to jni/libressl/man/d2i_SSL_SESSION.3.
1
2
3
4
5
6
7
8
.\"	$OpenBSD: d2i_SSL_SESSION.3,v 1.6 2018/08/27 15:42:39 jsing Exp $
.\"	OpenSSL b97fdb57 Nov 11 09:33:09 2016 +0100
.\"
.\" This file was written by Lutz Jaenicke <jaenicke@openssl.org>.
.\" Copyright (c) 2001, 2005, 2014 The OpenSSL Project.  All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
|







1
2
3
4
5
6
7
8
.\"	$OpenBSD: d2i_SSL_SESSION.3,v 1.7 2019/06/08 15:25:43 schwarze Exp $
.\"	OpenSSL b97fdb57 Nov 11 09:33:09 2016 +0100
.\"
.\" This file was written by Lutz Jaenicke <jaenicke@openssl.org>.
.\" Copyright (c) 2001, 2005, 2014 The OpenSSL Project.  All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: August 27 2018 $
.Dt D2I_SSL_SESSION 3
.Os
.Sh NAME
.Nm d2i_SSL_SESSION ,
.Nm i2d_SSL_SESSION
.Nd convert SSL_SESSION object from/to ASN1 representation
.Sh SYNOPSIS







|







44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: June 8 2019 $
.Dt D2I_SSL_SESSION 3
.Os
.Sh NAME
.Nm d2i_SSL_SESSION ,
.Nm i2d_SSL_SESSION
.Nd convert SSL_SESSION object from/to ASN1 representation
.Sh SYNOPSIS
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
.Fa pp .
The length of the resulting ASN1 representation is returned.
If
.Fa pp
is the
.Dv NULL
pointer, only the length is calculated and returned.
.Sh NOTES
The
.Vt SSL_SESSION
object is built from several
.Xr malloc 3 Ns
-ed parts; it can therefore not be moved, copied or stored directly.
In order to store session data on disk or into a database,
it must be transformed into a binary ASN1 representation.







|







83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
.Fa pp .
The length of the resulting ASN1 representation is returned.
If
.Fa pp
is the
.Dv NULL
pointer, only the length is calculated and returned.
.Pp
The
.Vt SSL_SESSION
object is built from several
.Xr malloc 3 Ns
-ed parts; it can therefore not be moved, copied or stored directly.
In order to store session data on disk or into a database,
it must be transformed into a binary ASN1 representation.
Changes to jni/libressl/man/evp.3.
1
2
3
4
5
6
7
8
.\"	$OpenBSD: evp.3,v 1.10 2019/03/21 14:15:13 schwarze Exp $
.\"	OpenSSL a9c85cea Nov 11 09:33:55 2016 +0100
.\"
.\" This file was written by Ulf Moeller <ulf@openssl.org>,
.\" Matt Caswell <matt@openssl.org>, Geoff Thorpe <geoff@openssl.org>,
.\" and Dr. Stephen Henson <steve@openssl.org>.
.\" Copyright (c) 2000, 2002, 2006, 2013, 2016 The OpenSSL Project.
.\" All rights reserved.
|







1
2
3
4
5
6
7
8
.\"	$OpenBSD: evp.3,v 1.14 2019/08/25 17:08:20 schwarze Exp $
.\"	OpenSSL a9c85cea Nov 11 09:33:55 2016 +0100
.\"
.\" This file was written by Ulf Moeller <ulf@openssl.org>,
.\" Matt Caswell <matt@openssl.org>, Geoff Thorpe <geoff@openssl.org>,
.\" and Dr. Stephen Henson <steve@openssl.org>.
.\" Copyright (c) 2000, 2002, 2006, 2013, 2016 The OpenSSL Project.
.\" All rights reserved.
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: March 21 2019 $
.Dt EVP 3
.Os
.Sh NAME
.Nm evp
.Nd high level cryptographic functions
.Sh SYNOPSIS
.In openssl/evp.h







|







47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: August 25 2019 $
.Dt EVP 3
.Os
.Sh NAME
.Nm evp
.Nd high level cryptographic functions
.Sh SYNOPSIS
.In openssl/evp.h
149
150
151
152
153
154
155
156
157

158
159
160
161
162
163
164
.Xr EVP_BytesToKey 3
function provides some limited support for password based encryption.
Careful selection of the parameters will provide a PKCS#5 PBKDF1
compatible implementation.
However, new applications should typically not use this (preferring, for
example, PBKDF2 from PCKS#5).
.Pp
Algorithms are loaded with
.Xr OpenSSL_add_all_algorithms 3 .

.Pp
All the symmetric algorithms (ciphers), digests and asymmetric
algorithms (public key algorithms) can be replaced by
.Vt ENGINE
modules providing alternative implementations; see
.Xr ENGINE_register_RSA 3
and the related manual pages for more information.







|
|
>







149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
.Xr EVP_BytesToKey 3
function provides some limited support for password based encryption.
Careful selection of the parameters will provide a PKCS#5 PBKDF1
compatible implementation.
However, new applications should typically not use this (preferring, for
example, PBKDF2 from PCKS#5).
.Pp
The
.Xr EVP_EncodeInit 3
family of functions provides base64 encoding and decoding.
.Pp
All the symmetric algorithms (ciphers), digests and asymmetric
algorithms (public key algorithms) can be replaced by
.Vt ENGINE
modules providing alternative implementations; see
.Xr ENGINE_register_RSA 3
and the related manual pages for more information.
176
177
178
179
180
181
182

183
184
185
186
187
188
189
190

191
192
193
194
195
196
197
198
199
200
201
202
203
204
205

206
207
208
.Vt ENGINE
versions of new algorithms cannot be accessed using the low level
functions.
Using them also makes code harder to adapt to new algorithms, some
options are not cleanly supported at the low level, and some
operations are more efficient using the high level interfaces.
.Sh SEE ALSO

.Xr ENGINE_register_RSA 3 ,
.Xr EVP_AEAD_CTX_init 3 ,
.Xr EVP_aes_128_cbc 3 ,
.Xr EVP_BytesToKey 3 ,
.Xr EVP_camellia_128_cbc 3 ,
.Xr EVP_des_cbc 3 ,
.Xr EVP_DigestInit 3 ,
.Xr EVP_DigestSignInit 3 ,

.Xr EVP_EncryptInit 3 ,
.Xr EVP_OpenInit 3 ,
.Xr EVP_PKEY_decrypt 3 ,
.Xr EVP_PKEY_derive 3 ,
.Xr EVP_PKEY_encrypt 3 ,
.Xr EVP_PKEY_keygen 3 ,
.Xr EVP_PKEY_new 3 ,
.Xr EVP_PKEY_print_private 3 ,
.Xr EVP_PKEY_set1_RSA 3 ,
.Xr EVP_PKEY_sign 3 ,
.Xr EVP_PKEY_verify 3 ,
.Xr EVP_PKEY_verify_recover 3 ,
.Xr EVP_rc4 3 ,
.Xr EVP_SealInit 3 ,
.Xr EVP_SignInit 3 ,

.Xr EVP_sm4_cbc 3 ,
.Xr EVP_VerifyInit 3 ,
.Xr OpenSSL_add_all_algorithms 3







>








>















>


|
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
.Vt ENGINE
versions of new algorithms cannot be accessed using the low level
functions.
Using them also makes code harder to adapt to new algorithms, some
options are not cleanly supported at the low level, and some
operations are more efficient using the high level interfaces.
.Sh SEE ALSO
.Xr crypto 3 ,
.Xr ENGINE_register_RSA 3 ,
.Xr EVP_AEAD_CTX_init 3 ,
.Xr EVP_aes_128_cbc 3 ,
.Xr EVP_BytesToKey 3 ,
.Xr EVP_camellia_128_cbc 3 ,
.Xr EVP_des_cbc 3 ,
.Xr EVP_DigestInit 3 ,
.Xr EVP_DigestSignInit 3 ,
.Xr EVP_EncodeInit 3 ,
.Xr EVP_EncryptInit 3 ,
.Xr EVP_OpenInit 3 ,
.Xr EVP_PKEY_decrypt 3 ,
.Xr EVP_PKEY_derive 3 ,
.Xr EVP_PKEY_encrypt 3 ,
.Xr EVP_PKEY_keygen 3 ,
.Xr EVP_PKEY_new 3 ,
.Xr EVP_PKEY_print_private 3 ,
.Xr EVP_PKEY_set1_RSA 3 ,
.Xr EVP_PKEY_sign 3 ,
.Xr EVP_PKEY_verify 3 ,
.Xr EVP_PKEY_verify_recover 3 ,
.Xr EVP_rc4 3 ,
.Xr EVP_SealInit 3 ,
.Xr EVP_SignInit 3 ,
.Xr EVP_sm3 3 ,
.Xr EVP_sm4_cbc 3 ,
.Xr EVP_VerifyInit 3 ,
.Xr EVP_whirlpool 3
Added jni/libressl/man/i2d_CMS_bio_stream.3.






























































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
.\" $OpenBSD: i2d_CMS_bio_stream.3,v 1.3 2019/08/18 21:44:10 schwarze Exp $
.\" full merge up to: OpenSSL df75c2bf Dec 9 01:02:36 2018 +0100
.\"
.\" This file was written by Dr. Stephen Henson <steve@openssl.org>.
.\" Copyright (c) 2008 The OpenSSL Project.  All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\"
.\" 1. Redistributions of source code must retain the above copyright
.\"    notice, this list of conditions and the following disclaimer.
.\"
.\" 2. Redistributions in binary form must reproduce the above copyright
.\"    notice, this list of conditions and the following disclaimer in
.\"    the documentation and/or other materials provided with the
.\"    distribution.
.\"
.\" 3. All advertising materials mentioning features or use of this
.\"    software must display the following acknowledgment:
.\"    "This product includes software developed by the OpenSSL Project
.\"    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
.\"
.\" 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
.\"    endorse or promote products derived from this software without
.\"    prior written permission. For written permission, please contact
.\"    openssl-core@openssl.org.
.\"
.\" 5. Products derived from this software may not be called "OpenSSL"
.\"    nor may "OpenSSL" appear in their names without prior written
.\"    permission of the OpenSSL Project.
.\"
.\" 6. Redistributions of any form whatsoever must retain the following
.\"    acknowledgment:
.\"    "This product includes software developed by the OpenSSL Project
.\"    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
.\"
.\" THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
.\" EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
.\" PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
.\" ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
.\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: August 18 2019 $
.Dt I2D_CMS_BIO_STREAM 3
.Os
.Sh NAME
.Nm i2d_CMS_bio_stream
.Nd output CMS_ContentInfo structure in BER format
.Sh SYNOPSIS
.In openssl/cms.h
.Ft int
.Fo i2d_CMS_bio_stream
.Fa "BIO *out"
.Fa "CMS_ContentInfo *cms"
.Fa "BIO *data"
.Fa "int flags"
.Fc
.Sh DESCRIPTION
.Fn i2d_CMS_bio_stream
outputs a
.Vt CMS_ContentInfo
structure in BER format.
.Pp
It is otherwise identical to the function
.Xr SMIME_write_CMS 3 .
.Pp
This function is effectively a version of
.Xr i2d_CMS_bio 3
supporting streaming.
.Sh RETURN VALUES
.Fn i2d_CMS_bio_stream
returns 1 for success or 0 for failure.
.Sh SEE ALSO
.Xr CMS_ContentInfo_new 3 ,
.Xr CMS_encrypt 3 ,
.Xr CMS_sign 3 ,
.Xr ERR_get_error 3 ,
.Xr PEM_write_bio_CMS_stream 3 ,
.Xr SMIME_write_CMS 3
.Sh HISTORY
.Fn i2d_CMS_bio_stream
first appeared in OpenSSL 1.0.0
and has been available since
.Ox 6.6 .
.Sh BUGS
The prefix "i2d" is arguably wrong because the function outputs BER
format.
Changes to jni/libressl/man/lh_new.3.
1
2
3
4
5
6
7
8
.\"	$OpenBSD: lh_new.3,v 1.4 2018/03/27 17:35:50 schwarze Exp $
.\"	OpenSSL 1bc74519 May 20 08:11:46 2016 -0400
.\"
.\" --------------------------------------------------------------------------
.\" Major patches to this file were contributed by
.\" Ulf Moeller <ulf@openssl.org>, Geoff Thorpe <geoff@openssl.org>,
.\" and Ben Laurie <ben@openssl.org>.
.\" --------------------------------------------------------------------------
|







1
2
3
4
5
6
7
8
.\"	$OpenBSD: lh_new.3,v 1.6 2019/06/10 09:49:48 schwarze Exp $
.\"	OpenSSL 1bc74519 May 20 08:11:46 2016 -0400
.\"
.\" --------------------------------------------------------------------------
.\" Major patches to this file were contributed by
.\" Ulf Moeller <ulf@openssl.org>, Geoff Thorpe <geoff@openssl.org>,
.\" and Ben Laurie <ben@openssl.org>.
.\" --------------------------------------------------------------------------
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
.\" SUCH DAMAGE.
.\"
.\" The licence and distribution terms for any publically available version or
.\" derivative of this code cannot be changed.  i.e. this code cannot simply be
.\" copied and put under another distribution licence
.\" [including the GNU Public Licence.]
.\"
.Dd $Mdocdate: March 27 2018 $
.Dt LH_NEW 3
.Os
.Sh NAME
.Nm lh_new ,
.Nm lh_free ,
.Nm lh_insert ,
.Nm lh_delete ,







|







111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
.\" SUCH DAMAGE.
.\"
.\" The licence and distribution terms for any publically available version or
.\" derivative of this code cannot be changed.  i.e. this code cannot simply be
.\" copied and put under another distribution licence
.\" [including the GNU Public Licence.]
.\"
.Dd $Mdocdate: June 10 2019 $
.Dt LH_NEW 3
.Os
.Sh NAME
.Nm lh_new ,
.Nm lh_free ,
.Nm lh_insert ,
.Nm lh_delete ,
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
The following description is based on the SSLeay documentation:
.Pp
The lhash library implements a hash table described in the
.Em Communications of the ACM
in 1991.
What makes this hash table different is that as the table fills,
the hash table is increased (or decreased) in size via
.Xr OPENSSL_realloc 3 .
When a 'resize' is done, instead of all hashes being redistributed over
twice as many 'buckets', one bucket is split.
So when an 'expand' is done, there is only a minimal cost to
redistribute some values.
Subsequent inserts will cause more single 'bucket' redistributions but
there will never be a sudden large cost due to redistributing all the
\&'buckets'.







|







460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
The following description is based on the SSLeay documentation:
.Pp
The lhash library implements a hash table described in the
.Em Communications of the ACM
in 1991.
What makes this hash table different is that as the table fills,
the hash table is increased (or decreased) in size via
.Xr reallocarray 3 .
When a 'resize' is done, instead of all hashes being redistributed over
twice as many 'buckets', one bucket is split.
So when an 'expand' is done, there is only a minimal cost to
redistribute some values.
Subsequent inserts will cause more single 'bucket' redistributions but
there will never be a sudden large cost due to redistributing all the
\&'buckets'.
519
520
521
522
523
524
525

526
527
528
529
530
531
532
.Pp
Since the LHASH routines would normally be passed structures, this
routine would not normally be passed to
.Fn lh_<type>_new ,
rather it would be used in the function passed to
.Fn lh_<type>_new .
.Sh SEE ALSO

.Xr lh_stats 3
.Sh HISTORY
.Fn lh_new ,
.Fn lh_free ,
.Fn lh_insert ,
.Fn lh_delete ,
.Fn lh_retrieve ,







>







519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
.Pp
Since the LHASH routines would normally be passed structures, this
routine would not normally be passed to
.Fn lh_<type>_new ,
rather it would be used in the function passed to
.Fn lh_<type>_new .
.Sh SEE ALSO
.Xr crypto 3 ,
.Xr lh_stats 3
.Sh HISTORY
.Fn lh_new ,
.Fn lh_free ,
.Fn lh_insert ,
.Fn lh_delete ,
.Fn lh_retrieve ,
Changes to jni/libressl/man/openssl.cnf.5.
1
2
3
4
5
6
7
8
.\" $OpenBSD: openssl.cnf.5,v 1.5 2019/01/02 07:42:21 jmc Exp $
.\" full merge up to: OpenSSL man5/config b53338cb Feb 28 12:30:28 2017 +0100
.\" selective merge up to: OpenSSL a8c5ed81 Jul 18 13:57:25 2017 -0400
.\"
.\" This file was written by Dr. Stephen Henson <steve@openssl.org>.
.\" Copyright (c) 1999, 2000, 2004, 2013, 2015, 2016, 2017 The OpenSSL Project.
.\" All rights reserved.
.\"
|







1
2
3
4
5
6
7
8
.\" $OpenBSD: openssl.cnf.5,v 1.6 2019/06/06 01:06:59 schwarze Exp $
.\" full merge up to: OpenSSL man5/config b53338cb Feb 28 12:30:28 2017 +0100
.\" selective merge up to: OpenSSL a8c5ed81 Jul 18 13:57:25 2017 -0400
.\"
.\" This file was written by Dr. Stephen Henson <steve@openssl.org>.
.\" Copyright (c) 1999, 2000, 2004, 2013, 2015, 2016, 2017 The OpenSSL Project.
.\" All rights reserved.
.\"
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: January 2 2019 $
.Dt OPENSSL.CNF 5
.Os
.Sh NAME
.Nm openssl.cnf
.Nd OpenSSL configuration files
.Sh DESCRIPTION
The OpenSSL CONF library can be used to read configuration files; see







|







46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: June 6 2019 $
.Dt OPENSSL.CNF 5
.Os
.Sh NAME
.Nm openssl.cnf
.Nd OpenSSL configuration files
.Sh DESCRIPTION
The OpenSSL CONF library can be used to read configuration files; see
413
414
415
416
417
418
419

420
421
422
423
424
425
426
will output:
.Dl 0:d=0  hl=2 l=   4 prim: OBJECT            :newoid1
.Pp
showing that the OID "newoid1" has been added as "1.2.3.4.1".
.Sh SEE ALSO
.Xr openssl 1 ,
.Xr CONF_modules_load_file 3 ,

.Xr x509v3.cnf 5
.Sh CAVEATS
If a configuration file attempts to expand a variable that doesn't
exist, then an error is flagged and the file will not load.
This can also happen if an attempt is made to expand an environment
variable that doesn't exist.
For example, in a previous version of OpenSSL the default OpenSSL







>







413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
will output:
.Dl 0:d=0  hl=2 l=   4 prim: OBJECT            :newoid1
.Pp
showing that the OID "newoid1" has been added as "1.2.3.4.1".
.Sh SEE ALSO
.Xr openssl 1 ,
.Xr CONF_modules_load_file 3 ,
.Xr OPENSSL_config 3 ,
.Xr x509v3.cnf 5
.Sh CAVEATS
If a configuration file attempts to expand a variable that doesn't
exist, then an error is flagged and the file will not load.
This can also happen if an attempt is made to expand an environment
variable that doesn't exist.
For example, in a previous version of OpenSSL the default OpenSSL
Changes to jni/libressl/man/ssl.3.
1
2
3
4
5
6
7
8
.\" $OpenBSD: ssl.3,v 1.15 2019/04/05 18:29:43 schwarze Exp $
.\" full merge up to: OpenSSL e330f55d Nov 11 00:51:04 2016 +0100
.\" selective merge up to: OpenSSL cbade361 Dec 12 13:14:45 2017 +0100
.\"
.\" This file was written by Ralf S. Engelschall <rse@openssl.org>,
.\" Ben Laurie <ben@openssl.org>, and Ulf Moeller <ulf@openssl.org>.
.\" Copyright (c) 1998-2002, 2005, 2013, 2015 The OpenSSL Project.
.\" All rights reserved.
|







1
2
3
4
5
6
7
8
.\" $OpenBSD: ssl.3,v 1.17 2019/06/14 13:41:31 schwarze Exp $
.\" full merge up to: OpenSSL e330f55d Nov 11 00:51:04 2016 +0100
.\" selective merge up to: OpenSSL cbade361 Dec 12 13:14:45 2017 +0100
.\"
.\" This file was written by Ralf S. Engelschall <rse@openssl.org>,
.\" Ben Laurie <ben@openssl.org>, and Ulf Moeller <ulf@openssl.org>.
.\" Copyright (c) 1998-2002, 2005, 2013, 2015 The OpenSSL Project.
.\" All rights reserved.
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: April 5 2019 $
.Dt SSL 3
.Os
.Sh NAME
.Nm ssl
.Nd OpenSSL SSL/TLS library
.Sh DESCRIPTION
The OpenSSL
.Nm ssl
library implements the Transport Layer Security (TLS v1) protocols.
.Pp
At first the library must be initialized; see
.Xr SSL_library_init 3 .
.Pp
Then an
.Vt SSL_CTX
object is created as a framework to establish TLS/SSL enabled connections (see
.Xr SSL_CTX_new 3 ) .
Various options regarding certificates, algorithms, etc., can be set in this
object.
.Pp
When a network connection has been created, it can be assigned to an







|










|
<
<
<







47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65



66
67
68
69
70
71
72
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: June 14 2019 $
.Dt SSL 3
.Os
.Sh NAME
.Nm ssl
.Nd OpenSSL SSL/TLS library
.Sh DESCRIPTION
The OpenSSL
.Nm ssl
library implements the Transport Layer Security (TLS v1) protocols.
.Pp
An



.Vt SSL_CTX
object is created as a framework to establish TLS/SSL enabled connections (see
.Xr SSL_CTX_new 3 ) .
Various options regarding certificates, algorithms, etc., can be set in this
object.
.Pp
When a network connection has been created, it can be assigned to an
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215




216

217
218
219
220
















221
222
223
224
225
226
227





228
229
230
231
232
233
234




235

236


237

238
239
240
241
242
243
244
.Xr SSL_get_ciphers 3 ,
.Xr SSL_get_current_cipher 3 ,
.Xr SSL_CIPHER_get_name 3
.Ss Protocol contexts
The following pages describe functions acting on
.Vt SSL_CTX
objects.
Many of these pages also document variants providing similar
functionality for individual connection objects.
.Pp
Constructors and destructors:
.Xr SSL_CTX_new 3 ,
.Xr SSL_CTX_set_ssl_version 3 ,
.Xr SSL_CTX_free 3
.Pp
Configuration functions:
.Xr SSL_CTX_add1_chain_cert 3 ,
.Xr SSL_CTX_add_extra_chain_cert 3 ,
.Xr SSL_CTX_ctrl 3 ,
.Xr SSL_CTX_flush_sessions 3 ,
.Xr SSL_CTX_get_verify_mode 3 ,
.Xr SSL_CTX_load_verify_locations 3 ,
.Xr SSL_CTX_sess_set_get_cb 3 ,
.Xr SSL_CTX_set_alpn_select_cb 3 ,
.Xr SSL_CTX_set_cert_store 3 ,
.Xr SSL_CTX_set_cert_verify_callback 3 ,
.Xr SSL_CTX_set_cipher_list 3 ,
.Xr SSL_CTX_set_client_CA_list 3 ,
.Xr SSL_CTX_set_client_cert_cb 3 ,




.Xr SSL_CTX_set_default_passwd_cb 3 ,

.Xr SSL_CTX_set_generate_session_id 3 ,
.Xr SSL_CTX_set_info_callback 3 ,
.Xr SSL_CTX_set_min_proto_version 3 ,
.Xr SSL_CTX_set_msg_callback 3 ,
















.Xr SSL_CTX_set_options 3 ,
.Xr SSL_CTX_set_quiet_shutdown 3 ,
.Xr SSL_CTX_set_read_ahead 3 ,
.Xr SSL_CTX_set_session_id_context 3 ,
.Xr SSL_CTX_set_timeout 3 ,
.Xr SSL_CTX_set_tmp_dh_callback 3 ,
.Xr SSL_CTX_set_tmp_rsa_callback 3 ,





.Xr SSL_CTX_set_verify 3 ,
.Xr SSL_CTX_set1_groups 3 ,
.Xr SSL_CTX_use_certificate 3 ,
.Xr SSL_set_tmp_ecdh 3 ,
.Xr SSL_set1_param 3
.Pp
Accessors:




.Xr SSL_CTX_get_ex_new_index 3 ,

.Xr SSL_CTX_sessions 3 ,


.Xr SSL_get_client_CA_list 3

.Ss Sessions
The following pages describe functions acting on
.Vt SSL_SESSION
objects.
.Pp
Constructors and destructors:
.Xr SSL_SESSION_new 3 ,







<
<






|
<

|
<
<

<
<


|
|
|
>
>
>
>
|
>
|
|
|
|
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
|
|
|
|
|

|
>
>
>
>
>
|
|

|


|
>
>
>
>
|
>
|
>
>
|
>







184
185
186
187
188
189
190


191
192
193
194
195
196
197

198
199


200


201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
.Xr SSL_get_ciphers 3 ,
.Xr SSL_get_current_cipher 3 ,
.Xr SSL_CIPHER_get_name 3
.Ss Protocol contexts
The following pages describe functions acting on
.Vt SSL_CTX
objects.


.Pp
Constructors and destructors:
.Xr SSL_CTX_new 3 ,
.Xr SSL_CTX_set_ssl_version 3 ,
.Xr SSL_CTX_free 3
.Pp
Certificate configuration:

.Xr SSL_CTX_add_extra_chain_cert 3 ,
.Xr SSL_CTX_get0_certificate 3 ,


.Xr SSL_CTX_load_verify_locations 3 ,


.Xr SSL_CTX_set_cert_store 3 ,
.Xr SSL_CTX_set_cert_verify_callback 3 ,
.Xr SSL_CTX_set_client_cert_cb 3 ,
.Xr SSL_CTX_set_default_passwd_cb 3 ,
.Xr SSL_CTX_set_tlsext_status_cb 3
.Pp
Session configuration:
.Xr SSL_CTX_add_session 3 ,
.Xr SSL_CTX_flush_sessions 3 ,
.Xr SSL_CTX_sess_number 3 ,
.Xr SSL_CTX_sess_set_cache_size 3 ,
.Xr SSL_CTX_sess_set_get_cb 3 ,
.Xr SSL_CTX_sessions 3 ,
.Xr SSL_CTX_set_session_cache_mode 3 ,
.Xr SSL_CTX_set_timeout 3 ,
.Xr SSL_CTX_set_tlsext_ticket_key_cb 3
.Pp
Various configuration:
.Xr SSL_CTX_get_ex_new_index 3 ,
.Xr SSL_CTX_set_tlsext_servername_callback 3
.Ss Common configuration of contexts and connections
The functions on the following pages each come in two variants:
one to directly configure a single
.Vt SSL
connection and another to be called on an
.Vt SSL_CTX
object, to set up defaults for all future
.Vt SSL
connections created from that context.
.Pp
Protocol and algorithm configuration:
.Xr SSL_CTX_set_alpn_select_cb 3 ,
.Xr SSL_CTX_set_cipher_list 3 ,
.Xr SSL_CTX_set_min_proto_version 3 ,
.Xr SSL_CTX_set_options 3 ,
.Xr SSL_CTX_set_tlsext_use_srtp 3 ,
.Xr SSL_CTX_set_tmp_dh_callback 3 ,
.Xr SSL_CTX_set1_groups 3
.Pp
Certificate configuration:
.Xr SSL_CTX_add1_chain_cert 3 ,
.Xr SSL_CTX_get_verify_mode 3 ,
.Xr SSL_CTX_set_client_CA_list 3 ,
.Xr SSL_CTX_set_max_cert_list 3 ,
.Xr SSL_CTX_set_verify 3 ,
.Xr SSL_CTX_use_certificate 3 ,
.Xr SSL_get_client_CA_list 3
.Xr SSL_set1_param 3
.Pp
Session configuration:
.Xr SSL_CTX_set_generate_session_id 3 ,
.Xr SSL_CTX_set_session_id_context 3
.Pp
Various configuration:
.Xr SSL_CTX_ctrl 3 ,
.Xr SSL_CTX_set_info_callback 3 ,
.Xr SSL_CTX_set_mode 3 ,
.Xr SSL_CTX_set_msg_callback 3 ,
.Xr SSL_CTX_set_quiet_shutdown 3 ,
.Xr SSL_CTX_set_read_ahead 3 ,
.Xr SSL_set_max_send_fragment 3
.Ss Sessions
The following pages describe functions acting on
.Vt SSL_SESSION
objects.
.Pp
Constructors and destructors:
.Xr SSL_SESSION_new 3 ,
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272








273
274
275
276





277
278
279
280
281

282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303

304
305
306
307
308







309
310
311
312
313
314
315
316
317
318
319






320
321
322
323
324
325
326
327
.Xr SSL_SESSION_has_ticket 3 ,
.Xr SSL_SESSION_set1_id_context 3
.Pp
Encoding and decoding:
.Xr d2i_SSL_SESSION 3 ,
.Xr PEM_read_SSL_SESSION 3 ,
.Xr SSL_SESSION_print 3
.Pp
Use by other objects:
.Xr SSL_CTX_add_session 3 ,
.Xr SSL_set_session 3 ,
.Xr SSL_get_session 3
.Ss Connections
The following pages describe functions acting on
.Vt SSL
connection objects:
.Pp
Constructors and destructors:
.Xr SSL_new 3 ,








.Xr SSL_set_connect_state 3 ,
.Xr SSL_dup 3 ,
.Xr SSL_set_bio 3 ,
.Xr SSL_set_fd 3 ,





.Xr BIO_f_ssl 3 ,
.Xr SSL_clear 3 ,
.Xr SSL_free 3
.Pp
I/O:

.Xr DTLSv1_listen 3 ,
.Xr SSL_accept 3 ,
.Xr SSL_connect 3 ,
.Xr SSL_do_handshake 3 ,
.Xr SSL_read 3 ,
.Xr SSL_renegotiate 3 ,
.Xr SSL_shutdown 3 ,
.Xr SSL_write 3
.Pp
Accessors:
.Xr SSL_copy_session_id 3 ,
.Xr SSL_export_keying_material 3 ,
.Xr SSL_get_SSL_CTX 3 ,
.Xr SSL_get_certificate 3 ,
.Xr SSL_get_client_random 3 ,
.Xr SSL_get_default_timeout 3 ,
.Xr SSL_get_error 3 ,
.Xr SSL_get_ex_data_X509_STORE_CTX_idx 3 ,
.Xr SSL_get_ex_new_index 3 ,
.Xr SSL_get_fd 3 ,
.Xr SSL_get_peer_cert_chain 3 ,
.Xr SSL_get_peer_certificate 3 ,

.Xr SSL_get_rbio 3 ,
.Xr SSL_get_shared_ciphers 3 ,
.Xr SSL_get_state 3 ,
.Xr SSL_get_verify_result 3 ,
.Xr SSL_get_version 3 ,







.Xr SSL_pending 3 ,
.Xr SSL_rstate_string 3 ,
.Xr SSL_set_shutdown 3 ,
.Xr SSL_set_verify_result 3 ,
.Xr SSL_state_string 3 ,
.Xr SSL_want 3
.Pp
Utility functions:
.Xr SSL_alert_type_string 3 ,
.Xr SSL_dup_CA_list 3 ,
.Xr SSL_load_client_CA_file 3






.Sh SEE ALSO
.Xr openssl 1 ,
.Xr crypto 3 ,
.Xr SSL_load_error_strings 3
.Sh HISTORY
The
.Nm
document appeared in OpenSSL 0.9.2.







<
<
<
<
<







>
>
>
>
>
>
>
>

|
|
|
>
>
>
>
>
|
|
|

<
>









|
<

<
<

<
<

<
<


>
|
|
|


>
>
>
>
>
>
>


<
<


<
|



>
>
>
>
>
>



|




278
279
280
281
282
283
284





285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312

313
314
315
316
317
318
319
320
321
322
323

324


325


326


327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343


344
345

346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
.Xr SSL_SESSION_has_ticket 3 ,
.Xr SSL_SESSION_set1_id_context 3
.Pp
Encoding and decoding:
.Xr d2i_SSL_SESSION 3 ,
.Xr PEM_read_SSL_SESSION 3 ,
.Xr SSL_SESSION_print 3





.Ss Connections
The following pages describe functions acting on
.Vt SSL
connection objects:
.Pp
Constructors and destructors:
.Xr SSL_new 3 ,
.Xr SSL_dup 3 ,
.Xr SSL_free 3 ,
.Xr BIO_f_ssl 3
.Pp
To change the configuration:
.Xr SSL_clear 3 ,
.Xr SSL_copy_session_id 3 ,
.Xr SSL_set_bio 3 ,
.Xr SSL_set_connect_state 3 ,
.Xr SSL_set_fd 3 ,
.Xr SSL_set_session 3 ,
.Xr SSL_set_verify_result 3
.Pp
To inspect the configuration:
.Xr SSL_get_certificate 3 ,
.Xr SSL_get_default_timeout 3 ,
.Xr SSL_get_ex_new_index 3 ,
.Xr SSL_get_fd 3 ,
.Xr SSL_get_rbio 3 ,
.Xr SSL_get_SSL_CTX 3
.Pp

To transmit data:
.Xr DTLSv1_listen 3 ,
.Xr SSL_accept 3 ,
.Xr SSL_connect 3 ,
.Xr SSL_do_handshake 3 ,
.Xr SSL_read 3 ,
.Xr SSL_renegotiate 3 ,
.Xr SSL_shutdown 3 ,
.Xr SSL_write 3
.Pp
To inspect the state after a connection is established:

.Xr SSL_export_keying_material 3 ,


.Xr SSL_get_client_random 3 ,


.Xr SSL_get_ex_data_X509_STORE_CTX_idx 3 ,


.Xr SSL_get_peer_cert_chain 3 ,
.Xr SSL_get_peer_certificate 3 ,
.Xr SSL_get_server_tmp_key 3 ,
.Xr SSL_get_servername 3 ,
.Xr SSL_get_session 3 ,
.Xr SSL_get_shared_ciphers 3 ,
.Xr SSL_get_verify_result 3 ,
.Xr SSL_get_version 3 ,
.Xr SSL_session_reused 3
.Pp
To inspect the state during ongoing communication:
.Xr SSL_get_error 3 ,
.Xr SSL_get_shutdown 3 ,
.Xr SSL_get_state 3 ,
.Xr SSL_num_renegotiations 3 ,
.Xr SSL_pending 3 ,
.Xr SSL_rstate_string 3 ,


.Xr SSL_state_string 3 ,
.Xr SSL_want 3

.Ss Utility functions
.Xr SSL_alert_type_string 3 ,
.Xr SSL_dup_CA_list 3 ,
.Xr SSL_load_client_CA_file 3
.Ss Obsolete functions
.Xr OPENSSL_init_ssl 3 ,
.Xr SSL_COMP_add_compression_method 3 ,
.Xr SSL_CTX_set_tmp_rsa_callback 3 ,
.Xr SSL_library_init 3 ,
.Xr SSL_set_tmp_ecdh 3
.Sh SEE ALSO
.Xr openssl 1 ,
.Xr crypto 3 ,
.Xr tls_init 3
.Sh HISTORY
The
.Nm
document appeared in OpenSSL 0.9.2.
Changes to jni/libressl/man/tls_read.3.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
.\" $OpenBSD: tls_read.3,v 1.5 2019/03/20 14:17:19 espie Exp $
.\"
.\" Copyright (c) 2014, 2015 Ted Unangst <tedu@openbsd.org>
.\" Copyright (c) 2015 Doug Hogan <doug@openbsd.org>
.\" Copyright (c) 2015 Joel Sing <jsing@openbsd.org>
.\" Copyright (c) 2015 Bob Beck <beck@openbsd.org>
.\" Copyright (c) 2017 Ingo Schwarze <schwarze@openbsd.org>
.\"
.\" Permission to use, copy, modify, and distribute this software for any
.\" purpose with or without fee is hereby granted, provided that the above
.\" copyright notice and this permission notice appear in all copies.
.\"
.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
.Dd $Mdocdate: March 20 2019 $
.Dt TLS_READ 3
.Os
.Sh NAME
.Nm tls_read ,
.Nm tls_write ,
.Nm tls_handshake ,
.Nm tls_error ,
|



















|







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
.\" $OpenBSD: tls_read.3,v 1.7 2019/07/09 17:58:33 jsing Exp $
.\"
.\" Copyright (c) 2014, 2015 Ted Unangst <tedu@openbsd.org>
.\" Copyright (c) 2015 Doug Hogan <doug@openbsd.org>
.\" Copyright (c) 2015 Joel Sing <jsing@openbsd.org>
.\" Copyright (c) 2015 Bob Beck <beck@openbsd.org>
.\" Copyright (c) 2017 Ingo Schwarze <schwarze@openbsd.org>
.\"
.\" Permission to use, copy, modify, and distribute this software for any
.\" purpose with or without fee is hereby granted, provided that the above
.\" copyright notice and this permission notice appear in all copies.
.\"
.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
.Dd $Mdocdate: July 9 2019 $
.Dt TLS_READ 3
.Os
.Sh NAME
.Nm tls_read ,
.Nm tls_write ,
.Nm tls_handshake ,
.Nm tls_error ,
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
return a size on success or -1 on error.
.Pp
.Fn tls_handshake
and
.Fn tls_close
return 0 on success or -1 on error.
.Pp
.Fn tls_error
returns
.Dv NULL
if no error occurred with
.Fa ctx
during or since the last call to
.Fn tls_handshake ,
.Fn tls_read ,
.Fn tls_write ,
.Fn tls_close ,
or
.Fn tls_reset
involving
.Fa ctx ,
or if memory allocation failed while trying to assemble the string
describing the most recent error related to
.Fa ctx .
.Pp
The
.Fn tls_read ,
.Fn tls_write ,
.Fn tls_handshake ,
and
.Fn tls_close
functions have two special return values:
.Pp
.Bl -tag -width "TLS_WANT_POLLOUT" -offset indent -compact
.It Dv TLS_WANT_POLLIN
The underlying read file descriptor needs to be readable in order to continue.
.It Dv TLS_WANT_POLLOUT
The underlying write file descriptor needs to be writeable in order to continue.
.El







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<






|







100
101
102
103
104
105
106


















107
108
109
110
111
112
113
114
115
116
117
118
119
120
return a size on success or -1 on error.
.Pp
.Fn tls_handshake
and
.Fn tls_close
return 0 on success or -1 on error.
.Pp


















The
.Fn tls_read ,
.Fn tls_write ,
.Fn tls_handshake ,
and
.Fn tls_close
functions also have two special return values:
.Pp
.Bl -tag -width "TLS_WANT_POLLOUT" -offset indent -compact
.It Dv TLS_WANT_POLLIN
The underlying read file descriptor needs to be readable in order to continue.
.It Dv TLS_WANT_POLLOUT
The underlying write file descriptor needs to be writeable in order to continue.
.El
148
149
150
151
152
153
154


















155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
.Fn tls_read ,
.Fn tls_write ,
.Fn tls_handshake ,
and
.Fn tls_close
all explicitly clear
.Ar errno .


















.Sh EXAMPLES
The following example demonstrates how to handle TLS writes on a blocking
file descriptor:
.Bd -literal -offset indent
\&...
while (len > 0) {
	ssize_t ret;

	ret = tls_write(ctx, buf, len);
	if (ret == TLS_WANT_POLLIN || ret == TLS_WANT_POLLOUT)
		continue;
	if (ret < 0)
		errx(1, "tls_write: %s", tls_error(ctx));
	buf += ret;
	len -= ret;
}
\&...
.Ed
.Pp







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>











|







130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
.Fn tls_read ,
.Fn tls_write ,
.Fn tls_handshake ,
and
.Fn tls_close
all explicitly clear
.Ar errno .
.Pp
.Fn tls_error
returns
.Dv NULL
if no error occurred with
.Fa ctx
during or since the last call to
.Fn tls_handshake ,
.Fn tls_read ,
.Fn tls_write ,
.Fn tls_close ,
or
.Fn tls_reset
involving
.Fa ctx ,
or if memory allocation failed while trying to assemble the string
describing the most recent error related to
.Fa ctx .
.Sh EXAMPLES
The following example demonstrates how to handle TLS writes on a blocking
file descriptor:
.Bd -literal -offset indent
\&...
while (len > 0) {
	ssize_t ret;

	ret = tls_write(ctx, buf, len);
	if (ret == TLS_WANT_POLLIN || ret == TLS_WANT_POLLOUT)
		continue;
	if (ret == -1)
		errx(1, "tls_write: %s", tls_error(ctx));
	buf += ret;
	len -= ret;
}
\&...
.Ed
.Pp
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
		ssize_t ret;

		ret = tls_write(ctx, buf, len);
		if (ret == TLS_WANT_POLLIN)
			pfd[0].events = POLLIN;
		else if (ret == TLS_WANT_POLLOUT)
			pfd[0].events = POLLOUT;
		else if (ret < 0)
			errx(1, "tls_write: %s", tls_error(ctx));
		else {
			buf += ret;
			len -= ret;
		}
	}
}







|







188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
		ssize_t ret;

		ret = tls_write(ctx, buf, len);
		if (ret == TLS_WANT_POLLIN)
			pfd[0].events = POLLIN;
		else if (ret == TLS_WANT_POLLOUT)
			pfd[0].events = POLLOUT;
		else if (ret == -1)
			errx(1, "tls_write: %s", tls_error(ctx));
		else {
			buf += ret;
			len -= ret;
		}
	}
}
Changes to jni/libressl/man/x509v3.cnf.5.
1
2
3
4
5
6
7
8
.\" $OpenBSD: x509v3.cnf.5,v 1.5 2018/08/26 18:04:54 jmc Exp $
.\" full merge up to:
.\" OpenSSL man5/x509v3_config a41815f0 Mar 17 18:43:53 2017 -0700
.\" selective merge up to: OpenSSL 36cf10cf Oct 4 02:11:08 2017 -0400
.\"
.\" This file was written by Dr. Stephen Henson <steve@openssl.org>.
.\" Copyright (c) 2004, 2006, 2013, 2014, 2015, 2016 The OpenSSL Project.
.\" All rights reserved.
|







1
2
3
4
5
6
7
8
.\" $OpenBSD: x509v3.cnf.5,v 1.6 2019/06/06 01:06:59 schwarze Exp $
.\" full merge up to:
.\" OpenSSL man5/x509v3_config a41815f0 Mar 17 18:43:53 2017 -0700
.\" selective merge up to: OpenSSL 36cf10cf Oct 4 02:11:08 2017 -0400
.\"
.\" This file was written by Dr. Stephen Henson <steve@openssl.org>.
.\" Copyright (c) 2004, 2006, 2013, 2014, 2015, 2016 The OpenSSL Project.
.\" All rights reserved.
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: August 26 2018 $
.Dt X509V3.CNF 5
.Os
.Sh NAME
.Nm x509v3.cnf
.Nd X.509 V3 certificate extension configuration format
.Sh DESCRIPTION
Several of the OpenSSL utilities can add extensions to a certificate or







|







47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: June 6 2019 $
.Dt X509V3.CNF 5
.Os
.Sh NAME
.Nm x509v3.cnf
.Nd X.509 V3 certificate extension configuration format
.Sh DESCRIPTION
Several of the OpenSSL utilities can add extensions to a certificate or
680
681
682
683
684
685
686

687
688
689
690
691
692
693
.Bl -tag -width /etc/ssl/x509v3.cnf -compact
.It Pa /etc/ssl/x509v3.cnf
standard configuration file
.El
.Sh SEE ALSO
.Xr openssl 1 ,
.Xr ASN1_generate_nconf 3 ,

.Xr openssl.cnf 5
.Sh HISTORY
X509v3 extension code was first added to OpenSSL 0.9.2.
.Sh CAVEATS
There is no guarantee that a specific implementation will process a
given extension.
It may therefore sometimes be possible to use certificates for purposes







>







680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
.Bl -tag -width /etc/ssl/x509v3.cnf -compact
.It Pa /etc/ssl/x509v3.cnf
standard configuration file
.El
.Sh SEE ALSO
.Xr openssl 1 ,
.Xr ASN1_generate_nconf 3 ,
.Xr OPENSSL_config 3 ,
.Xr openssl.cnf 5
.Sh HISTORY
X509v3 extension code was first added to OpenSSL 0.9.2.
.Sh CAVEATS
There is no guarantee that a specific implementation will process a
given extension.
It may therefore sometimes be possible to use certificates for purposes
Changes to jni/libressl/ssl/VERSION.
1
47:5:0
|
1
47:6:0
Changes to jni/libressl/ssl/s3_lib.c.
1
2
3
4
5
6
7
8
/* $OpenBSD: s3_lib.c,v 1.186 2019/04/04 15:03:21 jsing Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
 * All rights reserved.
 *
 * This package is an SSL implementation written
 * by Eric Young (eay@cryptsoft.com).
 * The implementation was written so as to conform with Netscapes SSL.
 *
|







1
2
3
4
5
6
7
8
/* $OpenBSD: s3_lib.c,v 1.187 2019/10/04 17:21:24 jsing Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
 * All rights reserved.
 *
 * This package is an SSL implementation written
 * by Eric Young (eay@cryptsoft.com).
 * The implementation was written so as to conform with Netscapes SSL.
 *
1678
1679
1680
1681
1682
1683
1684
1685

1686
1687
1688
1689
1690
1691
1692

	if (sc->peer_dh_tmp != NULL) {
		ret = EVP_PKEY_set1_DH(pkey, sc->peer_dh_tmp);
	} else if (sc->peer_ecdh_tmp) {
		ret = EVP_PKEY_set1_EC_KEY(pkey, sc->peer_ecdh_tmp);
	} else if (sc->peer_x25519_tmp != NULL) {
		/* Fudge up an EC_KEY that looks like X25519... */
		if ((group = EC_GROUP_new(EC_GFp_mont_method())) == NULL)

			goto err;
		if ((point = EC_POINT_new(group)) == NULL)
			goto err;
		if ((order = BN_new()) == NULL)
			goto err;
		if (!BN_set_bit(order, 252))
			goto err;







|
>







1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693

	if (sc->peer_dh_tmp != NULL) {
		ret = EVP_PKEY_set1_DH(pkey, sc->peer_dh_tmp);
	} else if (sc->peer_ecdh_tmp) {
		ret = EVP_PKEY_set1_EC_KEY(pkey, sc->peer_ecdh_tmp);
	} else if (sc->peer_x25519_tmp != NULL) {
		/* Fudge up an EC_KEY that looks like X25519... */
		if ((group = EC_GROUP_new_by_curve_name(
		    NID_X9_62_prime256v1)) == NULL)
			goto err;
		if ((point = EC_POINT_new(group)) == NULL)
			goto err;
		if ((order = BN_new()) == NULL)
			goto err;
		if (!BN_set_bit(order, 252))
			goto err;
Changes to jni/libressl/ssl/ssl_cert.c.
1
2
3
4
5
6
7
8
/* $OpenBSD: ssl_cert.c,v 1.74 2019/03/25 17:33:26 jsing Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
 * All rights reserved.
 *
 * This package is an SSL implementation written
 * by Eric Young (eay@cryptsoft.com).
 * The implementation was written so as to conform with Netscapes SSL.
 *
|







1
2
3
4
5
6
7
8
/* $OpenBSD: ssl_cert.c,v 1.76 2019/05/15 09:13:16 bcook Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
 * All rights reserved.
 *
 * This package is an SSL implementation written
 * by Eric Young (eay@cryptsoft.com).
 * The implementation was written so as to conform with Netscapes SSL.
 *
462
463
464
465
466
467
468
469
470
471


472
473

474
475
476

477

478



479
480
481
482
483
484
485
486
}

STACK_OF(X509_NAME) *
SSL_dup_CA_list(const STACK_OF(X509_NAME) *sk)
{
	int i;
	STACK_OF(X509_NAME) *ret;
	X509_NAME *name;

	ret = sk_X509_NAME_new_null();


	for (i = 0; i < sk_X509_NAME_num(sk); i++) {
		name = X509_NAME_dup(sk_X509_NAME_value(sk, i));

		if ((name == NULL) || !sk_X509_NAME_push(ret, name)) {
			sk_X509_NAME_pop_free(ret, X509_NAME_free);
			return (NULL);

		}

	}



	return (ret);
}

void
SSL_set_client_CA_list(SSL *s, STACK_OF(X509_NAME) *name_list)
{
	set_client_CA_list(&(s->internal->client_CA), name_list);
}







|

|
>
>

|
>
|
<
<
>
|
>
|
>
>
>
|







462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477


478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
}

STACK_OF(X509_NAME) *
SSL_dup_CA_list(const STACK_OF(X509_NAME) *sk)
{
	int i;
	STACK_OF(X509_NAME) *ret;
	X509_NAME *name = NULL;

	if ((ret = sk_X509_NAME_new_null()) == NULL)
		goto err;

	for (i = 0; i < sk_X509_NAME_num(sk); i++) {
		if ((name = X509_NAME_dup(sk_X509_NAME_value(sk, i))) == NULL)
			goto err;
		if (!sk_X509_NAME_push(ret, name))


			goto err;
	}
	return (ret);

 err:
	X509_NAME_free(name);
	sk_X509_NAME_pop_free(ret, X509_NAME_free);
	return NULL;
}

void
SSL_set_client_CA_list(SSL *s, STACK_OF(X509_NAME) *name_list)
{
	set_client_CA_list(&(s->internal->client_CA), name_list);
}
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
}

STACK_OF(X509_NAME) *
SSL_get_client_CA_list(const SSL *s)
{
	if (s->internal->type == SSL_ST_CONNECT) {
		/* We are in the client. */
		if (((s->version >> 8) == SSL3_VERSION_MAJOR) &&
		    (s->s3 != NULL))
			return (S3I(s)->tmp.ca_names);
		else
			return (NULL);
	} else {
		if (s->internal->client_CA != NULL)
			return (s->internal->client_CA);
		else







|
<







504
505
506
507
508
509
510
511

512
513
514
515
516
517
518
}

STACK_OF(X509_NAME) *
SSL_get_client_CA_list(const SSL *s)
{
	if (s->internal->type == SSL_ST_CONNECT) {
		/* We are in the client. */
		if ((s->version >> 8) == SSL3_VERSION_MAJOR)

			return (S3I(s)->tmp.ca_names);
		else
			return (NULL);
	} else {
		if (s->internal->client_CA != NULL)
			return (s->internal->client_CA);
		else
Changes to jni/libressl/ssl/ssl_ciphers.c.
1
2
3
4
5
6
7
8
/*	$OpenBSD: ssl_ciphers.c,v 1.2 2019/01/21 14:12:13 tb Exp $ */
/*
 * Copyright (c) 2015-2017 Doug Hogan <doug@openbsd.org>
 * Copyright (c) 2015-2018 Joel Sing <jsing@openbsd.org>
 * Copyright (c) 2019 Theo Buehler <tb@openbsd.org>
 *
 * Permission to use, copy, modify, and distribute this software for any
 * purpose with or without fee is hereby granted, provided that the above
|







1
2
3
4
5
6
7
8
/*	$OpenBSD: ssl_ciphers.c,v 1.3 2019/05/15 09:13:16 bcook Exp $ */
/*
 * Copyright (c) 2015-2017 Doug Hogan <doug@openbsd.org>
 * Copyright (c) 2015-2018 Joel Sing <jsing@openbsd.org>
 * Copyright (c) 2019 Theo Buehler <tb@openbsd.org>
 *
 * Permission to use, copy, modify, and distribute this software for any
 * purpose with or without fee is hereby granted, provided that the above
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
ssl_bytes_to_cipher_list(SSL *s, CBS *cbs)
{
	STACK_OF(SSL_CIPHER) *ciphers = NULL;
	const SSL_CIPHER *cipher;
	uint16_t cipher_value, max_version;
	unsigned long cipher_id;

	if (s->s3 != NULL)
		S3I(s)->send_connection_binding = 0;

	if ((ciphers = sk_SSL_CIPHER_new_null()) == NULL) {
		SSLerror(s, ERR_R_MALLOC_FAILURE);
		goto err;
	}

	while (CBS_len(cbs) > 0) {
		if (!CBS_get_u16(cbs, &cipher_value)) {
			SSLerror(s, SSL_R_ERROR_IN_RECEIVED_CIPHER_LIST);
			goto err;
		}

		cipher_id = SSL3_CK_ID | cipher_value;

		if (s->s3 != NULL && cipher_id == SSL3_CK_SCSV) {
			/*
			 * TLS_EMPTY_RENEGOTIATION_INFO_SCSV is fatal if
			 * renegotiating.
			 */
			if (s->internal->renegotiate) {
				SSLerror(s, SSL_R_SCSV_RECEIVED_WHEN_RENEGOTIATING);
				ssl3_send_alert(s, SSL3_AL_FATAL,







<
|














|







91
92
93
94
95
96
97

98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
ssl_bytes_to_cipher_list(SSL *s, CBS *cbs)
{
	STACK_OF(SSL_CIPHER) *ciphers = NULL;
	const SSL_CIPHER *cipher;
	uint16_t cipher_value, max_version;
	unsigned long cipher_id;


	S3I(s)->send_connection_binding = 0;

	if ((ciphers = sk_SSL_CIPHER_new_null()) == NULL) {
		SSLerror(s, ERR_R_MALLOC_FAILURE);
		goto err;
	}

	while (CBS_len(cbs) > 0) {
		if (!CBS_get_u16(cbs, &cipher_value)) {
			SSLerror(s, SSL_R_ERROR_IN_RECEIVED_CIPHER_LIST);
			goto err;
		}

		cipher_id = SSL3_CK_ID | cipher_value;

		if (cipher_id == SSL3_CK_SCSV) {
			/*
			 * TLS_EMPTY_RENEGOTIATION_INFO_SCSV is fatal if
			 * renegotiating.
			 */
			if (s->internal->renegotiate) {
				SSLerror(s, SSL_R_SCSV_RECEIVED_WHEN_RENEGOTIATING);
				ssl3_send_alert(s, SSL3_AL_FATAL,
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
			 * previously tried a higher protocol version.
			 * Fail if the current version is an unexpected
			 * downgrade.
			 */
			max_version = ssl_max_server_version(s);
			if (max_version == 0 || s->version < max_version) {
				SSLerror(s, SSL_R_INAPPROPRIATE_FALLBACK);
				if (s->s3 != NULL)
					ssl3_send_alert(s, SSL3_AL_FATAL,
					    SSL_AD_INAPPROPRIATE_FALLBACK);
				goto err;
			}
			continue;
		}

		if ((cipher = ssl3_get_cipher_by_value(cipher_value)) != NULL) {
			if (!sk_SSL_CIPHER_push(ciphers, cipher)) {







<
|
|







132
133
134
135
136
137
138

139
140
141
142
143
144
145
146
147
			 * previously tried a higher protocol version.
			 * Fail if the current version is an unexpected
			 * downgrade.
			 */
			max_version = ssl_max_server_version(s);
			if (max_version == 0 || s->version < max_version) {
				SSLerror(s, SSL_R_INAPPROPRIATE_FALLBACK);

				ssl3_send_alert(s, SSL3_AL_FATAL,
					SSL_AD_INAPPROPRIATE_FALLBACK);
				goto err;
			}
			continue;
		}

		if ((cipher = ssl3_get_cipher_by_value(cipher_value)) != NULL) {
			if (!sk_SSL_CIPHER_push(ciphers, cipher)) {
Changes to jni/libressl/ssl/ssl_lib.c.
1
2
3
4
5
6
7
8
/* $OpenBSD: ssl_lib.c,v 1.204 2019/03/25 17:33:26 jsing Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
 * All rights reserved.
 *
 * This package is an SSL implementation written
 * by Eric Young (eay@cryptsoft.com).
 * The implementation was written so as to conform with Netscapes SSL.
 *
|







1
2
3
4
5
6
7
8
/* $OpenBSD: ssl_lib.c,v 1.205 2019/05/15 09:13:16 bcook Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
 * All rights reserved.
 *
 * This package is an SSL implementation written
 * by Eric Young (eay@cryptsoft.com).
 * The implementation was written so as to conform with Netscapes SSL.
 *
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
}


/* return length of latest Finished message we sent, copy to 'buf' */
size_t
SSL_get_finished(const SSL *s, void *buf, size_t count)
{
	size_t	ret = 0;

	if (s->s3 != NULL) {
		ret = S3I(s)->tmp.finish_md_len;
		if (count > ret)
			count = ret;
		memcpy(buf, S3I(s)->tmp.finish_md, count);
	}
	return (ret);
}

/* return length of latest Finished message we expected, copy to 'buf' */
size_t
SSL_get_peer_finished(const SSL *s, void *buf, size_t count)
{
	size_t	ret = 0;

	if (s->s3 != NULL) {
		ret = S3I(s)->tmp.peer_finish_md_len;
		if (count > ret)
			count = ret;
		memcpy(buf, S3I(s)->tmp.peer_finish_md, count);
	}
	return (ret);
}


int
SSL_get_verify_mode(const SSL *s)
{







|

<
|
|
|
|
<







|

<
|
|
|
|
<







692
693
694
695
696
697
698
699
700

701
702
703
704

705
706
707
708
709
710
711
712
713

714
715
716
717

718
719
720
721
722
723
724
}


/* return length of latest Finished message we sent, copy to 'buf' */
size_t
SSL_get_finished(const SSL *s, void *buf, size_t count)
{
	size_t	ret;


	ret = S3I(s)->tmp.finish_md_len;
	if (count > ret)
		count = ret;
	memcpy(buf, S3I(s)->tmp.finish_md, count);

	return (ret);
}

/* return length of latest Finished message we expected, copy to 'buf' */
size_t
SSL_get_peer_finished(const SSL *s, void *buf, size_t count)
{
	size_t	ret;


	ret = S3I(s)->tmp.peer_finish_md_len;
	if (count > ret)
		count = ret;
	memcpy(buf, S3I(s)->tmp.peer_finish_md, count);

	return (ret);
}


int
SSL_get_verify_mode(const SSL *s)
{
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
void
SSL_get0_alpn_selected(const SSL *ssl, const unsigned char **data,
    unsigned *len)
{
	*data = NULL;
	*len = 0;

	if (ssl->s3 != NULL) {
		*data = ssl->s3->internal->alpn_selected;
		*len = ssl->s3->internal->alpn_selected_len;
	}
}

int
SSL_export_keying_material(SSL *s, unsigned char *out, size_t olen,
    const char *label, size_t llen, const unsigned char *p, size_t plen,
    int use_context)
{







<
|
|
<







1629
1630
1631
1632
1633
1634
1635

1636
1637

1638
1639
1640
1641
1642
1643
1644
void
SSL_get0_alpn_selected(const SSL *ssl, const unsigned char **data,
    unsigned *len)
{
	*data = NULL;
	*len = 0;


	*data = ssl->s3->internal->alpn_selected;
	*len = ssl->s3->internal->alpn_selected_len;

}

int
SSL_export_keying_material(SSL *s, unsigned char *out, size_t olen,
    const char *label, size_t llen, const unsigned char *p, size_t plen,
    int use_context)
{
Changes to jni/libressl/ssl/ssl_locl.h.
1
2
3
4
5
6
7
8
/* $OpenBSD: ssl_locl.h,v 1.245 2019/04/04 16:44:24 jsing Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
 * All rights reserved.
 *
 * This package is an SSL implementation written
 * by Eric Young (eay@cryptsoft.com).
 * The implementation was written so as to conform with Netscapes SSL.
 *
|







1
2
3
4
5
6
7
8
/* $OpenBSD: ssl_locl.h,v 1.247 2019/04/22 15:12:20 jsing Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
 * All rights reserved.
 *
 * This package is an SSL implementation written
 * by Eric Young (eay@cryptsoft.com).
 * The implementation was written so as to conform with Netscapes SSL.
 *
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
int ssl_cert_set1_chain(CERT *c, STACK_OF(X509) *chain);
int ssl_cert_add0_chain_cert(CERT *c, X509 *cert);
int ssl_cert_add1_chain_cert(CERT *c, X509 *cert);

SESS_CERT *ssl_sess_cert_new(void);
void ssl_sess_cert_free(SESS_CERT *sc);
int ssl_get_new_session(SSL *s, int session);
int ssl_get_prev_session(SSL *s, const unsigned char *session_id,
    int session_id_len, CBS *ext_block);
int ssl_cipher_id_cmp(const SSL_CIPHER *a, const SSL_CIPHER *b);
SSL_CIPHER *OBJ_bsearch_ssl_cipher_id(SSL_CIPHER *key, SSL_CIPHER const *base,
    int num);
int ssl_cipher_ptr_id_cmp(const SSL_CIPHER * const *ap,
    const SSL_CIPHER * const *bp);
int ssl_cipher_list_to_bytes(SSL *s, STACK_OF(SSL_CIPHER) *ciphers, CBB *cbb);
STACK_OF(SSL_CIPHER) *ssl_bytes_to_cipher_list(SSL *s, CBS *cbs);







|
<







1092
1093
1094
1095
1096
1097
1098
1099

1100
1101
1102
1103
1104
1105
1106
int ssl_cert_set1_chain(CERT *c, STACK_OF(X509) *chain);
int ssl_cert_add0_chain_cert(CERT *c, X509 *cert);
int ssl_cert_add1_chain_cert(CERT *c, X509 *cert);

SESS_CERT *ssl_sess_cert_new(void);
void ssl_sess_cert_free(SESS_CERT *sc);
int ssl_get_new_session(SSL *s, int session);
int ssl_get_prev_session(SSL *s, CBS *session_id, CBS *ext_block);

int ssl_cipher_id_cmp(const SSL_CIPHER *a, const SSL_CIPHER *b);
SSL_CIPHER *OBJ_bsearch_ssl_cipher_id(SSL_CIPHER *key, SSL_CIPHER const *base,
    int num);
int ssl_cipher_ptr_id_cmp(const SSL_CIPHER * const *ap,
    const SSL_CIPHER * const *bp);
int ssl_cipher_list_to_bytes(SSL *s, STACK_OF(SSL_CIPHER) *ciphers, CBB *cbb);
STACK_OF(SSL_CIPHER) *ssl_bytes_to_cipher_list(SSL *s, CBS *cbs);
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339

int ssl_parse_serverhello_tlsext(SSL *s, unsigned char **data,
    size_t n, int *al);
int ssl_check_clienthello_tlsext_early(SSL *s);
int ssl_check_clienthello_tlsext_late(SSL *s);
int ssl_check_serverhello_tlsext(SSL *s);

#define tlsext_tick_md	EVP_sha256
int tls1_process_ticket(SSL *s, const unsigned char *session_id,
    int session_id_len, CBS *ext_block, SSL_SESSION **ret);

long ssl_get_algorithm2(SSL *s);

int tls1_check_ec_server_key(SSL *s);

int ssl_add_clienthello_use_srtp_ext(SSL *s, unsigned char *p,
    int *len, int maxlen);







<
|
|







1322
1323
1324
1325
1326
1327
1328

1329
1330
1331
1332
1333
1334
1335
1336
1337

int ssl_parse_serverhello_tlsext(SSL *s, unsigned char **data,
    size_t n, int *al);
int ssl_check_clienthello_tlsext_early(SSL *s);
int ssl_check_clienthello_tlsext_late(SSL *s);
int ssl_check_serverhello_tlsext(SSL *s);


int tls1_process_ticket(SSL *s, CBS *session_id, CBS *ext_block,
    SSL_SESSION **ret);

long ssl_get_algorithm2(SSL *s);

int tls1_check_ec_server_key(SSL *s);

int ssl_add_clienthello_use_srtp_ext(SSL *s, unsigned char *p,
    int *len, int maxlen);
Changes to jni/libressl/ssl/ssl_sess.c.
1
2
3
4
5
6
7
8
/* $OpenBSD: ssl_sess.c,v 1.84 2019/04/04 14:32:49 jsing Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
 * All rights reserved.
 *
 * This package is an SSL implementation written
 * by Eric Young (eay@cryptsoft.com).
 * The implementation was written so as to conform with Netscapes SSL.
 *
|







1
2
3
4
5
6
7
8
/* $OpenBSD: ssl_sess.c,v 1.85 2019/04/22 15:12:20 jsing Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
 * All rights reserved.
 *
 * This package is an SSL implementation written
 * by Eric Young (eay@cryptsoft.com).
 * The implementation was written so as to conform with Netscapes SSL.
 *
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
 *   - If a session is found then s->session is pointed at it (after freeing
 *     an existing session if need be) and s->verify_result is set from the
 *     session.
 *   - Both for new and resumed sessions, s->internal->tlsext_ticket_expected is set
 *     to 1 if the server should issue a new session ticket (to 0 otherwise).
 */
int
ssl_get_prev_session(SSL *s, const unsigned char *session_id,
    int session_id_len, CBS *ext_block)
{
	SSL_SESSION *ret = NULL;
	int fatal = 0;
	int try_session_cache = 1;
	int r;

	/* This is used only by servers. */

	if (session_id_len > SSL_MAX_SSL_SESSION_ID_LENGTH)
		goto err;

	if (session_id_len == 0)
		try_session_cache = 0;

	/* Sets s->internal->tlsext_ticket_expected. */
	r = tls1_process_ticket(s, session_id, session_id_len, ext_block, &ret);
	switch (r) {
	case -1: /* Error during processing */
		fatal = 1;
		goto err;
	case 0: /* No ticket found */
	case 1: /* Zero length ticket found */
		break; /* Ok to carry on processing session id. */







|
<








|


|



|







431
432
433
434
435
436
437
438

439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
 *   - If a session is found then s->session is pointed at it (after freeing
 *     an existing session if need be) and s->verify_result is set from the
 *     session.
 *   - Both for new and resumed sessions, s->internal->tlsext_ticket_expected is set
 *     to 1 if the server should issue a new session ticket (to 0 otherwise).
 */
int
ssl_get_prev_session(SSL *s, CBS *session_id, CBS *ext_block)

{
	SSL_SESSION *ret = NULL;
	int fatal = 0;
	int try_session_cache = 1;
	int r;

	/* This is used only by servers. */

	if (CBS_len(session_id) > SSL_MAX_SSL_SESSION_ID_LENGTH)
		goto err;

	if (CBS_len(session_id) == 0)
		try_session_cache = 0;

	/* Sets s->internal->tlsext_ticket_expected. */
	r = tls1_process_ticket(s, session_id, ext_block, &ret);
	switch (r) {
	case -1: /* Error during processing */
		fatal = 1;
		goto err;
	case 0: /* No ticket found */
	case 1: /* Zero length ticket found */
		break; /* Ok to carry on processing session id. */
470
471
472
473
474
475
476

477
478
479

480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
		goto err;
	}

	if (try_session_cache && ret == NULL &&
	    !(s->session_ctx->internal->session_cache_mode &
	     SSL_SESS_CACHE_NO_INTERNAL_LOOKUP)) {
		SSL_SESSION data;

		data.ssl_version = s->version;
		data.session_id_length = session_id_len;
		memcpy(data.session_id, session_id, session_id_len);


		CRYPTO_r_lock(CRYPTO_LOCK_SSL_CTX);
		ret = lh_SSL_SESSION_retrieve(s->session_ctx->internal->sessions, &data);
		if (ret != NULL) {
			/* Don't allow other threads to steal it. */
			CRYPTO_add(&ret->references, 1,
			    CRYPTO_LOCK_SSL_SESSION);
		}
		CRYPTO_r_unlock(CRYPTO_LOCK_SSL_CTX);

		if (ret == NULL)
			s->session_ctx->internal->stats.sess_miss++;
	}

	if (try_session_cache && ret == NULL &&
	    s->session_ctx->internal->get_session_cb != NULL) {
		int copy = 1;

		if ((ret = s->session_ctx->internal->get_session_cb(s,
		    session_id, session_id_len, &copy))) {
			s->session_ctx->internal->stats.sess_cb_hit++;

			/*
			 * Increment reference count now if the session
			 * callback asks us to do so (note that if the session
			 * structures returned by the callback are shared
			 * between threads, it must handle the reference count







>

|
|
>



















|







469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
		goto err;
	}

	if (try_session_cache && ret == NULL &&
	    !(s->session_ctx->internal->session_cache_mode &
	     SSL_SESS_CACHE_NO_INTERNAL_LOOKUP)) {
		SSL_SESSION data;

		data.ssl_version = s->version;
		data.session_id_length = CBS_len(session_id);
		memcpy(data.session_id, CBS_data(session_id),
		    CBS_len(session_id));

		CRYPTO_r_lock(CRYPTO_LOCK_SSL_CTX);
		ret = lh_SSL_SESSION_retrieve(s->session_ctx->internal->sessions, &data);
		if (ret != NULL) {
			/* Don't allow other threads to steal it. */
			CRYPTO_add(&ret->references, 1,
			    CRYPTO_LOCK_SSL_SESSION);
		}
		CRYPTO_r_unlock(CRYPTO_LOCK_SSL_CTX);

		if (ret == NULL)
			s->session_ctx->internal->stats.sess_miss++;
	}

	if (try_session_cache && ret == NULL &&
	    s->session_ctx->internal->get_session_cb != NULL) {
		int copy = 1;

		if ((ret = s->session_ctx->internal->get_session_cb(s,
		    CBS_data(session_id), CBS_len(session_id), &copy))) {
			s->session_ctx->internal->stats.sess_cb_hit++;

			/*
			 * Increment reference count now if the session
			 * callback asks us to do so (note that if the session
			 * structures returned by the callback are shared
			 * between threads, it must handle the reference count
Changes to jni/libressl/ssl/ssl_srvr.c.
1
2
3
4
5
6
7
8
/* $OpenBSD: ssl_srvr.c,v 1.66 2019/03/25 17:21:18 jsing Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
 * All rights reserved.
 *
 * This package is an SSL implementation written
 * by Eric Young (eay@cryptsoft.com).
 * The implementation was written so as to conform with Netscapes SSL.
 *
|







1
2
3
4
5
6
7
8
/* $OpenBSD: ssl_srvr.c,v 1.68 2019/04/22 15:12:20 jsing Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
 * All rights reserved.
 *
 * This package is an SSL implementation written
 * by Eric Young (eay@cryptsoft.com).
 * The implementation was written so as to conform with Netscapes SSL.
 *
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
		if (!ssl_get_new_session(s, 1))
			goto err;
	} else {
		CBS ext_block;

		CBS_dup(&cbs, &ext_block);

		i = ssl_get_prev_session(s, CBS_data(&session_id),
		    CBS_len(&session_id), &ext_block);
		if (i == 1) { /* previous session */
			s->internal->hit = 1;
		} else if (i == -1)
			goto err;
		else {
			/* i == 0 */
			if (!ssl_get_new_session(s, 1))







|
<







909
910
911
912
913
914
915
916

917
918
919
920
921
922
923
		if (!ssl_get_new_session(s, 1))
			goto err;
	} else {
		CBS ext_block;

		CBS_dup(&cbs, &ext_block);

		i = ssl_get_prev_session(s, &session_id, &ext_block);

		if (i == 1) { /* previous session */
			s->internal->hit = 1;
		} else if (i == -1)
			goto err;
		else {
			/* i == 0 */
			if (!ssl_get_new_session(s, 1))
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
				goto err;
			}
		} else {
			arc4random_buf(iv, 16);
			EVP_EncryptInit_ex(&ctx, EVP_aes_128_cbc(), NULL,
			    tctx->internal->tlsext_tick_aes_key, iv);
			HMAC_Init_ex(&hctx, tctx->internal->tlsext_tick_hmac_key,
			    16, tlsext_tick_md(), NULL);
			memcpy(key_name, tctx->internal->tlsext_tick_key_name, 16);
		}

		/* Encrypt the session state. */
		enc_session_max_len = session_len + EVP_MAX_BLOCK_LENGTH;
		if ((enc_session = calloc(1, enc_session_max_len)) == NULL)
			goto err;







|







2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
				goto err;
			}
		} else {
			arc4random_buf(iv, 16);
			EVP_EncryptInit_ex(&ctx, EVP_aes_128_cbc(), NULL,
			    tctx->internal->tlsext_tick_aes_key, iv);
			HMAC_Init_ex(&hctx, tctx->internal->tlsext_tick_hmac_key,
			    16, EVP_sha256(), NULL);
			memcpy(key_name, tctx->internal->tlsext_tick_key_name, 16);
		}

		/* Encrypt the session state. */
		enc_session_max_len = session_len + EVP_MAX_BLOCK_LENGTH;
		if ((enc_session = calloc(1, enc_session_max_len)) == NULL)
			goto err;
Changes to jni/libressl/ssl/ssl_tlsext.c.
1
2
3
4
5
6
7
8
/* $OpenBSD: ssl_tlsext.c,v 1.44.2.1 2019/05/15 19:25:15 tb Exp $ */
/*
 * Copyright (c) 2016, 2017, 2019 Joel Sing <jsing@openbsd.org>
 * Copyright (c) 2017 Doug Hogan <doug@openbsd.org>
 * Copyright (c) 2018-2019 Bob Beck <beck@openbsd.org>
 *
 * Permission to use, copy, modify, and distribute this software for any
 * purpose with or without fee is hereby granted, provided that the above
|







1
2
3
4
5
6
7
8
/* $OpenBSD: ssl_tlsext.c,v 1.49 2019/05/29 17:28:37 jsing Exp $ */
/*
 * Copyright (c) 2016, 2017, 2019 Joel Sing <jsing@openbsd.org>
 * Copyright (c) 2017 Doug Hogan <doug@openbsd.org>
 * Copyright (c) 2018-2019 Bob Beck <beck@openbsd.org>
 *
 * Permission to use, copy, modify, and distribute this software for any
 * purpose with or without fee is hereby granted, provided that the above
673
674
675
676
677
678
679



680
681
682
683
684
685
686
	*alert = SSL_AD_DECODE_ERROR;
	return 0;
}

int
tlsext_sni_server_needs(SSL *s)
{



	return (s->session->tlsext_hostname != NULL);
}

int
tlsext_sni_server_build(SSL *s, CBB *cbb)
{
	return 1;







>
>
>







673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
	*alert = SSL_AD_DECODE_ERROR;
	return 0;
}

int
tlsext_sni_server_needs(SSL *s)
{
	if (s->internal->hit)
		return 0;

	return (s->session->tlsext_hostname != NULL);
}

int
tlsext_sni_server_build(SSL *s, CBB *cbb)
{
	return 1;
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
int
tlsext_keyshare_server_parse(SSL *s, CBS *cbs, int *alert)
{
	CBS client_shares;
	CBS key_exchange;
	uint16_t group;
	size_t out_len;
	int ret = 0;

	if (!CBS_get_u16_length_prefixed(cbs, &client_shares))
		goto err;

	if (CBS_len(cbs) != 0)
		goto err;








<







1268
1269
1270
1271
1272
1273
1274

1275
1276
1277
1278
1279
1280
1281
int
tlsext_keyshare_server_parse(SSL *s, CBS *cbs, int *alert)
{
	CBS client_shares;
	CBS key_exchange;
	uint16_t group;
	size_t out_len;


	if (!CBS_get_u16_length_prefixed(cbs, &client_shares))
		goto err;

	if (CBS_len(cbs) != 0)
		goto err;

1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315

		if (CBS_len(&key_exchange) != X25519_KEY_LENGTH)
			goto err;

		if (!CBS_stow(&key_exchange, &S3I(s)->hs_tls13.x25519_peer_public,
		    &out_len))
			goto err;

		ret = 1;
	}

	return ret;

 err:
	*alert = SSL_AD_DECODE_ERROR;
	return 0;
}

int







|
<
|
<
|







1299
1300
1301
1302
1303
1304
1305
1306

1307

1308
1309
1310
1311
1312
1313
1314
1315

		if (CBS_len(&key_exchange) != X25519_KEY_LENGTH)
			goto err;

		if (!CBS_stow(&key_exchange, &S3I(s)->hs_tls13.x25519_peer_public,
		    &out_len))
			goto err;
	}



	return 1;

 err:
	*alert = SSL_AD_DECODE_ERROR;
	return 0;
}

int
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
		 * ignores any server preference entirely.
		 */
		if (matched_version == 0 && version >= min && version <= max)
			matched_version = version;
	}

	/*
	 * XXX if we haven't mached a version we should
	 * fail - but we currently need to succeed to
	 * ignore this before the server code for 1.3
	 * is set up and initialized.
	 */
	if (max == 0)
		return 1; /* XXX */

	if (matched_version != 0)  {
		s->version = matched_version;
		return 1;
	}

	*alert = SSL_AD_PROTOCOL_VERSION;
	return 0;

err:
	*alert = SSL_AD_DECODE_ERROR;
	return 0;
}

int
tlsext_versions_server_needs(SSL *s)
{







|















|







1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
		 * ignores any server preference entirely.
		 */
		if (matched_version == 0 && version >= min && version <= max)
			matched_version = version;
	}

	/*
	 * XXX if we haven't matched a version we should
	 * fail - but we currently need to succeed to
	 * ignore this before the server code for 1.3
	 * is set up and initialized.
	 */
	if (max == 0)
		return 1; /* XXX */

	if (matched_version != 0)  {
		s->version = matched_version;
		return 1;
	}

	*alert = SSL_AD_PROTOCOL_VERSION;
	return 0;

 err:
	*alert = SSL_AD_DECODE_ERROR;
	return 0;
}

int
tlsext_versions_server_needs(SSL *s)
{
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
	{
		.type = TLSEXT_TYPE_supported_versions,
		.messages = SSL_TLSEXT_MSG_CH | SSL_TLSEXT_MSG_SH |
		    SSL_TLSEXT_MSG_HRR,
		.client = {
			.needs = tlsext_versions_client_needs,
			.build = tlsext_versions_client_build,
			.parse = tlsext_versions_server_parse,
		},
		.server = {
			.needs = tlsext_versions_server_needs,
			.build = tlsext_versions_server_build,
			.parse = tlsext_versions_client_parse,
		},
	},
	{
		.type = TLSEXT_TYPE_key_share,
		.messages = SSL_TLSEXT_MSG_CH | SSL_TLSEXT_MSG_SH |
		    SSL_TLSEXT_MSG_HRR,
		.client = {
			.needs = tlsext_keyshare_client_needs,
			.build = tlsext_keyshare_client_build,
			.parse = tlsext_keyshare_server_parse,
		},
		.server = {
			.needs = tlsext_keyshare_server_needs,
			.build = tlsext_keyshare_server_build,
			.parse = tlsext_keyshare_client_parse,
		},
	},
	{
		.type = TLSEXT_TYPE_server_name,
		.messages = SSL_TLSEXT_MSG_CH | SSL_TLSEXT_MSG_EE,
		.client = {
			.needs = tlsext_sni_client_needs,
			.build = tlsext_sni_client_build,
			.parse = tlsext_sni_server_parse,
		},
		.server = {
			.needs = tlsext_sni_server_needs,
			.build = tlsext_sni_server_build,
			.parse = tlsext_sni_client_parse,
		},
	},
	{
		.type = TLSEXT_TYPE_renegotiate,
		.messages = SSL_TLSEXT_MSG_CH | SSL_TLSEXT_MSG_SH,
		.client = {
			.needs = tlsext_ri_client_needs,
			.build = tlsext_ri_client_build,
			.parse = tlsext_ri_server_parse,
		},
		.server = {
			.needs = tlsext_ri_server_needs,
			.build = tlsext_ri_server_build,
			.parse = tlsext_ri_client_parse,
		},
	},
	{
		.type = TLSEXT_TYPE_status_request,
		.messages = SSL_TLSEXT_MSG_CH | SSL_TLSEXT_MSG_CR |
		    SSL_TLSEXT_MSG_CT,
		.client = {
			.needs = tlsext_ocsp_client_needs,
			.build = tlsext_ocsp_client_build,
			.parse = tlsext_ocsp_server_parse,
		},
		.server = {
			.needs = tlsext_ocsp_server_needs,
			.build = tlsext_ocsp_server_build,
			.parse = tlsext_ocsp_client_parse,
		},
	},
	{
		.type = TLSEXT_TYPE_ec_point_formats,
		.messages = SSL_TLSEXT_MSG_CH | SSL_TLSEXT_MSG_SH,
		.client = {
			.needs = tlsext_ecpf_client_needs,
			.build = tlsext_ecpf_client_build,
			.parse = tlsext_ecpf_server_parse,
		},
		.server = {
			.needs = tlsext_ecpf_server_needs,
			.build = tlsext_ecpf_server_build,
			.parse = tlsext_ecpf_client_parse,
		},
	},
	{
		.type = TLSEXT_TYPE_supported_groups,
		.messages = SSL_TLSEXT_MSG_CH | SSL_TLSEXT_MSG_EE,
		.client = {
			.needs = tlsext_supportedgroups_client_needs,
			.build = tlsext_supportedgroups_client_build,
			.parse = tlsext_supportedgroups_server_parse,
		},
		.server = {
			.needs = tlsext_supportedgroups_server_needs,
			.build = tlsext_supportedgroups_server_build,
			.parse = tlsext_supportedgroups_client_parse,
		},
	},
	{
		.type = TLSEXT_TYPE_session_ticket,
		.messages = SSL_TLSEXT_MSG_CH | SSL_TLSEXT_MSG_SH,
		.client = {
			.needs = tlsext_sessionticket_client_needs,
			.build = tlsext_sessionticket_client_build,
			.parse = tlsext_sessionticket_server_parse,
		},
		.server = {
			.needs = tlsext_sessionticket_server_needs,
			.build = tlsext_sessionticket_server_build,
			.parse = tlsext_sessionticket_client_parse,
		},
	},
	{
		.type = TLSEXT_TYPE_signature_algorithms,
		.messages = SSL_TLSEXT_MSG_CH | SSL_TLSEXT_MSG_CR,
		.client = {
			.needs = tlsext_sigalgs_client_needs,
			.build = tlsext_sigalgs_client_build,
			.parse = tlsext_sigalgs_server_parse,
		},
		.server = {
			.needs = tlsext_sigalgs_server_needs,
			.build = tlsext_sigalgs_server_build,
			.parse = tlsext_sigalgs_client_parse,
		},
	},
	{
		.type = TLSEXT_TYPE_application_layer_protocol_negotiation,
		.messages = SSL_TLSEXT_MSG_CH | SSL_TLSEXT_MSG_EE,
		.client = {
			.needs = tlsext_alpn_client_needs,
			.build = tlsext_alpn_client_build,
			.parse = tlsext_alpn_server_parse,
		},
		.server = {
			.needs = tlsext_alpn_server_needs,
			.build = tlsext_alpn_server_build,
			.parse = tlsext_alpn_client_parse,
		},
	},
	{
		.type = TLSEXT_TYPE_cookie,
		.messages = SSL_TLSEXT_MSG_CH | SSL_TLSEXT_MSG_HRR,
		.client = {
			.needs = tlsext_cookie_client_needs,
			.build = tlsext_cookie_client_build,
			.parse = tlsext_cookie_server_parse,
		},
		.server = {
			.needs = tlsext_cookie_server_needs,
			.build = tlsext_cookie_server_build,
			.parse = tlsext_cookie_client_parse,
		},
	},
#ifndef OPENSSL_NO_SRTP
	{
		.type = TLSEXT_TYPE_use_srtp,
		.messages = SSL_TLSEXT_MSG_CH | SSL_TLSEXT_MSG_SH /* XXX */ |
		    SSL_TLSEXT_MSG_EE,
		.client = {
			.needs = tlsext_srtp_client_needs,
			.build = tlsext_srtp_client_build,
			.parse = tlsext_srtp_server_parse,
		},
		.server = {
			.needs = tlsext_srtp_server_needs,
			.build = tlsext_srtp_server_build,
			.parse = tlsext_srtp_client_parse,
		},
	}
#endif /* OPENSSL_NO_SRTP */
};

#define N_TLS_EXTENSIONS (sizeof(tls_extensions) / sizeof(*tls_extensions))








|




|









|




|








|




|








|




|









|




|








|




|








|




|








|




|








|




|








|




|








|




|










|




|







1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
	{
		.type = TLSEXT_TYPE_supported_versions,
		.messages = SSL_TLSEXT_MSG_CH | SSL_TLSEXT_MSG_SH |
		    SSL_TLSEXT_MSG_HRR,
		.client = {
			.needs = tlsext_versions_client_needs,
			.build = tlsext_versions_client_build,
			.parse = tlsext_versions_client_parse,
		},
		.server = {
			.needs = tlsext_versions_server_needs,
			.build = tlsext_versions_server_build,
			.parse = tlsext_versions_server_parse,
		},
	},
	{
		.type = TLSEXT_TYPE_key_share,
		.messages = SSL_TLSEXT_MSG_CH | SSL_TLSEXT_MSG_SH |
		    SSL_TLSEXT_MSG_HRR,
		.client = {
			.needs = tlsext_keyshare_client_needs,
			.build = tlsext_keyshare_client_build,
			.parse = tlsext_keyshare_client_parse,
		},
		.server = {
			.needs = tlsext_keyshare_server_needs,
			.build = tlsext_keyshare_server_build,
			.parse = tlsext_keyshare_server_parse,
		},
	},
	{
		.type = TLSEXT_TYPE_server_name,
		.messages = SSL_TLSEXT_MSG_CH | SSL_TLSEXT_MSG_EE,
		.client = {
			.needs = tlsext_sni_client_needs,
			.build = tlsext_sni_client_build,
			.parse = tlsext_sni_client_parse,
		},
		.server = {
			.needs = tlsext_sni_server_needs,
			.build = tlsext_sni_server_build,
			.parse = tlsext_sni_server_parse,
		},
	},
	{
		.type = TLSEXT_TYPE_renegotiate,
		.messages = SSL_TLSEXT_MSG_CH | SSL_TLSEXT_MSG_SH,
		.client = {
			.needs = tlsext_ri_client_needs,
			.build = tlsext_ri_client_build,
			.parse = tlsext_ri_client_parse,
		},
		.server = {
			.needs = tlsext_ri_server_needs,
			.build = tlsext_ri_server_build,
			.parse = tlsext_ri_server_parse,
		},
	},
	{
		.type = TLSEXT_TYPE_status_request,
		.messages = SSL_TLSEXT_MSG_CH | SSL_TLSEXT_MSG_CR |
		    SSL_TLSEXT_MSG_CT,
		.client = {
			.needs = tlsext_ocsp_client_needs,
			.build = tlsext_ocsp_client_build,
			.parse = tlsext_ocsp_client_parse,
		},
		.server = {
			.needs = tlsext_ocsp_server_needs,
			.build = tlsext_ocsp_server_build,
			.parse = tlsext_ocsp_server_parse,
		},
	},
	{
		.type = TLSEXT_TYPE_ec_point_formats,
		.messages = SSL_TLSEXT_MSG_CH | SSL_TLSEXT_MSG_SH,
		.client = {
			.needs = tlsext_ecpf_client_needs,
			.build = tlsext_ecpf_client_build,
			.parse = tlsext_ecpf_client_parse,
		},
		.server = {
			.needs = tlsext_ecpf_server_needs,
			.build = tlsext_ecpf_server_build,
			.parse = tlsext_ecpf_server_parse,
		},
	},
	{
		.type = TLSEXT_TYPE_supported_groups,
		.messages = SSL_TLSEXT_MSG_CH | SSL_TLSEXT_MSG_EE,
		.client = {
			.needs = tlsext_supportedgroups_client_needs,
			.build = tlsext_supportedgroups_client_build,
			.parse = tlsext_supportedgroups_client_parse,
		},
		.server = {
			.needs = tlsext_supportedgroups_server_needs,
			.build = tlsext_supportedgroups_server_build,
			.parse = tlsext_supportedgroups_server_parse,
		},
	},
	{
		.type = TLSEXT_TYPE_session_ticket,
		.messages = SSL_TLSEXT_MSG_CH | SSL_TLSEXT_MSG_SH,
		.client = {
			.needs = tlsext_sessionticket_client_needs,
			.build = tlsext_sessionticket_client_build,
			.parse = tlsext_sessionticket_client_parse,
		},
		.server = {
			.needs = tlsext_sessionticket_server_needs,
			.build = tlsext_sessionticket_server_build,
			.parse = tlsext_sessionticket_server_parse,
		},
	},
	{
		.type = TLSEXT_TYPE_signature_algorithms,
		.messages = SSL_TLSEXT_MSG_CH | SSL_TLSEXT_MSG_CR,
		.client = {
			.needs = tlsext_sigalgs_client_needs,
			.build = tlsext_sigalgs_client_build,
			.parse = tlsext_sigalgs_client_parse,
		},
		.server = {
			.needs = tlsext_sigalgs_server_needs,
			.build = tlsext_sigalgs_server_build,
			.parse = tlsext_sigalgs_server_parse,
		},
	},
	{
		.type = TLSEXT_TYPE_application_layer_protocol_negotiation,
		.messages = SSL_TLSEXT_MSG_CH | SSL_TLSEXT_MSG_EE,
		.client = {
			.needs = tlsext_alpn_client_needs,
			.build = tlsext_alpn_client_build,
			.parse = tlsext_alpn_client_parse,
		},
		.server = {
			.needs = tlsext_alpn_server_needs,
			.build = tlsext_alpn_server_build,
			.parse = tlsext_alpn_server_parse,
		},
	},
	{
		.type = TLSEXT_TYPE_cookie,
		.messages = SSL_TLSEXT_MSG_CH | SSL_TLSEXT_MSG_HRR,
		.client = {
			.needs = tlsext_cookie_client_needs,
			.build = tlsext_cookie_client_build,
			.parse = tlsext_cookie_client_parse,
		},
		.server = {
			.needs = tlsext_cookie_server_needs,
			.build = tlsext_cookie_server_build,
			.parse = tlsext_cookie_server_parse,
		},
	},
#ifndef OPENSSL_NO_SRTP
	{
		.type = TLSEXT_TYPE_use_srtp,
		.messages = SSL_TLSEXT_MSG_CH | SSL_TLSEXT_MSG_SH /* XXX */ |
		    SSL_TLSEXT_MSG_EE,
		.client = {
			.needs = tlsext_srtp_client_needs,
			.build = tlsext_srtp_client_build,
			.parse = tlsext_srtp_client_parse,
		},
		.server = {
			.needs = tlsext_srtp_server_needs,
			.build = tlsext_srtp_server_build,
			.parse = tlsext_srtp_server_parse,
		},
	}
#endif /* OPENSSL_NO_SRTP */
};

#define N_TLS_EXTENSIONS (sizeof(tls_extensions) / sizeof(*tls_extensions))

1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
			return 0;
	}

	return 1;
}

static void
tlsext_client_reset_state(SSL *s)
{
	s->internal->servername_done = 0;
	s->tlsext_status_type = -1;
	S3I(s)->renegotiate_seen = 0;
	free(S3I(s)->alpn_selected);
	S3I(s)->alpn_selected = NULL;
	s->internal->srtp_profile = NULL;
}

int
tlsext_client_build(SSL *s, CBB *cbb, uint16_t msg_type)
{
	return tlsext_build(s, cbb, 0, msg_type);
}

int
tlsext_server_parse(SSL *s, CBS *cbs, int *alert, uint16_t msg_type)
{
	/* XXX - this possibly should be done by the caller... */
	tlsext_client_reset_state(s);

	return tlsext_parse(s, cbs, alert, 0, msg_type);
}

static void
tlsext_server_reset_state(SSL *s)
{
	S3I(s)->renegotiate_seen = 0;
	free(S3I(s)->alpn_selected);
	S3I(s)->alpn_selected = NULL;
}

int
tlsext_server_build(SSL *s, CBB *cbb, uint16_t msg_type)
{
	return tlsext_build(s, cbb, 1, msg_type);
}

int
tlsext_client_parse(SSL *s, CBS *cbs, int *alert, uint16_t msg_type)
{
	/* XXX - this possibly should be done by the caller... */
	tlsext_server_reset_state(s);

	return tlsext_parse(s, cbs, alert, 1, msg_type);
}







|










|

|






|

|



|







|

|






|

|

1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
			return 0;
	}

	return 1;
}

static void
tlsext_server_reset_state(SSL *s)
{
	s->internal->servername_done = 0;
	s->tlsext_status_type = -1;
	S3I(s)->renegotiate_seen = 0;
	free(S3I(s)->alpn_selected);
	S3I(s)->alpn_selected = NULL;
	s->internal->srtp_profile = NULL;
}

int
tlsext_server_build(SSL *s, CBB *cbb, uint16_t msg_type)
{
	return tlsext_build(s, cbb, 1, msg_type);
}

int
tlsext_server_parse(SSL *s, CBS *cbs, int *alert, uint16_t msg_type)
{
	/* XXX - this possibly should be done by the caller... */
	tlsext_server_reset_state(s);

	return tlsext_parse(s, cbs, alert, 1, msg_type);
}

static void
tlsext_client_reset_state(SSL *s)
{
	S3I(s)->renegotiate_seen = 0;
	free(S3I(s)->alpn_selected);
	S3I(s)->alpn_selected = NULL;
}

int
tlsext_client_build(SSL *s, CBB *cbb, uint16_t msg_type)
{
	return tlsext_build(s, cbb, 0, msg_type);
}

int
tlsext_client_parse(SSL *s, CBS *cbs, int *alert, uint16_t msg_type)
{
	/* XXX - this possibly should be done by the caller... */
	tlsext_client_reset_state(s);

	return tlsext_parse(s, cbs, alert, 0, msg_type);
}
Changes to jni/libressl/ssl/t1_enc.c.
1
2
3
4
5
6
7
8
/* $OpenBSD: t1_enc.c,v 1.117 2019/02/09 15:26:15 jsing Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
 * All rights reserved.
 *
 * This package is an SSL implementation written
 * by Eric Young (eay@cryptsoft.com).
 * The implementation was written so as to conform with Netscapes SSL.
 *
|







1
2
3
4
5
6
7
8
/* $OpenBSD: t1_enc.c,v 1.118 2019/05/13 22:48:30 bcook Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
 * All rights reserved.
 *
 * This package is an SSL implementation written
 * by Eric Young (eay@cryptsoft.com).
 * The implementation was written so as to conform with Netscapes SSL.
 *
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
{
	const SSL_AEAD_CTX *aead;
	const EVP_CIPHER *enc;
	EVP_CIPHER_CTX *ds;
	SSL3_RECORD *rec;
	unsigned char *seq;
	unsigned long l;
	int bs, i, j, k, pad = 0, ret, mac_size = 0;

	if (send) {
		aead = s->internal->aead_write_ctx;
		rec = &S3I(s)->wrec;
		seq = S3I(s)->write_sequence;
	} else {
		aead = s->internal->aead_read_ctx;







|







667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
{
	const SSL_AEAD_CTX *aead;
	const EVP_CIPHER *enc;
	EVP_CIPHER_CTX *ds;
	SSL3_RECORD *rec;
	unsigned char *seq;
	unsigned long l;
	int bs, i, j, k, ret, mac_size = 0;

	if (send) {
		aead = s->internal->aead_write_ctx;
		rec = &S3I(s)->wrec;
		seq = S3I(s)->write_sequence;
	} else {
		aead = s->internal->aead_read_ctx;
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
			return -1;	/* AEAD can fail to verify MAC */

		ret = 1;
		if (EVP_MD_CTX_md(s->read_hash) != NULL)
			mac_size = EVP_MD_CTX_size(s->read_hash);
		if ((bs != 1) && !send)
			ret = tls1_cbc_remove_padding(s, rec, bs, mac_size);
		if (pad && !send)
			rec->length -= pad;
	}
	return ret;
}

int
tls1_final_finish_mac(SSL *s, const char *str, int str_len, unsigned char *out)
{







<
<







900
901
902
903
904
905
906


907
908
909
910
911
912
913
			return -1;	/* AEAD can fail to verify MAC */

		ret = 1;
		if (EVP_MD_CTX_md(s->read_hash) != NULL)
			mac_size = EVP_MD_CTX_size(s->read_hash);
		if ((bs != 1) && !send)
			ret = tls1_cbc_remove_padding(s, rec, bs, mac_size);


	}
	return ret;
}

int
tls1_final_finish_mac(SSL *s, const char *str, int str_len, unsigned char *out)
{
Changes to jni/libressl/ssl/t1_lib.c.
1
2
3
4
5
6
7
8
/* $OpenBSD: t1_lib.c,v 1.154 2019/03/25 17:27:31 jsing Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
 * All rights reserved.
 *
 * This package is an SSL implementation written
 * by Eric Young (eay@cryptsoft.com).
 * The implementation was written so as to conform with Netscapes SSL.
 *
|







1
2
3
4
5
6
7
8
/* $OpenBSD: t1_lib.c,v 1.164 2019/04/25 04:57:36 jsing Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
 * All rights reserved.
 *
 * This package is an SSL implementation written
 * by Eric Young (eay@cryptsoft.com).
 * The implementation was written so as to conform with Netscapes SSL.
 *
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133

#include "ssl_locl.h"

#include "bytestring.h"
#include "ssl_sigalgs.h"
#include "ssl_tlsext.h"

static int tls_decrypt_ticket(SSL *s, const unsigned char *tick, int ticklen,
    const unsigned char *sess_id, int sesslen,
    SSL_SESSION **psess);

SSL3_ENC_METHOD TLSv1_enc_data = {
	.enc = tls1_enc,
	.enc_flags = 0,
};








|
<







118
119
120
121
122
123
124
125

126
127
128
129
130
131
132

#include "ssl_locl.h"

#include "bytestring.h"
#include "ssl_sigalgs.h"
#include "ssl_tlsext.h"

static int tls_decrypt_ticket(SSL *s, CBS *session_id, CBS *ticket,

    SSL_SESSION **psess);

SSL3_ENC_METHOD TLSv1_enc_data = {
	.enc = tls1_enc,
	.enc_flags = 0,
};

755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
	}
}

/* Since the server cache lookup is done early on in the processing of the
 * ClientHello, and other operations depend on the result, we need to handle
 * any TLS session ticket extension at the same time.
 *
 *   session_id: points at the session ID in the ClientHello.
 *   session_id_len: the length of the session ID.
 *   ext_block: a CBS for the ClientHello extensions block.
 *   ret: (output) on return, if a ticket was decrypted, then this is set to
 *       point to the resulting session.
 *
 * If s->internal->tls_session_secret_cb is set then we are expecting a pre-shared key
 * ciphersuite, in which case we have no use for session tickets and one will
 * never be decrypted, nor will s->internal->tlsext_ticket_expected be set to 1.







|
<







754
755
756
757
758
759
760
761

762
763
764
765
766
767
768
	}
}

/* Since the server cache lookup is done early on in the processing of the
 * ClientHello, and other operations depend on the result, we need to handle
 * any TLS session ticket extension at the same time.
 *
 *   session_id: a CBS containing the session ID.

 *   ext_block: a CBS for the ClientHello extensions block.
 *   ret: (output) on return, if a ticket was decrypted, then this is set to
 *       point to the resulting session.
 *
 * If s->internal->tls_session_secret_cb is set then we are expecting a pre-shared key
 * ciphersuite, in which case we have no use for session tickets and one will
 * never be decrypted, nor will s->internal->tlsext_ticket_expected be set to 1.
783
784
785
786
787
788
789
790
791
792
793


794
795
796
797
798
799
800
 *   a new session ticket to the client because the client indicated support
 *   (and s->internal->tls_session_secret_cb is NULL) but the client either doesn't have
 *   a session ticket or we couldn't use the one it gave us, or if
 *   s->ctx->tlsext_ticket_key_cb asked to renew the client's ticket.
 *   Otherwise, s->internal->tlsext_ticket_expected is set to 0.
 */
int
tls1_process_ticket(SSL *s, const unsigned char *session_id, int session_id_len,
    CBS *ext_block, SSL_SESSION **ret)
{
	CBS extensions;



	s->internal->tlsext_ticket_expected = 0;
	*ret = NULL;

	/*
	 * If tickets disabled behave as if no ticket present to permit stateful
	 * resumption.







<
|

|
>
>







781
782
783
784
785
786
787

788
789
790
791
792
793
794
795
796
797
798
799
 *   a new session ticket to the client because the client indicated support
 *   (and s->internal->tls_session_secret_cb is NULL) but the client either doesn't have
 *   a session ticket or we couldn't use the one it gave us, or if
 *   s->ctx->tlsext_ticket_key_cb asked to renew the client's ticket.
 *   Otherwise, s->internal->tlsext_ticket_expected is set to 0.
 */
int

tls1_process_ticket(SSL *s, CBS *session_id, CBS *ext_block, SSL_SESSION **ret)
{
	CBS extensions, ext_data;
	uint16_t ext_type = 0;
	int r;

	s->internal->tlsext_ticket_expected = 0;
	*ret = NULL;

	/*
	 * If tickets disabled behave as if no ticket present to permit stateful
	 * resumption.
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823


824



825

826
827

828
829
830

831

832
833
834
835
836

837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861

862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878

879
880


881
882
883
884
885
886



















887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903

904
905
906
907
908
909
910
911
912
913
914




915


916
917
918
919

920






921
922
923
924


925
926
927
928
929
930
931
932
933
934
935
936


937
938




939
940
941
942
943





944




945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965

966

967
968
969
970
971
972
973
974
975
976
977




978









979
980
981
982
983
984
985
986
987
988
989
990

991


992
993
994
995
996

















997
998
999
1000
1001
	if (CBS_len(ext_block) == 0)
		return 0;

	if (!CBS_get_u16_length_prefixed(ext_block, &extensions))
		return -1;

	while (CBS_len(&extensions) > 0) {
		uint16_t ext_type;
		CBS ext_data;

		if (!CBS_get_u16(&extensions, &ext_type) ||
		    !CBS_get_u16_length_prefixed(&extensions, &ext_data))
			return -1;

		if (ext_type == TLSEXT_TYPE_session_ticket) {


			int r;



			if (CBS_len(&ext_data) == 0) {

				/* The client will accept a ticket but doesn't
				 * currently have one. */

				s->internal->tlsext_ticket_expected = 1;
				return 1;
			}

			if (s->internal->tls_session_secret_cb != NULL) {

				/* Indicate that the ticket couldn't be
				 * decrypted rather than generating the session
				 * from ticket now, trigger abbreviated
				 * handshake based on external mechanism to
				 * calculate the master secret later. */

				return 2;
			}

			r = tls_decrypt_ticket(s, CBS_data(&ext_data),
			    CBS_len(&ext_data), session_id, session_id_len, ret);

			switch (r) {
			case 2: /* ticket couldn't be decrypted */
				s->internal->tlsext_ticket_expected = 1;
				return 2;
			case 3: /* ticket was decrypted */
				return r;
			case 4: /* ticket decrypted but need to renew */
				s->internal->tlsext_ticket_expected = 1;
				return 3;
			default: /* fatal error */
				return -1;
			}
		}
	}
	return 0;
}

/* tls_decrypt_ticket attempts to decrypt a session ticket.
 *

 *   etick: points to the body of the session ticket extension.
 *   eticklen: the length of the session tickets extenion.
 *   sess_id: points at the session ID.
 *   sesslen: the length of the session ID.
 *   psess: (output) on return, if a ticket was decrypted, then this is set to
 *       point to the resulting session.
 *
 * Returns:
 *   -1: fatal error, either from parsing or decrypting the ticket.
 *    2: the ticket couldn't be decrypted.
 *    3: a ticket was successfully decrypted and *psess was set.
 *    4: same as 3, but the ticket needs to be renewed.
 */
static int
tls_decrypt_ticket(SSL *s, const unsigned char *etick, int eticklen,
    const unsigned char *sess_id, int sesslen, SSL_SESSION **psess)
{

	SSL_SESSION *sess;
	unsigned char *sdec;


	const unsigned char *p;
	int slen, mlen, renew_ticket = 0;
	unsigned char tick_hmac[EVP_MAX_MD_SIZE];
	HMAC_CTX hctx;
	EVP_CIPHER_CTX ctx;
	SSL_CTX *tctx = s->initial_ctx;




















	/*
	 * The API guarantees EVP_MAX_IV_LENGTH bytes of space for
	 * the iv to tlsext_ticket_key_cb().  Since the total space
	 * required for a session cookie is never less than this,
	 * this check isn't too strict.  The exact check comes later.
	 */
	if (eticklen < 16 + EVP_MAX_IV_LENGTH)
		return 2;

	/* Initialize session ticket encryption and HMAC contexts */
	HMAC_CTX_init(&hctx);
	EVP_CIPHER_CTX_init(&ctx);
	if (tctx->internal->tlsext_ticket_key_cb) {
		unsigned char *nctick = (unsigned char *)etick;
		int rv = tctx->internal->tlsext_ticket_key_cb(s,
		    nctick, nctick + 16, &ctx, &hctx, 0);

		if (rv < 0) {
			HMAC_CTX_cleanup(&hctx);
			EVP_CIPHER_CTX_cleanup(&ctx);
			return -1;
		}
		if (rv == 0) {
			HMAC_CTX_cleanup(&hctx);
			EVP_CIPHER_CTX_cleanup(&ctx);
			return 2;
		}
		if (rv == 2)




			renew_ticket = 1;


	} else {
		/* Check key name matches */
		if (timingsafe_memcmp(etick,
		    tctx->internal->tlsext_tick_key_name, 16))

			return 2;






		HMAC_Init_ex(&hctx, tctx->internal->tlsext_tick_hmac_key,
		    16, tlsext_tick_md(), NULL);
		EVP_DecryptInit_ex(&ctx, EVP_aes_128_cbc(), NULL,
		    tctx->internal->tlsext_tick_aes_key, etick + 16);


	}

	/*
	 * Attempt to process session ticket, first conduct sanity and
	 * integrity checks on ticket.
	 */
	mlen = HMAC_size(&hctx);
	if (mlen < 0) {
		HMAC_CTX_cleanup(&hctx);
		EVP_CIPHER_CTX_cleanup(&ctx);
		return -1;
	}



	/* Sanity check ticket length: must exceed keyname + IV + HMAC */




	if (eticklen <= 16 + EVP_CIPHER_CTX_iv_length(&ctx) + mlen) {
		HMAC_CTX_cleanup(&hctx);
		EVP_CIPHER_CTX_cleanup(&ctx);
		return 2;
	}





	eticklen -= mlen;





	/* Check HMAC of encrypted ticket */
	if (HMAC_Update(&hctx, etick, eticklen) <= 0 ||
	    HMAC_Final(&hctx, tick_hmac, NULL) <= 0) {
		HMAC_CTX_cleanup(&hctx);
		EVP_CIPHER_CTX_cleanup(&ctx);
		return -1;
	}

	HMAC_CTX_cleanup(&hctx);
	if (timingsafe_memcmp(tick_hmac, etick + eticklen, mlen)) {
		EVP_CIPHER_CTX_cleanup(&ctx);
		return 2;
	}

	/* Attempt to decrypt session data */
	/* Move p after IV to start of encrypted ticket, update length */
	p = etick + 16 + EVP_CIPHER_CTX_iv_length(&ctx);
	eticklen -= 16 + EVP_CIPHER_CTX_iv_length(&ctx);
	sdec = malloc(eticklen);
	if (sdec == NULL ||

	    EVP_DecryptUpdate(&ctx, sdec, &slen, p, eticklen) <= 0) {

		free(sdec);
		EVP_CIPHER_CTX_cleanup(&ctx);
		return -1;
	}
	if (EVP_DecryptFinal_ex(&ctx, sdec + slen, &mlen) <= 0) {
		free(sdec);
		EVP_CIPHER_CTX_cleanup(&ctx);
		return 2;
	}
	slen += mlen;
	EVP_CIPHER_CTX_cleanup(&ctx);




	p = sdec;










	sess = d2i_SSL_SESSION(NULL, &p, slen);
	free(sdec);
	if (sess) {
		/* The session ID, if non-empty, is used by some clients to
		 * detect that the ticket has been accepted. So we copy it to
		 * the session structure. If it is empty set length to zero
		 * as required by standard.
		 */
		if (sesslen)
			memcpy(sess->session_id, sess_id, sesslen);
		sess->session_id_length = sesslen;

		*psess = sess;


		if (renew_ticket)
			return 4;
		else
			return 3;
	}

















	ERR_clear_error();
	/* For session parse failure, indicate that we need to send a new
	 * ticket. */
	return 2;
}







<
<
<




|
>
>
|
>
>
>
|
>
|
|
>
|
|
|
>
|
>
|
<
|
|
|
>
|
|

|
<
<
|
|
|
|
|
|
|
|
|
|
|
|
<
<
<




>
|
<
<
<










|
<

>
|
|
>
>

<
|
|
|

>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>

|
|
|
|
|
|
|
|

<
<
<
|
|
<
|
>
|
<
<
|
<
|
<
<
|
|
<
>
>
>
>
|
>
>

|
|
|
>
|
>
>
>
>
>
>
|
<
<
|
>
>



|
<

<
<
<
<
<
|
>
>

|
>
>
>
>
|
|
<
|
|
>
>
>
>
>
|
>
>
>
>
|
<
<
<
<
<
|
|
|
<
<
<
|
|
<
|
|
<
<
|
<
>
|
>
|
<
<
<
|
|
<
<
|
|
|
>
>
>
>

>
>
>
>
>
>
>
>
>
|
<
|
<
<
<
<
<
<
<
<
|
>
|
>
>
|
|
|
|
|
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
|
|
<
|

808
809
810
811
812
813
814



815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837

838
839
840
841
842
843
844
845


846
847
848
849
850
851
852
853
854
855
856
857



858
859
860
861
862
863



864
865
866
867
868
869
870
871
872
873
874

875
876
877
878
879
880
881

882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914



915
916

917
918
919


920

921


922
923

924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943


944
945
946
947
948
949
950

951





952
953
954
955
956
957
958
959
960
961
962

963
964
965
966
967
968
969
970
971
972
973
974
975





976
977
978



979
980

981
982


983

984
985
986
987



988
989


990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007

1008








1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037

1038
1039
	if (CBS_len(ext_block) == 0)
		return 0;

	if (!CBS_get_u16_length_prefixed(ext_block, &extensions))
		return -1;

	while (CBS_len(&extensions) > 0) {



		if (!CBS_get_u16(&extensions, &ext_type) ||
		    !CBS_get_u16_length_prefixed(&extensions, &ext_data))
			return -1;

		if (ext_type == TLSEXT_TYPE_session_ticket)
			break;
	}

	if (ext_type != TLSEXT_TYPE_session_ticket)
		return 0;

	if (CBS_len(&ext_data) == 0) {
		/*
		 * The client will accept a ticket but does not currently
		 * have one.
		 */
		s->internal->tlsext_ticket_expected = 1;
		return 1;
	}

	if (s->internal->tls_session_secret_cb != NULL) {
		/*
		 * Indicate that the ticket could not be decrypted rather than

		 * generating the session from ticket now, trigger abbreviated
		 * handshake based on external mechanism to calculate the master
		 * secret later.
		 */
		return 2;
	}

	r = tls_decrypt_ticket(s, session_id, &ext_data, ret);


	switch (r) {
	case 2: /* ticket couldn't be decrypted */
		s->internal->tlsext_ticket_expected = 1;
		return 2;
	case 3: /* ticket was decrypted */
		return r;
	case 4: /* ticket decrypted but need to renew */
		s->internal->tlsext_ticket_expected = 1;
		return 3;
	default: /* fatal error */
		return -1;
	}



}

/* tls_decrypt_ticket attempts to decrypt a session ticket.
 *
 *   session_id: a CBS containing the session ID.
 *   ticket: a CBS containing the body of the session ticket extension.



 *   psess: (output) on return, if a ticket was decrypted, then this is set to
 *       point to the resulting session.
 *
 * Returns:
 *   -1: fatal error, either from parsing or decrypting the ticket.
 *    2: the ticket couldn't be decrypted.
 *    3: a ticket was successfully decrypted and *psess was set.
 *    4: same as 3, but the ticket needs to be renewed.
 */
static int
tls_decrypt_ticket(SSL *s, CBS *session_id, CBS *ticket, SSL_SESSION **psess)

{
	CBS ticket_name, ticket_iv, ticket_encdata, ticket_hmac;
	SSL_SESSION *sess = NULL;
	unsigned char *sdec = NULL;
	size_t sdec_len = 0;
	size_t session_id_len;
	const unsigned char *p;

	unsigned char hmac[EVP_MAX_MD_SIZE];
	HMAC_CTX *hctx = NULL;
	EVP_CIPHER_CTX *cctx = NULL;
	SSL_CTX *tctx = s->initial_ctx;
	int slen, hlen;
	int renew_ticket = 0;
	int ret = -1;

	*psess = NULL;

	if (!CBS_get_bytes(ticket, &ticket_name, 16))
		goto derr;

	/*
	 * Initialize session ticket encryption and HMAC contexts.
	 */
	if ((cctx = EVP_CIPHER_CTX_new()) == NULL)
		goto err;
	if ((hctx = HMAC_CTX_new()) == NULL)
		goto err;

	if (tctx->internal->tlsext_ticket_key_cb != NULL) {
		int rv;

		/*
		 * The API guarantees EVP_MAX_IV_LENGTH bytes of space for
		 * the iv to tlsext_ticket_key_cb().  Since the total space
		 * required for a session cookie is never less than this,
		 * this check isn't too strict.  The exact check comes later.
		 */
		if (CBS_len(ticket) < EVP_MAX_IV_LENGTH)
			goto derr;




		if ((rv = tctx->internal->tlsext_ticket_key_cb(s,
		    (unsigned char *)CBS_data(&ticket_name),

		    (unsigned char *)CBS_data(ticket), cctx, hctx, 0)) < 0)
			goto err;
		if (rv == 0)


			goto derr;

		if (rv == 2)


			renew_ticket = 1;


		/*
		 * Now that the cipher context is initialised, we can extract
		 * the IV since its length is known.
		 */
		if (!CBS_get_bytes(ticket, &ticket_iv,
		    EVP_CIPHER_CTX_iv_length(cctx)))
			goto derr;
	} else {
		/* Check that the key name matches. */
		if (!CBS_mem_equal(&ticket_name,
		    tctx->internal->tlsext_tick_key_name,
		    sizeof(tctx->internal->tlsext_tick_key_name)))
			goto derr;
		if (!CBS_get_bytes(ticket, &ticket_iv,
		    EVP_CIPHER_iv_length(EVP_aes_128_cbc())))
			goto derr;
		if (!EVP_DecryptInit_ex(cctx, EVP_aes_128_cbc(), NULL,
		    tctx->internal->tlsext_tick_aes_key, CBS_data(&ticket_iv)))
			goto err;
		if (!HMAC_Init_ex(hctx, tctx->internal->tlsext_tick_hmac_key,


		    sizeof(tctx->internal->tlsext_tick_hmac_key), EVP_sha256(),
		    NULL))
			goto err;
	}

	/*
	 * Attempt to process session ticket.

	 */






	if ((hlen = HMAC_size(hctx)) < 0)
		goto err;

	if (hlen > CBS_len(ticket))
		goto derr;
	if (!CBS_get_bytes(ticket, &ticket_encdata, CBS_len(ticket) - hlen))
		goto derr;
	if (!CBS_get_bytes(ticket, &ticket_hmac, hlen))
		goto derr;
	if (CBS_len(ticket) != 0)

		goto err;

	/* Check HMAC of encrypted ticket. */
	if (HMAC_Update(hctx, CBS_data(&ticket_name),
	    CBS_len(&ticket_name)) <= 0)
		goto err;
	if (HMAC_Update(hctx, CBS_data(&ticket_iv),
	    CBS_len(&ticket_iv)) <= 0)
		goto err;
	if (HMAC_Update(hctx, CBS_data(&ticket_encdata),
	    CBS_len(&ticket_encdata)) <= 0)
		goto err;
	if (HMAC_Final(hctx, hmac, &hlen) <= 0)





		goto err;

	if (!CBS_mem_equal(&ticket_hmac, hmac, hlen))



		goto derr;


	/* Attempt to decrypt session data. */
	sdec_len = CBS_len(&ticket_encdata);


	if ((sdec = calloc(1, sdec_len)) == NULL)

		goto err;
	if (EVP_DecryptUpdate(cctx, sdec, &slen, CBS_data(&ticket_encdata),
	    CBS_len(&ticket_encdata)) <= 0)
		goto derr;



	if (EVP_DecryptFinal_ex(cctx, sdec + slen, &hlen) <= 0)
		goto derr;



	slen += hlen;

	/*
	 * For session parse failures, indicate that we need to send a new
	 * ticket.
	 */
	p = sdec;
	if ((sess = d2i_SSL_SESSION(NULL, &p, slen)) == NULL)
		goto derr;

	/*
	 * The session ID, if non-empty, is used by some clients to detect that
	 * the ticket has been accepted. So we copy it to the session structure.
	 * If it is empty set length to zero as required by standard.
	 */
	if (!CBS_write_bytes(session_id, sess->session_id,
	    sizeof(sess->session_id), &session_id_len))

		goto err;








	sess->session_id_length = (unsigned int)session_id_len;

	*psess = sess;
	sess = NULL;

	if (renew_ticket)
		ret = 4;
	else
		ret = 3;

	goto done;

 derr:
	ret = 2;
	goto done;

 err:
	ret = -1;
	goto done;

 done:
	freezero(sdec, sdec_len);
	EVP_CIPHER_CTX_free(cctx);
	HMAC_CTX_free(hctx);
	SSL_SESSION_free(sess);

	if (ret == 2)
		ERR_clear_error();


	return ret;
}
Changes to jni/libressl/tests/CMakeLists.txt.
80
81
82
83
84
85
86







87
88
89
90
91
92
93
if(NOT BUILD_SHARED_LIBS)
	add_executable(bntest bntest.c)
	set_source_files_properties(bntest.c PROPERTIES COMPILE_FLAGS
		-ULIBRESSL_INTERNAL)
	target_link_libraries(bntest ${OPENSSL_LIBS})
	add_test(bntest bntest)
endif()








# buffertest
if(NOT BUILD_SHARED_LIBS)
	add_executable(buffertest buffertest.c)
	target_link_libraries(buffertest ${OPENSSL_LIBS})
	add_test(buffertest buffertest)
endif()







>
>
>
>
>
>
>







80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
if(NOT BUILD_SHARED_LIBS)
	add_executable(bntest bntest.c)
	set_source_files_properties(bntest.c PROPERTIES COMPILE_FLAGS
		-ULIBRESSL_INTERNAL)
	target_link_libraries(bntest ${OPENSSL_LIBS})
	add_test(bntest bntest)
endif()

# bn_to_string
if(NOT BUILD_SHARED_LIBS)
	add_executable(bn_to_string bn_to_string.c)
	target_link_libraries(bn_to_string ${OPENSSL_LIBS})
	add_test(bn_to_string bn_to_string)
endif()

# buffertest
if(NOT BUILD_SHARED_LIBS)
	add_executable(buffertest buffertest.c)
	target_link_libraries(buffertest ${OPENSSL_LIBS})
	add_test(buffertest buffertest)
endif()
Changes to jni/libressl/tests/Makefile.am.
89
90
91
92
93
94
95





96
97
98
99
100
101
102

# bntest
TESTS += bntest
bntest_CPPFLAGS = $(AM_CPPFLAGS) -ULIBRESSL_INTERNAL
check_PROGRAMS += bntest
bntest_SOURCES = bntest.c






# buffertest
TESTS += buffertest
buffertest_CPPFLAGS = $(AM_CPPFLAGS)
check_PROGRAMS += buffertest
buffertest_SOURCES = buffertest.c

# bytestringtest







>
>
>
>
>







89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107

# bntest
TESTS += bntest
bntest_CPPFLAGS = $(AM_CPPFLAGS) -ULIBRESSL_INTERNAL
check_PROGRAMS += bntest
bntest_SOURCES = bntest.c

# bn_to_string
TESTS += bn_to_string
check_PROGRAMS += bn_to_string
bn_to_string_SOURCES = bn_to_string.c

# buffertest
TESTS += buffertest
buffertest_CPPFLAGS = $(AM_CPPFLAGS)
check_PROGRAMS += buffertest
buffertest_SOURCES = buffertest.c

# bytestringtest
Changes to jni/libressl/tests/Makefile.in.
89
90
91
92
93
94
95
96

97
98
99
100
101
102
103
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
@HOST_ASM_MACOSX_X86_64_TRUE@am__append_1 = $(abs_top_builddir)/crypto/.libs/libcrypto_la-cpuid-macosx-x86_64.o
TESTS = aeadtest.sh aes_wrap$(EXEEXT) $(am__append_2) asn1evp$(EXEEXT) \
	asn1test$(EXEEXT) asn1time$(EXEEXT) base64test$(EXEEXT) \
	bftest$(EXEEXT) $(am__EXEEXT_2) bnaddsub$(EXEEXT) \
	bn_rand_interval$(EXEEXT) bntest$(EXEEXT) buffertest$(EXEEXT) \

	bytestringtest$(EXEEXT) casttest$(EXEEXT) chachatest$(EXEEXT) \
	cipher_list$(EXEEXT) cipherstest$(EXEEXT) clienttest$(EXEEXT) \
	configtest$(EXEEXT) cts128test$(EXEEXT) destest$(EXEEXT) \
	dhtest$(EXEEXT) dsatest$(EXEEXT) ecdhtest$(EXEEXT) \
	ecdsatest$(EXEEXT) ectest$(EXEEXT) enginetest$(EXEEXT) \
	evptest.sh $(am__EXEEXT_3) exptest$(EXEEXT) freenull$(EXEEXT) \
	gcm128test$(EXEEXT) gost2814789t$(EXEEXT) hkdftest$(EXEEXT) \







|
>







89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
@HOST_ASM_MACOSX_X86_64_TRUE@am__append_1 = $(abs_top_builddir)/crypto/.libs/libcrypto_la-cpuid-macosx-x86_64.o
TESTS = aeadtest.sh aes_wrap$(EXEEXT) $(am__append_2) asn1evp$(EXEEXT) \
	asn1test$(EXEEXT) asn1time$(EXEEXT) base64test$(EXEEXT) \
	bftest$(EXEEXT) $(am__EXEEXT_2) bnaddsub$(EXEEXT) \
	bn_rand_interval$(EXEEXT) bntest$(EXEEXT) \
	bn_to_string$(EXEEXT) buffertest$(EXEEXT) \
	bytestringtest$(EXEEXT) casttest$(EXEEXT) chachatest$(EXEEXT) \
	cipher_list$(EXEEXT) cipherstest$(EXEEXT) clienttest$(EXEEXT) \
	configtest$(EXEEXT) cts128test$(EXEEXT) destest$(EXEEXT) \
	dhtest$(EXEEXT) dsatest$(EXEEXT) ecdhtest$(EXEEXT) \
	ecdsatest$(EXEEXT) ectest$(EXEEXT) enginetest$(EXEEXT) \
	evptest.sh $(am__EXEEXT_3) exptest$(EXEEXT) freenull$(EXEEXT) \
	gcm128test$(EXEEXT) gost2814789t$(EXEEXT) hkdftest$(EXEEXT) \
116
117
118
119
120
121
122

123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
	tls_ext_alpn$(EXEEXT) tls_prf$(EXEEXT) utf8test$(EXEEXT) \
	valid_handshakes_terminate$(EXEEXT) verifytest$(EXEEXT) \
	x25519test$(EXEEXT) x509name$(EXEEXT)
check_PROGRAMS = aeadtest$(EXEEXT) aes_wrap$(EXEEXT) $(am__EXEEXT_1) \
	asn1evp$(EXEEXT) asn1test$(EXEEXT) asn1time$(EXEEXT) \
	base64test$(EXEEXT) bftest$(EXEEXT) $(am__EXEEXT_2) \
	bnaddsub$(EXEEXT) bn_rand_interval$(EXEEXT) bntest$(EXEEXT) \

	buffertest$(EXEEXT) bytestringtest$(EXEEXT) casttest$(EXEEXT) \
	chachatest$(EXEEXT) cipher_list$(EXEEXT) cipherstest$(EXEEXT) \
	clienttest$(EXEEXT) configtest$(EXEEXT) cts128test$(EXEEXT) \
	destest$(EXEEXT) dhtest$(EXEEXT) dsatest$(EXEEXT) \
	ecdhtest$(EXEEXT) ecdsatest$(EXEEXT) ectest$(EXEEXT) \
	enginetest$(EXEEXT) evptest$(EXEEXT) $(am__EXEEXT_3) \
	exptest$(EXEEXT) freenull$(EXEEXT) gcm128test$(EXEEXT) \
	gost2814789t$(EXEEXT) hkdftest$(EXEEXT) hmactest$(EXEEXT) \
	ideatest$(EXEEXT) igetest$(EXEEXT) keypairtest$(EXEEXT) \
	key_schedule$(EXEEXT) md4test$(EXEEXT) md5test$(EXEEXT) \
	mont$(EXEEXT) $(am__EXEEXT_4) optionstest$(EXEEXT) \
	pbkdf2$(EXEEXT) $(am__EXEEXT_5) pkcs7test$(EXEEXT) \
	poly1305test$(EXEEXT) pq_test$(EXEEXT) randtest$(EXEEXT) \
	rc2test$(EXEEXT) rc4test$(EXEEXT) recordtest$(EXEEXT) \
	rfc5280time$(EXEEXT) rmdtest$(EXEEXT) rsa_test$(EXEEXT) \
	servertest$(EXEEXT) sha1test$(EXEEXT) sha256test$(EXEEXT) \
	sha512test$(EXEEXT) sm3test$(EXEEXT) sm4test$(EXEEXT) \
	ssl_versions$(EXEEXT) ssltest$(EXEEXT) timingsafe$(EXEEXT) \
	tlsexttest$(EXEEXT) tlstest$(EXEEXT) tls_ext_alpn$(EXEEXT) \
	tls_prf$(EXEEXT) utf8test$(EXEEXT) \
	valid_handshakes_terminate$(EXEEXT) verifytest$(EXEEXT) \
	x25519test$(EXEEXT) x509name$(EXEEXT)

# arc4randomforktest
# Windows/mingw does not have fork, but Cygwin does.
@HOST_WIN_FALSE@am__append_2 = arc4randomforktest.sh
@HOST_WIN_FALSE@am__append_3 = arc4randomforktest

# biotest







>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<
|
|







117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143

144
145
146
147
148
149
150
151
152
	tls_ext_alpn$(EXEEXT) tls_prf$(EXEEXT) utf8test$(EXEEXT) \
	valid_handshakes_terminate$(EXEEXT) verifytest$(EXEEXT) \
	x25519test$(EXEEXT) x509name$(EXEEXT)
check_PROGRAMS = aeadtest$(EXEEXT) aes_wrap$(EXEEXT) $(am__EXEEXT_1) \
	asn1evp$(EXEEXT) asn1test$(EXEEXT) asn1time$(EXEEXT) \
	base64test$(EXEEXT) bftest$(EXEEXT) $(am__EXEEXT_2) \
	bnaddsub$(EXEEXT) bn_rand_interval$(EXEEXT) bntest$(EXEEXT) \
	bn_to_string$(EXEEXT) buffertest$(EXEEXT) \
	bytestringtest$(EXEEXT) casttest$(EXEEXT) chachatest$(EXEEXT) \
	cipher_list$(EXEEXT) cipherstest$(EXEEXT) clienttest$(EXEEXT) \
	configtest$(EXEEXT) cts128test$(EXEEXT) destest$(EXEEXT) \
	dhtest$(EXEEXT) dsatest$(EXEEXT) ecdhtest$(EXEEXT) \
	ecdsatest$(EXEEXT) ectest$(EXEEXT) enginetest$(EXEEXT) \
	evptest$(EXEEXT) $(am__EXEEXT_3) exptest$(EXEEXT) \
	freenull$(EXEEXT) gcm128test$(EXEEXT) gost2814789t$(EXEEXT) \
	hkdftest$(EXEEXT) hmactest$(EXEEXT) ideatest$(EXEEXT) \
	igetest$(EXEEXT) keypairtest$(EXEEXT) key_schedule$(EXEEXT) \
	md4test$(EXEEXT) md5test$(EXEEXT) mont$(EXEEXT) \
	$(am__EXEEXT_4) optionstest$(EXEEXT) pbkdf2$(EXEEXT) \
	$(am__EXEEXT_5) pkcs7test$(EXEEXT) poly1305test$(EXEEXT) \
	pq_test$(EXEEXT) randtest$(EXEEXT) rc2test$(EXEEXT) \
	rc4test$(EXEEXT) recordtest$(EXEEXT) rfc5280time$(EXEEXT) \
	rmdtest$(EXEEXT) rsa_test$(EXEEXT) servertest$(EXEEXT) \
	sha1test$(EXEEXT) sha256test$(EXEEXT) sha512test$(EXEEXT) \
	sm3test$(EXEEXT) sm4test$(EXEEXT) ssl_versions$(EXEEXT) \
	ssltest$(EXEEXT) timingsafe$(EXEEXT) tlsexttest$(EXEEXT) \
	tlstest$(EXEEXT) tls_ext_alpn$(EXEEXT) tls_prf$(EXEEXT) \

	utf8test$(EXEEXT) valid_handshakes_terminate$(EXEEXT) \
	verifytest$(EXEEXT) x25519test$(EXEEXT) x509name$(EXEEXT)

# arc4randomforktest
# Windows/mingw does not have fork, but Cygwin does.
@HOST_WIN_FALSE@am__append_2 = arc4randomforktest.sh
@HOST_WIN_FALSE@am__append_3 = arc4randomforktest

# biotest
269
270
271
272
273
274
275







276
277
278
279
280
281
282
	$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) $(am__append_1)
am_bn_rand_interval_OBJECTS = bn_rand_interval.$(OBJEXT)
bn_rand_interval_OBJECTS = $(am_bn_rand_interval_OBJECTS)
bn_rand_interval_LDADD = $(LDADD)
bn_rand_interval_DEPENDENCIES =  \
	$(abs_top_builddir)/tls/.libs/libtls.a \
	$(abs_top_builddir)/ssl/.libs/libssl.a \







	$(abs_top_builddir)/crypto/.libs/libcrypto.a \
	$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) $(am__append_1)
am_bnaddsub_OBJECTS = bnaddsub.$(OBJEXT)
bnaddsub_OBJECTS = $(am_bnaddsub_OBJECTS)
bnaddsub_LDADD = $(LDADD)
bnaddsub_DEPENDENCIES = $(abs_top_builddir)/tls/.libs/libtls.a \
	$(abs_top_builddir)/ssl/.libs/libssl.a \







>
>
>
>
>
>
>







270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
	$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) $(am__append_1)
am_bn_rand_interval_OBJECTS = bn_rand_interval.$(OBJEXT)
bn_rand_interval_OBJECTS = $(am_bn_rand_interval_OBJECTS)
bn_rand_interval_LDADD = $(LDADD)
bn_rand_interval_DEPENDENCIES =  \
	$(abs_top_builddir)/tls/.libs/libtls.a \
	$(abs_top_builddir)/ssl/.libs/libssl.a \
	$(abs_top_builddir)/crypto/.libs/libcrypto.a \
	$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) $(am__append_1)
am_bn_to_string_OBJECTS = bn_to_string.$(OBJEXT)
bn_to_string_OBJECTS = $(am_bn_to_string_OBJECTS)
bn_to_string_LDADD = $(LDADD)
bn_to_string_DEPENDENCIES = $(abs_top_builddir)/tls/.libs/libtls.a \
	$(abs_top_builddir)/ssl/.libs/libssl.a \
	$(abs_top_builddir)/crypto/.libs/libcrypto.a \
	$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) $(am__append_1)
am_bnaddsub_OBJECTS = bnaddsub.$(OBJEXT)
bnaddsub_OBJECTS = $(am_bnaddsub_OBJECTS)
bnaddsub_LDADD = $(LDADD)
bnaddsub_DEPENDENCIES = $(abs_top_builddir)/tls/.libs/libtls.a \
	$(abs_top_builddir)/ssl/.libs/libssl.a \
766
767
768
769
770
771
772

773
774
775
776
777
778
779
780
depcomp = $(SHELL) $(top_srcdir)/depcomp
am__maybe_remake_depfiles = depfiles
am__depfiles_remade = ./$(DEPDIR)/aeadtest.Po ./$(DEPDIR)/aes_wrap.Po \
	./$(DEPDIR)/arc4randomforktest.Po ./$(DEPDIR)/asn1evp.Po \
	./$(DEPDIR)/asn1test.Po ./$(DEPDIR)/asn1time.Po \
	./$(DEPDIR)/base64test.Po ./$(DEPDIR)/bftest.Po \
	./$(DEPDIR)/biotest.Po ./$(DEPDIR)/bn_rand_interval.Po \

	./$(DEPDIR)/bnaddsub.Po ./$(DEPDIR)/bntest-bntest.Po \
	./$(DEPDIR)/buffertest-buffertest.Po \
	./$(DEPDIR)/bytestringtest.Po ./$(DEPDIR)/casttest.Po \
	./$(DEPDIR)/chachatest.Po ./$(DEPDIR)/cipher_list.Po \
	./$(DEPDIR)/cipherstest.Po ./$(DEPDIR)/clienttest.Po \
	./$(DEPDIR)/configtest.Po ./$(DEPDIR)/cts128test.Po \
	./$(DEPDIR)/destest.Po ./$(DEPDIR)/dhtest.Po \
	./$(DEPDIR)/dsatest.Po ./$(DEPDIR)/ecdhtest.Po \







>
|







774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
depcomp = $(SHELL) $(top_srcdir)/depcomp
am__maybe_remake_depfiles = depfiles
am__depfiles_remade = ./$(DEPDIR)/aeadtest.Po ./$(DEPDIR)/aes_wrap.Po \
	./$(DEPDIR)/arc4randomforktest.Po ./$(DEPDIR)/asn1evp.Po \
	./$(DEPDIR)/asn1test.Po ./$(DEPDIR)/asn1time.Po \
	./$(DEPDIR)/base64test.Po ./$(DEPDIR)/bftest.Po \
	./$(DEPDIR)/biotest.Po ./$(DEPDIR)/bn_rand_interval.Po \
	./$(DEPDIR)/bn_to_string.Po ./$(DEPDIR)/bnaddsub.Po \
	./$(DEPDIR)/bntest-bntest.Po \
	./$(DEPDIR)/buffertest-buffertest.Po \
	./$(DEPDIR)/bytestringtest.Po ./$(DEPDIR)/casttest.Po \
	./$(DEPDIR)/chachatest.Po ./$(DEPDIR)/cipher_list.Po \
	./$(DEPDIR)/cipherstest.Po ./$(DEPDIR)/clienttest.Po \
	./$(DEPDIR)/configtest.Po ./$(DEPDIR)/cts128test.Po \
	./$(DEPDIR)/destest.Po ./$(DEPDIR)/dhtest.Po \
	./$(DEPDIR)/dsatest.Po ./$(DEPDIR)/ecdhtest.Po \
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
am__v_CCLD_0 = @echo "  CCLD    " $@;
am__v_CCLD_1 = 
SOURCES = $(aeadtest_SOURCES) $(aes_wrap_SOURCES) \
	$(arc4randomforktest_SOURCES) $(asn1evp_SOURCES) \
	$(asn1test_SOURCES) $(asn1time_SOURCES) $(base64test_SOURCES) \
	$(bftest_SOURCES) $(biotest_SOURCES) \
	$(bn_rand_interval_SOURCES) $(bnaddsub_SOURCES) \
	$(bntest_SOURCES) $(buffertest_SOURCES) \
	$(bytestringtest_SOURCES) $(casttest_SOURCES) \
	$(chachatest_SOURCES) $(cipher_list_SOURCES) \
	$(cipherstest_SOURCES) $(clienttest_SOURCES) \
	$(configtest_SOURCES) $(cts128test_SOURCES) $(destest_SOURCES) \
	$(dhtest_SOURCES) $(dsatest_SOURCES) $(ecdhtest_SOURCES) \
	$(ecdsatest_SOURCES) $(ectest_SOURCES) $(enginetest_SOURCES) \
	$(evptest_SOURCES) $(explicit_bzero_SOURCES) \







|
|







834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
am__v_CCLD_0 = @echo "  CCLD    " $@;
am__v_CCLD_1 = 
SOURCES = $(aeadtest_SOURCES) $(aes_wrap_SOURCES) \
	$(arc4randomforktest_SOURCES) $(asn1evp_SOURCES) \
	$(asn1test_SOURCES) $(asn1time_SOURCES) $(base64test_SOURCES) \
	$(bftest_SOURCES) $(biotest_SOURCES) \
	$(bn_rand_interval_SOURCES) $(bn_to_string_SOURCES) \
	$(bnaddsub_SOURCES) $(bntest_SOURCES) $(buffertest_SOURCES) \
	$(bytestringtest_SOURCES) $(casttest_SOURCES) \
	$(chachatest_SOURCES) $(cipher_list_SOURCES) \
	$(cipherstest_SOURCES) $(clienttest_SOURCES) \
	$(configtest_SOURCES) $(cts128test_SOURCES) $(destest_SOURCES) \
	$(dhtest_SOURCES) $(dsatest_SOURCES) $(ecdhtest_SOURCES) \
	$(ecdsatest_SOURCES) $(ectest_SOURCES) $(enginetest_SOURCES) \
	$(evptest_SOURCES) $(explicit_bzero_SOURCES) \
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
	$(utf8test_SOURCES) $(valid_handshakes_terminate_SOURCES) \
	$(verifytest_SOURCES) $(x25519test_SOURCES) \
	$(x509name_SOURCES)
DIST_SOURCES = $(aeadtest_SOURCES) $(aes_wrap_SOURCES) \
	$(am__arc4randomforktest_SOURCES_DIST) $(asn1evp_SOURCES) \
	$(asn1test_SOURCES) $(asn1time_SOURCES) $(base64test_SOURCES) \
	$(bftest_SOURCES) $(am__biotest_SOURCES_DIST) \
	$(bn_rand_interval_SOURCES) $(bnaddsub_SOURCES) \
	$(bntest_SOURCES) $(buffertest_SOURCES) \
	$(bytestringtest_SOURCES) $(casttest_SOURCES) \
	$(chachatest_SOURCES) $(cipher_list_SOURCES) \
	$(cipherstest_SOURCES) $(clienttest_SOURCES) \
	$(configtest_SOURCES) $(cts128test_SOURCES) $(destest_SOURCES) \
	$(dhtest_SOURCES) $(dsatest_SOURCES) $(ecdhtest_SOURCES) \
	$(ecdsatest_SOURCES) $(ectest_SOURCES) $(enginetest_SOURCES) \
	$(evptest_SOURCES) $(am__explicit_bzero_SOURCES_DIST) \







|
|







865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
	$(utf8test_SOURCES) $(valid_handshakes_terminate_SOURCES) \
	$(verifytest_SOURCES) $(x25519test_SOURCES) \
	$(x509name_SOURCES)
DIST_SOURCES = $(aeadtest_SOURCES) $(aes_wrap_SOURCES) \
	$(am__arc4randomforktest_SOURCES_DIST) $(asn1evp_SOURCES) \
	$(asn1test_SOURCES) $(asn1time_SOURCES) $(base64test_SOURCES) \
	$(bftest_SOURCES) $(am__biotest_SOURCES_DIST) \
	$(bn_rand_interval_SOURCES) $(bn_to_string_SOURCES) \
	$(bnaddsub_SOURCES) $(bntest_SOURCES) $(buffertest_SOURCES) \
	$(bytestringtest_SOURCES) $(casttest_SOURCES) \
	$(chachatest_SOURCES) $(cipher_list_SOURCES) \
	$(cipherstest_SOURCES) $(clienttest_SOURCES) \
	$(configtest_SOURCES) $(cts128test_SOURCES) $(destest_SOURCES) \
	$(dhtest_SOURCES) $(dsatest_SOURCES) $(ecdhtest_SOURCES) \
	$(ecdsatest_SOURCES) $(ectest_SOURCES) $(enginetest_SOURCES) \
	$(evptest_SOURCES) $(am__explicit_bzero_SOURCES_DIST) \
1275
1276
1277
1278
1279
1280
1281

1282
1283
1284
1285
1286
1287
1288
base64test_SOURCES = base64test.c
bftest_SOURCES = bftest.c
@ENABLE_EXTRATESTS_TRUE@biotest_SOURCES = biotest.c
bnaddsub_SOURCES = bnaddsub.c
bn_rand_interval_SOURCES = bn_rand_interval.c
bntest_CPPFLAGS = $(AM_CPPFLAGS) -ULIBRESSL_INTERNAL
bntest_SOURCES = bntest.c

buffertest_CPPFLAGS = $(AM_CPPFLAGS)
buffertest_SOURCES = buffertest.c
bytestringtest_SOURCES = bytestringtest.c
casttest_SOURCES = casttest.c
chachatest_SOURCES = chachatest.c
cipher_list_SOURCES = cipher_list.c
noinst_HEADERS = tests.h







>







1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
base64test_SOURCES = base64test.c
bftest_SOURCES = bftest.c
@ENABLE_EXTRATESTS_TRUE@biotest_SOURCES = biotest.c
bnaddsub_SOURCES = bnaddsub.c
bn_rand_interval_SOURCES = bn_rand_interval.c
bntest_CPPFLAGS = $(AM_CPPFLAGS) -ULIBRESSL_INTERNAL
bntest_SOURCES = bntest.c
bn_to_string_SOURCES = bn_to_string.c
buffertest_CPPFLAGS = $(AM_CPPFLAGS)
buffertest_SOURCES = buffertest.c
bytestringtest_SOURCES = bytestringtest.c
casttest_SOURCES = casttest.c
chachatest_SOURCES = chachatest.c
cipher_list_SOURCES = cipher_list.c
noinst_HEADERS = tests.h
1436
1437
1438
1439
1440
1441
1442




1443
1444
1445
1446
1447
1448
1449
biotest$(EXEEXT): $(biotest_OBJECTS) $(biotest_DEPENDENCIES) $(EXTRA_biotest_DEPENDENCIES) 
	@rm -f biotest$(EXEEXT)
	$(AM_V_CCLD)$(LINK) $(biotest_OBJECTS) $(biotest_LDADD) $(LIBS)

bn_rand_interval$(EXEEXT): $(bn_rand_interval_OBJECTS) $(bn_rand_interval_DEPENDENCIES) $(EXTRA_bn_rand_interval_DEPENDENCIES) 
	@rm -f bn_rand_interval$(EXEEXT)
	$(AM_V_CCLD)$(LINK) $(bn_rand_interval_OBJECTS) $(bn_rand_interval_LDADD) $(LIBS)





bnaddsub$(EXEEXT): $(bnaddsub_OBJECTS) $(bnaddsub_DEPENDENCIES) $(EXTRA_bnaddsub_DEPENDENCIES) 
	@rm -f bnaddsub$(EXEEXT)
	$(AM_V_CCLD)$(LINK) $(bnaddsub_OBJECTS) $(bnaddsub_LDADD) $(LIBS)

bntest$(EXEEXT): $(bntest_OBJECTS) $(bntest_DEPENDENCIES) $(EXTRA_bntest_DEPENDENCIES) 
	@rm -f bntest$(EXEEXT)







>
>
>
>







1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
biotest$(EXEEXT): $(biotest_OBJECTS) $(biotest_DEPENDENCIES) $(EXTRA_biotest_DEPENDENCIES) 
	@rm -f biotest$(EXEEXT)
	$(AM_V_CCLD)$(LINK) $(biotest_OBJECTS) $(biotest_LDADD) $(LIBS)

bn_rand_interval$(EXEEXT): $(bn_rand_interval_OBJECTS) $(bn_rand_interval_DEPENDENCIES) $(EXTRA_bn_rand_interval_DEPENDENCIES) 
	@rm -f bn_rand_interval$(EXEEXT)
	$(AM_V_CCLD)$(LINK) $(bn_rand_interval_OBJECTS) $(bn_rand_interval_LDADD) $(LIBS)

bn_to_string$(EXEEXT): $(bn_to_string_OBJECTS) $(bn_to_string_DEPENDENCIES) $(EXTRA_bn_to_string_DEPENDENCIES) 
	@rm -f bn_to_string$(EXEEXT)
	$(AM_V_CCLD)$(LINK) $(bn_to_string_OBJECTS) $(bn_to_string_LDADD) $(LIBS)

bnaddsub$(EXEEXT): $(bnaddsub_OBJECTS) $(bnaddsub_DEPENDENCIES) $(EXTRA_bnaddsub_DEPENDENCIES) 
	@rm -f bnaddsub$(EXEEXT)
	$(AM_V_CCLD)$(LINK) $(bnaddsub_OBJECTS) $(bnaddsub_LDADD) $(LIBS)

bntest$(EXEEXT): $(bntest_OBJECTS) $(bntest_DEPENDENCIES) $(EXTRA_bntest_DEPENDENCIES) 
	@rm -f bntest$(EXEEXT)
1728
1729
1730
1731
1732
1733
1734

1735
1736
1737
1738
1739
1740
1741
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/asn1evp.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/asn1test.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/asn1time.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/base64test.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bftest.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/biotest.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bn_rand_interval.Po@am__quote@ # am--include-marker

@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bnaddsub.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bntest-bntest.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/buffertest-buffertest.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bytestringtest.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/casttest.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/chachatest.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cipher_list.Po@am__quote@ # am--include-marker







>







1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/asn1evp.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/asn1test.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/asn1time.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/base64test.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bftest.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/biotest.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bn_rand_interval.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bn_to_string.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bnaddsub.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bntest-bntest.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/buffertest-buffertest.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bytestringtest.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/casttest.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/chachatest.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cipher_list.Po@am__quote@ # am--include-marker
2148
2149
2150
2151
2152
2153
2154







2155
2156
2157
2158
2159
2160
2161
	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
	--log-file $$b.log --trs-file $$b.trs \
	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
	"$$tst" $(AM_TESTS_FD_REDIRECT)
bntest.log: bntest$(EXEEXT)
	@p='bntest$(EXEEXT)'; \
	b='bntest'; \







	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
	--log-file $$b.log --trs-file $$b.trs \
	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
	"$$tst" $(AM_TESTS_FD_REDIRECT)
buffertest.log: buffertest$(EXEEXT)
	@p='buffertest$(EXEEXT)'; \
	b='buffertest'; \







>
>
>
>
>
>
>







2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
	--log-file $$b.log --trs-file $$b.trs \
	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
	"$$tst" $(AM_TESTS_FD_REDIRECT)
bntest.log: bntest$(EXEEXT)
	@p='bntest$(EXEEXT)'; \
	b='bntest'; \
	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
	--log-file $$b.log --trs-file $$b.trs \
	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
	"$$tst" $(AM_TESTS_FD_REDIRECT)
bn_to_string.log: bn_to_string$(EXEEXT)
	@p='bn_to_string$(EXEEXT)'; \
	b='bn_to_string'; \
	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
	--log-file $$b.log --trs-file $$b.trs \
	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
	"$$tst" $(AM_TESTS_FD_REDIRECT)
buffertest.log: buffertest$(EXEEXT)
	@p='buffertest$(EXEEXT)'; \
	b='buffertest'; \
2720
2721
2722
2723
2724
2725
2726

2727
2728
2729
2730
2731
2732
2733
	-rm -f ./$(DEPDIR)/asn1evp.Po
	-rm -f ./$(DEPDIR)/asn1test.Po
	-rm -f ./$(DEPDIR)/asn1time.Po
	-rm -f ./$(DEPDIR)/base64test.Po
	-rm -f ./$(DEPDIR)/bftest.Po
	-rm -f ./$(DEPDIR)/biotest.Po
	-rm -f ./$(DEPDIR)/bn_rand_interval.Po

	-rm -f ./$(DEPDIR)/bnaddsub.Po
	-rm -f ./$(DEPDIR)/bntest-bntest.Po
	-rm -f ./$(DEPDIR)/buffertest-buffertest.Po
	-rm -f ./$(DEPDIR)/bytestringtest.Po
	-rm -f ./$(DEPDIR)/casttest.Po
	-rm -f ./$(DEPDIR)/chachatest.Po
	-rm -f ./$(DEPDIR)/cipher_list.Po







>







2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
	-rm -f ./$(DEPDIR)/asn1evp.Po
	-rm -f ./$(DEPDIR)/asn1test.Po
	-rm -f ./$(DEPDIR)/asn1time.Po
	-rm -f ./$(DEPDIR)/base64test.Po
	-rm -f ./$(DEPDIR)/bftest.Po
	-rm -f ./$(DEPDIR)/biotest.Po
	-rm -f ./$(DEPDIR)/bn_rand_interval.Po
	-rm -f ./$(DEPDIR)/bn_to_string.Po
	-rm -f ./$(DEPDIR)/bnaddsub.Po
	-rm -f ./$(DEPDIR)/bntest-bntest.Po
	-rm -f ./$(DEPDIR)/buffertest-buffertest.Po
	-rm -f ./$(DEPDIR)/bytestringtest.Po
	-rm -f ./$(DEPDIR)/casttest.Po
	-rm -f ./$(DEPDIR)/chachatest.Po
	-rm -f ./$(DEPDIR)/cipher_list.Po
2843
2844
2845
2846
2847
2848
2849

2850
2851
2852
2853
2854
2855
2856
	-rm -f ./$(DEPDIR)/asn1evp.Po
	-rm -f ./$(DEPDIR)/asn1test.Po
	-rm -f ./$(DEPDIR)/asn1time.Po
	-rm -f ./$(DEPDIR)/base64test.Po
	-rm -f ./$(DEPDIR)/bftest.Po
	-rm -f ./$(DEPDIR)/biotest.Po
	-rm -f ./$(DEPDIR)/bn_rand_interval.Po

	-rm -f ./$(DEPDIR)/bnaddsub.Po
	-rm -f ./$(DEPDIR)/bntest-bntest.Po
	-rm -f ./$(DEPDIR)/buffertest-buffertest.Po
	-rm -f ./$(DEPDIR)/bytestringtest.Po
	-rm -f ./$(DEPDIR)/casttest.Po
	-rm -f ./$(DEPDIR)/chachatest.Po
	-rm -f ./$(DEPDIR)/cipher_list.Po







>







2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
	-rm -f ./$(DEPDIR)/asn1evp.Po
	-rm -f ./$(DEPDIR)/asn1test.Po
	-rm -f ./$(DEPDIR)/asn1time.Po
	-rm -f ./$(DEPDIR)/base64test.Po
	-rm -f ./$(DEPDIR)/bftest.Po
	-rm -f ./$(DEPDIR)/biotest.Po
	-rm -f ./$(DEPDIR)/bn_rand_interval.Po
	-rm -f ./$(DEPDIR)/bn_to_string.Po
	-rm -f ./$(DEPDIR)/bnaddsub.Po
	-rm -f ./$(DEPDIR)/bntest-bntest.Po
	-rm -f ./$(DEPDIR)/buffertest-buffertest.Po
	-rm -f ./$(DEPDIR)/bytestringtest.Po
	-rm -f ./$(DEPDIR)/casttest.Po
	-rm -f ./$(DEPDIR)/chachatest.Po
	-rm -f ./$(DEPDIR)/cipher_list.Po
Changes to jni/libressl/tests/base64test.c.
1
2
3
4
5
6
7
8
/*	$OpenBSD: base64test.c,v 1.5 2018/07/17 17:06:49 tb Exp $	*/
/*
 * Copyright (c) 2014 Joel Sing <jsing@openbsd.org>
 *
 * Permission to use, copy, modify, and distribute this software for any
 * purpose with or without fee is hereby granted, provided that the above
 * copyright notice and this permission notice appear in all copies.
 *
|







1
2
3
4
5
6
7
8
/*	$OpenBSD: base64test.c,v 1.6 2019/06/27 04:29:35 deraadt Exp $	*/
/*
 * Copyright (c) 2014 Joel Sing <jsing@openbsd.org>
 *
 * Permission to use, copy, modify, and distribute this software for any
 * purpose with or without fee is hereby granted, provided that the above
 * copyright notice and this permission notice appear in all copies.
 *
275
276
277
278
279
280
281



282
283
284
285
286
287
288

	input = (char *)bt->out;
	inlen = bt->out_len;

	if (test_nl)
		inlen = asprintf(&input, "%s\r\n", bt->out);




	bio_mem = BIO_new_mem_buf(input, inlen);
	if (bio_mem == NULL)
		errx(1, "BIO_new_mem_buf failed");

	bio_b64 = BIO_new(BIO_f_base64());
	if (bio_b64 == NULL)
		errx(1, "BIO_new failed for BIO_f_base64");







>
>
>







275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291

	input = (char *)bt->out;
	inlen = bt->out_len;

	if (test_nl)
		inlen = asprintf(&input, "%s\r\n", bt->out);

	if (inlen == -1)
		errx(1, "asprintf");

	bio_mem = BIO_new_mem_buf(input, inlen);
	if (bio_mem == NULL)
		errx(1, "BIO_new_mem_buf failed");

	bio_b64 = BIO_new(BIO_f_base64());
	if (bio_b64 == NULL)
		errx(1, "BIO_new failed for BIO_f_base64");
Added jni/libressl/tests/bn_to_string.c.








































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
/*	$OpenBSD: bn_to_string.c,v 1.1 2019/04/13 22:06:31 tb Exp $ */
/*
 * Copyright (c) 2019 Theo Buehler <tb@openbsd.org>
 *
 * Permission to use, copy, modify, and distribute this software for any
 * purpose with or without fee is hereby granted, provided that the above
 * copyright notice and this permission notice appear in all copies.
 *
 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 */

#include <err.h>
#include <stdio.h>
#include <string.h>

#include <openssl/bn.h>

char *bn_to_string(const BIGNUM *bn);

struct convert_st {
	const char	*input;
	const char	*expected;
};

struct convert_st testcases[] = {
	{"0", "0"},
	{"-0", "-0"},
	{"7", "7"},
	{"-7", "-7"},
	{"8", "8"},
	{"-8", "-8"},
	{"F", "15"},
	{"-F", "-15"},
	{"10", "16"},
	{"-10", "-16"},
	{"7F", "127"},
	{"-7F", "-127"},
	{"80", "128"},
	{"-80", "-128"},
	{"FF", "255"},
	{"-FF", "-255"},
	{"100", "256"},
	{"7FFF", "32767"},
	{"-7FFF", "-32767"},
	{"8000", "32768"},
	{"-8000", "-32768"},
	{"FFFF", "65535"},
	{"-FFFF", "-65535"},
	{"10000", "65536"},
	{"-10000", "-65536"},
	{"7FFFFFFF", "2147483647"},
	{"-7FFFFFFF", "-2147483647"},
	{"80000000", "2147483648"},
	{"-80000000", "-2147483648"},
	{"FFFFFFFF", "4294967295"},
	{"-FFFFFFFF", "-4294967295"},
	{"100000000", "4294967296"},
	{"-100000000", "-4294967296"},
	{"7FFFFFFFFFFFFFFF", "9223372036854775807"},
	{"-7FFFFFFFFFFFFFFF", "-9223372036854775807"},
	{"8000000000000000", "9223372036854775808"},
	{"-8000000000000000", "-9223372036854775808"},
	{"FFFFFFFFFFFFFFFF", "18446744073709551615"},
	{"-FFFFFFFFFFFFFFFF", "-18446744073709551615"},
	{"10000000000000000", "18446744073709551616"},
	{"-10000000000000000", "-18446744073709551616"},
	{"7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF",
	    "170141183460469231731687303715884105727"},
	{"-7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF",
	    "-170141183460469231731687303715884105727"},
	{"80000000000000000000000000000000",
	    "0x80000000000000000000000000000000"},
	{"-80000000000000000000000000000000",
	    "-0x80000000000000000000000000000000"},
	{"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF",
	    "0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF"},
	{"-FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF",
	    "-0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF"},
	{"100000000000000000000000000000000",
	    "0x0100000000000000000000000000000000"},
	{"-100000000000000000000000000000000",
	    "-0x0100000000000000000000000000000000"},
	{ NULL, NULL },
};

int
main(int argc, char *argv[])
{
	struct convert_st	*test;
	BIGNUM			*bn = NULL;
	char			*bnstr;
	int			 failed = 0;

	for (test = testcases; test->input != NULL; test++) {
		if (!BN_hex2bn(&bn, test->input))
			errx(1, "BN_hex2bn(%s)", test->input);
		if ((bnstr = bn_to_string(bn)) == NULL)
			errx(1, "bn_to_string(%s)", test->input);
		if (strcmp(bnstr, test->expected) != 0) {
			warnx("%s != %s", bnstr, test->expected);
			failed = 1;
		}
		free(bnstr);
	}

	BN_free(bn);

	printf("%s\n", failed ? "FAILED" : "SUCCESS");
	return failed;
}
Changes to jni/libressl/tests/bntest.c.
1
2
3
4
5
6
7
8
/*	$OpenBSD: bntest.c,v 1.20 2018/07/17 17:06:49 tb Exp $	*/
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
 * All rights reserved.
 *
 * This package is an SSL implementation written
 * by Eric Young (eay@cryptsoft.com).
 * The implementation was written so as to conform with Netscapes SSL.
 *
|







1
2
3
4
5
6
7
8
/*	$OpenBSD: bntest.c,v 1.21 2019/09/05 00:59:36 bluhm Exp $	*/
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
 * All rights reserved.
 *
 * This package is an SSL implementation written
 * by Eric Young (eay@cryptsoft.com).
 * The implementation was written so as to conform with Netscapes SSL.
 *
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
	if (p == 1)
		c = '+';
	if (p == 2)
		c = '*';
	if (p == 3)
		c = '\n';
	putc(c, stderr);
	fflush(stderr);
	return (1);
}

int
test_kron(BIO *bp, BN_CTX *ctx)
{
	BN_GENCB cb;







<







2024
2025
2026
2027
2028
2029
2030

2031
2032
2033
2034
2035
2036
2037
	if (p == 1)
		c = '+';
	if (p == 2)
		c = '*';
	if (p == 3)
		c = '\n';
	putc(c, stderr);

	return (1);
}

int
test_kron(BIO *bp, BN_CTX *ctx)
{
	BN_GENCB cb;
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
			fprintf(stderr, ", b = ");
			CHECK_GOTO(BN_print_fp(stderr, b));
			fprintf(stderr, "\n");
			goto err;
		}

		putc('.', stderr);
		fflush(stderr);
	}

	putc('\n', stderr);
	fflush(stderr);
	rc = 1;
err:
	BN_free(a);
	BN_free(b);
	BN_free(r);
	BN_free(t);
	return rc;







<



<







2111
2112
2113
2114
2115
2116
2117

2118
2119
2120

2121
2122
2123
2124
2125
2126
2127
			fprintf(stderr, ", b = ");
			CHECK_GOTO(BN_print_fp(stderr, b));
			fprintf(stderr, "\n");
			goto err;
		}

		putc('.', stderr);

	}

	putc('\n', stderr);

	rc = 1;
err:
	BN_free(a);
	BN_free(b);
	BN_free(r);
	BN_free(t);
	return rc;
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
				fprintf(stderr, ", p = ");
				CHECK_GOTO(BN_print_fp(stderr, p));
				fprintf(stderr, "\n");
				goto err;
			}

			putc('.', stderr);
			fflush(stderr);
		}

		putc('\n', stderr);
		fflush(stderr);
	}
	rc = 1;
err:
	BN_free(a);
	BN_free(p);
	BN_free(r);
	return rc;







<



<







2200
2201
2202
2203
2204
2205
2206

2207
2208
2209

2210
2211
2212
2213
2214
2215
2216
				fprintf(stderr, ", p = ");
				CHECK_GOTO(BN_print_fp(stderr, p));
				fprintf(stderr, "\n");
				goto err;
			}

			putc('.', stderr);

		}

		putc('\n', stderr);

	}
	rc = 1;
err:
	BN_free(a);
	BN_free(p);
	BN_free(r);
	return rc;
Changes to jni/libressl/tests/evptests.txt.
1
2
3
4
5
6
7
8
#	$OpenBSD: evptests.txt,v 1.6 2019/03/17 18:33:01 tb Exp $
#cipher:key:iv:plaintext:ciphertext:0/1(decrypt/encrypt)
#digest:::input:output

# SHA(1) tests (from shatest.c)
SHA1:::616263:a9993e364706816aba3e25717850c26c9cd0d89d

# MD5 tests (from md5test.c)
|







1
2
3
4
5
6
7
8
#	$OpenBSD: evptests.txt,v 1.7 2019/05/09 23:01:09 tb Exp $
#cipher:key:iv:plaintext:ciphertext:0/1(decrypt/encrypt)
#digest:::input:output

# SHA(1) tests (from shatest.c)
SHA1:::616263:a9993e364706816aba3e25717850c26c9cd0d89d

# MD5 tests (from md5test.c)
21
22
23
24
25
26
27

28
29
30
31
32
33
34
md_gost94::::981e5f3ca30c841487830f84fb433e13ac1101569b9c13584ac483234cd656c0
streebog512::::8e945da209aa869f0455928529bcae4679e9873ab707b55315f56ceb98bef0a7362f715528356ee83cda5f2aac4c6ad2ba3a715c1bcd81cb8e9f90bf4c1c1a8a
streebog256::::3f539a213e97c802cc229d474c6aa32a825a360b2a933a949fd925208d9ce1bb
streebog512:::303132333435363738393031323334353637383930313233343536373839303132333435363738393031323334353637383930313233343536373839303132:1b54d01a4af5b9d5cc3d86d68d285462b19abc2475222f35c085122be4ba1ffa00ad30f8767b3a82384c6574f024c311e2a481332b08ef7f41797891c1646f48
streebog256:::303132333435363738393031323334353637383930313233343536373839303132333435363738393031323334353637383930313233343536373839303132:9d151eefd8590b89daa6ba6cb74af9275dd051026bb149a452fd84e5e57b5500
streebog512:::d1e520e2e5f2f0e82c20d1f2f0e8e1eee6e820e2edf3f6e82c20e2e5fef2fa20f120eceef0ff20f1f2f0e5ebe0ece820ede020f5f0e0e1f0fbff20efebfaeafb20c8e3eef0e5e2fb:1e88e62226bfca6f9994f1f2d51569e0daf8475a3b0fe61a5300eee46d961376035fe83549ada2b8620fcd7c496ce5b33f0cb9dddc2b6460143b03dabac9fb28
streebog256:::d1e520e2e5f2f0e82c20d1f2f0e8e1eee6e820e2edf3f6e82c20e2e5fef2fa20f120eceef0ff20f1f2f0e5ebe0ece820ede020f5f0e0e1f0fbff20efebfaeafb20c8e3eef0e5e2fb:9dd2fe4e90409e5da87f53976d7405b0c0cac628fc669a741d50063c557e8f50


# AES 128 ECB tests (from FIPS-197 test vectors, encrypt)

AES-128-ECB:000102030405060708090A0B0C0D0E0F::00112233445566778899AABBCCDDEEFF:69C4E0D86A7B0430D8CDB78070B4C55A:1

# AES 192 ECB tests (from FIPS-197 test vectors, encrypt)








>







21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
md_gost94::::981e5f3ca30c841487830f84fb433e13ac1101569b9c13584ac483234cd656c0
streebog512::::8e945da209aa869f0455928529bcae4679e9873ab707b55315f56ceb98bef0a7362f715528356ee83cda5f2aac4c6ad2ba3a715c1bcd81cb8e9f90bf4c1c1a8a
streebog256::::3f539a213e97c802cc229d474c6aa32a825a360b2a933a949fd925208d9ce1bb
streebog512:::303132333435363738393031323334353637383930313233343536373839303132333435363738393031323334353637383930313233343536373839303132:1b54d01a4af5b9d5cc3d86d68d285462b19abc2475222f35c085122be4ba1ffa00ad30f8767b3a82384c6574f024c311e2a481332b08ef7f41797891c1646f48
streebog256:::303132333435363738393031323334353637383930313233343536373839303132333435363738393031323334353637383930313233343536373839303132:9d151eefd8590b89daa6ba6cb74af9275dd051026bb149a452fd84e5e57b5500
streebog512:::d1e520e2e5f2f0e82c20d1f2f0e8e1eee6e820e2edf3f6e82c20e2e5fef2fa20f120eceef0ff20f1f2f0e5ebe0ece820ede020f5f0e0e1f0fbff20efebfaeafb20c8e3eef0e5e2fb:1e88e62226bfca6f9994f1f2d51569e0daf8475a3b0fe61a5300eee46d961376035fe83549ada2b8620fcd7c496ce5b33f0cb9dddc2b6460143b03dabac9fb28
streebog256:::d1e520e2e5f2f0e82c20d1f2f0e8e1eee6e820e2edf3f6e82c20e2e5fef2fa20f120eceef0ff20f1f2f0e5ebe0ece820ede020f5f0e0e1f0fbff20efebfaeafb20c8e3eef0e5e2fb:9dd2fe4e90409e5da87f53976d7405b0c0cac628fc669a741d50063c557e8f50
streebog512:::000000000000000000000000000000000000000000000000000000000000000021ffffffffffffff7fffffffffff7bffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000000000000000000000000000000000000000000000b1cd42dd2900f900:efd5fec76e1e7929baebb85007ec80c9d565ac8fa5cb4f100749091afb943499ab5d408d11091f6eb278fa7d06e18cae63370a5570f041ecd14bb36eb262c82a

# AES 128 ECB tests (from FIPS-197 test vectors, encrypt)

AES-128-ECB:000102030405060708090A0B0C0D0E0F::00112233445566778899AABBCCDDEEFF:69C4E0D86A7B0430D8CDB78070B4C55A:1

# AES 192 ECB tests (from FIPS-197 test vectors, encrypt)

Changes to jni/libressl/tests/key_schedule.c.
1
2
3
4
5
6
7
8
/* $OpenBSD: key_schedule.c,v 1.6 2018/11/13 01:32:33 beck Exp $ */
/*
 * Copyright (c) 2018 Bob Beck <beck@openbsd.org>
 *
 * Permission to use, copy, modify, and distribute this software for any
 * purpose with or without fee is hereby granted, provided that the above
 * copyright notice and this permission notice appear in all copies.
 *
|







1
2
3
4
5
6
7
8
/* $OpenBSD: key_schedule.c,v 1.7 2019/05/09 05:47:27 claudio Exp $ */
/*
 * Copyright (c) 2018 Bob Beck <beck@openbsd.org>
 *
 * Permission to use, copy, modify, and distribute this software for any
 * purpose with or without fee is hereby granted, provided that the above
 * copyright notice and this permission notice appear in all copies.
 *
157
158
159
160
161
162
163
164


165
166
167
168
169
170
171
uint8_t expected_exporter_master[] = {
	0xfe, 0x22, 0xf8, 0x81, 0x17, 0x6e, 0xda, 0x18,
	0xeb, 0x8f, 0x44, 0x52, 0x9e, 0x67, 0x92, 0xc5,
	0x0c, 0x9a, 0x3f, 0x89, 0x45, 0x2f, 0x68, 0xd8,
	0xae, 0x31, 0x1b, 0x43, 0x09, 0xd3, 0xcf, 0x50
};

int main () {


	struct tls13_secrets *secrets;

	if ((secrets = tls13_secrets_create(EVP_sha256(), 0)) == NULL)
		errx(1,"failed to create secrets\n");

	secrets->insecure = 1; /* don't explicit_bzero when done */








|
>
>







157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
uint8_t expected_exporter_master[] = {
	0xfe, 0x22, 0xf8, 0x81, 0x17, 0x6e, 0xda, 0x18,
	0xeb, 0x8f, 0x44, 0x52, 0x9e, 0x67, 0x92, 0xc5,
	0x0c, 0x9a, 0x3f, 0x89, 0x45, 0x2f, 0x68, 0xd8,
	0xae, 0x31, 0x1b, 0x43, 0x09, 0xd3, 0xcf, 0x50
};

int
main (int argc, char **argv)
{
	struct tls13_secrets *secrets;

	if ((secrets = tls13_secrets_create(EVP_sha256(), 0)) == NULL)
		errx(1,"failed to create secrets\n");

	secrets->insecure = 1; /* don't explicit_bzero when done */

Changes to jni/libressl/tests/keypairtest.c.
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 */

#ifdef _MSC_VER
#define NO_REDEF_POSIX_FUNCTIONS
#endif

#include <sys/stat.h>

#include <err.h>
#include <fcntl.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>







<
<
<
<







11
12
13
14
15
16
17




18
19
20
21
22
23
24
 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 */





#include <sys/stat.h>

#include <err.h>
#include <fcntl.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
Changes to jni/libressl/tls/VERSION.
1
19:6:0
|
1
19:7:0
Changes to jni/libressl/tls/tls_config.c.
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 */

#ifdef _MSC_VER
#define NO_REDEF_POSIX_FUNCTIONS
#endif

#include <sys/stat.h>

#include <ctype.h>
#include <errno.h>
#include <fcntl.h>
#include <pthread.h>
#include <stdlib.h>







<
<
<
<







11
12
13
14
15
16
17




18
19
20
21
22
23
24
 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 */





#include <sys/stat.h>

#include <ctype.h>
#include <errno.h>
#include <fcntl.h>
#include <pthread.h>
#include <stdlib.h>
Changes to jni/libressl/tls/tls_server.c.
1
2
3
4
5
6
7
8
/* $OpenBSD: tls_server.c,v 1.44 2018/03/19 16:34:47 jsing Exp $ */
/*
 * Copyright (c) 2014 Joel Sing <jsing@openbsd.org>
 *
 * Permission to use, copy, modify, and distribute this software for any
 * purpose with or without fee is hereby granted, provided that the above
 * copyright notice and this permission notice appear in all copies.
 *
|







1
2
3
4
5
6
7
8
/* $OpenBSD: tls_server.c,v 1.45 2019/05/13 22:36:01 bcook Exp $ */
/*
 * Copyright (c) 2014 Joel Sing <jsing@openbsd.org>
 *
 * Permission to use, copy, modify, and distribute this software for any
 * purpose with or without fee is hereby granted, provided that the above
 * copyright notice and this permission notice appear in all copies.
 *
48
49
50
51
52
53
54

55

56
57
58
59
60
61
62
	struct tls *conn_ctx;

	if ((conn_ctx = tls_new()) == NULL)
		return (NULL);

	conn_ctx->flags |= TLS_SERVER_CONN;


	ctx->config->refcount++;


	conn_ctx->config = ctx->config;
	conn_ctx->keypair = ctx->config->keypair;

	return (conn_ctx);
}








>

>







48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
	struct tls *conn_ctx;

	if ((conn_ctx = tls_new()) == NULL)
		return (NULL);

	conn_ctx->flags |= TLS_SERVER_CONN;

	pthread_mutex_lock(&ctx->config->mutex);
	ctx->config->refcount++;
	pthread_mutex_unlock(&ctx->config->mutex);

	conn_ctx->config = ctx->config;
	conn_ctx->keypair = ctx->config->keypair;

	return (conn_ctx);
}

Changes to jni/libressl/tls/tls_util.c.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
/* $OpenBSD: tls_util.c,v 1.13 2019/04/04 15:10:10 jsing Exp $ */
/*
 * Copyright (c) 2014 Joel Sing <jsing@openbsd.org>
 * Copyright (c) 2014 Ted Unangst <tedu@openbsd.org>
 * Copyright (c) 2015 Reyk Floeter <reyk@openbsd.org>
 *
 * Permission to use, copy, modify, and distribute this software for any
 * purpose with or without fee is hereby granted, provided that the above
 * copyright notice and this permission notice appear in all copies.
 *
 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 */

#ifdef _MSC_VER
#define NO_REDEF_POSIX_FUNCTIONS
#endif

#include <sys/stat.h>

#include <stdlib.h>
#include <unistd.h>
#include <fcntl.h>

#include "tls.h"
|


















<
<
<
<







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19




20
21
22
23
24
25
26
/* $OpenBSD: tls_util.c,v 1.14 2019/04/13 18:47:58 tb Exp $ */
/*
 * Copyright (c) 2014 Joel Sing <jsing@openbsd.org>
 * Copyright (c) 2014 Ted Unangst <tedu@openbsd.org>
 * Copyright (c) 2015 Reyk Floeter <reyk@openbsd.org>
 *
 * Permission to use, copy, modify, and distribute this software for any
 * purpose with or without fee is hereby granted, provided that the above
 * copyright notice and this permission notice appear in all copies.
 *
 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 */





#include <sys/stat.h>

#include <stdlib.h>
#include <unistd.h>
#include <fcntl.h>

#include "tls.h"
102
103
104
105
106
107
108
109

110

111

112

113
114
115
116
117
118
119

	/* If there is another separator then we have issues. */
	if (strchr(p + 1, ':') != NULL)
		goto done;

	*p++ = '\0';

	if (asprintf(host, "%s", h) == -1)

		goto err;

	if (asprintf(port, "%s", p) == -1)

		goto err;


	rv = 0;
	goto done;

 err:
	free(*host);
	*host = NULL;







|
>

>
|
>

>







98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119

	/* If there is another separator then we have issues. */
	if (strchr(p + 1, ':') != NULL)
		goto done;

	*p++ = '\0';

	if (asprintf(host, "%s", h) == -1) {
		*host = NULL;
		goto err;
	}
	if (asprintf(port, "%s", p) == -1) {
		*port = NULL;
		goto err;
	}

	rv = 0;
	goto done;

 err:
	free(*host);
	*host = NULL;