Skip to content

Commit ce596ad

Browse files
committed
various trailing spaces and hard tabs fixes
1 parent ee4d0a6 commit ce596ad

File tree

6 files changed

+26
-25
lines changed

6 files changed

+26
-25
lines changed

src/bio.c

+5-5
Original file line numberDiff line numberDiff line change
@@ -173,8 +173,8 @@ static int wolfSSL_BIO_MEMORY_read(WOLFSSL_BIO* bio, void* buf, int len)
173173
/* Resize down to WOLFSSL_BIO_RESIZE_THRESHOLD for fewer
174174
* allocations. */
175175
if (wolfSSL_BUF_MEM_resize(bio->mem_buf,
176-
bio->wrSz > WOLFSSL_BIO_RESIZE_THRESHOLD ?
177-
(size_t)bio->wrSz : WOLFSSL_BIO_RESIZE_THRESHOLD) == 0) {
176+
bio->wrSz > WOLFSSL_BIO_RESIZE_THRESHOLD ?
177+
(size_t)bio->wrSz : WOLFSSL_BIO_RESIZE_THRESHOLD) == 0) {
178178
WOLFSSL_MSG("wolfSSL_BUF_MEM_resize error");
179179
return WOLFSSL_BIO_ERROR;
180180
}
@@ -2380,7 +2380,7 @@ int wolfSSL_BIO_flush(WOLFSSL_BIO* bio)
23802380
port = str + XSTRLEN(str); /* point to null terminator */
23812381

23822382
bio->ip = (char*)XMALLOC(
2383-
(size_t)(port - str) + 1, /* +1 for null char */
2383+
(size_t)(port - str) + 1, /* +1 for null char */
23842384
bio->heap, DYNAMIC_TYPE_OPENSSL);
23852385
if (bio->ip != NULL) {
23862386
XMEMCPY(bio->ip, str, (size_t)(port - str));
@@ -3363,10 +3363,10 @@ int wolfSSL_BIO_dump(WOLFSSL_BIO *bio, const char *buf, int length)
33633363
"%02x ", (unsigned char)buf[i]);
33643364
else
33653365
(void)XSNPRINTF(line + o, (size_t)((int)sizeof(line) - o),
3366-
" ");
3366+
" ");
33673367
if (i == 7)
33683368
(void)XSNPRINTF(line + o + 2, (size_t)((int)sizeof(line) -
3369-
(o + 2)), "-");
3369+
(o + 2)), "-");
33703370
o += 3;
33713371
}
33723372
(void)XSNPRINTF(line + o, (size_t)((int)sizeof(line) - o), " ");

src/internal.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -7131,8 +7131,8 @@ int InitHandshakeHashesAndCopy(WOLFSSL* ssl, HS_Hashes* source,
71317131
!defined(WOLFSSL_NO_CLIENT_AUTH)
71327132
if (ret == 0 && source->messages != NULL) {
71337133
(*destination)->messages = (byte*)XMALLOC((size_t)source->length,
7134-
ssl->heap,
7135-
(size_t)DYNAMIC_TYPE_HASHES);
7134+
ssl->heap,
7135+
(size_t)DYNAMIC_TYPE_HASHES);
71367136
(*destination)->length = source->length;
71377137
(*destination)->prevLen = source->prevLen;
71387138

src/ssl.c

+10-10
Original file line numberDiff line numberDiff line change
@@ -7440,7 +7440,7 @@ WOLFSSL_EVP_PKEY* wolfSSL_d2i_PUBKEY_bio(WOLFSSL_BIO* bio,
74407440
}
74417441

74427442
mem = (unsigned char*)XMALLOC((size_t)memSz, bio->heap,
7443-
DYNAMIC_TYPE_TMP_BUFFER);
7443+
DYNAMIC_TYPE_TMP_BUFFER);
74447444
if (mem == NULL) {
74457445
return NULL;
74467446
}
@@ -7580,7 +7580,7 @@ static WOLFSSL_EVP_PKEY* _d2i_PublicKey(int type, WOLFSSL_EVP_PKEY** out,
75807580
local->pkey_sz = (int)inSz;
75817581
local->pkcs8HeaderSz = pkcs8HeaderSz;
75827582
local->pkey.ptr = (char*)XMALLOC((size_t)inSz, NULL,
7583-
DYNAMIC_TYPE_PUBLIC_KEY);
7583+
DYNAMIC_TYPE_PUBLIC_KEY);
75847584
if (local->pkey.ptr == NULL) {
75857585
wolfSSL_EVP_PKEY_free(local);
75867586
local = NULL;
@@ -12276,7 +12276,7 @@ int wolfSSL_set_compression(WOLFSSL* ssl)
1227612276
ret = wc_PeekErrorNode(0, &file, &reason, &line);
1227712277
if (ret >= 0) {
1227812278
const char* r = wolfSSL_ERR_reason_error_string(
12279-
(unsigned long)(0 - ret));
12279+
(unsigned long)(0 - ret));
1228012280
if (XSNPRINTF(buf, sizeof(buf),
1228112281
"error:%d:wolfSSL library:%s:%s:%d\n",
1228212282
ret, r, file, line)
@@ -14165,7 +14165,7 @@ WOLFSSL_X509* wolfSSL_CTX_get0_certificate(WOLFSSL_CTX* ctx)
1416514165
ctx->ourCert = wolfSSL_X509_d2i_ex(NULL,
1416614166
ctx->certificate->buffer,
1416714167
(int)ctx->certificate->length,
14168-
ctx->heap);
14168+
ctx->heap);
1416914169
#endif
1417014170
ctx->ownOurCert = 1;
1417114171
}
@@ -18213,8 +18213,8 @@ int wolfSSL_get_chain_cert_pem(WOLFSSL_X509_CHAIN* chain, int idx,
1821318213

1821418214
/* Null output buffer return size needed in outLen */
1821518215
if(!buf) {
18216-
if(Base64_Encode(chain->certs[idx].buffer,
18217-
(word32)chain->certs[idx].length,
18216+
if(Base64_Encode(chain->certs[idx].buffer,
18217+
(word32)chain->certs[idx].length,
1821818218
NULL, &szNeeded) != WC_NO_ERR_TRACE(LENGTH_ONLY_E))
1821918219
return WOLFSSL_FAILURE;
1822018220
*outLen = (int)szNeeded + headerLen + footerLen;
@@ -18235,7 +18235,7 @@ int wolfSSL_get_chain_cert_pem(WOLFSSL_X509_CHAIN* chain, int idx,
1823518235
*outLen = inLen; /* input to Base64_Encode */
1823618236
if ( (err = Base64_Encode(chain->certs[idx].buffer,
1823718237
(word32)chain->certs[idx].length, buf + i,
18238-
(word32*)outLen)) < 0)
18238+
(word32*)outLen)) < 0)
1823918239
return err;
1824018240
i += *outLen;
1824118241

@@ -19245,12 +19245,12 @@ void* wolfSSL_GetHKDFExtractCtx(WOLFSSL* ssl)
1924519245
if (o->nid > 0)
1924619246
return o->nid;
1924719247
if ((ret = GetObjectId(o->obj, &idx, &oid,
19248-
(word32)o->grp, o->objSz)) < 0) {
19248+
(word32)o->grp, o->objSz)) < 0) {
1924919249
if (ret == WC_NO_ERR_TRACE(ASN_OBJECT_ID_E)) {
1925019250
/* Put ASN object tag in front and try again */
1925119251
int len = SetObjectId((int)o->objSz, NULL) + (int)o->objSz;
1925219252
byte* buf = (byte*)XMALLOC((size_t)len, NULL,
19253-
DYNAMIC_TYPE_TMP_BUFFER);
19253+
DYNAMIC_TYPE_TMP_BUFFER);
1925419254
if (!buf) {
1925519255
WOLFSSL_MSG("malloc error");
1925619256
return WOLFSSL_FATAL_ERROR;
@@ -20157,7 +20157,7 @@ WOLFSSL_EVP_PKEY* wolfSSL_d2i_PrivateKey_bio(WOLFSSL_BIO* bio,
2015720157
}
2015820158

2015920159
mem = (unsigned char*)XMALLOC((size_t)memSz, bio->heap,
20160-
DYNAMIC_TYPE_TMP_BUFFER);
20160+
DYNAMIC_TYPE_TMP_BUFFER);
2016120161
if (mem == NULL) {
2016220162
WOLFSSL_MSG("Malloc failure");
2016320163
return NULL;

src/ssl_asn1.c

+4-4
Original file line numberDiff line numberDiff line change
@@ -2830,8 +2830,8 @@ static int i2d_ASN1_STRING(WOLFSSL_ASN1_STRING* s,
28302830
if (s == NULL || s->data == NULL || s->length == 0)
28312831
return WOLFSSL_FATAL_ERROR;
28322832

2833-
len = (int)((word32)SetHeader(tag, (word32)s->length, NULL, 0) +
2834-
(word32)s->length);
2833+
len = (int)((word32)SetHeader(tag, (word32)s->length, NULL, 0) +
2834+
(word32)s->length);
28352835

28362836
if (pp == NULL)
28372837
return len;
@@ -2888,8 +2888,8 @@ int wolfSSL_i2d_ASN1_SEQUENCE(WOLFSSL_ASN1_STRING* s,
28882888
return s->length;
28892889

28902890
if (*pp == NULL) {
2891-
out = (unsigned char*)XMALLOC((size_t)s->length,
2892-
NULL, DYNAMIC_TYPE_ASN1);
2891+
out = (unsigned char*)XMALLOC((size_t)s->length,
2892+
NULL, DYNAMIC_TYPE_ASN1);
28932893
if (out == NULL)
28942894
return WOLFSSL_FATAL_ERROR;
28952895
}

src/ssl_crypto.c

+4-3
Original file line numberDiff line numberDiff line change
@@ -2543,8 +2543,8 @@ WOLFSSL_DES_LONG wolfSSL_DES_cbc_cksum(const unsigned char* in,
25432543
if ((!err) && (dataSz % DES_BLOCK_SIZE)) {
25442544
/* Allocate a buffer big enough to hold padded input. */
25452545
dataSz += DES_BLOCK_SIZE - (dataSz % DES_BLOCK_SIZE);
2546-
data = (unsigned char*)XMALLOC((size_t)dataSz, NULL,
2547-
DYNAMIC_TYPE_TMP_BUFFER);
2546+
data = (unsigned char*)XMALLOC((size_t)dataSz, NULL,
2547+
DYNAMIC_TYPE_TMP_BUFFER);
25482548
if (data == NULL) {
25492549
WOLFSSL_MSG("Issue creating temporary buffer");
25502550
err = 1;
@@ -2558,7 +2558,8 @@ WOLFSSL_DES_LONG wolfSSL_DES_cbc_cksum(const unsigned char* in,
25582558

25592559
if (!err) {
25602560
/* Allocate buffer to hold encrypted data. */
2561-
tmp = (unsigned char*)XMALLOC((size_t)dataSz, NULL, DYNAMIC_TYPE_TMP_BUFFER);
2561+
tmp = (unsigned char*)XMALLOC((size_t)dataSz, NULL,
2562+
DYNAMIC_TYPE_TMP_BUFFER);
25622563
if (tmp == NULL) {
25632564
WOLFSSL_MSG("Issue creating temporary buffer");
25642565
err = 1;

src/tls.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -4190,7 +4190,7 @@ int TLSX_CSR2_InitRequests(TLSX* extensions, DecodedCert* cert, byte isPeer,
41904190

41914191
/* preserve nonce, replicating nonce of ocsp[0] */
41924192
XMEMCPY(nonce, csr2->request.ocsp[0].nonce,
4193-
(size_t)nonceSz);
4193+
(size_t)nonceSz);
41944194

41954195
if ((ret = InitOcspRequest(
41964196
&csr2->request.ocsp[csr2->requests], cert,

0 commit comments

Comments
 (0)