diff options
author | Adam Langley <agl@google.com> | 2016-03-09 02:00:18 +0300 |
---|---|---|
committer | David Benjamin <davidben@google.com> | 2016-03-09 22:38:06 +0300 |
commit | a7a226add9a3fb9efc2540d12635683150820f83 (patch) | |
tree | 94da0e599365dc03e3b79bedbfc4d742286389c8 /include/openssl/obj.h | |
parent | ff452c1d0e5bf389a112e35dba09a61b424a7d00 (diff) |
Add |OBJ_NAME_do_all_sorted|.
This another of those functions that tries to turn C into Python. In
this case, implement it in terms of the similar functions in EVP so that
at least we only have one list of things.
This makes life with nmap easier.
Change-Id: I6d01c43f062748d4ba7d7020587c286322e610bb
Reviewed-on: https://boringssl-review.googlesource.com/7403
Reviewed-by: David Benjamin <davidben@google.com>
Diffstat (limited to 'include/openssl/obj.h')
-rw-r--r-- | include/openssl/obj.h | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/include/openssl/obj.h b/include/openssl/obj.h index 32a48948..884cd180 100644 --- a/include/openssl/obj.h +++ b/include/openssl/obj.h @@ -189,6 +189,32 @@ OPENSSL_EXPORT int OBJ_find_sigid_by_algs(int *out_sign_nid, int digest_nid, int pkey_nid); +/* Deprecated functions. */ + +typedef struct obj_name_st { + int type; + const char *name; +} OBJ_NAME; + +#define OBJ_NAME_TYPE_MD_METH 1 +#define OBJ_NAME_TYPE_CIPHER_METH 2 + +/* OBJ_NAME_do_all_sorted calls |callback| zero or more times, each time with + * the name of a different primitive. If |type| is |OBJ_NAME_TYPE_MD_METH| then + * the primitives will be hash functions, alternatively if |type| is + * |OBJ_NAME_TYPE_CIPHER_METH| then the primitives will be ciphers or cipher + * modes. + * + * This function is ill-specified and should never be used. */ +OPENSSL_EXPORT void OBJ_NAME_do_all_sorted( + int type, void (*callback)(const OBJ_NAME *, void *arg), void *arg); + +/* OBJ_NAME_do_all calls |OBJ_NAME_do_all_sorted|. */ +OPENSSL_EXPORT void OBJ_NAME_do_all(int type, void (*callback)(const OBJ_NAME *, + void *arg), + void *arg); + + #if defined(__cplusplus) } /* extern C */ #endif |