summaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorRichard Levitte <levitte@openssl.org>2019-09-23 11:16:21 +0200
committerRichard Levitte <levitte@openssl.org>2019-10-17 09:16:45 +0200
commit506cb0f6322b24c980273ff5cd8f2c973a12b42f (patch)
tree773bbde5c66b9bc899c1e4d986e1a39ee3bb2f72 /doc
parentf651c727f85813085355bb207cf913288108ed79 (diff)
EVP: add functions that return the name number
The returned number can be used for comparison purposes. Reviewed-by: Tomas Mraz <tmraz@fedoraproject.org> (Merged from https://github.com/openssl/openssl/pull/9979)
Diffstat (limited to 'doc')
-rw-r--r--doc/man3/EVP_DigestInit.pod8
-rw-r--r--doc/man3/EVP_EncryptInit.pod5
-rw-r--r--doc/man3/EVP_KDF.pod6
-rw-r--r--doc/man3/EVP_KEYEXCH_free.pod9
-rw-r--r--doc/man3/EVP_KEYMGMT.pod7
-rw-r--r--doc/man3/EVP_MAC.pod6
-rw-r--r--doc/man3/EVP_SIGNATURE_free.pod8
7 files changed, 43 insertions, 6 deletions
diff --git a/doc/man3/EVP_DigestInit.pod b/doc/man3/EVP_DigestInit.pod
index c00a07671c..2c72a0dce3 100644
--- a/doc/man3/EVP_DigestInit.pod
+++ b/doc/man3/EVP_DigestInit.pod
@@ -12,7 +12,7 @@ EVP_MD_CTX_settable_params, EVP_MD_CTX_gettable_params,
EVP_MD_CTX_set_flags, EVP_MD_CTX_clear_flags, EVP_MD_CTX_test_flags,
EVP_Digest, EVP_DigestInit_ex, EVP_DigestInit, EVP_DigestUpdate,
EVP_DigestFinal_ex, EVP_DigestFinalXOF, EVP_DigestFinal,
-EVP_MD_is_a, EVP_MD_name, EVP_MD_names_do_all, EVP_MD_provider,
+EVP_MD_is_a, EVP_MD_name, EVP_MD_number, EVP_MD_names_do_all, EVP_MD_provider,
EVP_MD_type, EVP_MD_pkey_type, EVP_MD_size, EVP_MD_block_size, EVP_MD_flags,
EVP_MD_CTX_name,
EVP_MD_CTX_md, EVP_MD_CTX_type, EVP_MD_CTX_size, EVP_MD_CTX_block_size,
@@ -62,6 +62,7 @@ EVP_MD_do_all_provided
int EVP_MD_CTX_copy(EVP_MD_CTX *out, EVP_MD_CTX *in);
const char *EVP_MD_name(const EVP_MD *md);
+ int EVP_MD_number(const EVP_MD *md);
int EVP_MD_is_a(const EVP_MD *md, const char *name);
void EVP_MD_names_do_all(const EVP_MD *md,
void (*fn)(const char *name, void *data),
@@ -247,6 +248,11 @@ be initialized.
Returns 1 if I<md> is an implementation of an algorithm that's
identifiable with I<name>, otherwise 0.
+=item EVP_MD_number()
+
+Returns the internal dynamic number assigned to the I<md>. This is
+only useful with fetched B<EVP_MD>s.
+
=item EVP_MD_name(),
EVP_MD_CTX_name()
diff --git a/doc/man3/EVP_EncryptInit.pod b/doc/man3/EVP_EncryptInit.pod
index 0b6d4eba44..31e2fdeaf0 100644
--- a/doc/man3/EVP_EncryptInit.pod
+++ b/doc/man3/EVP_EncryptInit.pod
@@ -31,6 +31,7 @@ EVP_get_cipherbynid,
EVP_get_cipherbyobj,
EVP_CIPHER_is_a,
EVP_CIPHER_name,
+EVP_CIPHER_number,
EVP_CIPHER_names_do_all,
EVP_CIPHER_provider,
EVP_CIPHER_nid,
@@ -122,6 +123,7 @@ EVP_CIPHER_do_all_provided
const EVP_CIPHER *EVP_get_cipherbyobj(const ASN1_OBJECT *a);
int EVP_CIPHER_nid(const EVP_CIPHER *e);
+ int EVP_CIPHER_number(const EVP_CIPHER *e);
int EVP_CIPHER_is_a(const EVP_CIPHER *cipher, const char *name);
void EVP_CIPHER_names_do_all(const EVP_CIPHER *cipher,
void (*fn)(const char *name, void *data),
@@ -337,6 +339,9 @@ B<NID_undef>.
EVP_CIPHER_is_a() returns 1 if I<cipher> is an implementation of an
algorithm that's identifiable with I<name>, otherwise 0.
+EVP_CIPHER_number() returns the internal dynamic number assigned to
+the I<cipher>. This is only useful with fetched B<EVP_CIPHER>s.
+
EVP_CIPHER_name() and EVP_CIPHER_CTX_name() return the name of the passed
cipher or context. For fetched ciphers with multiple names, only one
of them is returned; it's recommended to use EVP_CIPHER_names_do_all()
diff --git a/doc/man3/EVP_KDF.pod b/doc/man3/EVP_KDF.pod
index 61c7a562e5..339129a943 100644
--- a/doc/man3/EVP_KDF.pod
+++ b/doc/man3/EVP_KDF.pod
@@ -6,7 +6,7 @@ EVP_KDF, EVP_KDF_fetch, EVP_KDF_free, EVP_KDF_up_ref,
EVP_KDF_CTX, EVP_KDF_CTX_new, EVP_KDF_CTX_free, EVP_KDF_CTX_dup,
EVP_KDF_reset, EVP_KDF_derive,
EVP_KDF_size, EVP_KDF_provider, EVP_KDF_CTX_kdf, EVP_KDF_is_a,
-EVP_KDF_names_do_all,
+EVP_KDF_number, EVP_KDF_names_do_all,
EVP_KDF_CTX_get_params, EVP_KDF_CTX_set_params, EVP_KDF_do_all_provided,
EVP_KDF_get_params, EVP_KDF_gettable_ctx_params, EVP_KDF_settable_ctx_params,
EVP_KDF_gettable_params - EVP KDF routines
@@ -29,6 +29,7 @@ EVP_KDF_gettable_params - EVP KDF routines
void EVP_KDF_free(EVP_KDF *kdf);
EVP_KDF *EVP_KDF_fetch(OPENSSL_CTX *libctx, const char *algorithm,
const char *properties);
+ int EVP_KDF_number(const EVP_KDF *kdf);
int EVP_KDF_is_a(const EVP_KDF *kdf, const char *name);
const OSSL_PROVIDER *EVP_KDF_provider(const EVP_KDF *kdf);
void EVP_KDF_do_all_provided(OPENSSL_CTX *libctx,
@@ -144,6 +145,9 @@ providers in the given library context I<libctx>, and for each of the
implementations, calls the given function I<fn> with the implementation method
and the given I<arg> as argument.
+EVP_KDF_number() returns the internal dynamic number assigned to
+I<kdf>.
+
EVP_KDF_names_do_all() traverses all names for I<kdf>, and calls
I<fn> with each name and I<data>.
diff --git a/doc/man3/EVP_KEYEXCH_free.pod b/doc/man3/EVP_KEYEXCH_free.pod
index d9b36a495a..deb9b9999b 100644
--- a/doc/man3/EVP_KEYEXCH_free.pod
+++ b/doc/man3/EVP_KEYEXCH_free.pod
@@ -3,7 +3,8 @@
=head1 NAME
EVP_KEYEXCH_fetch, EVP_KEYEXCH_free, EVP_KEYEXCH_up_ref, EVP_KEYEXCH_provider,
-EVP_KEYEXCH_is_a, EVP_KEYEXCH_do_all_provided, EVP_KEYEXCH_names_do_all
+EVP_KEYEXCH_is_a, EVP_KEYEXCH_do_all_provided,
+EVP_KEYEXCH_number, EVP_KEYEXCH_names_do_all
- Functions to manage EVP_KEYEXCH algorithm objects
=head1 SYNOPSIS
@@ -16,6 +17,7 @@ EVP_KEYEXCH_is_a, EVP_KEYEXCH_do_all_provided, EVP_KEYEXCH_names_do_all
int EVP_KEYEXCH_up_ref(EVP_KEYEXCH *exchange);
OSSL_PROVIDER *EVP_KEYEXCH_provider(const EVP_KEYEXCH *exchange);
int EVP_KEYEXCH_is_a(const EVP_KEYEXCH *exchange, const char *name);
+ int EVP_KEYEXCH_number(const EVP_KEYEXCH *exchange);
void EVP_KEYEXCH_do_all_provided(OPENSSL_CTX *libctx,
void (*fn)(EVP_KEYEXCH *exchange, void *arg),
void *arg);
@@ -45,6 +47,9 @@ EVP_KEYEXCH_provider() returns the provider that I<exchange> was fetched from.
EVP_KEYEXCH_is_a() checks if I<exchange> is an implementation of an
algorithm that's identifiable with I<name>.
+EVP_KEYEXCH_number() returns the internal dynamic number assigned to
+the I<exchange>.
+
EVP_KEYEXCH_names_do_all() traverses all names for the I<exchange>, and
calls I<fn> with each name and I<data>.
@@ -63,6 +68,8 @@ EVP_KEYEXCH_up_ref() returns 1 for success or 0 otherwise.
EVP_KEYEXCH_is_a() returns 1 of I<exchange> was identifiable,
otherwise 0.
+EVP_KEYEXCH_number() returns an integer.
+
=head1 SEE ALSO
L<provider(7)/Fetching algorithms>, L<OSSL_PROVIDER(3)>
diff --git a/doc/man3/EVP_KEYMGMT.pod b/doc/man3/EVP_KEYMGMT.pod
index 2115d29e5e..853a15f089 100644
--- a/doc/man3/EVP_KEYMGMT.pod
+++ b/doc/man3/EVP_KEYMGMT.pod
@@ -8,6 +8,7 @@ EVP_KEYMGMT_up_ref,
EVP_KEYMGMT_free,
EVP_KEYMGMT_provider,
EVP_KEYMGMT_is_a,
+EVP_KEYMGMT_number,
EVP_KEYMGMT_do_all_provided,
EVP_KEYMGMT_names_do_all
- EVP key management routines
@@ -24,6 +25,7 @@ EVP_KEYMGMT_names_do_all
void EVP_KEYMGMT_free(EVP_KEYMGMT *keymgmt);
const OSSL_PROVIDER *EVP_KEYMGMT_provider(const EVP_KEYMGMT *keymgmt);
int EVP_KEYMGMT_is_a(const EVP_KEYMGMT *keymgmt, const char *name);
+ int EVP_KEYMGMT_number(const EVP_KEYMGMT *keymgmt);
void EVP_KEYMGMT_do_all_provided(OPENSSL_CTX *libctx,
void (*fn)(EVP_KEYMGMT *keymgmt, void *arg),
void *arg);
@@ -58,6 +60,9 @@ implementation.
EVP_KEYMGMT_is_a() checks if I<keymgmt> is an implementation of an
algorithm that's identifiable with I<name>.
+EVP_KEYMGMT_number() returns the internal dynamic number assigned to
+the I<keymgmt>.
+
EVP_KEYMGMT_names_do_all() traverses all names for the I<keymgmt>, and
calls I<fn> with each name and I<data>.
@@ -88,6 +93,8 @@ on error.
EVP_KEYMGMT_is_a() returns 1 of I<keymgmt> was identifiable,
otherwise 0.
+EVP_KEYMGMT_number() returns an integer.
+
=head1 SEE ALSO
L<EVP_MD_fetch(3)>, L<OPENSSL_CTX(3)>
diff --git a/doc/man3/EVP_MAC.pod b/doc/man3/EVP_MAC.pod
index cd3755d8ef..1081314879 100644
--- a/doc/man3/EVP_MAC.pod
+++ b/doc/man3/EVP_MAC.pod
@@ -3,7 +3,7 @@
=head1 NAME
EVP_MAC, EVP_MAC_fetch, EVP_MAC_up_ref, EVP_MAC_free,
-EVP_MAC_is_a, EVP_MAC_names_do_all,
+EVP_MAC_is_a, EVP_MAC_number, EVP_MAC_names_do_all,
EVP_MAC_provider, EVP_MAC_get_params, EVP_MAC_gettable_params,
EVP_MAC_CTX, EVP_MAC_CTX_new, EVP_MAC_CTX_free, EVP_MAC_CTX_dup,
EVP_MAC_CTX_mac, EVP_MAC_CTX_get_params, EVP_MAC_CTX_set_params,
@@ -23,6 +23,7 @@ EVP_MAC_do_all_provided - EVP MAC routines
int EVP_MAC_up_ref(EVP_MAC *mac);
void EVP_MAC_free(EVP_MAC *mac);
int EVP_MAC_is_a(const EVP_MAC *mac, const char *name);
+ int EVP_MAC_number(const EVP_MAC *mac);
void EVP_MAC_names_do_all(const EVP_MAC *mac,
void (*fn)(const char *name, void *data),
void *data);
@@ -170,6 +171,9 @@ providers in the given library context I<libctx>, and for each of the
implementations, calls the given function I<fn> with the implementation method
and the given I<arg> as argument.
+EVP_MAC_number() returns the internal dynamic number assigned to
+I<mac>.
+
EVP_MAC_names_do_all() traverses all names for I<mac>, and calls
I<fn> with each name and I<data>.
diff --git a/doc/man3/EVP_SIGNATURE_free.pod b/doc/man3/EVP_SIGNATURE_free.pod
index fa2106aeb8..70a0ee72dc 100644
--- a/doc/man3/EVP_SIGNATURE_free.pod
+++ b/doc/man3/EVP_SIGNATURE_free.pod
@@ -3,8 +3,8 @@
=head1 NAME
EVP_SIGNATURE_fetch, EVP_SIGNATURE_free, EVP_SIGNATURE_up_ref,
-EVP_SIGNATURE_is_a, EVP_SIGNATURE_provider, EVP_SIGNATURE_do_all_provided,
-EVP_SIGNATURE_names_do_all
+EVP_SIGNATURE_number, EVP_SIGNATURE_is_a, EVP_SIGNATURE_provider,
+EVP_SIGNATURE_do_all_provided, EVP_SIGNATURE_names_do_all
- Functions to manage EVP_SIGNATURE algorithm objects
=head1 SYNOPSIS
@@ -15,6 +15,7 @@ EVP_SIGNATURE_names_do_all
const char *properties);
void EVP_SIGNATURE_free(EVP_SIGNATURE *signature);
int EVP_SIGNATURE_up_ref(EVP_SIGNATURE *signature);
+ int EVP_SIGNATURE_number(const EVP_SIGNATURE *signature);
int EVP_SIGNATURE_is_a(const EVP_SIGNATURE *signature, const char *name);
OSSL_PROVIDER *EVP_SIGNATURE_provider(const EVP_SIGNATURE *signature);
void EVP_SIGNATURE_do_all_provided(OPENSSL_CTX *libctx,
@@ -54,6 +55,9 @@ activated roviders in the given library context I<libctx>, and for each of the
implementations, calls the given function I<fn> with the implementation method
and the given I<arg> as argument.
+EVP_SIGNATURE_number() returns the internal dynamic number assigned to
+I<signature>.
+
EVP_SIGNATURE_names_do_all() traverses all names for I<signature>, and calls
I<fn> with each name and I<data>.