Skip to content

Commit

Permalink
wrapping lines < 80 characters
Browse files Browse the repository at this point in the history
  • Loading branch information
gasbytes committed Nov 13, 2024
1 parent 9477f9b commit 9c1f015
Show file tree
Hide file tree
Showing 8 changed files with 17 additions and 9 deletions.
3 changes: 2 additions & 1 deletion src/pk.c
Original file line number Diff line number Diff line change
Expand Up @@ -16035,7 +16035,8 @@ static int pem_read_data(char* pem, int pemLen, char **name, char **header,
hdrLen++;
}
/* Allocate memory for encryption header string. */
*header = (char*)XMALLOC((size_t)hdrLen + 1, NULL, DYNAMIC_TYPE_TMP_BUFFER);
*header = (char*)XMALLOC((size_t)hdrLen + 1, NULL,
DYNAMIC_TYPE_TMP_BUFFER);
if (*header == NULL) {
ret = MEMORY_E;
}
Expand Down
3 changes: 2 additions & 1 deletion src/ssl.c
Original file line number Diff line number Diff line change
Expand Up @@ -7515,7 +7515,8 @@ static int wolfSSL_EVP_PKEY_get_der(const WOLFSSL_EVP_PKEY* key,
*der += sz;
}
else {
*der = (unsigned char*)XMALLOC((size_t)sz, NULL, DYNAMIC_TYPE_OPENSSL);
*der = (unsigned char*)XMALLOC((size_t)sz, NULL,
DYNAMIC_TYPE_OPENSSL);
if (*der == NULL) {
return WOLFSSL_FATAL_ERROR;
}
Expand Down
3 changes: 2 additions & 1 deletion src/ssl_asn1.c
Original file line number Diff line number Diff line change
Expand Up @@ -2177,7 +2177,8 @@ WOLFSSL_ASN1_OBJECT *wolfSSL_d2i_ASN1_OBJECT(WOLFSSL_ASN1_OBJECT **a,
return NULL;
}

if (wolfssl_asn1_obj_set(ret, *der, idx + (word32)len, 0) != WOLFSSL_SUCCESS) {
if (wolfssl_asn1_obj_set(ret, *der, idx + (word32)len, 0) !=
WOLFSSL_SUCCESS) {
wolfSSL_ASN1_OBJECT_free(ret);
return NULL;
}
Expand Down
3 changes: 2 additions & 1 deletion src/ssl_load.c
Original file line number Diff line number Diff line change
Expand Up @@ -5042,7 +5042,8 @@ int wolfSSL_CTX_use_RSAPrivateKey(WOLFSSL_CTX* ctx, WOLFSSL_RSA* rsa)

if (ret == 1) {
/* Allocate memory to hold DER encoding.. */
der = (unsigned char*)XMALLOC((size_t)derSize, NULL, DYNAMIC_TYPE_TMP_BUFFER);
der = (unsigned char*)XMALLOC((size_t)derSize, NULL,
DYNAMIC_TYPE_TMP_BUFFER);
if (der == NULL) {
WOLFSSL_MSG("Malloc failure");
ret = MEMORY_E;
Expand Down
3 changes: 2 additions & 1 deletion src/ssl_sess.c
Original file line number Diff line number Diff line change
Expand Up @@ -2669,7 +2669,8 @@ int wolfSSL_i2d_SSL_SESSION(WOLFSSL_SESSION* sess, unsigned char** p)
unsigned char *data;

if (*p == NULL)
*p = (unsigned char*)XMALLOC((size_t)size, NULL, DYNAMIC_TYPE_OPENSSL);
*p = (unsigned char*)XMALLOC((size_t)size, NULL,
DYNAMIC_TYPE_OPENSSL);
if (*p == NULL)
return 0;
data = *p;
Expand Down
2 changes: 1 addition & 1 deletion src/tls.c
Original file line number Diff line number Diff line change
Expand Up @@ -3451,7 +3451,7 @@ static int TLSX_CSR_Parse(WOLFSSL* ssl, const byte* input, word16 length,

if (request) {
XMEMCPY(request->nonce, csr->request.ocsp[0].nonce,
(size_t)csr->request.ocsp[0].nonceSz);
(size_t)csr->request.ocsp[0].nonceSz);
request->nonceSz = csr->request.ocsp[0].nonceSz;
}
}
Expand Down
3 changes: 2 additions & 1 deletion src/wolfio.c
Original file line number Diff line number Diff line change
Expand Up @@ -1466,7 +1466,8 @@ int wolfIO_TcpConnect(SOCKET_T* sockfd, const char* ip, word16 port, int to_sec)
sin = (SOCKADDR_IN *)&addr;
sin->sin_family = AF_INET;
sin->sin_port = XHTONS(port);
XMEMCPY(&sin->sin_addr.s_addr, entry->h_addr_list[0], (size_t)entry->h_length);
XMEMCPY(&sin->sin_addr.s_addr, entry->h_addr_list[0],
(size_t)entry->h_length);
#endif
}

Expand Down
6 changes: 4 additions & 2 deletions wolfcrypt/src/evp.c
Original file line number Diff line number Diff line change
Expand Up @@ -6293,14 +6293,16 @@ void wolfSSL_EVP_init(void)
case WC_AES_256_OFB_TYPE:
#endif
wc_AesFree(&ctx->cipher.aes);
ctx->flags &= (long unsigned int)~WOLFSSL_EVP_CIPH_LOW_LEVEL_INITED;
ctx->flags &=
(long unsigned int)~WOLFSSL_EVP_CIPH_LOW_LEVEL_INITED;
break;
#if defined(WOLFSSL_AES_XTS) && \
(!defined(HAVE_FIPS) || FIPS_VERSION_GE(5,3))
case WC_AES_128_XTS_TYPE:
case WC_AES_256_XTS_TYPE:
wc_AesXtsFree(&ctx->cipher.xts);
ctx->flags &= (long unsigned int)~WOLFSSL_EVP_CIPH_LOW_LEVEL_INITED;
ctx->flags &=
(long unsigned int)~WOLFSSL_EVP_CIPH_LOW_LEVEL_INITED;
break;
#endif
#endif /* AES */
Expand Down

0 comments on commit 9c1f015

Please sign in to comment.