Skip to content

Commit 1252d69

Browse files
committed
Remove trailing spaces
1 parent 29482a3 commit 1252d69

3 files changed

Lines changed: 9 additions & 9 deletions

File tree

src/ssl_load.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -946,7 +946,7 @@ static int ProcessBufferTryDecodeDilithium(WOLFSSL_CTX* ctx, WOLFSSL* ssl,
946946
int ret;
947947
word32 idx;
948948
dilithium_key* key;
949-
int keyFormatTemp = 0;
949+
int keyFormatTemp = 0;
950950
int keyTypeTemp;
951951
int keySizeTemp;
952952

@@ -958,7 +958,7 @@ static int ProcessBufferTryDecodeDilithium(WOLFSSL_CTX* ctx, WOLFSSL* ssl,
958958
}
959959

960960
/* Initialize Dilithium key. */
961-
ret = wc_dilithium_init(key);
961+
ret = wc_dilithium_init(key);
962962
if (ret == 0) {
963963
/* Decode as a Dilithium private key. */
964964
idx = 0;
@@ -1023,7 +1023,7 @@ static int ProcessBufferTryDecodeDilithium(WOLFSSL_CTX* ctx, WOLFSSL* ssl,
10231023
/* Unknown format wasn't dilithium, so keep trying other formats. */
10241024
ret = 0;
10251025
}
1026-
1026+
10271027
/* Free dynamically allocated data in key. */
10281028
wc_dilithium_free(key);
10291029
}

tests/api.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13944,7 +13944,7 @@ static int test_wolfSSL_PKCS8_MLDSA(void)
1394413944
size_t i;
1394513945
const int derMaxSz = 8192; /* Largest size will be 7520 of separated format, WC_ML_DSA_87, DER */
1394613946
const int tempMaxSz = 10240; /* Largest size will be 10239 of separated format, WC_MLS_DSA_87, PEM */
13947-
byte* der = NULL;
13947+
byte* der = NULL;
1394813948
byte* temp = NULL; /* Store PEM or intermediate key */
1394913949
word32 derSz = 0;
1395013950
word32 pemSz = 0;
@@ -13964,7 +13964,7 @@ static int test_wolfSSL_PKCS8_MLDSA(void)
1396413964
(void) pemSz;
1396513965

1396613966
ExpectNotNull(der = (byte*) XMALLOC(derMaxSz, NULL, DYNAMIC_TYPE_TMP_BUFFER));
13967-
ExpectNotNull(temp = (byte*) XMALLOC(tempMaxSz, NULL, DYNAMIC_TYPE_TMP_BUFFER));
13967+
ExpectNotNull(temp = (byte*) XMALLOC(tempMaxSz, NULL, DYNAMIC_TYPE_TMP_BUFFER));
1396813968

1396913969
#ifndef NO_WOLFSSL_SERVER
1397013970
ExpectNotNull(ctx = wolfSSL_CTX_new(wolfSSLv23_server_method()));
@@ -13980,7 +13980,7 @@ static int test_wolfSSL_PKCS8_MLDSA(void)
1398013980
ExpectIntEQ(wc_dilithium_set_level(&mldsa_key, test_variant[i].wcId), 0);
1398113981
ExpectIntEQ(wc_dilithium_make_key(&mldsa_key, &rng), 0);
1398213982

13983-
ExpectIntGT(derSz = wc_Dilithium_KeyToDer(&mldsa_key, der, derMaxSz), 0);
13983+
ExpectIntGT(derSz = wc_Dilithium_KeyToDer(&mldsa_key, der, derMaxSz), 0);
1398413984
ExpectIntEQ(wolfSSL_CTX_use_PrivateKey_buffer(ctx, der, derSz,
1398513985
WOLFSSL_FILETYPE_ASN1), WOLFSSL_SUCCESS);
1398613986

@@ -13996,7 +13996,7 @@ static int test_wolfSSL_PKCS8_MLDSA(void)
1399613996
ExpectIntEQ(wc_dilithium_set_level(&mldsa_key, test_variant[i].wcId), 0);
1399713997
ExpectIntEQ(wc_dilithium_make_key(&mldsa_key, &rng), 0);
1399813998

13999-
ExpectIntGT(derSz = wc_Dilithium_PrivateKeyToDer(&mldsa_key, der, derMaxSz), 0);
13999+
ExpectIntGT(derSz = wc_Dilithium_PrivateKeyToDer(&mldsa_key, der, derMaxSz), 0);
1400014000
ExpectIntEQ(wolfSSL_CTX_use_PrivateKey_buffer(ctx, der, derSz,
1400114001
WOLFSSL_FILETYPE_ASN1), WOLFSSL_SUCCESS);
1400214002

@@ -14006,7 +14006,7 @@ static int test_wolfSSL_PKCS8_MLDSA(void)
1400614006
WOLFSSL_FILETYPE_PEM), WOLFSSL_SUCCESS);
1400714007
#endif /* WOLFSSL_DER_TO_PEM */
1400814008
}
14009-
14009+
1401014010
/* Test private + public key (integrated format) */
1401114011
for(i = 0; i < sizeof(test_variant) / sizeof(test_variant[0]); ++i) {
1401214012
ExpectIntEQ(wc_dilithium_set_level(&mldsa_key, test_variant[i].wcId), 0);

wolfcrypt/src/dilithium.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9663,7 +9663,7 @@ int wc_Dilithium_PrivateKeyDecode(const byte* input, word32* inOutIdx,
96639663
}
96649664

96659665
if (ret == 0) {
9666-
/* Get OID sum for level. */
9666+
/* Get OID sum for level. */
96679667
if(key->level == 0) { /* Check first, because key->params will be NULL
96689668
* when key->level = 0 */
96699669
/* Level not set by caller, decode from DER */

0 commit comments

Comments
 (0)