remove warnings

This commit is contained in:
Zhi Guan
2020-06-19 15:56:33 +08:00
parent ec29454f1d
commit 5a000d0998
42 changed files with 6607 additions and 5928 deletions

View File

@@ -67,6 +67,12 @@ static void sm2_sign_free(void *parent, void *ptr, CRYPTO_EX_DATA *ad,
BN_clear_free(bn);
CRYPTO_set_ex_data(ad, sm2_sign_idx, NULL);
}
(void)parent;
(void)ptr;
(void)idx;
(void)argl;
(void)argp;
}
static int sm2_sign_setup(EC_KEY *ec_key, BN_CTX *ctx_in, BIGNUM **kp, BIGNUM **xp)
@@ -542,6 +548,10 @@ int SM2_sign_ex(int type, const unsigned char *dgst, int dgstlen,
{
ECDSA_SIG *s;
if (type != NID_undef) {
return 0;
}
RAND_seed(dgst, dgstlen);
if (!(s = SM2_do_sign_ex(dgst, dgstlen, k, x, ec_key))) {
@@ -570,6 +580,10 @@ int SM2_verify(int type, const unsigned char *dgst, int dgstlen,
int derlen = -1;
int ret = -1;
if (type != NID_undef) {
return ret;
}
if (!(s = ECDSA_SIG_new())) {
return ret;
}