projects
/
oweals
/
openssl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ad35cda
)
Use EVP_DigestVerify() in dgst.c if verifying.
author
Dr. Stephen Henson
<steve@openssl.org>
Thu, 17 May 2007 12:35:32 +0000
(12:35 +0000)
committer
Dr. Stephen Henson
<steve@openssl.org>
Thu, 17 May 2007 12:35:32 +0000
(12:35 +0000)
apps/dgst.c
patch
|
blob
|
history
diff --git
a/apps/dgst.c
b/apps/dgst.c
index 9981ee1db5164fe923beeb5513064f31517213ac..147c4f9e61ff89ca7d8b5a5963b43260c0446a67 100644
(file)
--- a/
apps/dgst.c
+++ b/
apps/dgst.c
@@
-412,13
+412,18
@@
int MAIN(int argc, char **argv)
{
EVP_MD_CTX *mctx = NULL;
EVP_PKEY_CTX *pctx = NULL;
+ int r;
if (!BIO_get_md_ctx(bmd, &mctx))
{
BIO_printf(bio_err, "Error getting context\n");
ERR_print_errors(bio_err);
goto end;
}
- if (!EVP_DigestSignInit(mctx, &pctx, md, e, sigkey))
+ if (do_verify)
+ r = EVP_DigestVerifyInit(mctx, &pctx, md, e, sigkey);
+ else
+ r = EVP_DigestSignInit(mctx, &pctx, md, e, sigkey);
+ if (!r)
{
BIO_printf(bio_err, "Error setting context\n");
ERR_print_errors(bio_err);