libressl-EVP_CIPHER_do_all - iterate over lookup tables for ciphers and digests


EVP_CIPHER_DO_ALL(3) Library Functions Manual EVP_CIPHER_DO_ALL(3)

NAME

EVP_CIPHER_do_all, EVP_CIPHER_do_all_sorted, EVP_MD_do_all, EVP_MD_do_all_sorted — iterate over lookup tables for ciphers and digests

SYNOPSIS

#include <openssl/evp.h>

void

EVP_CIPHER_do_all(void (*fn)(const EVP_CIPHER *cipher, const char *from, const char *to, void *arg), void *arg);

void

EVP_CIPHER_do_all_sorted(void (*fn)(const EVP_CIPHER *cipher, const char *from, const char *to, void *arg), void *arg);

void

EVP_MD_do_all(void (*fn)(const EVP_MD *md, const char *from, const char *to, void *arg), void *arg);

void

EVP_MD_do_all_sorted(void (*fn)(const EVP_MD *md, const char *from, const char *to, void *arg), void *arg);

DESCRIPTION

EVP_CIPHER_do_all() calls fn on every entry of the global table of cipher names and aliases. For a cipher name entry, fn is called with a non-NULL cipher, its non-NULL cipher name from, a NULL to, and the arg pointer. For an alias entry, fn is called with a NULL cipher, its alias from, the cipher name that alias points to, and the arg pointer.

EVP_CIPHER_do_all_sorted() is similar, except that it processes the cipher names and aliases in lexicographic order of their from names as determined by strcmp(3).

EVP_MD_do_all() calls fn on every entry of the global table of digest names and aliases. For a digest name entry, fn is called with a non-NULL md, its non-NULL digest name from, a NULL to, and the arg pointer. For an alias entry, fn is called with a NULL md, its alias from, the digest name that alias points to, and the arg pointer.

EVP_MD_do_all_sorted() is similar, except that it processes the digest names and aliases in lexicographic order of their from names as determined by strcmp(3).

SEE ALSO

evp(3), EVP_add_cipher(3), OBJ_NAME_do_all(3)

HISTORY

These functions first appeared in OpenSSL 1.0.0 and have been available since OpenBSD 4.9.

BUGS

EVP_CIPHER_do_all_sorted() and EVP_MD_do_all_sorted() are wrappers of OBJ_NAME_do_all_sorted(3). In particular, if memory allocation fails, they do nothing at all without telling the caller about the problem. GNU August 30, 2023 EVP_CIPHER_DO_ALL(3)


Updated 2024-01-29 - jenkler.se | uex.se