diff options
author | Richard Levitte <levitte@openssl.org> | 2018-10-12 22:27:18 +0200 |
---|---|---|
committer | Richard Levitte <levitte@openssl.org> | 2018-10-29 13:35:19 +0100 |
commit | 567db2c17d4ea8a0164d7abd8aed65b7a634bb40 (patch) | |
tree | 064c9a50082bc9cda43b96dcde3f7eba5a0c6bd5 /crypto/evp/evp_locl.h | |
parent | Rework and simplify resource flow in drbg_add (diff) | |
download | openssl-567db2c17d4ea8a0164d7abd8aed65b7a634bb40.tar.xz openssl-567db2c17d4ea8a0164d7abd8aed65b7a634bb40.zip |
Add EVP_MAC API
We currently implement EVP MAC methods as EVP_PKEY methods. This
change creates a separate EVP API for MACs, to replace the current
EVP_PKEY ones.
A note about this EVP API and how it interfaces with underlying MAC
implementations:
Other EVP APIs pass the EVP API context down to implementations, and
it can be observed that the implementations use the pointer to their
own private data almost exclusively. The EVP_MAC API deviates from
that pattern by passing the pointer to the implementation's private
data directly, and thereby deny the implementations access to the
EVP_MAC context structure. This change is made to provide a clearer
separation between the EVP library itself and the implementations of
its supported algorithm classes.
Reviewed-by: Paul Dale <paul.dale@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/7393)
Diffstat (limited to 'crypto/evp/evp_locl.h')
-rw-r--r-- | crypto/evp/evp_locl.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/crypto/evp/evp_locl.h b/crypto/evp/evp_locl.h index f1589d6828..eaee472b92 100644 --- a/crypto/evp/evp_locl.h +++ b/crypto/evp/evp_locl.h @@ -41,6 +41,11 @@ struct evp_cipher_ctx_st { unsigned char final[EVP_MAX_BLOCK_LENGTH]; /* possible final block */ } /* EVP_CIPHER_CTX */ ; +struct evp_mac_ctx_st { + const EVP_MAC *meth; /* Method structure */ + void *data; /* Individual method data */ +} /* EVP_MAC_CTX */; + int PKCS5_v2_PBKDF2_keyivgen(EVP_CIPHER_CTX *ctx, const char *pass, int passlen, ASN1_TYPE *param, const EVP_CIPHER *c, const EVP_MD *md, |