提交 eb63bce0 编写于 作者: M Matt Caswell 提交者: Rich Salz

RT3192: spurious error in DSA verify

This is funny; Ben commented in the source, Matt opend a ticket,
and Rich is doing the submit.  Need more code-review? :)
Reviewed-by: NDr. Stephen Henson <steve@openssl.org>
上级 c939cca1
...@@ -449,9 +449,7 @@ static int dsa_do_verify(const unsigned char *dgst, int dgst_len, DSA_SIG *sig, ...@@ -449,9 +449,7 @@ static int dsa_do_verify(const unsigned char *dgst, int dgst_len, DSA_SIG *sig,
ret=(BN_ucmp(&u1, sig->r) == 0); ret=(BN_ucmp(&u1, sig->r) == 0);
err: err:
/* XXX: surely this is wrong - if ret is 0, it just didn't verify; if (ret < 0) DSAerr(DSA_F_DSA_DO_VERIFY,ERR_R_BN_LIB);
there is no error in BN. Test should be ret == -1 (Ben) */
if (ret != 1) DSAerr(DSA_F_DSA_DO_VERIFY,ERR_R_BN_LIB);
if (ctx != NULL) BN_CTX_free(ctx); if (ctx != NULL) BN_CTX_free(ctx);
BN_free(&u1); BN_free(&u1);
BN_free(&u2); BN_free(&u2);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册