1SSL_CTX_SET1_SIGALGS(3)             OpenSSL            SSL_CTX_SET1_SIGALGS(3)
2
3
4

NAME

6       SSL_CTX_set1_sigalgs, SSL_set1_sigalgs, SSL_CTX_set1_sigalgs_list,
7       SSL_set1_sigalgs_list, SSL_CTX_set1_client_sigalgs,
8       SSL_set1_client_sigalgs, SSL_CTX_set1_client_sigalgs_list,
9       SSL_set1_client_sigalgs_list - set supported signature algorithms
10

SYNOPSIS

12        #include <openssl/ssl.h>
13
14        long SSL_CTX_set1_sigalgs(SSL_CTX *ctx, const int *slist, long slistlen);
15        long SSL_set1_sigalgs(SSL *ssl, const int *slist, long slistlen);
16        long SSL_CTX_set1_sigalgs_list(SSL_CTX *ctx, const char *str);
17        long SSL_set1_sigalgs_list(SSL *ssl, const char *str);
18
19        long SSL_CTX_set1_client_sigalgs(SSL_CTX *ctx, const int *slist, long slistlen);
20        long SSL_set1_client_sigalgs(SSL *ssl, const int *slist, long slistlen);
21        long SSL_CTX_set1_client_sigalgs_list(SSL_CTX *ctx, const char *str);
22        long SSL_set1_client_sigalgs_list(SSL *ssl, const char *str);
23

DESCRIPTION

25       SSL_CTX_set1_sigalgs() and SSL_set1_sigalgs() set the supported
26       signature algorithms for ctx or ssl. The array slist of length slistlen
27       must consist of pairs of NIDs corresponding to digest and public key
28       algorithms.
29
30       SSL_CTX_set1_sigalgs_list() and SSL_set1_sigalgs_list() set the
31       supported signature algorithms for ctx or ssl. The str parameter must
32       be a null terminated string consisting of a colon separated list of
33       elements, where each element is either a combination of a public key
34       algorithm and a digest separated by +, or a TLS 1.3-style named
35       SignatureScheme such as rsa_pss_pss_sha256.
36
37       SSL_CTX_set1_client_sigalgs(), SSL_set1_client_sigalgs(),
38       SSL_CTX_set1_client_sigalgs_list() and SSL_set1_client_sigalgs_list()
39       set signature algorithms related to client authentication, otherwise
40       they are identical to SSL_CTX_set1_sigalgs(), SSL_set1_sigalgs(),
41       SSL_CTX_set1_sigalgs_list() and SSL_set1_sigalgs_list().
42
43       All these functions are implemented as macros. The signature algorithm
44       parameter (integer array or string) is not freed: the application
45       should free it, if necessary.
46

NOTES

48       If an application wishes to allow the setting of signature algorithms
49       as one of many user configurable options it should consider using the
50       more flexible SSL_CONF API instead.
51
52       The signature algorithms set by a client are used directly in the
53       supported signature algorithm in the client hello message.
54
55       The supported signature algorithms set by a server are not sent to the
56       client but are used to determine the set of shared signature algorithms
57       and (if server preferences are set with
58       SSL_OP_CIPHER_SERVER_PREFERENCE) their order.
59
60       The client authentication signature algorithms set by a server are sent
61       in a certificate request message if client authentication is enabled,
62       otherwise they are unused.
63
64       Similarly client authentication signature algorithms set by a client
65       are used to determined the set of client authentication shared
66       signature algorithms.
67
68       Signature algorithms will neither be advertised nor used if the
69       security level prohibits them (for example SHA1 if the security level
70       is 4 or more).
71
72       Currently the NID_md5, NID_sha1, NID_sha224, NID_sha256, NID_sha384 and
73       NID_sha512 digest NIDs are supported and the public key algorithm NIDs
74       EVP_PKEY_RSA, EVP_PKEY_RSA_PSS, EVP_PKEY_DSA and EVP_PKEY_EC.
75
76       The short or long name values for digests can be used in a string (for
77       example "MD5", "SHA1", "SHA224", "SHA256", "SHA384", "SHA512") and the
78       public key algorithm strings "RSA", "RSA-PSS", "DSA" or "ECDSA".
79
80       The TLS 1.3 signature scheme names (such as "rsa_pss_pss_sha256") can
81       also be used with the _list forms of the API.
82
83       The use of MD5 as a digest is strongly discouraged due to security
84       weaknesses.
85

RETURN VALUES

87       All these functions return 1 for success and 0 for failure.
88

EXAMPLES

90       Set supported signature algorithms to SHA256 with ECDSA and SHA256 with
91       RSA using an array:
92
93        const int slist[] = {NID_sha256, EVP_PKEY_EC, NID_sha256, EVP_PKEY_RSA};
94
95        SSL_CTX_set1_sigalgs(ctx, slist, 4);
96
97       Set supported signature algorithms to SHA256 with ECDSA and SHA256 with
98       RSA using a string:
99
100        SSL_CTX_set1_sigalgs_list(ctx, "ECDSA+SHA256:RSA+SHA256");
101

SEE ALSO

103       ssl(7), SSL_get_shared_sigalgs(3), SSL_CONF_CTX_new(3)
104
106       Copyright 2015-2019 The OpenSSL Project Authors. All Rights Reserved.
107
108       Licensed under the OpenSSL license (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
1151.1.1q                            2022-07-07           SSL_CTX_SET1_SIGALGS(3)
Impressum