diff --git a/src/pk.c b/src/pk.c index 0369a0681..04070ec70 100644 --- a/src/pk.c +++ b/src/pk.c @@ -9306,7 +9306,7 @@ int wolfSSL_ECDSA_do_verify(const unsigned char *d, int dlen, r = wolfSSL_BN_bn2hex(sig->r); s = wolfSSL_BN_bn2hex(sig->s); /* get DER-encoded ECDSA signature */ - ret = wc_ecc_rs_to_sig((const char*)r, (const char*)s, + ret = wc_ecc_rs_to_sig((const char*)r, (const char*)s, signature, &signaturelen); /* free r and s */ if (r) @@ -9318,10 +9318,10 @@ int wolfSSL_ECDSA_do_verify(const unsigned char *d, int dlen, WOLFSSL_MSG("wc_ecc_verify_hash failed"); return WOLFSSL_FATAL_ERROR; } - /* verify hash. expects to call wc_CryptoCb_EccVerify internally */ + /* verify hash. expects to call wc_CryptoCb_EccVerify internally */ ret = wc_ecc_verify_hash(signature, signaturelen, d, dlen, &check_sign, (ecc_key*)key->internal); - + if (ret != MP_OKAY) { WOLFSSL_MSG("wc_ecc_verify_hash failed"); return WOLFSSL_FATAL_ERROR; diff --git a/wolfcrypt/test/test.c b/wolfcrypt/test/test.c index dedf057c0..683d0dde8 100644 --- a/wolfcrypt/test/test.c +++ b/wolfcrypt/test/test.c @@ -39428,7 +39428,7 @@ static int ecc_onlycb_test(myCryptoDevCtx *ctx) byte* out = (byte*)XMALLOC(sizeof(byte), HEAP_HINT, DYNAMIC_TYPE_TMP_BUFFER); #ifdef OPENSSL_EXTRA - byte* check = (byte*)XMALLOC(sizeof(byte)*(256), HEAP_HINT, + byte* check = (byte*)XMALLOC(sizeof(byte)*(256), HEAP_HINT, DYNAMIC_TYPE_TMP_BUFFER); #endif @@ -39581,10 +39581,10 @@ static int ecc_onlycb_test(myCryptoDevCtx *ctx) } else ret = 0; - - + + #ifdef OPENSSL_EXTRA - + (void)pkey; cp = ecc_clikey_der_256; privKey = d2i_PrivateKey(EVP_PKEY_EC, NULL, &cp, @@ -39594,7 +39594,7 @@ static int ecc_onlycb_test(myCryptoDevCtx *ctx) } pkey = (ecc_key*)privKey->ecc->internal; pkey->devId = devId; - + p = ecc_clikeypub_der_256; pubKey = d2i_PUBKEY(NULL, &p, sizeof_ecc_clikeypub_der_256); if (pubKey == NULL) { @@ -39605,7 +39605,7 @@ static int ecc_onlycb_test(myCryptoDevCtx *ctx) /* sign */ EVP_MD_CTX_init(&mdCtx); - + ret = EVP_DigestSignInit(&mdCtx, NULL, EVP_sha256(), NULL, privKey); if (ret != WOLFSSL_SUCCESS) { ERROR_OUT(-8021, exit_onlycb); @@ -39647,7 +39647,7 @@ static int ecc_onlycb_test(myCryptoDevCtx *ctx) } /* verify */ - + EVP_MD_CTX_init(&mdCtx); if (ret == SSL_SUCCESS) {