xref: /openbsd-src/lib/libcrypto/man/OBJ_find_sigid_algs.3 (revision fe9ac7b09157e97ae2148a9610f5f1614d1d4f79)
1*fe9ac7b0Stb.\" $OpenBSD: OBJ_find_sigid_algs.3,v 1.2 2024/01/31 08:02:53 tb Exp $
2c8397f34Stb.\"
3c8397f34Stb.\" Copyright (c) 2021 Ingo Schwarze <schwarze@openbsd.org>
4c8397f34Stb.\"
5c8397f34Stb.\" Permission to use, copy, modify, and distribute this software for any
6c8397f34Stb.\" purpose with or without fee is hereby granted, provided that the above
7c8397f34Stb.\" copyright notice and this permission notice appear in all copies.
8c8397f34Stb.\"
9c8397f34Stb.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10c8397f34Stb.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11c8397f34Stb.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12c8397f34Stb.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13c8397f34Stb.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14c8397f34Stb.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
15c8397f34Stb.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
16c8397f34Stb.\"
17*fe9ac7b0Stb.Dd $Mdocdate: January 31 2024 $
18c8397f34Stb.Dt OBJ_FIND_SIGID_ALGS 3
19c8397f34Stb.Os
20c8397f34Stb.Sh NAME
21c8397f34Stb.Nm OBJ_find_sigid_algs ,
22c8397f34Stb.Nm OBJ_find_sigid_by_algs
23c8397f34Stb.Nd signature algorithm mappings
24c8397f34Stb.Sh SYNOPSIS
25c8397f34Stb.In openssl/objects.h
26c8397f34Stb.Ft int
27c8397f34Stb.Fo OBJ_find_sigid_algs
28c8397f34Stb.Fa "int signature"
29c8397f34Stb.Fa "int *pdigest"
30c8397f34Stb.Fa "int *pencryption"
31c8397f34Stb.Fc
32c8397f34Stb.Ft int
33c8397f34Stb.Fo OBJ_find_sigid_by_algs
34c8397f34Stb.Fa "int *psignature"
35c8397f34Stb.Fa "int digest"
36c8397f34Stb.Fa "int encryption"
37c8397f34Stb.Fc
38c8397f34Stb.Sh DESCRIPTION
39c8397f34Stb.Fn OBJ_find_sigid_algs
40c8397f34Stblooks up the
41c8397f34Stb.Fa signature
42c8397f34Stbalgorithm.
43c8397f34StbIf it is found, the associated digest algorithm is stored in
44c8397f34Stb.Pf * Fa pdigest
45c8397f34Stbunless
46c8397f34Stb.Fa pdigest
47c8397f34Stbis a
48c8397f34Stb.Dv NULL
49c8397f34Stbpointer, and the associated encryption algorithm is stored in
50c8397f34Stb.Pf * Fa pencryption
51c8397f34Stbunless
52c8397f34Stb.Fa pencryption
53c8397f34Stbis a
54c8397f34Stb.Dv NULL
55c8397f34Stbpointer.
56c8397f34Stb.Pp
57c8397f34Stb.Fn OBJ_find_sigid_by_algs
58c8397f34Stblooks up the pair
59c8397f34Stb.Pq Fa digest , encryption .
60c8397f34StbIf it is found, the associated signature algorithm is stored in
61c8397f34Stb.Pf * Fa psignature
62c8397f34Stbunless
63c8397f34Stb.Fa psignature
64c8397f34Stbis a
65c8397f34Stb.Dv NULL
66c8397f34Stbpointer.
67c8397f34Stb.Sh RETURN VALUES
68c8397f34Stb.Fn OBJ_find_sigid_algs
69c8397f34Stbreturns 1 if a definition of the
70c8397f34Stb.Fa signature
71c8397f34Stbalgorithm is found or 0 if a definition of the
72c8397f34Stb.Fa signature
73c8397f34Stbalgorithm is not built into the library.
74c8397f34Stb.Pp
75c8397f34Stb.Fn OBJ_find_sigid_by_algs
76c8397f34Stbreturns 1 if a signature algorithm using the specified
77c8397f34Stb.Fa digest
78c8397f34Stband
79c8397f34Stb.Fa encryption
80c8397f34Stbalgorithms is defined or 0 if the definition of such an algorithm
81c8397f34Stbis not built into the library.
82c8397f34Stb.Sh SEE ALSO
83c8397f34Stb.Xr EVP_cleanup 3 ,
84c8397f34Stb.Xr OBJ_create 3 ,
85c8397f34Stb.Xr OBJ_nid2obj 3
86c8397f34Stb.Sh HISTORY
87c8397f34StbThese functions first appeared in OpenSSL 1.0.0
88c8397f34Stband have been available since
89c8397f34Stb.Ox 4.9 .
90