Skip to content

Commit

Permalink
network: Apply new astyle config
Browse files Browse the repository at this point in the history
There are some code formatting issues is the network directory. Run
astyle to fix them.

Signed-off-by: Ciprian Regus <[email protected]>
  • Loading branch information
CiprianRegus authored and buha committed Dec 9, 2024
1 parent bac76d7 commit 19084c7
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions network/tcp_socket.c
Original file line number Diff line number Diff line change
Expand Up @@ -169,16 +169,16 @@ static int32_t stcp_socket_init(struct secure_socket_desc **desc,

if (param->ca_cert) {
#ifdef ENABLE_PEM_CERT
ret = mbedtls_x509_crt_parse( &ldesc->cacert,
ret = mbedtls_x509_crt_parse(&ldesc->cacert,
#else
ret = mbedtls_x509_crt_parse_der_nocopy(&ldesc->cacert,
#endif /* ENABLE_PEM_CERT */
(const unsigned char *)param->ca_cert,
(size_t)param->ca_cert_len);
(const unsigned char *)param->ca_cert,
(size_t)param->ca_cert_len);
if (ret < 0)
goto exit;

mbedtls_ssl_conf_ca_chain(&ldesc->conf, &ldesc->cacert, NULL );
mbedtls_ssl_conf_ca_chain(&ldesc->conf, &ldesc->cacert, NULL);
/* Verify server identity */
mbedtls_ssl_conf_authmode(&ldesc->conf,
param->cert_verify_mode);
Expand All @@ -194,17 +194,17 @@ static int32_t stcp_socket_init(struct secure_socket_desc **desc,
goto exit;
}
#ifdef ENABLE_PEM_CERT
ret = mbedtls_x509_crt_parse( &ldesc->clicert,
ret = mbedtls_x509_crt_parse(&ldesc->clicert,
#else
ret = mbedtls_x509_crt_parse_der_nocopy(&ldesc->clicert,
#endif /* ENABLE_PEM_CERT */
(const unsigned char *)param->cli_cert,
(size_t)param->cli_cert_len);
(const unsigned char *)param->cli_cert,
(size_t)param->cli_cert_len);
if (NO_OS_IS_ERR_VALUE(ret))
goto exit;
ret = mbedtls_pk_parse_key(&ldesc->pkey,
(const unsigned char *)param->cli_pk,
param->cli_pk_len, NULL, 0 );
param->cli_pk_len, NULL, 0);
if (NO_OS_IS_ERR_VALUE(ret))
goto exit;

Expand Down

0 comments on commit 19084c7

Please sign in to comment.