mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-08-02 04:04:39 +02:00
Spelling and whitespace cleanups.
This commit is contained in:
@@ -11,7 +11,7 @@
|
|||||||
#ifdef __aarch64__
|
#ifdef __aarch64__
|
||||||
#if !defined(__clang__) || \
|
#if !defined(__clang__) || \
|
||||||
(defined(__clang__) && defined(__clang_major__) && __clang_major__ >= 5)
|
(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
|
#define WOLFSSL_ARMASM
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
@@ -58,7 +58,7 @@
|
|||||||
#define HAVE_PK_CALLBACKS
|
#define HAVE_PK_CALLBACKS
|
||||||
/* crypto callback support is not in FIPS 3389 */
|
/* crypto callback support is not in FIPS 3389 */
|
||||||
#ifndef HAVE_FIPS
|
#ifndef HAVE_FIPS
|
||||||
#define WOLF_CRYPTO_CB
|
#define WOLF_CRYPTO_CB
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define KEEP_OUR_CERT
|
#define KEEP_OUR_CERT
|
||||||
|
@@ -6013,7 +6013,7 @@ static int X509PrintPubKey(WOLFSSL_BIO* bio, WOLFSSL_X509* x509, int indent)
|
|||||||
switch (x509->pubKeyOID) {
|
switch (x509->pubKeyOID) {
|
||||||
#ifndef NO_RSA
|
#ifndef NO_RSA
|
||||||
case RSAk:
|
case RSAk:
|
||||||
len = XSNPRINTF(scratch, MAX_WIDTH,
|
len = XSNPRINTF(scratch, MAX_WIDTH,
|
||||||
"%*sPublic Key Algorithm: rsaEncryption\n", indent + 4, "");
|
"%*sPublic Key Algorithm: rsaEncryption\n", indent + 4, "");
|
||||||
if (len >= MAX_WIDTH)
|
if (len >= MAX_WIDTH)
|
||||||
return WOLFSSL_FAILURE;
|
return WOLFSSL_FAILURE;
|
||||||
@@ -6023,7 +6023,7 @@ static int X509PrintPubKey(WOLFSSL_BIO* bio, WOLFSSL_X509* x509, int indent)
|
|||||||
#endif
|
#endif
|
||||||
#ifdef HAVE_ECC
|
#ifdef HAVE_ECC
|
||||||
case ECDSAk:
|
case ECDSAk:
|
||||||
len = XSNPRINTF(scratch, MAX_WIDTH,
|
len = XSNPRINTF(scratch, MAX_WIDTH,
|
||||||
"%*sPublic Key Algorithm: EC\n", indent + 4, "");
|
"%*sPublic Key Algorithm: EC\n", indent + 4, "");
|
||||||
if (len >= MAX_WIDTH)
|
if (len >= MAX_WIDTH)
|
||||||
return WOLFSSL_FAILURE;
|
return WOLFSSL_FAILURE;
|
||||||
@@ -6031,11 +6031,11 @@ static int X509PrintPubKey(WOLFSSL_BIO* bio, WOLFSSL_X509* x509, int indent)
|
|||||||
return WOLFSSL_FAILURE;
|
return WOLFSSL_FAILURE;
|
||||||
break;
|
break;
|
||||||
#endif
|
#endif
|
||||||
default:
|
default:
|
||||||
WOLFSSL_MSG("Unknown key type");
|
WOLFSSL_MSG("Unknown key type");
|
||||||
return WOLFSSL_FAILURE;
|
return WOLFSSL_FAILURE;
|
||||||
}
|
}
|
||||||
|
|
||||||
pubKey = wolfSSL_X509_get_pubkey(x509);
|
pubKey = wolfSSL_X509_get_pubkey(x509);
|
||||||
if (pubKey == NULL)
|
if (pubKey == NULL)
|
||||||
return WOLFSSL_FAILURE;
|
return WOLFSSL_FAILURE;
|
||||||
|
@@ -401,7 +401,7 @@ static word32 SizeASNLength(word32 length)
|
|||||||
#define DECL_ASNGETDATA(name, cnt) \
|
#define DECL_ASNGETDATA(name, cnt) \
|
||||||
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] name Variable name to declare.
|
||||||
* @param [in] cnt Number of elements required.
|
* @param [in] cnt Number of elements required.
|
||||||
@@ -420,7 +420,7 @@ static word32 SizeASNLength(word32 length)
|
|||||||
#define CALLOC_ASNGETDATA(name, cnt, err, heap) \
|
#define CALLOC_ASNGETDATA(name, cnt, err, heap) \
|
||||||
XMEMSET(name, 0, sizeof(name))
|
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] name Variable name to declare.
|
||||||
* @param [in] heap Dynamic memory allocation hint.
|
* @param [in] heap Dynamic memory allocation hint.
|
||||||
@@ -435,7 +435,7 @@ static word32 SizeASNLength(word32 length)
|
|||||||
#define DECL_ASNSETDATA(name, cnt) \
|
#define DECL_ASNSETDATA(name, cnt) \
|
||||||
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] name Variable name to declare.
|
||||||
* @param [in] cnt Number of elements required.
|
* @param [in] cnt Number of elements required.
|
||||||
@@ -454,7 +454,7 @@ static word32 SizeASNLength(word32 length)
|
|||||||
#define CALLOC_ASNSETDATA(name, cnt, err, heap) \
|
#define CALLOC_ASNSETDATA(name, cnt, err, heap) \
|
||||||
XMEMSET(name, 0, sizeof(name))
|
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] name Variable name to declare.
|
||||||
* @param [in] heap Dynamic memory allocation hint.
|
* @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. */
|
/* Check if the first byte indicates the count of bytes. */
|
||||||
if (b >= ASN_LONG_LENGTH) {
|
if (b >= ASN_LONG_LENGTH) {
|
||||||
/* Bottom 7 bits are the number of bytes to calculate length with.
|
/* 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;
|
word32 bytes = b & 0x7F;
|
||||||
int minLen;
|
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 */
|
/* Set the header length to include the length field */
|
||||||
IndefItems_UpdateHeaderLen(indefItems);
|
IndefItems_UpdateHeaderLen(indefItems);
|
||||||
/* Go to indefinte parent item */
|
/* Go to indefinite parent item */
|
||||||
IndefItems_Up(indefItems);
|
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 */
|
/* Finish calculation of data length for indefinite item */
|
||||||
IndefItems_CalcLength(indefItems);
|
IndefItems_CalcLength(indefItems);
|
||||||
/* Go to indefinte parent item */
|
/* Go to indefinite parent item */
|
||||||
IndefItems_Up(indefItems);
|
IndefItems_Up(indefItems);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@@ -18746,7 +18746,7 @@ static int DecodeSubtreeGeneralName(const byte* input, int sz, byte tag,
|
|||||||
}
|
}
|
||||||
#endif
|
#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.
|
* X.509: RFC 5280, 4.2.1.10 - Name Contraints.
|
||||||
*
|
*
|
||||||
|
@@ -9245,7 +9245,7 @@ static int PrintPubKeyRSA(WOLFSSL_BIO* out, const byte* pkey, int pkeySz,
|
|||||||
nSz++;
|
nSz++;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (PrintHexWithColon(out, n, nSz,
|
if (PrintHexWithColon(out, n, nSz,
|
||||||
indent + 4, 1/* lower case */) != WOLFSSL_SUCCESS) {
|
indent + 4, 1/* lower case */) != WOLFSSL_SUCCESS) {
|
||||||
break;
|
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) {
|
if (wolfSSL_BIO_write(out, line, (int)XSTRLEN(line)) <= 0) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (PrintHexWithColon(out, y, ySz, indent + 4, 0/* upper case */)
|
if (PrintHexWithColon(out, y, ySz, indent + 4, 0/* upper case */)
|
||||||
!= WOLFSSL_SUCCESS) {
|
!= WOLFSSL_SUCCESS) {
|
||||||
break;
|
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) {
|
if (wolfSSL_BIO_write(out, line, (int)XSTRLEN(line)) <= 0) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (PrintHexWithColon(out, p, pSz, indent + 4, 0/* upper case */)
|
if (PrintHexWithColon(out, p, pSz, indent + 4, 0/* upper case */)
|
||||||
!= WOLFSSL_SUCCESS) {
|
!= WOLFSSL_SUCCESS) {
|
||||||
break;
|
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) {
|
if (wolfSSL_BIO_write(out, line, (int)XSTRLEN(line)) <= 0) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (PrintHexWithColon(out, g, gSz, indent + 4, 0/* upper case */)
|
if (PrintHexWithColon(out, g, gSz, indent + 4, 0/* upper case */)
|
||||||
!= WOLFSSL_SUCCESS) {
|
!= WOLFSSL_SUCCESS) {
|
||||||
break;
|
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) {
|
if (wolfSSL_BIO_write(out, line, (int)XSTRLEN(line)) <= 0) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (PrintHexWithColon(out, publicKey,
|
if (PrintHexWithColon(out, publicKey,
|
||||||
publicKeySz, indent + 4, 0/* upper case */)
|
publicKeySz, indent + 4, 0/* upper case */)
|
||||||
!= WOLFSSL_SUCCESS) {
|
!= WOLFSSL_SUCCESS) {
|
||||||
break;
|
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) {
|
if (wolfSSL_BIO_write(out, line, (int)XSTRLEN(line)) <= 0) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (PrintHexWithColon(out, prime, primeSz,
|
if (PrintHexWithColon(out, prime, primeSz,
|
||||||
indent + 4, 0/* upper case */)
|
indent + 4, 0/* upper case */)
|
||||||
!= WOLFSSL_SUCCESS) {
|
!= WOLFSSL_SUCCESS) {
|
||||||
break;
|
break;
|
||||||
|
@@ -3919,8 +3919,8 @@ int fp_set_int(fp_int *a, unsigned long b)
|
|||||||
#else
|
#else
|
||||||
fp_set (a, (fp_digit)b);
|
fp_set (a, (fp_digit)b);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
return FP_OKAY;
|
return FP_OKAY;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* check if a bit is set */
|
/* check if a bit is set */
|
||||||
|
Reference in New Issue
Block a user