diff options
author | Richard Levitte <levitte@openssl.org> | 2015-11-27 13:35:02 +0100 |
---|---|---|
committer | Richard Levitte <levitte@openssl.org> | 2015-12-07 17:36:57 +0100 |
commit | 7638370ca6cb1d89eba5d891f522776b9da3d6e7 (patch) | |
tree | cb35fe9a2f06491a482ff9f6fc5f97e97579b109 /crypto/evp/evp_locl.h | |
parent | 451a5bdf0386d7acf091c3e3b39107e5ed8be25d (diff) |
Make the definition of EVP_MD_CTX opaque
This moves the definitionto crypto/evp/evp_locl.h, along with a few
associated accessor macros. A few accessor/writer functions added.
Reviewed-by: Rich Salz <rsalz@openssl.org>
Diffstat (limited to 'crypto/evp/evp_locl.h')
-rw-r--r-- | crypto/evp/evp_locl.h | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/crypto/evp/evp_locl.h b/crypto/evp/evp_locl.h index b70a54ce77..1fbdb65641 100644 --- a/crypto/evp/evp_locl.h +++ b/crypto/evp/evp_locl.h @@ -57,6 +57,26 @@ * */ +/* EVP_MD_CTX related stuff */ + +struct evp_md_ctx_st { + const EVP_MD *digest; + ENGINE *engine; /* functional reference if 'digest' is + * ENGINE-provided */ + unsigned long flags; + void *md_data; + /* Public key context for sign/verify */ + EVP_PKEY_CTX *pctx; + /* Update function: usually copied from EVP_MD */ + int (*update) (EVP_MD_CTX *ctx, const void *data, size_t count); +} /* EVP_MD_CTX */ ; + +# define M_EVP_MD_CTX_set_flags(ctx,flgs) ((ctx)->flags|=(flgs)) +# define M_EVP_MD_CTX_clear_flags(ctx,flgs) ((ctx)->flags&=~(flgs)) +# define M_EVP_MD_CTX_test_flags(ctx,flgs) ((ctx)->flags&(flgs)) +# define M_EVP_MD_CTX_type(e) M_EVP_MD_type(M_EVP_MD_CTX_md(e)) +# define M_EVP_MD_CTX_md(e) ((e)->digest) + /* Macros to code block cipher wrappers */ /* Wrapper functions for each cipher mode */ |