@@ -65,14 +65,14 @@ int main(int argc, char** argv)
65
65
hints .ai_family = AF_INET ; /* using IPv4 */
66
66
hints .ai_socktype = SOCK_STREAM ; /* means TCP socket */
67
67
char * service = "https" ; /* using https */
68
-
68
+
69
69
/* Get a Domain IP address */
70
70
if (getaddrinfo (argv [1 ],service ,& hints ,& res ) != 0 ){
71
71
fprintf (stderr , "ERROR: failed to get the server ip\n" );
72
72
ret = -1 ;
73
73
goto end ;
74
74
}
75
-
75
+
76
76
/* Create a socket that uses an internet IPv4 address,
77
77
* Sets the socket to be stream based (TCP),
78
78
* 0 means choose the default protocol. */
@@ -83,13 +83,13 @@ int main(int argc, char** argv)
83
83
}
84
84
/* Free a list pointed by res */
85
85
freeaddrinfo (res );
86
-
86
+
87
87
/* Connect to the server */
88
88
if ((ret = connect (sockfd , res -> ai_addr , res -> ai_addrlen )) == -1 ) {
89
89
fprintf (stderr , "ERROR: failed to connect\n" );
90
90
goto end ;
91
91
}
92
-
92
+ printf ( "Debug \n" );
93
93
/*---------------------------------*/
94
94
/* Start of wolfSSL initialization and configuration */
95
95
/*---------------------------------*/
@@ -98,7 +98,7 @@ int main(int argc, char** argv)
98
98
fprintf (stderr , "ERROR: Failed to initialize the library\n" );
99
99
goto socket_cleanup ;
100
100
}
101
-
101
+
102
102
/* Create and initialize WOLFSSL_CTX */
103
103
if ((ctx = wolfSSL_CTX_new (wolfTLSv1_2_client_method ())) == NULL ) {
104
104
fprintf (stderr , "ERROR: failed to create WOLFSSL_CTX\n" );
@@ -130,7 +130,6 @@ int main(int argc, char** argv)
130
130
/* Connect to wolfSSL on the server side */
131
131
if ((ret = wolfSSL_connect (ssl )) != SSL_SUCCESS ) {
132
132
fprintf (stderr , "ERROR: failed to connect to wolfSSL\n" );
133
- printf ("%d\n" ,ret );
134
133
goto cleanup ;
135
134
}
136
135
0 commit comments