@@ -54,7 +54,9 @@ int simple_client_example(void)
5454 }
5555
5656 /* Create a TCP socket */
57- sockfd = socket (server_addr -> ai_family , server_addr -> ai_socktype , server_addr -> ai_protocol );
57+ sockfd = socket (server_addr -> ai_family ,
58+ server_addr -> ai_socktype ,
59+ server_addr -> ai_protocol );
5860 if (sockfd == -1 ) {
5961 perror ("Failed to create socket" );
6062 freeaddrinfo (server_addr );
@@ -84,10 +86,12 @@ int simple_client_example(void)
8486 }
8587
8688 /* Load CA certificate into WOLFSSL_CTX
87- * NOTE: CERT_PATH macro is set relative to Xcode $(PROJECT_DIR) environment variable
88- * in the preprocessor macros section of the project build settings to avoid hardcoding
89- * a path in the source code. The CA cert is located at wolfssl/certs/wolfssl-website-ca.pem. */
90- if ((ret = wolfSSL_CTX_load_verify_locations (ctx , CERT_PATH , NULL )) != WOLFSSL_SUCCESS ) {
89+ * NOTE: CERT_PATH macro is set relative to Xcode $(PROJECT_DIR) environment
90+ * variable in the preprocessor macros section of the project build settings
91+ * to avoid hardcoding a path in the source code. The CA cert is located at
92+ * wolfssl/certs/wolfssl-website-ca.pem. */
93+ ret = wolfSSL_CTX_load_verify_locations (ctx , CERT_PATH , NULL );
94+ if (ret != WOLFSSL_SUCCESS ) {
9195 printf ("ERROR: failed to load %s, please check the file.\n" , CERT_PATH );
9296 wolfSSL_CTX_free (ctx );
9397 close (sockfd );
0 commit comments