Add EVP_MD_CTX_ctrl function.
Reviewed-by: Tim Hudson <tjh@openssl.org>
This commit is contained in:
parent
93972b8c72
commit
396d5fd091
@ -364,3 +364,14 @@ int EVP_MD_CTX_cleanup(EVP_MD_CTX *ctx)
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
int EVP_MD_CTX_ctrl(EVP_MD_CTX *ctx, int cmd, int p1, void *p2)
|
||||
{
|
||||
if (ctx->digest && ctx->digest->md_ctrl) {
|
||||
int ret = ctx->digest->md_ctrl(ctx, cmd, p1, p2);
|
||||
if (ret <= 0)
|
||||
return 0;
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
@ -626,6 +626,7 @@ void BIO_set_md(BIO *, const EVP_MD *md);
|
||||
|
||||
void EVP_MD_CTX_init(EVP_MD_CTX *ctx);
|
||||
int EVP_MD_CTX_cleanup(EVP_MD_CTX *ctx);
|
||||
int EVP_MD_CTX_ctrl(EVP_MD_CTX *ctx, int cmd, int p1, void *p2);
|
||||
EVP_MD_CTX *EVP_MD_CTX_create(void);
|
||||
void EVP_MD_CTX_destroy(EVP_MD_CTX *ctx);
|
||||
/*__owur*/ int EVP_MD_CTX_copy_ex(EVP_MD_CTX *out, const EVP_MD_CTX *in);
|
||||
|
Loading…
x
Reference in New Issue
Block a user