Debian Codegraph @

upstream/debian-unstable/man3/EVP_ASYM_CIPHER_free.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_ASYM_CIPHER_FREE 3SSL"
58 .TH EVP_ASYM_CIPHER_FREE 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_ASYM_CIPHER_fetch, EVP_ASYM_CIPHER_free, EVP_ASYM_CIPHER_up_ref,
65 EVP_ASYM_CIPHER_is_a, EVP_ASYM_CIPHER_get0_provider,
66 EVP_ASYM_CIPHER_do_all_provided, EVP_ASYM_CIPHER_names_do_all,
67 EVP_ASYM_CIPHER_get0_name, EVP_ASYM_CIPHER_get0_description,
68 EVP_ASYM_CIPHER_gettable_ctx_params, EVP_ASYM_CIPHER_settable_ctx_params
69 \&\- Functions to manage EVP_ASYM_CIPHER algorithm objects
70 .SH SYNOPSIS
71 .IX Header "SYNOPSIS"
72 .Vb 1
73 \& #include <openssl/evp.h>
74 \&
75 \& EVP_ASYM_CIPHER *EVP_ASYM_CIPHER_fetch(OSSL_LIB_CTX *ctx, const char *algorithm,
76 \& const char *properties);
77 \& void EVP_ASYM_CIPHER_free(EVP_ASYM_CIPHER *cipher);
78 \& int EVP_ASYM_CIPHER_up_ref(EVP_ASYM_CIPHER *cipher);
79 \& const char *EVP_ASYM_CIPHER_get0_name(const EVP_ASYM_CIPHER *cipher);
80 \& int EVP_ASYM_CIPHER_is_a(const EVP_ASYM_CIPHER *cipher, const char *name);
81 \& OSSL_PROVIDER *EVP_ASYM_CIPHER_get0_provider(const EVP_ASYM_CIPHER *cipher);
82 \& void EVP_ASYM_CIPHER_do_all_provided(OSSL_LIB_CTX *libctx,
83 \& void (*fn)(EVP_ASYM_CIPHER *cipher,
84 \& void *arg),
85 \& void *arg);
86 \& int EVP_ASYM_CIPHER_names_do_all(const EVP_ASYM_CIPHER *cipher,
87 \& void (*fn)(const char *name, void *data),
88 \& void *data);
89 \& const char *EVP_ASYM_CIPHER_get0_description(const EVP_ASYM_CIPHER *cipher);
90 \& const OSSL_PARAM *EVP_ASYM_CIPHER_gettable_ctx_params(const EVP_ASYM_CIPHER *cip);
91 \& const OSSL_PARAM *EVP_ASYM_CIPHER_settable_ctx_params(const EVP_ASYM_CIPHER *cip);
92 .Ve
93 .SH DESCRIPTION
94 .IX Header "DESCRIPTION"
95 \&\fBEVP_ASYM_CIPHER_fetch()\fR fetches the implementation for the given
96 \&\fBalgorithm\fR from any provider offering it, within the criteria given
97 by the \fBproperties\fR and in the scope of the given library context \fBctx\fR (see
98 \&\fBOSSL_LIB_CTX\fR\|(3)). The algorithm will be one offering functions for performing
99 asymmetric cipher related tasks such as asymmetric encryption and decryption.
100 See "ALGORITHM FETCHING" in \fBcrypto\fR\|(7) for further information.
101 .PP
102 The returned value must eventually be freed with \fBEVP_ASYM_CIPHER_free()\fR.
103 .PP
104 \&\fBEVP_ASYM_CIPHER_free()\fR decrements the reference count for the \fBEVP_ASYM_CIPHER\fR
105 structure. Typically this structure will have been obtained from an earlier call
106 to \fBEVP_ASYM_CIPHER_fetch()\fR. If the reference count drops to 0 then the
107 structure is freed. If the argument is NULL, nothing is done.
108 .PP
109 \&\fBEVP_ASYM_CIPHER_up_ref()\fR increments the reference count for an
110 \&\fBEVP_ASYM_CIPHER\fR structure.
111 .PP
112 \&\fBEVP_ASYM_CIPHER_is_a()\fR returns 1 if \fIcipher\fR is an implementation of an
113 algorithm that's identifiable with \fIname\fR, otherwise 0.
114 .PP
115 \&\fBEVP_ASYM_CIPHER_get0_provider()\fR returns the provider that \fIcipher\fR was
116 fetched from.
117 .PP
118 \&\fBEVP_ASYM_CIPHER_do_all_provided()\fR traverses all EVP_ASYM_CIPHERs implemented by
119 all activated providers in the given library context \fIlibctx\fR, and for each of
120 the implementations, calls the given function \fIfn\fR with the implementation
121 method and the given \fIarg\fR as argument.
122 .PP
123 \&\fBEVP_ASYM_CIPHER_get0_name()\fR returns the algorithm name from the provided
124 implementation for the given \fIcipher\fR. Note that the \fIcipher\fR may have
125 multiple synonyms associated with it. In this case the first name from the
126 algorithm definition is returned. Ownership of the returned string is retained
127 by the \fIcipher\fR object and should not be freed by the caller.
128 .PP
129 \&\fBEVP_ASYM_CIPHER_names_do_all()\fR traverses all names for \fIcipher\fR, and calls
130 \&\fIfn\fR with each name and \fIdata\fR.
131 .PP
132 \&\fBEVP_ASYM_CIPHER_get0_description()\fR returns a description of the \fIcipher\fR,
133 meant for display and human consumption. The description is at the
134 discretion of the \fIcipher\fR implementation.
135 .PP
136 \&\fBEVP_ASYM_CIPHER_gettable_ctx_params()\fR and \fBEVP_ASYM_CIPHER_settable_ctx_params()\fR
137 return a constant \fBOSSL_PARAM\fR\|(3) array that describes the names and types of key
138 parameters that can be retrieved or set by a key encryption algorithm using
139 \&\fBEVP_PKEY_CTX_get_params\fR\|(3) and \fBEVP_PKEY_CTX_set_params\fR\|(3).
140 .SH "RETURN VALUES"
141 .IX Header "RETURN VALUES"
142 \&\fBEVP_ASYM_CIPHER_fetch()\fR returns a pointer to an \fBEVP_ASYM_CIPHER\fR for success
143 or \fBNULL\fR for failure.
144 .PP
145 \&\fBEVP_ASYM_CIPHER_up_ref()\fR returns 1 for success or 0 otherwise.
146 .PP
147 \&\fBEVP_ASYM_CIPHER_names_do_all()\fR returns 1 if the callback was called for all
148 names. A return value of 0 means that the callback was not called for any names.
149 .PP
150 \&\fBEVP_ASYM_CIPHER_gettable_ctx_params()\fR and \fBEVP_ASYM_CIPHER_settable_ctx_params()\fR
151 return a constant \fBOSSL_PARAM\fR\|(3) array or NULL on error.
152 .SH "SEE ALSO"
153 .IX Header "SEE ALSO"
154 "ALGORITHM FETCHING" in \fBcrypto\fR\|(7), \fBOSSL_PROVIDER\fR\|(3)
155 .SH HISTORY
156 .IX Header "HISTORY"
157 The functions described here were added in OpenSSL 3.0.
158 .SH COPYRIGHT
159 .IX Header "COPYRIGHT"
160 Copyright 2019\-2024 The OpenSSL Project Authors. All Rights Reserved.
161 .PP
162 Licensed under the Apache License 2.0 (the "License"). You may not use
163 this file except in compliance with the License. You can obtain a copy
164 in the file LICENSE in the source distribution or at
165 <https://www.openssl.org/source/license.html>.