xref: /freebsd/crypto/openssl/doc/man3/EVP_PKEY_get_group_name.pod (revision b077aed33b7b6aefca7b17ddb250cf521f938613)
1*b077aed3SPierre Pronchery=pod
2*b077aed3SPierre Pronchery
3*b077aed3SPierre Pronchery=head1 NAME
4*b077aed3SPierre Pronchery
5*b077aed3SPierre ProncheryEVP_PKEY_get_group_name - get group name of a key
6*b077aed3SPierre Pronchery
7*b077aed3SPierre Pronchery=head1 SYNOPSIS
8*b077aed3SPierre Pronchery
9*b077aed3SPierre Pronchery #include <openssl/evp.h>
10*b077aed3SPierre Pronchery
11*b077aed3SPierre Pronchery int EVP_PKEY_get_group_name(EVP_PKEY *pkey, char *gname, size_t gname_sz,
12*b077aed3SPierre Pronchery                             size_t *gname_len);
13*b077aed3SPierre Pronchery
14*b077aed3SPierre Pronchery=head1 DESCRIPTION
15*b077aed3SPierre Pronchery
16*b077aed3SPierre ProncheryEVP_PKEY_get_group_name() fills in the group name of the I<pkey> into
17*b077aed3SPierre ProncheryI<gname>, up to at most I<gname_sz> bytes including the ending NUL byte
18*b077aed3SPierre Proncheryand assigns I<*gname_len> the actual length of the name not including
19*b077aed3SPierre Proncherythe NUL byte, if I<pkey>'s key type supports it.
20*b077aed3SPierre ProncheryI<gname> as well as I<gname_len> may individually be NULL, and won't be
21*b077aed3SPierre Proncheryfilled in or assigned in that case.
22*b077aed3SPierre Pronchery
23*b077aed3SPierre Pronchery=head1 NOTES
24*b077aed3SPierre Pronchery
25*b077aed3SPierre ProncheryAmong the standard OpenSSL key types, this is only supported for DH, EC and
26*b077aed3SPierre ProncherySM2 keys.  Other providers may support this for additional key types.
27*b077aed3SPierre Pronchery
28*b077aed3SPierre Pronchery=head1 RETURN VALUES
29*b077aed3SPierre Pronchery
30*b077aed3SPierre ProncheryEVP_PKEY_get_group_name() returns 1 if the group name could be filled in,
31*b077aed3SPierre Proncheryotherwise 0.
32*b077aed3SPierre Pronchery
33*b077aed3SPierre Pronchery=head1 HISTORY
34*b077aed3SPierre Pronchery
35*b077aed3SPierre ProncheryThis function was added in OpenSSL 3.0.
36*b077aed3SPierre Pronchery
37*b077aed3SPierre Pronchery=head1 COPYRIGHT
38*b077aed3SPierre Pronchery
39*b077aed3SPierre ProncheryCopyright 2020-2021 The OpenSSL Project Authors. All Rights Reserved.
40*b077aed3SPierre Pronchery
41*b077aed3SPierre ProncheryLicensed under the Apache License 2.0 (the "License").  You may not use
42*b077aed3SPierre Proncherythis file except in compliance with the License.  You can obtain a copy
43*b077aed3SPierre Proncheryin the file LICENSE in the source distribution or at
44*b077aed3SPierre ProncheryL<https://www.openssl.org/source/license.html>.
45*b077aed3SPierre Pronchery
46*b077aed3SPierre Pronchery=cut
47