From 1252d69a9a1d012badb928bf16cfd47c8547d4dc Mon Sep 17 00:00:00 2001 From: Koji Takeda Date: Sat, 12 Apr 2025 17:09:36 +0900 Subject: [PATCH] Remove trailing spaces --- src/ssl_load.c | 6 +++--- tests/api.c | 10 +++++----- wolfcrypt/src/dilithium.c | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/ssl_load.c b/src/ssl_load.c index ee0e8f21b..19d1426a7 100644 --- a/src/ssl_load.c +++ b/src/ssl_load.c @@ -946,7 +946,7 @@ static int ProcessBufferTryDecodeDilithium(WOLFSSL_CTX* ctx, WOLFSSL* ssl, int ret; word32 idx; dilithium_key* key; - int keyFormatTemp = 0; + int keyFormatTemp = 0; int keyTypeTemp; int keySizeTemp; @@ -958,7 +958,7 @@ static int ProcessBufferTryDecodeDilithium(WOLFSSL_CTX* ctx, WOLFSSL* ssl, } /* Initialize Dilithium key. */ - ret = wc_dilithium_init(key); + ret = wc_dilithium_init(key); if (ret == 0) { /* Decode as a Dilithium private key. */ idx = 0; @@ -1023,7 +1023,7 @@ static int ProcessBufferTryDecodeDilithium(WOLFSSL_CTX* ctx, WOLFSSL* ssl, /* Unknown format wasn't dilithium, so keep trying other formats. */ ret = 0; } - + /* Free dynamically allocated data in key. */ wc_dilithium_free(key); } diff --git a/tests/api.c b/tests/api.c index 8b9770c4b..81754b0c4 100644 --- a/tests/api.c +++ b/tests/api.c @@ -13944,7 +13944,7 @@ static int test_wolfSSL_PKCS8_MLDSA(void) size_t i; const int derMaxSz = 8192; /* Largest size will be 7520 of separated format, WC_ML_DSA_87, DER */ const int tempMaxSz = 10240; /* Largest size will be 10239 of separated format, WC_MLS_DSA_87, PEM */ - byte* der = NULL; + byte* der = NULL; byte* temp = NULL; /* Store PEM or intermediate key */ word32 derSz = 0; word32 pemSz = 0; @@ -13964,7 +13964,7 @@ static int test_wolfSSL_PKCS8_MLDSA(void) (void) pemSz; ExpectNotNull(der = (byte*) XMALLOC(derMaxSz, NULL, DYNAMIC_TYPE_TMP_BUFFER)); - ExpectNotNull(temp = (byte*) XMALLOC(tempMaxSz, NULL, DYNAMIC_TYPE_TMP_BUFFER)); + ExpectNotNull(temp = (byte*) XMALLOC(tempMaxSz, NULL, DYNAMIC_TYPE_TMP_BUFFER)); #ifndef NO_WOLFSSL_SERVER ExpectNotNull(ctx = wolfSSL_CTX_new(wolfSSLv23_server_method())); @@ -13980,7 +13980,7 @@ static int test_wolfSSL_PKCS8_MLDSA(void) ExpectIntEQ(wc_dilithium_set_level(&mldsa_key, test_variant[i].wcId), 0); ExpectIntEQ(wc_dilithium_make_key(&mldsa_key, &rng), 0); - ExpectIntGT(derSz = wc_Dilithium_KeyToDer(&mldsa_key, der, derMaxSz), 0); + ExpectIntGT(derSz = wc_Dilithium_KeyToDer(&mldsa_key, der, derMaxSz), 0); ExpectIntEQ(wolfSSL_CTX_use_PrivateKey_buffer(ctx, der, derSz, WOLFSSL_FILETYPE_ASN1), WOLFSSL_SUCCESS); @@ -13996,7 +13996,7 @@ static int test_wolfSSL_PKCS8_MLDSA(void) ExpectIntEQ(wc_dilithium_set_level(&mldsa_key, test_variant[i].wcId), 0); ExpectIntEQ(wc_dilithium_make_key(&mldsa_key, &rng), 0); - ExpectIntGT(derSz = wc_Dilithium_PrivateKeyToDer(&mldsa_key, der, derMaxSz), 0); + ExpectIntGT(derSz = wc_Dilithium_PrivateKeyToDer(&mldsa_key, der, derMaxSz), 0); ExpectIntEQ(wolfSSL_CTX_use_PrivateKey_buffer(ctx, der, derSz, WOLFSSL_FILETYPE_ASN1), WOLFSSL_SUCCESS); @@ -14006,7 +14006,7 @@ static int test_wolfSSL_PKCS8_MLDSA(void) WOLFSSL_FILETYPE_PEM), WOLFSSL_SUCCESS); #endif /* WOLFSSL_DER_TO_PEM */ } - + /* Test private + public key (integrated format) */ for(i = 0; i < sizeof(test_variant) / sizeof(test_variant[0]); ++i) { ExpectIntEQ(wc_dilithium_set_level(&mldsa_key, test_variant[i].wcId), 0); diff --git a/wolfcrypt/src/dilithium.c b/wolfcrypt/src/dilithium.c index c77f5676a..f5804615e 100644 --- a/wolfcrypt/src/dilithium.c +++ b/wolfcrypt/src/dilithium.c @@ -9663,7 +9663,7 @@ int wc_Dilithium_PrivateKeyDecode(const byte* input, word32* inOutIdx, } if (ret == 0) { - /* Get OID sum for level. */ + /* Get OID sum for level. */ if(key->level == 0) { /* Check first, because key->params will be NULL * when key->level = 0 */ /* Level not set by caller, decode from DER */