@@ -6,7 +6,7 @@ EVP_SKEY, EVP_SKEY_generate,
6
6
EVP_SKEY_import, EVP_SKEY_import_raw_key, EVP_SKEY_up_ref,
7
7
EVP_SKEY_export, EVP_SKEY_get_raw_key, EVP_SKEY_get0_key_id,
8
8
EVP_SKEY_get0_skeymgmt_name, EVP_SKEY_get0_provider_name,
9
- EVP_SKEY_free
9
+ EVP_SKEY_free, EVP_SKEY_is_a, EVP_SKEY_to_provider
10
10
- opaque symmetric key allocation and handling functions
11
11
12
12
=head1 SYNOPSIS
@@ -34,6 +34,10 @@ EVP_SKEY_free
34
34
35
35
int EVP_SKEY_up_ref(EVP_SKEY *key);
36
36
void EVP_SKEY_free(EVP_SKEY *key);
37
+ int EVP_SKEY_is_a(const EVP_SKEY *skey, const char *name);
38
+ EVP_SKEY *EVP_SKEY_to_provider(EVP_SKEY *skey, OSSL_LIB_CTX *libctx,
39
+ OSSL_PROVIDER *prov, const char *propquery);
40
+
37
41
38
42
=head1 DESCRIPTION
39
43
@@ -80,6 +84,12 @@ EVP_SKEY_up_ref() increments the reference count of I<key>.
80
84
EVP_SKEY_free() decrements the reference count of I<key> and, if the reference
81
85
count is zero, frees it. If I<key> is NULL, nothing is done.
82
86
87
+ EVP_SKEY_is_a() checks if the key type of I<skey> is I<name>.
88
+
89
+ EVP_SKEY_to_provider() simplifies the task of importing a I<skey> into a
90
+ different provider identified by I<prov>. If I<prov> is NULL, the default
91
+ provider for the key type identified via I<skey> is used.
92
+
83
93
=head2 Selections
84
94
85
95
The following constants can be used for I<selection>:
@@ -106,6 +116,9 @@ All parameters will be selected.
106
116
The B<EVP_SKEY> structure is used by various OpenSSL functions which require a
107
117
general symmetric key without reference to any particular algorithm.
108
118
119
+ The EVP_SKEY_to_provider() function will fail and return NULL if the origin
120
+ key I<skey> cannot be exported from its provider.
121
+
109
122
=head1 RETURN VALUES
110
123
111
124
EVP_SKEY_generate(), EVP_SKEY_import() and EVP_SKEY_import_raw_key() return
@@ -120,6 +133,12 @@ EVP_SKEY_export() and EVP_SKEY_get_raw_key() return 1 for success and 0 on failu
120
133
EVP_SKEY_get0_skeymgmt_name() and EVP_SKEY_get0_provider_name() return the
121
134
names of the associated EVP_SKEYMGMT object and its provider correspondigly.
122
135
136
+ EVP_SKEY_is_a() returns 1 if I<skey> has the key type I<name>,
137
+ otherwise 0.
138
+
139
+ EVP_SKEY_to_provider() returns a new B<EVP_SKEY> suitable for operations with
140
+ the I<prov> provider or NULL in case of failure.
141
+
123
142
=head1 SEE ALSO
124
143
125
144
L<EVP_SKEYMGMT(3)>, L<provider(7)>, L<OSSL_PARAM(3)>
@@ -129,8 +148,8 @@ L<EVP_SKEYMGMT(3)>, L<provider(7)>, L<OSSL_PARAM(3)>
129
148
The B<EVP_SKEY> API and functions EVP_SKEY_export(),
130
149
EVP_SKEY_free(), EVP_SKEY_get_raw_key(), EVP_SKEY_import(),
131
150
EVP_SKEY_import_raw_key(), EVP_SKEY_up_ref(), EVP_SKEY_generate(),
132
- EVP_SKEY_get0_key_id(), EVP_SKEY_get0_provider_name(), and
133
- EVP_SKEY_get0_skeymgmt_name()
151
+ EVP_SKEY_get0_key_id(), EVP_SKEY_get0_provider_name(),
152
+ EVP_SKEY_get0_skeymgmt_name(), EVP_SKEY_is_a(), EVP_SKEY_to_provider()
134
153
were introduced in OpenSSL 3.5.
135
154
136
155
=head1 COPYRIGHT
0 commit comments