4646
4747int main (int argc , char * * argv )
4848{
49- int ret ;
49+ int ret ;
5050 int sockfd = SOCKET_INVALID ;
5151 struct sockaddr_in servAddr ;
5252 char buff [256 ];
@@ -76,7 +76,7 @@ int main(int argc, char** argv)
7676 * 0 means choose the default protocol. */
7777 if ((sockfd = socket (AF_INET , SOCK_STREAM , 0 )) == -1 ) {
7878 fprintf (stderr , "ERROR: failed to create the socket\n" );
79- ret = -1 ;
79+ ret = -1 ;
8080 goto exit ;
8181 }
8282
@@ -85,7 +85,7 @@ int main(int argc, char** argv)
8585 /* Create and initialize WOLFSSL_CTX */
8686 if ((ctx = wolfSSL_CTX_new (wolfTLSv1_2_client_method ())) == NULL ) {
8787 fprintf (stderr , "ERROR: failed to create WOLFSSL_CTX\n" );
88- ret = -1 ;
88+ ret = -1 ;
8989 goto exit ;
9090 }
9191
@@ -98,15 +98,15 @@ int main(int argc, char** argv)
9898 }
9999
100100 /* Load client ecc certificates into WOLFSSL_CTX */
101- if ((ret = wolfSSL_CTX_use_certificate_chain_file (ctx , ECC_FILE )) !=
101+ if ((ret = wolfSSL_CTX_use_certificate_chain_file (ctx , ECC_FILE )) !=
102102 WOLFSSL_SUCCESS ) {
103103 fprintf (stderr , "ERROR: failed to load %s, please check the file.\n" ,
104104 ECC_FILE );
105105 goto exit ;
106106 }
107107
108108 /* Load client ecc key into WOLFSSL_CTX */
109- if ((ret = wolfSSL_CTX_use_PrivateKey_file (ctx , KEY_FILE , SSL_FILETYPE_PEM ))
109+ if ((ret = wolfSSL_CTX_use_PrivateKey_file (ctx , KEY_FILE , WOLFSSL_FILETYPE_PEM ))
110110 != WOLFSSL_SUCCESS ) {
111111 fprintf (stderr , "ERROR: failed to load %s, please check the file.\n" ,
112112 KEY_FILE );
@@ -132,7 +132,7 @@ int main(int argc, char** argv)
132132 /* Get the server IPv4 address from the command line call */
133133 if (inet_pton (AF_INET , argv [1 ], & servAddr .sin_addr ) != 1 ) {
134134 fprintf (stderr , "ERROR: invalid address\n" );
135- ret = -1 ;
135+ ret = -1 ;
136136 goto exit ;
137137 }
138138
@@ -142,7 +142,7 @@ int main(int argc, char** argv)
142142 if (connect (sockfd , (struct sockaddr * ) & servAddr , sizeof (servAddr ))
143143 == -1 ) {
144144 fprintf (stderr , "ERROR: failed to connect\n" );
145- ret = -1 ;
145+ ret = -1 ;
146146 goto exit ;
147147 }
148148
@@ -151,7 +151,7 @@ int main(int argc, char** argv)
151151 /* Create a WOLFSSL object */
152152 if ((ssl = wolfSSL_new (ctx )) == NULL ) {
153153 fprintf (stderr , "ERROR: failed to create WOLFSSL object\n" );
154- ret = -1 ;
154+ ret = -1 ;
155155 goto exit ;
156156 }
157157
@@ -171,7 +171,7 @@ int main(int argc, char** argv)
171171 memset (buff , 0 , sizeof (buff ));
172172 if (fgets (buff , sizeof (buff ), stdin ) == NULL ) {
173173 fprintf (stderr , "ERROR: failed to get message for server\n" );
174- ret = -1 ;
174+ ret = -1 ;
175175 goto exit ;
176176 }
177177 len = strnlen (buff , sizeof (buff ));
0 commit comments