summaryrefslogtreecommitdiffstats
path: root/crypto/evp/m_sigver.c
diff options
context:
space:
mode:
authorShane Lontis <shane.lontis@oracle.com>2020-07-26 09:32:05 +0200
committerShane Lontis <shane.lontis@oracle.com>2020-08-09 09:34:52 +0200
commit0ab18e7924727f7b613edc187f3a5074d0ce9bc6 (patch)
tree15d960fa8fd6adca2f9bf74621fada77098a8be5 /crypto/evp/m_sigver.c
parentUse libctx for EVP_CIPHER_CTX_rand_key() method. (diff)
downloadopenssl-0ab18e7924727f7b613edc187f3a5074d0ce9bc6.tar.xz
openssl-0ab18e7924727f7b613edc187f3a5074d0ce9bc6.zip
Add EVP signature with libctx methods.
-Added EVP_SignFinal_with_libctx() and EVP_VerifyFinal_with_libctx() -Renamed EVP_DigestSignInit_ex() and EVP_DigestVerifyInit_with_libctx() to EVP_DigestSignInit_with_libctx() and EVP_DigestVerifyInit_with_libctx() Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/11884)
Diffstat (limited to 'crypto/evp/m_sigver.c')
-rw-r--r--crypto/evp/m_sigver.c27
1 files changed, 14 insertions, 13 deletions
diff --git a/crypto/evp/m_sigver.c b/crypto/evp/m_sigver.c
index 8d37f19d6c..04ac121e25 100644
--- a/crypto/evp/m_sigver.c
+++ b/crypto/evp/m_sigver.c
@@ -38,8 +38,8 @@ static const char *canon_mdname(const char *mdname)
static int do_sigver_init(EVP_MD_CTX *ctx, EVP_PKEY_CTX **pctx,
const EVP_MD *type, const char *mdname,
- const char *props, ENGINE *e, EVP_PKEY *pkey,
- OPENSSL_CTX *libctx, int ver)
+ OPENSSL_CTX *libctx, const char *props,
+ ENGINE *e, EVP_PKEY *pkey, int ver)
{
EVP_PKEY_CTX *locpctx = NULL;
EVP_SIGNATURE *signature = NULL;
@@ -285,31 +285,32 @@ static int do_sigver_init(EVP_MD_CTX *ctx, EVP_PKEY_CTX **pctx,
return 1;
}
-int EVP_DigestSignInit_ex(EVP_MD_CTX *ctx, EVP_PKEY_CTX **pctx,
- const char *mdname, const char *props, EVP_PKEY *pkey,
- OPENSSL_CTX *libctx)
+int EVP_DigestSignInit_with_libctx(EVP_MD_CTX *ctx, EVP_PKEY_CTX **pctx,
+ const char *mdname,
+ OPENSSL_CTX *libctx, const char *props,
+ EVP_PKEY *pkey)
{
- return do_sigver_init(ctx, pctx, NULL, mdname, props, NULL, pkey, libctx,
- 0);
+ return do_sigver_init(ctx, pctx, NULL, mdname, libctx, props, NULL, pkey, 0);
}
int EVP_DigestSignInit(EVP_MD_CTX *ctx, EVP_PKEY_CTX **pctx,
const EVP_MD *type, ENGINE *e, EVP_PKEY *pkey)
{
- return do_sigver_init(ctx, pctx, type, NULL, NULL, e, pkey, NULL, 0);
+ return do_sigver_init(ctx, pctx, type, NULL, NULL, NULL, e, pkey, 0);
}
-int EVP_DigestVerifyInit_ex(EVP_MD_CTX *ctx, EVP_PKEY_CTX **pctx,
- const char *mdname, const char *props,
- EVP_PKEY *pkey, OPENSSL_CTX *libctx)
+int EVP_DigestVerifyInit_with_libctx(EVP_MD_CTX *ctx, EVP_PKEY_CTX **pctx,
+ const char *mdname,
+ OPENSSL_CTX *libctx, const char *props,
+ EVP_PKEY *pkey)
{
- return do_sigver_init(ctx, pctx, NULL, mdname, props, NULL, pkey, libctx, 1);
+ return do_sigver_init(ctx, pctx, NULL, mdname, libctx, props, NULL, pkey, 1);
}
int EVP_DigestVerifyInit(EVP_MD_CTX *ctx, EVP_PKEY_CTX **pctx,
const EVP_MD *type, ENGINE *e, EVP_PKEY *pkey)
{
- return do_sigver_init(ctx, pctx, type, NULL, NULL, e, pkey, NULL, 1);
+ return do_sigver_init(ctx, pctx, type, NULL, NULL, NULL, e, pkey, 1);
}
#endif /* FIPS_MDOE */