DragonFly On-Line Manual Pages
EVP_PKEY_ASN1_GET_... DragonFly Library Functions Manual EVP_PKEY_ASN1_GET_...
NAME
EVP_PKEY_asn1_get_count, EVP_PKEY_asn1_get0, EVP_PKEY_get0_asn1,
EVP_PKEY_asn1_find, EVP_PKEY_asn1_find_str, EVP_PKEY_asn1_get0_info --
enumerate public key ASN.1 methods
SYNOPSIS
#include <openssl/evp.h>
int
EVP_PKEY_asn1_get_count(void);
const EVP_PKEY_ASN1_METHOD *
EVP_PKEY_asn1_get0(int idx);
const EVP_PKEY_ASN1_METHOD *
EVP_PKEY_get0_asn1(const EVP_PKEY *pkey);
const EVP_PKEY_ASN1_METHOD *
EVP_PKEY_asn1_find(ENGINE **pe, int type);
const EVP_PKEY_ASN1_METHOD *
EVP_PKEY_asn1_find_str(ENGINE **pe, const char *str, int len);
int
EVP_PKEY_asn1_get0_info(int *ppkey_id, int *pkey_base_id,
int *ppkey_flags, const char **pinfo, const char **ppem_str,
const EVP_PKEY_ASN1_METHOD *ameth);
DESCRIPTION
EVP_PKEY_asn1_get_count() returns a count of the number of public key
ASN.1 methods available. It includes standard methods and any methods
added by the application.
EVP_PKEY_asn1_get0() returns the public key ASN.1 method idx. The value
of idx must be in the range from zero to EVP_PKEY_asn1_get_count() - 1.
EVP_PKEY_asn1_find() looks up the method with NID type. If pe is not
NULL, it first looks for an engine implementing a method for the NID
type. If one is found, *pe is set to that engine and the method from
that engine is returned instead.
EVP_PKEY_asn1_find_str() looks up the method with PEM type string str.
Just like EVP_PKEY_asn1_find(), if pe is not NULL, methods from engines
are preferred.
EVP_PKEY_asn1_get0_info() retrieves the public key ID, the base public
key ID (both NIDs), any flags, the method description and the PEM type
string associated with the public key ASN.1 method *ameth.
EVP_PKEY_asn1_get_count(), EVP_PKEY_asn1_get0(), EVP_PKEY_asn1_find() and
EVP_PKEY_asn1_find_str() are not thread safe, but as long as all
EVP_PKEY_ASN1_METHOD objects are added before the application gets
threaded, using them is safe. See EVP_PKEY_asn1_add0(3).
RETURN VALUES
EVP_PKEY_asn1_get_count() returns the number of available public key
methods.
EVP_PKEY_asn1_get0() returns a public key method or NULL if idx is out of
range.
EVP_PKEY_get0_asn1() returns the public key method used by pkey.
EVP_PKEY_asn1_get0_info() returns 1 on success or 0 on failure.
SEE ALSO
EVP_PKEY_asn1_new(3), EVP_PKEY_base_id(3)
HISTORY
These functions first appeared in OpenSSL 1.0.0 and have been available
since OpenBSD 4.9.
DragonFly 5.5 May 13, 2018 DragonFly 5.5