1SSL_CTX_SET1_CURVES(3)              OpenSSL             SSL_CTX_SET1_CURVES(3)
2
3
4

NAME

6       SSL_CTX_set1_groups, SSL_CTX_set1_groups_list, SSL_set1_groups,
7       SSL_set1_groups_list, SSL_get1_groups, SSL_get_shared_group,
8       SSL_CTX_set1_curves, SSL_CTX_set1_curves_list, SSL_set1_curves,
9       SSL_set1_curves_list, SSL_get1_curves, SSL_get_shared_curve - EC
10       supported curve functions
11

SYNOPSIS

13        #include <openssl/ssl.h>
14
15        int SSL_CTX_set1_groups(SSL_CTX *ctx, int *glist, int glistlen);
16        int SSL_CTX_set1_groups_list(SSL_CTX *ctx, char *list);
17
18        int SSL_set1_groups(SSL *ssl, int *glist, int glistlen);
19        int SSL_set1_groups_list(SSL *ssl, char *list);
20
21        int SSL_get1_groups(SSL *ssl, int *groups);
22        int SSL_get_shared_group(SSL *s, int n);
23
24        int SSL_CTX_set1_curves(SSL_CTX *ctx, int *clist, int clistlen);
25        int SSL_CTX_set1_curves_list(SSL_CTX *ctx, char *list);
26
27        int SSL_set1_curves(SSL *ssl, int *clist, int clistlen);
28        int SSL_set1_curves_list(SSL *ssl, char *list);
29
30        int SSL_get1_curves(SSL *ssl, int *curves);
31        int SSL_get_shared_curve(SSL *s, int n);
32

DESCRIPTION

34       For all of the functions below that set the supported groups there must
35       be at least one group in the list.
36
37       SSL_CTX_set1_groups() sets the supported groups for ctx to glistlen
38       groups in the array glist. The array consist of all NIDs of groups in
39       preference order. For a TLS client the groups are used directly in the
40       supported groups extension. For a TLS server the groups are used to
41       determine the set of shared groups.
42
43       SSL_CTX_set1_groups_list() sets the supported groups for ctx to string
44       list. The string is a colon separated list of group NIDs or names, for
45       example "P-521:P-384:P-256".
46
47       SSL_set1_groups() and SSL_set1_groups_list() are similar except they
48       set supported groups for the SSL structure ssl.
49
50       SSL_get1_groups() returns the set of supported groups sent by a client
51       in the supported groups extension. It returns the total number of
52       supported groups. The groups parameter can be NULL to simply return the
53       number of groups for memory allocation purposes. The groups array is in
54       the form of a set of group NIDs in preference order. It can return zero
55       if the client did not send a supported groups extension.
56
57       SSL_get_shared_group() returns shared group n for a server-side SSL
58       ssl. If n is -1 then the total number of shared groups is returned,
59       which may be zero. Other than for diagnostic purposes, most
60       applications will only be interested in the first shared group so n is
61       normally set to zero. If the value n is out of range, NID_undef is
62       returned.
63
64       All these functions are implemented as macros.
65
66       The curve functions are synonyms for the equivalently named group
67       functions and are identical in every respect. They exist because, prior
68       to TLS1.3, there was only the concept of supported curves. In TLS1.3
69       this was renamed to supported groups, and extended to include Diffie
70       Hellman groups. The group functions should be used in preference.
71

NOTES

73       If an application wishes to make use of several of these functions for
74       configuration purposes either on a command line or in a file it should
75       consider using the SSL_CONF interface instead of manually parsing
76       options.
77

RETURN VALUES

79       SSL_CTX_set1_groups(), SSL_CTX_set1_groups_list(), SSL_set1_groups()
80       and SSL_set1_groups_list(), return 1 for success and 0 for failure.
81
82       SSL_get1_groups() returns the number of groups, which may be zero.
83
84       SSL_get_shared_group() returns the NID of shared group n or NID_undef
85       if there is no shared group n; or the total number of shared groups if
86       n is -1.
87
88       When called on a client ssl, SSL_get_shared_group() has no meaning and
89       returns -1.
90

SEE ALSO

92       SSL_CTX_add_extra_chain_cert(3)
93

HISTORY

95       The curve functions were added in OpenSSL 1.0.2. The equivalent group
96       functions were added in OpenSSL 1.1.1.
97
99       Copyright 2013-2018 The OpenSSL Project Authors. All Rights Reserved.
100
101       Licensed under the OpenSSL license (the "License").  You may not use
102       this file except in compliance with the License.  You can obtain a copy
103       in the file LICENSE in the source distribution or at
104       <https://www.openssl.org/source/license.html>.
105
106
107
1081.1.1i                            2021-07-22            SSL_CTX_SET1_CURVES(3)
Impressum