Debian Codegraph @

upstream/debian-unstable/man3/EVP_SKEYMGMT.3ssl

raw
1 .\" -*- mode: troff; coding: utf-8 -*-
2 .\" Automatically generated by Pod::Man 5.0102 (Pod::Simple 3.45)
3 .\"
4 .\" Standard preamble:
5 .\" ========================================================================
6 .de Sp \" Vertical space (when we can't use .PP)
7 .if t .sp .5v
8 .if n .sp
9 ..
10 .de Vb \" Begin verbatim text
11 .ft CW
12 .nf
13 .ne \\$1
14 ..
15 .de Ve \" End verbatim text
16 .ft R
17 .fi
18 ..
19 .\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>.
20 .ie n \{\
21 . ds C` ""
22 . ds C' ""
23 'br\}
24 .el\{\
25 . ds C`
26 . ds C'
27 'br\}
28 .\"
29 .\" Escape single quotes in literal strings from groff's Unicode transform.
30 .ie \n(.g .ds Aq \(aq
31 .el .ds Aq '
32 .\"
33 .\" If the F register is >0, we'll generate index entries on stderr for
34 .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
35 .\" entries marked with X<> in POD. Of course, you'll have to process the
36 .\" output yourself in some meaningful fashion.
37 .\"
38 .\" Avoid warning from groff about undefined register 'F'.
39 .de IX
40 ..
41 .nr rF 0
42 .if \n(.g .if rF .nr rF 1
43 .if (\n(rF:(\n(.g==0)) \{\
44 . if \nF \{\
45 . de IX
46 . tm Index:\\$1\t\\n%\t"\\$2"
47 ..
48 . if !\nF==2 \{\
49 . nr % 0
50 . nr F 2
51 . \}
52 . \}
53 .\}
54 .rr rF
55 .\" ========================================================================
56 .\"
57 .IX Title "EVP_SKEYMGMT 3SSL"
58 .TH EVP_SKEYMGMT 3SSL 2026-04-07 3.6.2 OpenSSL
59 .\" For nroff, turn off justification. Always turn off hyphenation; it makes
60 .\" way too many mistakes in technical documents.
61 .if n .ad l
62 .nh
63 .SH NAME
64 EVP_SKEYMGMT,
65 EVP_SKEYMGMT_fetch,
66 EVP_SKEYMGMT_up_ref,
67 EVP_SKEYMGMT_free,
68 EVP_SKEYMGMT_get0_provider,
69 EVP_SKEYMGMT_is_a,
70 EVP_SKEYMGMT_get0_description,
71 EVP_SKEYMGMT_get0_name,
72 EVP_SKEYMGMT_do_all_provided,
73 EVP_SKEYMGMT_names_do_all,
74 EVP_SKEYMGMT_get0_gen_settable_params,
75 EVP_SKEYMGMT_get0_imp_settable_params
76 \&\- EVP key management routines for opaque symmetric keys
77 .SH SYNOPSIS
78 .IX Header "SYNOPSIS"
79 .Vb 1
80 \& #include <openssl/evp.h>
81 \&
82 \& typedef struct evp_sskeymgmt_st EVP_SKEYMGMT;
83 \&
84 \& EVP_SKEYMGMT *EVP_SKEYMGMT_fetch(OSSL_LIB_CTX *ctx, const char *algorithm,
85 \& const char *properties);
86 \& int EVP_SKEYMGMT_up_ref(EVP_SKEYMGMT *skeymgmt);
87 \& void EVP_SKEYMGMT_free(EVP_SKEYMGMT *skeymgmt);
88 \& const OSSL_PROVIDER *EVP_SKEYMGMT_get0_provider(const EVP_SKEYMGMT *skeymgmt);
89 \& int EVP_SKEYMGMT_is_a(const EVP_SKEYMGMT *skeymgmt, const char *name);
90 \& const char *EVP_SKEYMGMT_get0_name(const EVP_SKEYMGMT *skeymgmt);
91 \& const char *EVP_SKEYMGMT_get0_description(const EVP_SKEYMGMT *skeymgmt);
92 \&
93 \& void EVP_SKEYMGMT_do_all_provided(OSSL_LIB_CTX *libctx,
94 \& void (*fn)(EVP_SKEYMGMT *skeymgmt, void *arg),
95 \& void *arg);
96 \& int EVP_SKEYMGMT_names_do_all(const EVP_SKEYMGMT *skeymgmt,
97 \& void (*fn)(const char *name, void *data),
98 \& void *data);
99 \& const OSSL_PARAM *EVP_SKEYMGMT_get0_gen_settable_params(const EVP_SKEYMGMT *skeymgmt);
100 \& const OSSL_PARAM *EVP_SKEYMGMT_get0_imp_settable_params(const EVP_SKEYMGMT *skeymgmt);
101 .Ve
102 .SH DESCRIPTION
103 .IX Header "DESCRIPTION"
104 \&\fBEVP_SKEYMGMT\fR is a method object that represents symmetric key management
105 implementations for different cryptographic algorithms. This method object
106 provides functionality to allow providers to import key material from the
107 outside, as well as export key material to the outside.
108 .PP
109 Most of the functionality can only be used internally and has no public
110 interface, this opaque object is simply passed into other functions when
111 needed.
112 .PP
113 \&\fBEVP_SKEYMGMT_fetch()\fR looks for an algorithm within a provider that
114 has been loaded into the \fBOSSL_LIB_CTX\fR given by \fIctx\fR, having the
115 name given by \fIalgorithm\fR and the properties given by \fIproperties\fR.
116 .PP
117 \&\fBEVP_SKEYMGMT_up_ref()\fR increments the reference count for the given
118 \&\fBEVP_SKEYMGMT\fR \fIskeymgmt\fR.
119 .PP
120 \&\fBEVP_SKEYMGMT_free()\fR decrements the reference count for the given
121 \&\fBEVP_SKEYMGMT\fR \fIskeymgmt\fR, and when the count reaches zero, frees it.
122 If the argument is NULL, nothing is done.
123 .PP
124 \&\fBEVP_SKEYMGMT_get0_provider()\fR returns the provider that has this particular
125 implementation.
126 .PP
127 \&\fBEVP_SKEYMGMT_is_a()\fR checks if \fIskeymgmt\fR is an implementation of an
128 algorithm that's identified by \fIname\fR.
129 .PP
130 \&\fBEVP_SKEYMGMT_get0_name()\fR returns the algorithm name from the provided
131 implementation for the given \fIskeymgmt\fR. Note that the \fIskeymgmt\fR may have
132 multiple synonyms associated with it. In this case the first name from the
133 algorithm definition is returned. Ownership of the returned string is
134 retained by the \fIskeymgmt\fR object and should not be freed by the caller.
135 .PP
136 \&\fBEVP_SKEYMGMT_names_do_all()\fR traverses all names for the \fIskeymgmt\fR, and
137 calls \fIfn\fR with each name and \fIdata\fR.
138 .PP
139 \&\fBEVP_SKEYMGMT_get0_description()\fR returns a description of the \fIskeymgmt\fR, meant
140 for display and human consumption. The description is at the discretion
141 of the \fIskeymgmt\fR implementation.
142 .PP
143 \&\fBEVP_SKEYMGMT_do_all_provided()\fR traverses all key \fIskeymgmt\fR implementations by
144 all activated providers in the library context \fIlibctx\fR, and for each
145 of the implementations, calls \fIfn\fR with the implementation method and
146 \&\fIdata\fR as arguments.
147 .PP
148 \&\fBEVP_SKEYMGMT_get0_gen_settable_params()\fR and \fBEVP_SKEYMGMT_get0_imp_settable_params()\fR
149 get a constant \fBOSSL_PARAM\fR\|(3) array that describes the settable parameters
150 that can be used with \fBEVP_SKEY_generate()\fR and \fBEVP_SKEY_import()\fR correspondingly.
151 .SH NOTES
152 .IX Header "NOTES"
153 \&\fBEVP_SKEYMGMT_fetch()\fR may be called implicitly by other fetching
154 functions, using the same library context and properties.
155 Any other API that uses symmetric keys will typically do this.
156 .SH "RETURN VALUES"
157 .IX Header "RETURN VALUES"
158 \&\fBEVP_SKEYMGMT_fetch()\fR returns a pointer to the key management
159 implementation represented by an EVP_SKEYMGMT object, or NULL on
160 error.
161 .PP
162 \&\fBEVP_SKEYMGMT_up_ref()\fR returns 1 on success, or 0 on error.
163 .PP
164 \&\fBEVP_SKEYMGMT_names_do_all()\fR returns 1 if the callback was called for all
165 names. A return value of 0 means that the callback was not called for any names.
166 .PP
167 \&\fBEVP_SKEYMGMT_free()\fR doesn't return any value.
168 .PP
169 \&\fBEVP_SKEYMGMT_get0_provider()\fR returns a pointer to a provider object, or NULL
170 on error.
171 .PP
172 \&\fBEVP_SKEYMGMT_is_a()\fR returns 1 if \fIskeymgmt\fR was identifiable, otherwise 0.
173 .PP
174 \&\fBEVP_SKEYMGMT_get0_name()\fR returns the algorithm name, or NULL on error.
175 .PP
176 \&\fBEVP_SKEYMGMT_get0_description()\fR returns a pointer to a description, or NULL if
177 there isn't one.
178 .SH "SEE ALSO"
179 .IX Header "SEE ALSO"
180 \&\fBEVP_SKEY\fR\|(3), \fBEVP_MD_fetch\fR\|(3), \fBOSSL_LIB_CTX\fR\|(3)
181 .SH HISTORY
182 .IX Header "HISTORY"
183 \&\fBEVP_SKEYMGMT\fR structure and functions
184 \&\fBEVP_SKEYMGMT_fetch()\fR,
185 \&\fBEVP_SKEYMGMT_up_ref()\fR,
186 \&\fBEVP_SKEYMGMT_free()\fR,
187 \&\fBEVP_SKEYMGMT_get0_provider()\fR,
188 \&\fBEVP_SKEYMGMT_is_a()\fR,
189 \&\fBEVP_SKEYMGMT_get0_description()\fR,
190 \&\fBEVP_SKEYMGMT_get0_name()\fR,
191 \&\fBEVP_SKEYMGMT_do_all_provided()\fR,
192 \&\fBEVP_SKEYMGMT_names_do_all()\fR,
193 \&\fBEVP_SKEYMGMT_get0_gen_settable_params()\fR,
194 \&\fBEVP_SKEYMGMT_get0_imp_settable_params()\fR
195 were added in OpenSSL 3.5.
196 .SH COPYRIGHT
197 .IX Header "COPYRIGHT"
198 Copyright 2025 The OpenSSL Project Authors. All Rights Reserved.
199 .PP
200 Licensed under the Apache License 2.0 (the "License"). You may not use
201 this file except in compliance with the License. You can obtain a copy
202 in the file LICENSE in the source distribution or at
203 <https://www.openssl.org/source/license.html>.