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