This is an automated email from the ASF dual-hosted git repository.

jiuzhudong pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx-apps.git

commit d2902008fe9ec6ac48884b40b9ef63585cf524b3
Author: makejian <[email protected]>
AuthorDate: Fri Jan 16 21:39:22 2026 +0800

    openssl-wrapper: fix code style compliance
    
    Fix coding style issues in OpenSSL/MbedTLS wrapper implementation:
    - Align whitespace and indentation
    - Fix line formatting
    - Ensure consistent code style per NuttX standards
    
    Signed-off-by: makejian <[email protected]>
---
 crypto/openssl_mbedtls_wrapper/include/openssl/ssl.h       | 10 ++++++----
 crypto/openssl_mbedtls_wrapper/include/openssl/ssl_local.h |  8 ++++----
 crypto/openssl_mbedtls_wrapper/include/openssl/x509.h      |  2 +-
 crypto/openssl_mbedtls_wrapper/mbedtls/ssl_pm.c            |  2 +-
 4 files changed, 12 insertions(+), 10 deletions(-)

diff --git a/crypto/openssl_mbedtls_wrapper/include/openssl/ssl.h 
b/crypto/openssl_mbedtls_wrapper/include/openssl/ssl.h
index 94291eea8..7bdc03125 100644
--- a/crypto/openssl_mbedtls_wrapper/include/openssl/ssl.h
+++ b/crypto/openssl_mbedtls_wrapper/include/openssl/ssl.h
@@ -131,8 +131,9 @@ typedef unsigned int (*SSL_psk_client_cb_func)(SSL *ssl,
                                                unsigned char *psk,
                                                unsigned int max_psk_len);
 
-typedef void (*ossl_msg_cb)(int write_p, int version, int content_type,
-                            const void *buf, size_t len, SSL *ssl, void *arg);
+typedef void (*ossl_msg_cb)(
+              int write_p, int version, int content_type,
+              const void *buf, size_t len, SSL *ssl, void *arg);
 
 typedef enum
 {
@@ -426,12 +427,13 @@ void SSL_CTX_set_default_passwd_cb_userdata(SSL_CTX *ctx, 
void *u);
 
 int SSL_CTX_set_default_verify_paths(SSL_CTX *ctx);
 
-void SSL_CTX_set_psk_client_callback(SSL_CTX *ctx, SSL_psk_client_cb_func cb);
+void SSL_CTX_set_psk_client_callback(SSL_CTX *ctx,
+                                     SSL_psk_client_cb_func cb);
 
 long SSL_CTX_set_mode(SSL_CTX *ctx, long larg);
 
 void SSL_CTX_set_info_callback(SSL_CTX *ctx,
-                               void (*cb)(const SSL *ssl, int type, int val));
+                    void (*cb)(const SSL *ssl, int type, int val));
 
 void SSL_CTX_set_msg_callback(SSL_CTX *ctx,
                               void (*cb)(int write_p, int version,
diff --git a/crypto/openssl_mbedtls_wrapper/include/openssl/ssl_local.h 
b/crypto/openssl_mbedtls_wrapper/include/openssl/ssl_local.h
index 13f692b4e..053da27de 100644
--- a/crypto/openssl_mbedtls_wrapper/include/openssl/ssl_local.h
+++ b/crypto/openssl_mbedtls_wrapper/include/openssl/ssl_local.h
@@ -120,12 +120,12 @@ struct ssl_session_st
 
 struct ssl_st
 {
-/* protocol version(one of SSL3.0, TLS1.0, etc.) */
+  /* protocol version(one of SSL3.0, TLS1.0, etc.) */
 
   int version;
   unsigned long options;
 
-/* shut things down(0x01 : sent, 0x02 : received) */
+  /* shut things down(0x01 : sent, 0x02 : received) */
 
   int shutdown;
   CERT *cert;
@@ -135,7 +135,7 @@ struct ssl_st
   const char **alpn_protos;
   RECORD_LAYER rlayer;
 
-/* where we are */
+  /* where we are */
 
   OSSL_STATEM statem;
   SSL_SESSION *session;
@@ -148,7 +148,7 @@ struct ssl_st
   int err;
   void (*info_callback) (const SSL *ssl, int type, int val);
 
-/* SSL low-level system arch point */
+  /* SSL low-level system arch point */
 
   void *ssl_pm;
   SSL_CIPHER *cipher_list;
diff --git a/crypto/openssl_mbedtls_wrapper/include/openssl/x509.h 
b/crypto/openssl_mbedtls_wrapper/include/openssl/x509.h
index d7cff9a4b..cda221276 100644
--- a/crypto/openssl_mbedtls_wrapper/include/openssl/x509.h
+++ b/crypto/openssl_mbedtls_wrapper/include/openssl/x509.h
@@ -48,7 +48,7 @@
 
 struct x509_st
 {
-/* X509 certification platform private point */
+  /* X509 certification platform private point */
 
   void *x509_pm;
   const X509_METHOD *method;
diff --git a/crypto/openssl_mbedtls_wrapper/mbedtls/ssl_pm.c 
b/crypto/openssl_mbedtls_wrapper/mbedtls/ssl_pm.c
index 0169ed913..84ba2345e 100644
--- a/crypto/openssl_mbedtls_wrapper/mbedtls/ssl_pm.c
+++ b/crypto/openssl_mbedtls_wrapper/mbedtls/ssl_pm.c
@@ -634,7 +634,7 @@ OSSL_HANDSHAKE_STATE ssl_pm_get_state(const SSL *ssl)
       case MBEDTLS_SSL_HANDSHAKE_OVER:
         state = TLS_ST_OK;
         break;
-      default :
+      default:
         state = TLS_ST_BEFORE;
         break;
     }

Reply via email to