]> git.ipfire.org Git - thirdparty/openssl.git/blame - doc/man3/EVP_set_default_properties.pod
Rename OPENSSL_CTX prefix to OSSL_LIB_CTX
[thirdparty/openssl.git] / doc / man3 / EVP_set_default_properties.pod
CommitLineData
cb929645
RL
1=pod
2
3=head1 NAME
4
e0624f0d
SL
5EVP_set_default_properties, EVP_default_properties_enable_fips,
6EVP_default_properties_is_fips_enabled
cb929645
RL
7- Set default properties for future algorithm fetches
8
9=head1 SYNOPSIS
10
11 #include <openssl/evp.h>
12
b4250010
DMSP
13 int EVP_set_default_properties(OSSL_LIB_CTX *libctx, const char *propq);
14 int EVP_default_properties_enable_fips(OSSL_LIB_CTX *libctx, int enable);
15 int EVP_default_properties_is_fips_enabled(OSSL_LIB_CTX *libctx);
cb929645
RL
16
17=head1 DESCRIPTION
18
19EVP_set_default_properties() sets the default properties for all
20future EVP algorithm fetches, implicit as well as explicit.
21
22=for comment TODO(3.0) We should consider having an EVP document in
23section 7 that details everything about implicit vs explicit fetches
24and how they relate to properties.
25
26EVP_set_default_properties stores the properties given with the string
27I<propq> among the EVP data that's been stored in the library context
28given with I<libctx> (NULL signifies the default library context).
29
30Any previous default property for the specified library context will
31be dropped.
32
e0624f0d
SL
33EVP_default_properties_enable_fips() sets the 'fips=yes' to be a default property
34if I<enable> is non zero, otherwise it clears 'fips' from the default property
35query for the given I<libctx>. It merges the fips default property query with any
36existing query strings that have been set via EVP_set_default_properties().
37
38EVP_default_properties_is_fips_enabled() indicates if 'fips=yes' is a default
39property for the given I<libctx>.
40
cb929645
RL
41=head1 RETURN VALUES
42
e0624f0d 43EVP_set_default_properties() and EVP_default_properties_enable_fips() return 1
8c1cbc72 44on success, or 0 on failure. An error is placed on the error stack if a
e0624f0d
SL
45failure occurs.
46
6763f9c7 47EVP_default_properties_is_fips_enabled() returns 1 if the 'fips=yes' default
e0624f0d 48property is set for the given I<libctx>, otherwise it returns 0.
cb929645
RL
49
50=head1 SEE ALSO
51
6e4618a0 52L<EVP_MD_fetch(3)>
cb929645
RL
53
54=head1 HISTORY
55
56The functions described here were added in OpenSSL 3.0.
57
58=head1 COPYRIGHT
59
e0624f0d 60Copyright 2019-2020 The OpenSSL Project Authors. All Rights Reserved.
cb929645
RL
61
62Licensed under the Apache License 2.0 (the "License"). You may not use
63this file except in compliance with the License. You can obtain a copy
64in the file LICENSE in the source distribution or at
65L<https://www.openssl.org/source/license.html>.
66
67=cut