diff --git a/IDE/Android/user_settings.h b/IDE/Android/user_settings.h index af56c7c4f..7863a49c4 100644 --- a/IDE/Android/user_settings.h +++ b/IDE/Android/user_settings.h @@ -11,7 +11,7 @@ #ifdef __aarch64__ #if !defined(__clang__) || \ (defined(__clang__) && defined(__clang_major__) && __clang_major__ >= 5) - /* older clang v4 has issue with inline assembly contraints */ + /* older clang v4 has issue with inline assembly constraints */ #define WOLFSSL_ARMASM #endif #endif @@ -58,7 +58,7 @@ #define HAVE_PK_CALLBACKS /* crypto callback support is not in FIPS 3389 */ #ifndef HAVE_FIPS - #define WOLF_CRYPTO_CB + #define WOLF_CRYPTO_CB #endif #define KEEP_OUR_CERT diff --git a/src/x509.c b/src/x509.c index 2dfe1517e..ac4eab7b5 100644 --- a/src/x509.c +++ b/src/x509.c @@ -6013,7 +6013,7 @@ static int X509PrintPubKey(WOLFSSL_BIO* bio, WOLFSSL_X509* x509, int indent) switch (x509->pubKeyOID) { #ifndef NO_RSA case RSAk: - len = XSNPRINTF(scratch, MAX_WIDTH, + len = XSNPRINTF(scratch, MAX_WIDTH, "%*sPublic Key Algorithm: rsaEncryption\n", indent + 4, ""); if (len >= MAX_WIDTH) return WOLFSSL_FAILURE; @@ -6023,7 +6023,7 @@ static int X509PrintPubKey(WOLFSSL_BIO* bio, WOLFSSL_X509* x509, int indent) #endif #ifdef HAVE_ECC case ECDSAk: - len = XSNPRINTF(scratch, MAX_WIDTH, + len = XSNPRINTF(scratch, MAX_WIDTH, "%*sPublic Key Algorithm: EC\n", indent + 4, ""); if (len >= MAX_WIDTH) return WOLFSSL_FAILURE; @@ -6031,11 +6031,11 @@ static int X509PrintPubKey(WOLFSSL_BIO* bio, WOLFSSL_X509* x509, int indent) return WOLFSSL_FAILURE; break; #endif - default: + default: WOLFSSL_MSG("Unknown key type"); return WOLFSSL_FAILURE; } - + pubKey = wolfSSL_X509_get_pubkey(x509); if (pubKey == NULL) return WOLFSSL_FAILURE; diff --git a/wolfcrypt/src/asn.c b/wolfcrypt/src/asn.c index e3e30ad98..e8aee87da 100644 --- a/wolfcrypt/src/asn.c +++ b/wolfcrypt/src/asn.c @@ -401,7 +401,7 @@ static word32 SizeASNLength(word32 length) #define DECL_ASNGETDATA(name, cnt) \ ASNGetData name[cnt] - /* No implementation as declartion is static. + /* No implementation as declaration is static. * * @param [in] name Variable name to declare. * @param [in] cnt Number of elements required. @@ -420,7 +420,7 @@ static word32 SizeASNLength(word32 length) #define CALLOC_ASNGETDATA(name, cnt, err, heap) \ XMEMSET(name, 0, sizeof(name)) - /* No implementation as declartion is static. + /* No implementation as declaration is static. * * @param [in] name Variable name to declare. * @param [in] heap Dynamic memory allocation hint. @@ -435,7 +435,7 @@ static word32 SizeASNLength(word32 length) #define DECL_ASNSETDATA(name, cnt) \ ASNSetData name[cnt] - /* No implementation as declartion is static. + /* No implementation as declaration is static. * * @param [in] name Variable name to declare. * @param [in] cnt Number of elements required. @@ -454,7 +454,7 @@ static word32 SizeASNLength(word32 length) #define CALLOC_ASNSETDATA(name, cnt, err, heap) \ XMEMSET(name, 0, sizeof(name)) - /* No implementation as declartion is static. + /* No implementation as declaration is static. * * @param [in] name Variable name to declare. * @param [in] heap Dynamic memory allocation hint. @@ -2107,7 +2107,7 @@ int GetLength_ex(const byte* input, word32* inOutIdx, int* len, word32 maxIdx, /* Check if the first byte indicates the count of bytes. */ if (b >= ASN_LONG_LENGTH) { /* Bottom 7 bits are the number of bytes to calculate length with. - * Note: 0 indicates indefinte length encoding *not* 0 bytes of length. + * Note: 0 indicates indefinite length encoding *not* 0 bytes of length. */ word32 bytes = b & 0x7F; int minLen; @@ -3680,7 +3680,7 @@ int wc_BerToDer(const byte* ber, word32 berSz, byte* der, word32* derSz) /* Set the header length to include the length field */ IndefItems_UpdateHeaderLen(indefItems); - /* Go to indefinte parent item */ + /* Go to indefinite parent item */ IndefItems_Up(indefItems); } } @@ -3698,7 +3698,7 @@ int wc_BerToDer(const byte* ber, word32 berSz, byte* der, word32* derSz) /* Finish calculation of data length for indefinite item */ IndefItems_CalcLength(indefItems); - /* Go to indefinte parent item */ + /* Go to indefinite parent item */ IndefItems_Up(indefItems); } else { @@ -18746,7 +18746,7 @@ static int DecodeSubtreeGeneralName(const byte* input, int sz, byte tag, } #endif -/* Decode a subtree of a name contraint in a certificate. +/* Decode a subtree of a name constraints in a certificate. * * X.509: RFC 5280, 4.2.1.10 - Name Contraints. * diff --git a/wolfcrypt/src/evp.c b/wolfcrypt/src/evp.c index 99d16e295..57ebba065 100644 --- a/wolfcrypt/src/evp.c +++ b/wolfcrypt/src/evp.c @@ -9245,7 +9245,7 @@ static int PrintPubKeyRSA(WOLFSSL_BIO* out, const byte* pkey, int pkeySz, nSz++; } - if (PrintHexWithColon(out, n, nSz, + if (PrintHexWithColon(out, n, nSz, indent + 4, 1/* lower case */) != WOLFSSL_SUCCESS) { break; } @@ -9669,7 +9669,7 @@ static int PrintPubKeyDSA(WOLFSSL_BIO* out, const byte* pkey, int pkeySz, if (wolfSSL_BIO_write(out, line, (int)XSTRLEN(line)) <= 0) { break; } - if (PrintHexWithColon(out, y, ySz, indent + 4, 0/* upper case */) + if (PrintHexWithColon(out, y, ySz, indent + 4, 0/* upper case */) != WOLFSSL_SUCCESS) { break; } @@ -9679,7 +9679,7 @@ static int PrintPubKeyDSA(WOLFSSL_BIO* out, const byte* pkey, int pkeySz, if (wolfSSL_BIO_write(out, line, (int)XSTRLEN(line)) <= 0) { break; } - if (PrintHexWithColon(out, p, pSz, indent + 4, 0/* upper case */) + if (PrintHexWithColon(out, p, pSz, indent + 4, 0/* upper case */) != WOLFSSL_SUCCESS) { break; } @@ -9699,7 +9699,7 @@ static int PrintPubKeyDSA(WOLFSSL_BIO* out, const byte* pkey, int pkeySz, if (wolfSSL_BIO_write(out, line, (int)XSTRLEN(line)) <= 0) { break; } - if (PrintHexWithColon(out, g, gSz, indent + 4, 0/* upper case */) + if (PrintHexWithColon(out, g, gSz, indent + 4, 0/* upper case */) != WOLFSSL_SUCCESS) { break; } @@ -9878,7 +9878,7 @@ static int PrintPubKeyDH(WOLFSSL_BIO* out, const byte* pkey, int pkeySz, if (wolfSSL_BIO_write(out, line, (int)XSTRLEN(line)) <= 0) { break; } - if (PrintHexWithColon(out, publicKey, + if (PrintHexWithColon(out, publicKey, publicKeySz, indent + 4, 0/* upper case */) != WOLFSSL_SUCCESS) { break; @@ -9888,7 +9888,7 @@ static int PrintPubKeyDH(WOLFSSL_BIO* out, const byte* pkey, int pkeySz, if (wolfSSL_BIO_write(out, line, (int)XSTRLEN(line)) <= 0) { break; } - if (PrintHexWithColon(out, prime, primeSz, + if (PrintHexWithColon(out, prime, primeSz, indent + 4, 0/* upper case */) != WOLFSSL_SUCCESS) { break; diff --git a/wolfcrypt/src/tfm.c b/wolfcrypt/src/tfm.c index a31c7baa1..4bfcdd7c6 100644 --- a/wolfcrypt/src/tfm.c +++ b/wolfcrypt/src/tfm.c @@ -3919,8 +3919,8 @@ int fp_set_int(fp_int *a, unsigned long b) #else fp_set (a, (fp_digit)b); #endif - - return FP_OKAY; + + return FP_OKAY; } /* check if a bit is set */