---
name: "EVP_PKEY_get_group_name"
section: "3ssl"
platform: "linux"
package: "openssl"
version: "3.6.5-1"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/EVP_PKEY_get_group_name"
---

# EVP\_PKEY\_get\_group\_name(3ssl)

get group name of a key

## NAME

EVP\_PKEY\_get\_group\_name - get group name of a key

## SYNOPSIS

```
 #include <openssl/evp.h>
 int EVP_PKEY_get_group_name(EVP_PKEY *pkey, char *gname, size_t gname_sz,
                             size_t *gname_len);
```

## DESCRIPTION

**EVP\_PKEY\_get\_group\_name()** fills in the group name of the *pkey* into *gname*, up to at most *gname\_sz* bytes including the ending NUL byte and assigns *\*gname\_len* the actual length of the name not including the NUL byte, if *pkey*'s key type supports it. *gname* as well as *gname\_len* may individually be NULL, and won't be filled in or assigned in that case.

## NOTES

Among the standard OpenSSL key types, this is only supported for DH, EC and SM2 keys.  Other providers may support this for additional key types.

## RETURN VALUES

**EVP\_PKEY\_get\_group\_name()** returns 1 if the group name could be filled in, otherwise 0.

## HISTORY

This function was added in OpenSSL 3.0.

## COPYRIGHT

Copyright 2020-2021 The OpenSSL Project Authors. All Rights Reserved.

Licensed under the Apache License 2.0 (the "License").  You may not use this file except in compliance with the License.  You can obtain a copy in the file LICENSE in the source distribution or at \<https://www.openssl.org/source/license.html\>.
