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