---
name: "libressl-SSL_CTX_set1_groups"
section: "3"
platform: "linux"
package: "libressl"
version: "4.4.0-1"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/libressl-SSL_CTX_set1_groups"
---

# libressl-SSL\_CTX\_set1\_groups(3)

choose supported EC groups

## NAME

**SSL\_CTX\_set1\_groups**, **SSL\_CTX\_set1\_groups\_list**, **SSL\_set1\_groups**, **SSL\_set1\_groups\_list**, **SSL\_CTX\_set1\_curves**, **SSL\_CTX\_set1\_curves\_list**, **SSL\_set1\_curves**, **SSL\_set1\_curves\_list** – choose supported EC groups

## SYNOPSIS

SSL Library (libssl, -lssl) libcrypto

**#include \<openssl/ssl.h\>**

*int*\

**SSL\_CTX\_set1\_groups**(*SSL\_CTX \*ctx*, *const int \*glist*, *size\_t glistlen*);

*int*\

**SSL\_CTX\_set1\_groups\_list**(*SSL\_CTX \*ctx*, *const char \*list*);

*int*\

**SSL\_set1\_groups**(*SSL \*ssl*, *const int \*glist*, *size\_t glistlen*);

*int*\

**SSL\_set1\_groups\_list**(*SSL \*ssl*, *const char \*list*);

*int*\

**SSL\_CTX\_set1\_curves**(*SSL\_CTX \*ctx*, *const int \*clist*, *size\_t clistlen*);

*int*\

**SSL\_CTX\_set1\_curves\_list**(*SSL\_CTX \*ctx*, *const char \*list*);

*int*\

**SSL\_set1\_curves**(*SSL \*ssl*, *const int \*clist*, *size\_t clistlen*);

*int*\

**SSL\_set1\_curves\_list**(*SSL \*ssl*, *const char \*list*);

## DESCRIPTION

**SSL\_CTX\_set1\_groups**() sets the supported groups for *ctx* to the *glistlen* groups in the array *glist*. The array consists of group NIDs in preference order. For a TLS client, the groups are used directly in the supported groups extension. For a TLS server, the groups are used to determine the set of shared groups.

**SSL\_CTX\_set1\_groups\_list**() sets the supported groups for *ctx* to the *list* represented as a colon separated list of group NIDs or names, for example "P-521:P-384:P-256".

**SSL\_set1\_groups**() and **SSL\_set1\_groups\_list**() are similar except that they set supported groups for the SSL structure *ssl* only.

The curve functions are deprecated synonyms for the equivalently named group functions and are identical in every respect except that they are implemented as macros. They exist because prior to TLS1.3, there was only the concept of supported curves. In TLS1.3, this was renamed to supported groups and extended to include Diffie Hellman groups.

If an application wishes to make use of several of these functions for configuration purposes either on a command line or in a file, it should consider using the SSL\_CONF interface instead of manually parsing options.

## RETURN VALUES

All these functions return 1 for success or 0 for failure.

## SEE ALSO

[ssl(3)](/ssl/3.md), SSL\_CTX\_add\_extra\_chain\_cert(3), SSL\_CTX\_set\_cipher\_list(3), SSL\_CTX\_set\_options(3), SSL\_new(3)

## HISTORY

The curve functions first appeared in OpenSSL 1.0.2 and the group functions in OpenSSL 1.1.1. Both have been available since OpenBSD 6.1.
