1EVP_SIGNATURE(3ossl)                OpenSSL               EVP_SIGNATURE(3ossl)
2
3
4

NAME

6       EVP_SIGNATURE, EVP_SIGNATURE_fetch, EVP_SIGNATURE_free,
7       EVP_SIGNATURE_up_ref, EVP_SIGNATURE_is_a, EVP_SIGNATURE_get0_provider,
8       EVP_SIGNATURE_do_all_provided, EVP_SIGNATURE_names_do_all,
9       EVP_SIGNATURE_get0_name, EVP_SIGNATURE_get0_description,
10       EVP_SIGNATURE_gettable_ctx_params, EVP_SIGNATURE_settable_ctx_params -
11       Functions to manage EVP_SIGNATURE algorithm objects
12

SYNOPSIS

14        #include <openssl/evp.h>
15
16        typedef struct evp_signature_st EVP_SIGNATURE;
17
18        EVP_SIGNATURE *EVP_SIGNATURE_fetch(OSSL_LIB_CTX *ctx, const char *algorithm,
19                                           const char *properties);
20        void EVP_SIGNATURE_free(EVP_SIGNATURE *signature);
21        int EVP_SIGNATURE_up_ref(EVP_SIGNATURE *signature);
22        const char *EVP_SIGNATURE_get0_name(const EVP_SIGNATURE *signature);
23        int EVP_SIGNATURE_is_a(const EVP_SIGNATURE *signature, const char *name);
24        OSSL_PROVIDER *EVP_SIGNATURE_get0_provider(const EVP_SIGNATURE *signature);
25        void EVP_SIGNATURE_do_all_provided(OSSL_LIB_CTX *libctx,
26                                           void (*fn)(EVP_SIGNATURE *signature,
27                                                      void *arg),
28                                           void *arg);
29        int EVP_SIGNATURE_names_do_all(const EVP_SIGNATURE *signature,
30                                       void (*fn)(const char *name, void *data),
31                                       void *data);
32        const char *EVP_SIGNATURE_get0_name(const EVP_SIGNATURE *signature);
33        const char *EVP_SIGNATURE_get0_description(const EVP_SIGNATURE *signature);
34        const OSSL_PARAM *EVP_SIGNATURE_gettable_ctx_params(const EVP_SIGNATURE *sig);
35        const OSSL_PARAM *EVP_SIGNATURE_settable_ctx_params(const EVP_SIGNATURE *sig);
36

DESCRIPTION

38       EVP_SIGNATURE_fetch() fetches the implementation for the given
39       algorithm from any provider offering it, within the criteria given by
40       the properties.  The algorithm will be one offering functions for
41       performing signature related tasks such as signing and verifying.  See
42       "ALGORITHM FETCHING" in crypto(7) for further information.
43
44       The returned value must eventually be freed with EVP_SIGNATURE_free().
45
46       EVP_SIGNATURE_free() decrements the reference count for the
47       EVP_SIGNATURE structure. Typically this structure will have been
48       obtained from an earlier call to EVP_SIGNATURE_fetch(). If the
49       reference count drops to 0 then the structure is freed.
50
51       EVP_SIGNATURE_up_ref() increments the reference count for an
52       EVP_SIGNATURE structure.
53
54       EVP_SIGNATURE_is_a() returns 1 if signature is an implementation of an
55       algorithm that's identifiable with name, otherwise 0.
56
57       EVP_SIGNATURE_get0_provider() returns the provider that signature was
58       fetched from.
59
60       EVP_SIGNATURE_do_all_provided() traverses all SIGNATURE implemented by
61       all activated roviders in the given library context libctx, and for
62       each of the implementations, calls the given function fn with the
63       implementation method and the given arg as argument.
64
65       EVP_SIGNATURE_get0_name() returns the algorithm name from the provided
66       implementation for the given signature. Note that the signature may
67       have multiple synonyms associated with it. In this case the first name
68       from the algorithm definition is returned. Ownership of the returned
69       string is retained by the signature object and should not be freed by
70       the caller.
71
72       EVP_SIGNATURE_names_do_all() traverses all names for signature, and
73       calls fn with each name and data.
74
75       EVP_SIGNATURE_get0_description() returns a description of the
76       signature, meant for display and human consumption.  The description is
77       at the discretion of the signature implementation.
78
79       EVP_SIGNATURE_gettable_ctx_params() and
80       EVP_SIGNATURE_settable_ctx_params() return a constant OSSL_PARAM array
81       that describes the names and types of key parameters that can be
82       retrieved or set by a signature algorithm using
83       EVP_PKEY_CTX_get_params(3) and EVP_PKEY_CTX_set_params(3).
84

RETURN VALUES

86       EVP_SIGNATURE_fetch() returns a pointer to an EVP_SIGNATURE for success
87       or NULL for failure.
88
89       EVP_SIGNATURE_up_ref() returns 1 for success or 0 otherwise.
90
91       EVP_SIGNATURE_names_do_all() returns 1 if the callback was called for
92       all names.  A return value of 0 means that the callback was not called
93       for any names.
94
95       EVP_SIGNATURE_gettable_ctx_params() and
96       EVP_SIGNATURE_settable_ctx_params() return a constant OSSL_PARAM array
97       or NULL on error.
98

SEE ALSO

100       "ALGORITHM FETCHING" in crypto(7), OSSL_PROVIDER(3)
101

HISTORY

103       The functions described here were added in OpenSSL 3.0.
104
106       Copyright 2019-2021 The OpenSSL Project Authors. All Rights Reserved.
107
108       Licensed under the Apache License 2.0 (the "License").  You may not use
109       this file except in compliance with the License.  You can obtain a copy
110       in the file LICENSE in the source distribution or at
111       <https://www.openssl.org/source/license.html>.
112
113
114
1153.0.5                             2022-11-01              EVP_SIGNATURE(3ossl)
Impressum