sync code with last fixes and improvements from OpenBSD

This commit is contained in:
purplerain 2023-07-21 21:32:25 +00:00
parent 58b04bcee7
commit 58df21ce75
Signed by: purplerain
GPG key ID: F42C07F07E2E35B7
33 changed files with 383 additions and 312 deletions

View file

@ -1,69 +0,0 @@
.\" $OpenBSD: ASN1_buf_print.3,v 1.2 2023/07/09 06:45:03 tb Exp $
.\"
.\" Copyright (c) 2022 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 2023 $
.Dt ASN1_BUF_PRINT 3
.Os
.Sh NAME
.Nm ASN1_buf_print
.Nd pretty-print a byte array
.Sh SYNOPSIS
.In openssl/asn1.h
.Ft int
.Fo ASN1_buf_print
.Fa "BIO *bio_out"
.Fa "const unsigned char *buf"
.Fa "size_t buflen"
.Fa "int indent"
.Fc
.Sh DESCRIPTION
.Fn ASN1_buf_print
prints a hexadecimal representation of the first
.Fa buflen
bytes from
.Fa buf
to
.Fa bio_out .
Despite its name and the header file,
this function has nothing to do with ASN.1.
.Pp
Each byte from
.Fa buf
is represented by two lower-case hexadecimal digits.
Fifteen pairs of digits are printed per output line,
or at most fifteen on the last output line.
Every output line including the last one ends with a newline character.
Every pair except the last is followed by a colon
.Pq Sq \&: .
If
.Fa indent
is greater than zero,
every output line is indented by
.Fa indent
space characters, but not by more than 64 characters.
.Sh RETURN VALUES
.Fn ASN1_buf_print
returns 1 if successful or 0 if printing fails.
.Sh SEE ALSO
.Xr ASN1_item_print 3 ,
.Xr ASN1_STRING_print_ex 3 ,
.Xr ASN1_TIME_print 3 ,
.Xr BIO_new 3 ,
.Xr BIO_write 3
.Sh HISTORY
.Fn ASN1_buf_print
first appeared in OpenSSL 1.1.0 and has been available since
.Ox 7.3 .

View file

@ -1,4 +1,4 @@
.\" $OpenBSD: BIO_get_ex_new_index.3,v 1.13 2022/12/23 17:52:32 schwarze Exp $
.\" $OpenBSD: BIO_get_ex_new_index.3,v 1.14 2023/07/21 04:39:49 tb Exp $
.\" full merge up to: OpenSSL 61f805c1 Jan 16 01:01:46 2018 +0800
.\"
.\" This file was written by Rich Salz <rsalz@akamai.com>.
@ -48,7 +48,7 @@
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: December 23 2022 $
.Dd $Mdocdate: July 21 2023 $
.Dt BIO_GET_EX_NEW_INDEX 3
.Os
.Sh NAME
@ -68,13 +68,7 @@
.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
.Nm EC_KEY_set_ex_data
.Nd application-specific data
.Sh SYNOPSIS
.In openssl/bio.h
@ -82,8 +76,6 @@
.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"
@ -205,16 +197,6 @@ and
first appeared in OpenSSL 0.9.7 and have been available since
.Ox 3.2 .
.Pp
.Fn ECDH_get_ex_new_index ,
.Fn ECDH_set_ex_data ,
.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

View file

@ -1,4 +1,4 @@
.\" $OpenBSD: BIO_new.3,v 1.26 2022/12/23 15:59:34 schwarze Exp $
.\" $OpenBSD: BIO_new.3,v 1.27 2023/07/21 04:50:47 tb 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
@ -52,7 +52,7 @@
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: December 23 2022 $
.Dd $Mdocdate: July 21 2023 $
.Dt BIO_NEW 3
.Os
.Sh NAME
@ -228,7 +228,6 @@ Create a memory BIO:
.Pp
.Dl BIO *mem = BIO_new(BIO_s_mem());
.Sh SEE ALSO
.Xr ASN1_buf_print 3 ,
.Xr BIO_accept 3 ,
.Xr BIO_ctrl 3 ,
.Xr BIO_dump 3 ,

View file

@ -1,4 +1,4 @@
.\" $OpenBSD: BN_new.3,v 1.29 2023/07/20 09:38:45 tb Exp $
.\" $OpenBSD: BN_new.3,v 1.30 2023/07/21 05:04:48 tb 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
@ -50,7 +50,7 @@
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: July 20 2023 $
.Dd $Mdocdate: July 21 2023 $
.Dt BN_NEW 3
.Os
.Sh NAME
@ -142,6 +142,7 @@ and sets an error code that can be obtained by
.Xr BN_CTX_new 3 ,
.Xr BN_CTX_start 3 ,
.Xr BN_generate_prime 3 ,
.Xr BN_get_rfc3526_prime_8192 3 ,
.Xr BN_kronecker 3 ,
.Xr BN_mod_inverse 3 ,
.Xr BN_mod_mul_montgomery 3 ,
@ -154,8 +155,7 @@ and sets an error code that can be obtained by
.Xr BN_set_negative 3 ,
.Xr BN_swap 3 ,
.Xr BN_zero 3 ,
.Xr crypto 3 ,
.Xr BN_get_rfc3526_prime_8192 3
.Xr crypto 3
.Sh HISTORY
.Fn BN_new ,
.Fn BN_clear ,

View file

@ -1,4 +1,4 @@
.\" $OpenBSD: CONF_modules_free.3,v 1.5 2018/03/22 21:08:22 schwarze Exp $
.\" $OpenBSD: CONF_modules_free.3,v 1.6 2023/07/21 10:46:54 tb Exp $
.\" OpenSSL a528d4f0 Oct 27 13:40:11 2015 -0400
.\"
.\" This file was written by Dr. Stephen Henson <steve@openssl.org>.
@ -48,7 +48,7 @@
.\" 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 $
.Dd $Mdocdate: July 21 2023 $
.Dt CONF_MODULES_FREE 3
.Os
.Sh NAME
@ -87,10 +87,7 @@ that module may have performed.
finishes and unloads configuration modules.
If
.Fa all
is set to 0, only modules loaded from DSOs will be unloaded.
If
.Fa all
is 1, all modules, including builtin modules, will be unloaded.
is set to 1, the builtin modules will be unloaded as well.
.Sh SEE ALSO
.Xr CONF_modules_load_file 3 ,
.Xr OPENSSL_config 3

View file

@ -1,4 +1,4 @@
.\" $OpenBSD: CONF_modules_load_file.3,v 1.10 2021/08/03 18:49:30 schwarze Exp $
.\" $OpenBSD: CONF_modules_load_file.3,v 1.11 2023/07/21 10:46:54 tb Exp $
.\" full merge up to: e9b77246 Jan 20 19:58:49 2017 +0100
.\" selective merge up to: d090fc00 Feb 26 13:11:10 2019 +0800
.\"
@ -66,7 +66,7 @@
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: August 3 2021 $
.Dd $Mdocdate: July 21 2023 $
.Dt CONF_MODULES_LOAD_FILE 3
.Os
.Sh NAME
@ -143,6 +143,7 @@ Do not add any error information.
By default, all module errors add error information to the error queue.
.It Dv CONF_MFLAGS_NO_DSO
Disable loading of configuration modules from DSOs.
This flag is provided for compatibility and has no effect.
.It Dv CONF_MFLAGS_IGNORE_MISSING_FILE
Let
.Fn CONF_modules_load_file

View file

@ -1,4 +1,4 @@
.\" $OpenBSD: ECDSA_SIG_new.3,v 1.18 2023/07/20 09:28:30 tb Exp $
.\" $OpenBSD: ECDSA_SIG_new.3,v 1.19 2023/07/21 04:44:40 tb 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
.\"
@ -50,7 +50,7 @@
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: July 20 2023 $
.Dd $Mdocdate: July 21 2023 $
.Dt ECDSA_SIG_NEW 3
.Os
.Sh NAME
@ -66,11 +66,7 @@
.Nm ECDSA_sign ,
.Nm ECDSA_verify ,
.Nm ECDSA_do_sign ,
.Nm ECDSA_do_verify ,
.Nm ECDSA_OpenSSL ,
.Nm ECDSA_get_default_method ,
.Nm ECDSA_set_default_method ,
.Nm ECDSA_set_method
.Nm ECDSA_do_verify
.Nd Elliptic Curve Digital Signature Algorithm
.Sh SYNOPSIS
.In openssl/ecdsa.h
@ -148,23 +144,6 @@
.Fa "const ECDSA_SIG *sig"
.Fa "EC_KEY* eckey"
.Fc
.Ft const ECDSA_METHOD*
.Fo ECDSA_OpenSSL
.Fa void
.Fc
.Ft const ECDSA_METHOD*
.Fo ECDSA_get_default_method
.Fa void
.Fc
.Ft void
.Fo ECDSA_set_default_method
.Fa "const ECDSA_METHOD *meth"
.Fc
.Ft int
.Fo ECDSA_set_method
.Fa "EC_KEY *eckey"
.Fa "const ECDSA_METHOD *meth"
.Fc
.Sh DESCRIPTION
These functions provide a low level interface to ECDSA.
Most applications should use the higher level EVP interface such as
@ -453,12 +432,8 @@ ANSI X9.62, US Federal Information Processing Standard FIPS 186-5
.Fn ECDSA_sign ,
.Fn ECDSA_verify ,
.Fn ECDSA_do_sign ,
.Fn ECDSA_do_verify ,
.Fn ECDSA_OpenSSL ,
.Fn ECDSA_get_default_method ,
.Fn ECDSA_set_default_method ,
and
.Fn ECDSA_set_method
.Fn ECDSA_do_verify
first appeared in OpenSSL 0.9.8 and have been available since
.Ox 4.5 .
.Pp

View file

@ -1,4 +1,4 @@
.\" $OpenBSD: ENGINE_get_default_RSA.3,v 1.3 2023/07/20 09:28:30 tb Exp $
.\" $OpenBSD: ENGINE_get_default_RSA.3,v 1.4 2023/07/21 04:35:36 tb Exp $
.\" content checked up to:
.\" OpenSSL ENGINE_add 1f13ad31 Dec 25 17:50:39 2017 +0800
.\"
@ -16,14 +16,13 @@
.\" 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 20 2023 $
.Dd $Mdocdate: July 21 2023 $
.Dt ENGINE_GET_DEFAULT_RSA 3
.Os
.Sh NAME
.Nm ENGINE_get_default_RSA ,
.Nm ENGINE_get_default_DSA ,
.Nm ENGINE_get_default_ECDH ,
.Nm ENGINE_get_default_ECDSA ,
.Nm ENGINE_get_default_EC ,
.Nm ENGINE_get_default_DH ,
.Nm ENGINE_get_default_RAND ,
.Nm ENGINE_get_cipher_engine ,
@ -38,9 +37,7 @@
.Ft ENGINE *
.Fn ENGINE_get_default_DSA void
.Ft ENGINE *
.Fn ENGINE_get_default_ECDH void
.Ft ENGINE *
.Fn ENGINE_get_default_ECDSA void
.Fn ENGINE_get_default_EC void
.Ft ENGINE *
.Fn ENGINE_get_default_DH void
.Ft ENGINE *
@ -104,11 +101,7 @@ Application programs rarely need to call these functions because
they are called automatically when needed, in particular from
.Xr RSA_new 3 ,
.Xr DSA_new 3 ,
.Fn ECDH_set_method ,
.Fn ECDH_compute_key ,
.Xr ECDSA_set_method 3 ,
.Xr ECDSA_do_sign 3 ,
.Xr ECDSA_do_verify 3 ,
.Xr EC_KEY_new 3 ,
.Xr DH_new 3 ,
.Xr EVP_CipherInit_ex 3 ,
and
@ -153,8 +146,6 @@ and
first appeared in OpenSSL 0.9.7 and have been available since
.Ox 3.2 .
.Pp
.Fn ENGINE_get_default_ECDH
and
.Fn ENGINE_get_default_ECDSA
first appeared in OpenSSL 0.9.8 and have been available since
.Ox 4.5 .
.Fn ENGINE_get_default_EC
first appeared in OpenSSL 1.1.0 and has been available since
.Ox 6.5 .

View file

@ -1,4 +1,4 @@
.\" $OpenBSD: ENGINE_set_RSA.3,v 1.6 2023/07/20 09:28:30 tb Exp $
.\" $OpenBSD: ENGINE_set_RSA.3,v 1.7 2023/07/21 04:29:27 tb Exp $
.\" content checked up to:
.\" OpenSSL ENGINE_add 1f13ad31 Dec 25 17:50:39 2017 +0800
.\"
@ -16,7 +16,7 @@
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
.Dd $Mdocdate: July 20 2023 $
.Dd $Mdocdate: July 21 2023 $
.Dt ENGINE_SET_RSA 3
.Os
.Sh NAME
@ -24,10 +24,8 @@
.Nm ENGINE_get_RSA ,
.Nm ENGINE_set_DSA ,
.Nm ENGINE_get_DSA ,
.Nm ENGINE_set_ECDH ,
.Nm ENGINE_get_ECDH ,
.Nm ENGINE_set_ECDSA ,
.Nm ENGINE_get_ECDSA ,
.Nm ENGINE_set_EC ,
.Nm ENGINE_get_EC ,
.Nm ENGINE_set_DH ,
.Nm ENGINE_get_DH ,
.Nm ENGINE_set_RAND ,
@ -62,21 +60,12 @@
.Fa "const ENGINE *e"
.Fc
.Ft int
.Fo ENGINE_set_ECDH
.Fo ENGINE_set_EC
.Fa "ENGINE *e"
.Fa "const ECDH_METHOD *dh_meth"
.Fa "const EC_KEY_METHOD *ec_meth"
.Fc
.Ft const ECDH_METHOD *
.Fo ENGINE_get_ECDH
.Fa "const ENGINE *e"
.Fc
.Ft int
.Fo ENGINE_set_ECDSA
.Fa "ENGINE *e"
.Fa "const ECDSA_METHOD *dh_meth"
.Fc
.Ft const ECDSA_METHOD *
.Fo ENGINE_get_ECDSA
.Ft const EC_KEY_METHOD *
.Fo ENGINE_get_EC
.Fa "const ENGINE *e"
.Fc
.Ft int
@ -159,8 +148,7 @@ Partial information about the various method objects is available from
.Xr RSA_get_default_method 3 ,
.Xr DSA_meth_new 3 ,
.Xr DSA_get_default_method 3 ,
.Fn ECDH_get_default_method ,
.Xr ECDSA_get_default_method 3 ,
.Xr EC_KEY_get_default_method 3 ,
.Xr DH_get_default_method 3 ,
.Xr RAND_get_rand_method 3 ,
.Xr EVP_get_cipherbynid 3 ,
@ -237,9 +225,8 @@ as shown in the following table:
.It Accessor: Ta Called by:
.It Fn ENGINE_get_RSA Ta Xr RSA_new_method 3 , Xr RSA_new 3
.It Fn ENGINE_get_DSA Ta Xr DSA_new_method 3 , Xr DSA_new 3
.It Fn ENGINE_get_ECDH Ta Fn ECDH_set_method , Fn ECDH_compute_key
.It Fn ENGINE_get_ECDSA Ta Xr ECDSA_set_method 3 ,
.Xr ECDSA_do_sign 3 , Xr ECDSA_do_verify 3
.It Fn ENGINE_get_EC Ta Xr EC_KEY_new_method 3 , Xr EC_KEY_new 3 ,
.Xr EC_KEY_new_by_curve_name 3
.It Fn ENGINE_get_DH Ta Xr DH_new_method 3 , Xr DH_new 3
.It Fn ENGINE_get_RAND Ta unused
.It Fn ENGINE_get_STORE Ta unused
@ -318,12 +305,13 @@ and
first appeared in OpenSSL 0.9.7 and have been available since
.Ox 3.2 .
.Pp
.Fn ENGINE_set_ECDH ,
.Fn ENGINE_get_ECDH ,
.Fn ENGINE_set_ECDSA ,
.Fn ENGINE_get_ECDSA ,
.Fn ENGINE_set_STORE ,
.Fn ENGINE_set_STORE
and
.Fn ENGINE_get_STORE
first appeared in OpenSSL 0.9.8 and have been available since
.Ox 4.5 .
.Fn ENGINE_set_EC
and
.Fn ENGINE_get_EC
first appeared in OpenSSL 1.1.0 and have been available since
.Ox 6.5 .

View file

@ -1,4 +1,4 @@
.\" $OpenBSD: ERR_load_crypto_strings.3,v 1.10 2021/11/11 13:13:38 schwarze Exp $
.\" $OpenBSD: ERR_load_crypto_strings.3,v 1.11 2023/07/21 10:45:44 tb Exp $
.\" full merge up to: OpenSSL f672aee4 Feb 9 11:52:40 2016 -0500
.\" selective merge up to: OpenSSL b3696a55 Sep 2 09:35:50 2017 -0400
.\"
@ -66,7 +66,7 @@
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: November 11 2021 $
.Dd $Mdocdate: July 21 2023 $
.Dt ERR_LOAD_CRYPTO_STRINGS 3
.Os
.Sh NAME
@ -86,11 +86,7 @@
.\" ERR_load_CRYPTO_strings()
.\" ERR_load_DH_strings()
.\" ERR_load_DSA_strings()
.\" ERR_load_DSO_strings()
.\" ERR_load_EC_strings()
.\" ERR_load_ECDH_strings()
.\" ERR_load_ECDSA_strings()
.\" ERR_load_ENGINE_strings()
.\" ERR_load_ERR_strings()
.\" ERR_load_EVP_strings()
.\" ERR_load_GOST_strings()

View file

@ -1,4 +1,4 @@
# $OpenBSD: Makefile,v 1.254 2023/07/20 16:26:40 tb Exp $
# $OpenBSD: Makefile,v 1.255 2023/07/21 04:50:47 tb Exp $
.include <bsd.own.mk>
@ -18,7 +18,6 @@ MAN= \
ASN1_TIME_set.3 \
ASN1_TYPE_get.3 \
ASN1_UNIVERSALSTRING_to_string.3 \
ASN1_buf_print.3 \
ASN1_generate_nconf.3 \
ASN1_get_object.3 \
ASN1_item_d2i.3 \

View file

@ -1,4 +1,4 @@
.\" $OpenBSD: OBJ_NAME_add.3,v 1.3 2022/09/10 10:22:46 jsg Exp $
.\" $OpenBSD: OBJ_NAME_add.3,v 1.4 2023/07/21 05:02:53 tb Exp $
.\"
.\" Copyright (c) 2021 Ingo Schwarze <schwarze@openbsd.org>
.\"
@ -14,7 +14,7 @@
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
.Dd $Mdocdate: September 10 2022 $
.Dd $Mdocdate: July 21 2023 $
.Dt OBJ_NAME_ADD 3
.Os
.Sh NAME
@ -315,7 +315,6 @@ representing the new type or 0 if memory allocation fails.
.Xr EVP_get_cipherbyname 3 ,
.Xr EVP_get_digestbyname 3 ,
.Xr lh_new 3 ,
.Xr OBJ_add_sigid 3 ,
.Xr OBJ_create 3 ,
.Xr OBJ_nid2obj 3
.Sh BUGS

View file

@ -1,4 +1,4 @@
.\" $OpenBSD: OBJ_add_sigid.3,v 1.1 2021/12/18 17:47:45 schwarze Exp $
.\" $OpenBSD: OBJ_add_sigid.3,v 1.2 2023/07/21 05:02:53 tb Exp $
.\"
.\" Copyright (c) 2021 Ingo Schwarze <schwarze@openbsd.org>
.\"
@ -14,26 +14,16 @@
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
.Dd $Mdocdate: December 18 2021 $
.Dd $Mdocdate: July 21 2023 $
.Dt OBJ_ADD_SIGID 3
.Os
.Sh NAME
.Nm OBJ_add_sigid ,
.Nm OBJ_sigid_free ,
.Nm OBJ_find_sigid_algs ,
.Nm OBJ_find_sigid_by_algs
.Nd signature algorithm mappings
.Sh SYNOPSIS
.In openssl/objects.h
.Ft int
.Fo OBJ_add_sigid
.Fa "int signature"
.Fa "int digest"
.Fa "int encryption"
.Fc
.Ft void
.Fn OBJ_sigid_free void
.Ft int
.Fo OBJ_find_sigid_algs
.Fa "int signature"
.Fa "int *pdigest"
@ -46,25 +36,6 @@
.Fa "int encryption"
.Fc
.Sh DESCRIPTION
.Fn OBJ_add_sigid
defines the
.Fa signature
algorithm to use the specified
.Fa digest
and
.Fa encryption
algorithms.
Making sure that this does not conflict with earlier invocations of
.Fn OBJ_add_sigid
is the responsibility of the caller.
Definitions made with
.Fn OBJ_add_sigid
take precedence over definitions built into the library.
.Pp
.Fn OBJ_sigid_free
deletes all definitions made with
.Fn OBJ_add_sigid .
.Pp
.Fn OBJ_find_sigid_algs
looks up the
.Fa signature
@ -94,16 +65,12 @@ is a
.Dv NULL
pointer.
.Sh RETURN VALUES
.Fn OBJ_add_sigid
returns 1 on success or 0 if memory allocation fails.
.Pp
.Fn OBJ_find_sigid_algs
returns 1 if a definition of the
.Fa signature
algorithm is found or 0 if a definition of the
.Fa signature
algorithm is neither built into the library nor provided with
.Fn OBJ_add_sigid .
algorithm is not built into the library.
.Pp
.Fn OBJ_find_sigid_by_algs
returns 1 if a signature algorithm using the specified
@ -111,8 +78,7 @@ returns 1 if a signature algorithm using the specified
and
.Fa encryption
algorithms is defined or 0 if the definition of such an algorithm
is neither built into the library nor provided with
.Fn OBJ_add_sigid .
is not built into the library.
.Sh SEE ALSO
.Xr EVP_cleanup 3 ,
.Xr OBJ_create 3 ,

View file

@ -1,4 +1,4 @@
.\" $OpenBSD: OBJ_create.3,v 1.6 2022/01/01 02:06:07 jsg Exp $
.\" $OpenBSD: OBJ_create.3,v 1.7 2023/07/21 05:02:53 tb Exp $
.\" full merge up to:
.\" OpenSSL OBJ_nid2obj.pod 9b86974e Aug 17 15:21:33 2015 -0400
.\" selective merge up to:
@ -69,7 +69,7 @@
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: January 1 2022 $
.Dd $Mdocdate: July 21 2023 $
.Dt OBJ_CREATE 3
.Os
.Sh NAME
@ -253,7 +253,6 @@ obj = OBJ_nid2obj(new_nid);
.Sh SEE ALSO
.Xr ASN1_OBJECT_new 3 ,
.Xr EVP_cleanup 3 ,
.Xr OBJ_add_sigid 3 ,
.Xr OBJ_NAME_add 3 ,
.Xr OBJ_nid2obj 3
.Sh HISTORY

View file

@ -1,4 +1,4 @@
.\" $OpenBSD: OBJ_nid2obj.3,v 1.19 2022/03/31 17:27:17 naddy Exp $
.\" $OpenBSD: OBJ_nid2obj.3,v 1.20 2023/07/21 05:02:53 tb Exp $
.\" full merge up to: OpenSSL c264592d May 14 11:28:00 2006 +0000
.\" selective merge up to: OpenSSL 35fd9953 May 28 14:49:38 2019 +0200
.\"
@ -67,7 +67,7 @@
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: March 31 2022 $
.Dd $Mdocdate: July 21 2023 $
.Dt OBJ_NID2OBJ 3
.Os
.Sh NAME
@ -389,7 +389,6 @@ obj = OBJ_txt2obj("1.2.3.4", 1);
.Xr ASN1_OBJECT_new 3 ,
.Xr BIO_new 3 ,
.Xr d2i_ASN1_OBJECT 3 ,
.Xr OBJ_add_sigid 3 ,
.Xr OBJ_create 3 ,
.Xr OBJ_NAME_add 3
.Sh HISTORY

View file

@ -1,4 +1,4 @@
.\" $OpenBSD: OpenSSL_add_all_algorithms.3,v 1.11 2021/12/18 17:47:45 schwarze Exp $
.\" $OpenBSD: OpenSSL_add_all_algorithms.3,v 1.12 2023/07/21 05:02:53 tb 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>.
@ -48,7 +48,7 @@
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: December 18 2021 $
.Dd $Mdocdate: July 21 2023 $
.Dt OPENSSL_ADD_ALL_ALGORITHMS 3
.Os
.Sh NAME
@ -100,12 +100,10 @@ only the first call has an effect.
.Fn EVP_cleanup
removes all ciphers and digests from the table and also calls
.Xr OBJ_NAME_cleanup 3
with an argument of \-1 and
.Xr OBJ_sigid_free 3 ,
with an argument of \-1 ,
thus resetting the global associative array of names
and all signature algorithm definitions to their default states,
removing all application-defined types, key-value pairs, aliases,
and signature algorithm definitions,
removing all application-defined types, key-value pairs, and aliases,
including any that are unrelated to the EVP library.
.Sh SEE ALSO
.Xr evp 3 ,
@ -113,7 +111,6 @@ including any that are unrelated to the EVP library.
.Xr EVP_EncryptInit 3 ,
.Xr OBJ_cleanup 3 ,
.Xr OBJ_NAME_add 3 ,
.Xr OBJ_sigid_free 3 ,
.Xr OPENSSL_config 3
.Sh HISTORY
.Fn EVP_cleanup