mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-07-31 11:17:29 +02:00
fix whitespace.
This commit is contained in:
6
src/pk.c
6
src/pk.c
@ -9306,7 +9306,7 @@ int wolfSSL_ECDSA_do_verify(const unsigned char *d, int dlen,
|
|||||||
r = wolfSSL_BN_bn2hex(sig->r);
|
r = wolfSSL_BN_bn2hex(sig->r);
|
||||||
s = wolfSSL_BN_bn2hex(sig->s);
|
s = wolfSSL_BN_bn2hex(sig->s);
|
||||||
/* get DER-encoded ECDSA signature */
|
/* 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);
|
signature, &signaturelen);
|
||||||
/* free r and s */
|
/* free r and s */
|
||||||
if (r)
|
if (r)
|
||||||
@ -9318,10 +9318,10 @@ int wolfSSL_ECDSA_do_verify(const unsigned char *d, int dlen,
|
|||||||
WOLFSSL_MSG("wc_ecc_verify_hash failed");
|
WOLFSSL_MSG("wc_ecc_verify_hash failed");
|
||||||
return WOLFSSL_FATAL_ERROR;
|
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,
|
ret = wc_ecc_verify_hash(signature, signaturelen, d, dlen, &check_sign,
|
||||||
(ecc_key*)key->internal);
|
(ecc_key*)key->internal);
|
||||||
|
|
||||||
if (ret != MP_OKAY) {
|
if (ret != MP_OKAY) {
|
||||||
WOLFSSL_MSG("wc_ecc_verify_hash failed");
|
WOLFSSL_MSG("wc_ecc_verify_hash failed");
|
||||||
return WOLFSSL_FATAL_ERROR;
|
return WOLFSSL_FATAL_ERROR;
|
||||||
|
@ -39428,7 +39428,7 @@ static int ecc_onlycb_test(myCryptoDevCtx *ctx)
|
|||||||
byte* out = (byte*)XMALLOC(sizeof(byte),
|
byte* out = (byte*)XMALLOC(sizeof(byte),
|
||||||
HEAP_HINT, DYNAMIC_TYPE_TMP_BUFFER);
|
HEAP_HINT, DYNAMIC_TYPE_TMP_BUFFER);
|
||||||
#ifdef OPENSSL_EXTRA
|
#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);
|
DYNAMIC_TYPE_TMP_BUFFER);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
@ -39581,10 +39581,10 @@ static int ecc_onlycb_test(myCryptoDevCtx *ctx)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
ret = 0;
|
ret = 0;
|
||||||
|
|
||||||
|
|
||||||
#ifdef OPENSSL_EXTRA
|
#ifdef OPENSSL_EXTRA
|
||||||
|
|
||||||
(void)pkey;
|
(void)pkey;
|
||||||
cp = ecc_clikey_der_256;
|
cp = ecc_clikey_der_256;
|
||||||
privKey = d2i_PrivateKey(EVP_PKEY_EC, NULL, &cp,
|
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 = (ecc_key*)privKey->ecc->internal;
|
||||||
pkey->devId = devId;
|
pkey->devId = devId;
|
||||||
|
|
||||||
p = ecc_clikeypub_der_256;
|
p = ecc_clikeypub_der_256;
|
||||||
pubKey = d2i_PUBKEY(NULL, &p, sizeof_ecc_clikeypub_der_256);
|
pubKey = d2i_PUBKEY(NULL, &p, sizeof_ecc_clikeypub_der_256);
|
||||||
if (pubKey == NULL) {
|
if (pubKey == NULL) {
|
||||||
@ -39605,7 +39605,7 @@ static int ecc_onlycb_test(myCryptoDevCtx *ctx)
|
|||||||
|
|
||||||
/* sign */
|
/* sign */
|
||||||
EVP_MD_CTX_init(&mdCtx);
|
EVP_MD_CTX_init(&mdCtx);
|
||||||
|
|
||||||
ret = EVP_DigestSignInit(&mdCtx, NULL, EVP_sha256(), NULL, privKey);
|
ret = EVP_DigestSignInit(&mdCtx, NULL, EVP_sha256(), NULL, privKey);
|
||||||
if (ret != WOLFSSL_SUCCESS) {
|
if (ret != WOLFSSL_SUCCESS) {
|
||||||
ERROR_OUT(-8021, exit_onlycb);
|
ERROR_OUT(-8021, exit_onlycb);
|
||||||
@ -39647,7 +39647,7 @@ static int ecc_onlycb_test(myCryptoDevCtx *ctx)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* verify */
|
/* verify */
|
||||||
|
|
||||||
EVP_MD_CTX_init(&mdCtx);
|
EVP_MD_CTX_init(&mdCtx);
|
||||||
|
|
||||||
if (ret == SSL_SUCCESS) {
|
if (ret == SSL_SUCCESS) {
|
||||||
|
Reference in New Issue
Block a user