1*637f393eSschwarze.\"	$OpenBSD: SSL_CTX_set1_groups.3,v 1.2 2017/08/19 19:36:39 schwarze Exp $
29b1b080bSschwarze.\"	OpenSSL SSL_CTX_set1_curves.pod de4d764e Nov 9 14:51:06 2016 +0000
39b1b080bSschwarze.\"
49b1b080bSschwarze.\" This file was written by Dr. Stephen Henson <steve@openssl.org>.
59b1b080bSschwarze.\" Copyright (c) 2013, 2014, 2016 The OpenSSL Project.  All rights reserved.
69b1b080bSschwarze.\"
79b1b080bSschwarze.\" Redistribution and use in source and binary forms, with or without
89b1b080bSschwarze.\" modification, are permitted provided that the following conditions
99b1b080bSschwarze.\" are met:
109b1b080bSschwarze.\"
119b1b080bSschwarze.\" 1. Redistributions of source code must retain the above copyright
129b1b080bSschwarze.\"    notice, this list of conditions and the following disclaimer.
139b1b080bSschwarze.\"
149b1b080bSschwarze.\" 2. Redistributions in binary form must reproduce the above copyright
159b1b080bSschwarze.\"    notice, this list of conditions and the following disclaimer in
169b1b080bSschwarze.\"    the documentation and/or other materials provided with the
179b1b080bSschwarze.\"    distribution.
189b1b080bSschwarze.\"
199b1b080bSschwarze.\" 3. All advertising materials mentioning features or use of this
209b1b080bSschwarze.\"    software must display the following acknowledgment:
219b1b080bSschwarze.\"    "This product includes software developed by the OpenSSL Project
229b1b080bSschwarze.\"    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
239b1b080bSschwarze.\"
249b1b080bSschwarze.\" 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
259b1b080bSschwarze.\"    endorse or promote products derived from this software without
269b1b080bSschwarze.\"    prior written permission. For written permission, please contact
279b1b080bSschwarze.\"    openssl-core@openssl.org.
289b1b080bSschwarze.\"
299b1b080bSschwarze.\" 5. Products derived from this software may not be called "OpenSSL"
309b1b080bSschwarze.\"    nor may "OpenSSL" appear in their names without prior written
319b1b080bSschwarze.\"    permission of the OpenSSL Project.
329b1b080bSschwarze.\"
339b1b080bSschwarze.\" 6. Redistributions of any form whatsoever must retain the following
349b1b080bSschwarze.\"    acknowledgment:
359b1b080bSschwarze.\"    "This product includes software developed by the OpenSSL Project
369b1b080bSschwarze.\"    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
379b1b080bSschwarze.\"
389b1b080bSschwarze.\" THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
399b1b080bSschwarze.\" EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
409b1b080bSschwarze.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
419b1b080bSschwarze.\" PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
429b1b080bSschwarze.\" ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
439b1b080bSschwarze.\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
449b1b080bSschwarze.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
459b1b080bSschwarze.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
469b1b080bSschwarze.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
479b1b080bSschwarze.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
489b1b080bSschwarze.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
499b1b080bSschwarze.\" OF THE POSSIBILITY OF SUCH DAMAGE.
509b1b080bSschwarze.\"
51*637f393eSschwarze.Dd $Mdocdate: August 19 2017 $
529b1b080bSschwarze.Dt SSL_CTX_SET1_GROUPS 3
539b1b080bSschwarze.Os
549b1b080bSschwarze.Sh NAME
559b1b080bSschwarze.Nm SSL_CTX_set1_groups ,
569b1b080bSschwarze.Nm SSL_CTX_set1_groups_list ,
579b1b080bSschwarze.Nm SSL_set1_groups ,
589b1b080bSschwarze.Nm SSL_set1_groups_list ,
599b1b080bSschwarze.Nm SSL_CTX_set1_curves ,
609b1b080bSschwarze.Nm SSL_CTX_set1_curves_list ,
619b1b080bSschwarze.Nm SSL_set1_curves ,
629b1b080bSschwarze.Nm SSL_set1_curves_list
639b1b080bSschwarze.Nd choose supported EC groups
649b1b080bSschwarze.Sh SYNOPSIS
659b1b080bSschwarze.In openssl/ssl.h
669b1b080bSschwarze.Ft int
679b1b080bSschwarze.Fo SSL_CTX_set1_groups
689b1b080bSschwarze.Fa "SSL_CTX *ctx"
699b1b080bSschwarze.Fa "const int *glist"
709b1b080bSschwarze.Fa "size_t glistlen"
719b1b080bSschwarze.Fc
729b1b080bSschwarze.Ft int
739b1b080bSschwarze.Fo SSL_CTX_set1_groups_list
749b1b080bSschwarze.Fa "SSL_CTX *ctx"
759b1b080bSschwarze.Fa "const char *list"
769b1b080bSschwarze.Fc
779b1b080bSschwarze.Ft int
789b1b080bSschwarze.Fo SSL_set1_groups
799b1b080bSschwarze.Fa "SSL *ssl"
809b1b080bSschwarze.Fa "const int *glist"
819b1b080bSschwarze.Fa "size_t glistlen"
829b1b080bSschwarze.Fc
839b1b080bSschwarze.Ft int
849b1b080bSschwarze.Fo SSL_set1_groups_list
859b1b080bSschwarze.Fa "SSL *ssl"
869b1b080bSschwarze.Fa "const char *list"
879b1b080bSschwarze.Fc
889b1b080bSschwarze.Ft int
899b1b080bSschwarze.Fo SSL_CTX_set1_curves
909b1b080bSschwarze.Fa "SSL_CTX *ctx"
919b1b080bSschwarze.Fa "const int *clist"
929b1b080bSschwarze.Fa "size_t clistlen"
939b1b080bSschwarze.Fc
949b1b080bSschwarze.Ft int
959b1b080bSschwarze.Fo SSL_CTX_set1_curves_list
969b1b080bSschwarze.Fa "SSL_CTX *ctx"
979b1b080bSschwarze.Fa "const char *list"
989b1b080bSschwarze.Fc
999b1b080bSschwarze.Ft int
1009b1b080bSschwarze.Fo SSL_set1_curves
1019b1b080bSschwarze.Fa "SSL *ssl"
1029b1b080bSschwarze.Fa "const int *clist"
1039b1b080bSschwarze.Fa "size_t clistlen"
1049b1b080bSschwarze.Fc
1059b1b080bSschwarze.Ft int
1069b1b080bSschwarze.Fo SSL_set1_curves_list
1079b1b080bSschwarze.Fa "SSL *ssl"
1089b1b080bSschwarze.Fa "const char *list"
1099b1b080bSschwarze.Fc
1109b1b080bSschwarze.Sh DESCRIPTION
1119b1b080bSschwarze.Fn SSL_CTX_set1_groups
1129b1b080bSschwarzesets the supported groups for
1139b1b080bSschwarze.Fa ctx
1149b1b080bSschwarzeto the
1159b1b080bSschwarze.Fa glistlen
1169b1b080bSschwarzegroups in the array
1179b1b080bSschwarze.Fa glist .
118*637f393eSschwarzeThe array consists of group NIDs in preference order.
1199b1b080bSschwarzeFor a TLS client, the groups are used directly in the supported groups
1209b1b080bSschwarzeextension.
1219b1b080bSschwarzeFor a TLS server, the groups are used to determine the set of shared
1229b1b080bSschwarzegroups.
1239b1b080bSschwarze.Pp
1249b1b080bSschwarze.Fn SSL_CTX_set1_groups_list
1259b1b080bSschwarzesets the supported groups for
1269b1b080bSschwarze.Fa ctx
1279b1b080bSschwarzeto the
1289b1b080bSschwarze.Fa list
1299b1b080bSschwarzerepresented as a colon separated list of group NIDs or names, for example
1309b1b080bSschwarze"P-521:P-384:P-256".
1319b1b080bSschwarze.Pp
1329b1b080bSschwarze.Fn SSL_set1_groups
1339b1b080bSschwarzeand
1349b1b080bSschwarze.Fn SSL_set1_groups_list
1359b1b080bSschwarzeare similar except that they set supported groups for the SSL structure
1369b1b080bSschwarze.Fa ssl
1379b1b080bSschwarzeonly.
1389b1b080bSschwarze.Pp
1399b1b080bSschwarzeThe curve functions are deprecated synonyms for the equivalently
1409b1b080bSschwarzenamed group functions and are identical in every respect except
1419b1b080bSschwarzethat they are implemented as macros.
1429b1b080bSschwarzeThey exist because prior to TLS1.3, there was only the concept of
1439b1b080bSschwarzesupported curves.
1449b1b080bSschwarzeIn TLS1.3, this was renamed to supported groups and extended to include
1459b1b080bSschwarzeDiffie Hellman groups.
1469b1b080bSschwarze.Pp
1479b1b080bSschwarzeIf an application wishes to make use of several of these functions for
1489b1b080bSschwarzeconfiguration purposes either on a command line or in a file, it should
1499b1b080bSschwarzeconsider using the SSL_CONF interface instead of manually parsing
1509b1b080bSschwarzeoptions.
1519b1b080bSschwarze.Sh RETURN VALUES
1529b1b080bSschwarzeAll these functions return 1 for success or 0 for failure.
1539b1b080bSschwarze.Sh SEE ALSO
1549b1b080bSschwarze.Xr ssl 3 ,
1559b1b080bSschwarze.Xr SSL_CTX_add_extra_chain_cert 3 ,
1569b1b080bSschwarze.Xr SSL_CTX_set_cipher_list 3 ,
1579b1b080bSschwarze.Xr SSL_CTX_set_options 3 ,
1589b1b080bSschwarze.Xr SSL_new 3
1599b1b080bSschwarze.Sh HISTORY
1609b1b080bSschwarzeThe curve functions first appeared in OpenSSL 1.0.2
1619b1b080bSschwarzeand the group functions in OpenSSL 1.1.1.
162*637f393eSschwarzeBoth have been available since
163*637f393eSschwarze.Ox 6.1 .
164