EVP_PKEY_METH_GET_COUNT(3SSL)

πŸ’… EVP_PKEY_METH_GET_COUNT πŸ’…

okay so bestie, this is the EVP_PKEY_METH_GET_COUNT(3SSL) page from the OpenSSL fam β€” it's a little deprecated-era relic that lets you peek at the list of public key methods. Let's get into it πŸŽ€


✨ NAME ✨

EVP_PKEY_meth_get_count, EVP_PKEY_meth_get0, EVP_PKEY_meth_get0_info β€” literally just enumerating public key methods, that's the whole vibe πŸ¦‹


🌸 SYNOPSIS 🌸

#include <openssl/evp.h>

okay so the way this works: the following functions have been deprecated since OpenSSL 3.0, and you can hide them entirely by defining OPENSSL_API_COMPAT with a suitable version value β€” see openssl_user_macros(7) for the deets πŸ‘‘

size_t EVP_PKEY_meth_get_count(void);
const EVP_PKEY_METHOD *EVP_PKEY_meth_get0(size_t idx);
void EVP_PKEY_meth_get0_info(int *ppkey_id, int *pflags,
                             const EVP_PKEY_METHOD *meth);

πŸ¦‹ DESCRIPTION πŸ¦‹

πŸ’€ heads up: all of the functions described on this page are deprecated. Applications should instead use the OSSL_PROVIDER APIs. no cap, that's the actual recommendation.

EVP_PKEY_meth_count() returns a count of the number of public key methods available β€” and it includes the standard methods plus any methods added by the application. so it's the full roster, not just the OGs ✨

EVP_PKEY_meth_get0() returns the public key method idx. The value of idx must be between zero and EVP_PKEY_meth_get_count() - 1 β€” stay in your lane, index-wise πŸ™ˆ

EVP_PKEY_meth_get0_info() returns the public key ID (a NID) and any flags associated with the public key method *meth. it's giving "tell me everything about this method" 🫢


πŸ’– RETURN VALUES πŸ’–

  • EVP_PKEY_meth_count() returns the number of available public key methods πŸ”’
  • EVP_PKEY_meth_get0() return a public key method or NULL if idx is out of range 😭
  • EVP_PKEY_meth_get0_info() does not return a value. it just fills in your pointers, main character energy πŸ’…

🌈 SEE ALSO 🌈


⭐ HISTORY ⭐

All of these functions were deprecated in OpenSSL 3.0. yeah, they've been living that deprecated life for a minute πŸ•°οΈ


Copyright 2002-2020 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>.


and that's the page!! πŸ“ this was OpenSSL 3.5.7, dated 2026-06-09, page EVP_PKEY_METH_GET_COUNT(3SSL) β€” mwah, go forth and enumerate responsibly bestie πŸ§šπŸ’œ

πŸ“¦ where this page comes from