mirror of
https://github.com/guanzhi/GmSSL.git
synced 2026-05-06 16:36:16 +08:00
Fix Visual Studio related bugs
This commit is contained in:
@@ -49,7 +49,11 @@ int tls13_client_main(int argc, char *argv[])
|
||||
char *pass = NULL;
|
||||
struct hostent *hp;
|
||||
struct sockaddr_in server;
|
||||
#ifdef WIN32
|
||||
SOCKET sock;
|
||||
#else
|
||||
int sock;
|
||||
#endif
|
||||
TLS_CTX ctx;
|
||||
TLS_CONNECT conn;
|
||||
char buf[1024] = {0};
|
||||
@@ -194,7 +198,11 @@ bad:
|
||||
}
|
||||
|
||||
end:
|
||||
#ifdef WIN32
|
||||
closesocket(sock);
|
||||
#else
|
||||
close(sock);
|
||||
#endif
|
||||
tls_ctx_cleanup(&ctx);
|
||||
tls_cleanup(&conn);
|
||||
return 0;
|
||||
|
||||
Reference in New Issue
Block a user