summaryrefslogtreecommitdiff
path: root/vio/test-sslclient.c
diff options
context:
space:
mode:
Diffstat (limited to 'vio/test-sslclient.c')
-rw-r--r--vio/test-sslclient.c23
1 files changed, 19 insertions, 4 deletions
diff --git a/vio/test-sslclient.c b/vio/test-sslclient.c
index b50b0722b17..51a78485642 100644
--- a/vio/test-sslclient.c
+++ b/vio/test-sslclient.c
@@ -1,3 +1,19 @@
+/* Copyright (C) 2000 MySQL AB
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
+
#include <my_global.h>
#ifdef HAVE_OPENSSL
#include <my_sys.h>
@@ -55,14 +71,14 @@ main( int argc __attribute__((unused)),
/* ----------------------------------------------- */
/* Create a socket and connect to server using normal socket calls. */
-
+
client_vio = vio_new(socket (AF_INET, SOCK_STREAM, 0), VIO_TYPE_TCPIP, TRUE);
-
+
memset (&sa, '\0', sizeof(sa));
sa.sin_family = AF_INET;
sa.sin_addr.s_addr = inet_addr ("127.0.0.1"); /* Server IP */
sa.sin_port = htons (1111); /* Server Port number */
-
+
err = connect(client_vio->sd, (struct sockaddr*) &sa,
sizeof(sa));
@@ -87,4 +103,3 @@ int main() {
return 0;
}
#endif /* HAVE_OPENSSL */
-