mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-08-03 20:54:41 +02:00
Whitespace cleanups.
This commit is contained in:
committed by
Hideki Miyazaki
parent
d3a379adac
commit
99af84f1e2
@@ -9160,8 +9160,8 @@ static int _ecc_validate_public_key(ecc_key* key, int partial, int priv)
|
|||||||
defined(WOLFSSL_SE050) || defined(WOLF_CRYPTO_CB_ONLY_ECC)
|
defined(WOLFSSL_SE050) || defined(WOLF_CRYPTO_CB_ONLY_ECC)
|
||||||
|
|
||||||
/* consider key check success on HW crypto
|
/* consider key check success on HW crypto
|
||||||
* ex: ATECC508/608A, CryptoCell and Silabs
|
* ex: ATECC508/608A, CryptoCell and Silabs
|
||||||
*
|
*
|
||||||
* consider key check success on Crypt Cb
|
* consider key check success on Crypt Cb
|
||||||
*/
|
*/
|
||||||
err = MP_OKAY;
|
err = MP_OKAY;
|
||||||
|
@@ -1585,7 +1585,7 @@ options: [-s max_relative_stack_bytes] [-m max_relative_heap_memory_bytes]\n\
|
|||||||
#if !defined(NO_ASN) && (defined(HAVE_ECC) || !defined(NO_DSA) || \
|
#if !defined(NO_ASN) && (defined(HAVE_ECC) || !defined(NO_DSA) || \
|
||||||
(!defined(NO_RSA) && (defined(WOLFSSL_KEY_GEN) || defined(WOLFSSL_CERT_GEN)))) \
|
(!defined(NO_RSA) && (defined(WOLFSSL_KEY_GEN) || defined(WOLFSSL_CERT_GEN)))) \
|
||||||
&& !defined(WOLF_CRYPTO_CB_ONLY_ECC)
|
&& !defined(WOLF_CRYPTO_CB_ONLY_ECC)
|
||||||
|
|
||||||
#if !defined(NO_FILESYSTEM) && !defined(NO_WRITE_TEMP_FILES)
|
#if !defined(NO_FILESYSTEM) && !defined(NO_WRITE_TEMP_FILES)
|
||||||
#define SaveDerAndPem(d, dSz, fD, fP, pT, eB) _SaveDerAndPem(d, dSz, fD, fP, pT, eB)
|
#define SaveDerAndPem(d, dSz, fD, fP, pT, eB) _SaveDerAndPem(d, dSz, fD, fP, pT, eB)
|
||||||
#else
|
#else
|
||||||
@@ -38377,11 +38377,11 @@ typedef struct {
|
|||||||
#ifdef WOLF_CRYPTO_CB_ONLY_RSA
|
#ifdef WOLF_CRYPTO_CB_ONLY_RSA
|
||||||
/* Testing rsa cb when CB_ONLY_RSA is enabled
|
/* Testing rsa cb when CB_ONLY_RSA is enabled
|
||||||
* When CB_ONLY_RSA is enabled, software imple. is not available.
|
* When CB_ONLY_RSA is enabled, software imple. is not available.
|
||||||
*
|
*
|
||||||
* ctx callback ctx
|
* ctx callback ctx
|
||||||
* returen 0 on success, otherwise return -8000 - -8007
|
* returen 0 on success, otherwise return -8000 - -8007
|
||||||
*/
|
*/
|
||||||
static int rsa_onlycb_test(myCryptoDevCtx *ctx)
|
static int rsa_onlycb_test(myCryptoDevCtx *ctx)
|
||||||
{
|
{
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
#if !defined(NO_RSA)
|
#if !defined(NO_RSA)
|
||||||
@@ -38503,7 +38503,7 @@ static int rsa_onlycb_test(myCryptoDevCtx *ctx)
|
|||||||
if (ret == 0) {
|
if (ret == 0) {
|
||||||
/* wc_SignatureGenerate() -> rsa cb ->
|
/* wc_SignatureGenerate() -> rsa cb ->
|
||||||
* myCryptoDevCb -> wc_RsaFunction(INVALID_DEVID)
|
* myCryptoDevCb -> wc_RsaFunction(INVALID_DEVID)
|
||||||
* wc_SignatureGenerate(INVALID_DEVID) expects to
|
* wc_SignatureGenerate(INVALID_DEVID) expects to
|
||||||
* return NO_VALID_DEVID(failure)
|
* return NO_VALID_DEVID(failure)
|
||||||
*/
|
*/
|
||||||
ctx->exampleVar = 1;
|
ctx->exampleVar = 1;
|
||||||
@@ -38536,7 +38536,7 @@ exit_onlycb:
|
|||||||
#ifdef WOLF_CRYPTO_CB_ONLY_ECC
|
#ifdef WOLF_CRYPTO_CB_ONLY_ECC
|
||||||
/* Testing rsa cb when CB_ONLY_ECC is enabled
|
/* Testing rsa cb when CB_ONLY_ECC is enabled
|
||||||
* When CB_ONLY_ECC is enabled, software imple. is not available.
|
* When CB_ONLY_ECC is enabled, software imple. is not available.
|
||||||
*
|
*
|
||||||
* ctx callback ctx
|
* ctx callback ctx
|
||||||
* returen 0 on success, otherwise return -8008 - -8018
|
* returen 0 on success, otherwise return -8008 - -8018
|
||||||
*/
|
*/
|
||||||
@@ -38615,7 +38615,7 @@ static int ecc_onlycb_test(myCryptoDevCtx *ctx)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
ret = 0;
|
ret = 0;
|
||||||
|
|
||||||
/* wc_CryptoCb_EccVerify cb test, no actual testing */
|
/* wc_CryptoCb_EccVerify cb test, no actual testing */
|
||||||
ctx->exampleVar = 99;
|
ctx->exampleVar = 99;
|
||||||
if (ret == 0) {
|
if (ret == 0) {
|
||||||
@@ -38624,7 +38624,7 @@ static int ecc_onlycb_test(myCryptoDevCtx *ctx)
|
|||||||
if (ret != 0) {
|
if (ret != 0) {
|
||||||
ERROR_OUT(-8015, exit_onlycb);
|
ERROR_OUT(-8015, exit_onlycb);
|
||||||
}
|
}
|
||||||
|
|
||||||
ctx->exampleVar = 1;
|
ctx->exampleVar = 1;
|
||||||
if (ret == 0) {
|
if (ret == 0) {
|
||||||
ret = wc_ecc_verify_hash(in, inLen, out, outLen, &verify, key);
|
ret = wc_ecc_verify_hash(in, inLen, out, outLen, &verify, key);
|
||||||
@@ -38634,12 +38634,12 @@ static int ecc_onlycb_test(myCryptoDevCtx *ctx)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
ret = 0;
|
ret = 0;
|
||||||
|
|
||||||
/* wc_CryptoCb_Ecdh cb test, no actual testing */
|
/* wc_CryptoCb_Ecdh cb test, no actual testing */
|
||||||
|
|
||||||
/* make public key for shared secret */
|
/* make public key for shared secret */
|
||||||
wc_ecc_init_ex(pub, HEAP_HINT, devId);
|
wc_ecc_init_ex(pub, HEAP_HINT, devId);
|
||||||
|
|
||||||
ctx->exampleVar = 99;
|
ctx->exampleVar = 99;
|
||||||
if (ret == 0) {
|
if (ret == 0) {
|
||||||
ret = wc_ecc_shared_secret(key, pub, out, &outLen);
|
ret = wc_ecc_shared_secret(key, pub, out, &outLen);
|
||||||
|
Reference in New Issue
Block a user