@@ -65,14 +65,14 @@ int main(int argc, char** argv)
6565 hints .ai_family = AF_INET ; /* using IPv4 */
6666 hints .ai_socktype = SOCK_STREAM ; /* means TCP socket */
6767 char * service = "https" ; /* using https */
68-
68+
6969 /* Get a Domain IP address */
7070 if (getaddrinfo (argv [1 ],service ,& hints ,& res ) != 0 ){
7171 fprintf (stderr , "ERROR: failed to get the server ip\n" );
7272 ret = -1 ;
7373 goto end ;
7474 }
75-
75+
7676 /* Create a socket that uses an internet IPv4 address,
7777 * Sets the socket to be stream based (TCP),
7878 * 0 means choose the default protocol. */
@@ -83,13 +83,13 @@ int main(int argc, char** argv)
8383 }
8484 /* Free a list pointed by res */
8585 freeaddrinfo (res );
86-
86+
8787 /* Connect to the server */
8888 if ((ret = connect (sockfd , res -> ai_addr , res -> ai_addrlen )) == -1 ) {
8989 fprintf (stderr , "ERROR: failed to connect\n" );
9090 goto end ;
9191 }
92-
92+ printf ( "Debug \n" );
9393 /*---------------------------------*/
9494 /* Start of wolfSSL initialization and configuration */
9595 /*---------------------------------*/
@@ -98,7 +98,7 @@ int main(int argc, char** argv)
9898 fprintf (stderr , "ERROR: Failed to initialize the library\n" );
9999 goto socket_cleanup ;
100100 }
101-
101+
102102 /* Create and initialize WOLFSSL_CTX */
103103 if ((ctx = wolfSSL_CTX_new (wolfTLSv1_2_client_method ())) == NULL ) {
104104 fprintf (stderr , "ERROR: failed to create WOLFSSL_CTX\n" );
@@ -130,7 +130,6 @@ int main(int argc, char** argv)
130130 /* Connect to wolfSSL on the server side */
131131 if ((ret = wolfSSL_connect (ssl )) != SSL_SUCCESS ) {
132132 fprintf (stderr , "ERROR: failed to connect to wolfSSL\n" );
133- printf ("%d\n" ,ret );
134133 goto cleanup ;
135134 }
136135
0 commit comments