diff options
Diffstat (limited to 'vio')
-rw-r--r-- | vio/test-ssl.c | 17 | ||||
-rw-r--r-- | vio/test-sslclient.c | 23 | ||||
-rw-r--r-- | vio/test-sslserver.c | 29 | ||||
-rw-r--r-- | vio/vio.c | 8 | ||||
-rw-r--r-- | vio/viosocket.c | 29 | ||||
-rw-r--r-- | vio/viossl.c | 31 | ||||
-rw-r--r-- | vio/viosslfactories.c | 31 | ||||
-rw-r--r-- | vio/viotest-ssl.c | 16 |
8 files changed, 119 insertions, 65 deletions
diff --git a/vio/test-ssl.c b/vio/test-ssl.c index 61d92bb7b84..09dae7ad5cf 100644 --- a/vio/test-ssl.c +++ b/vio/test-ssl.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> @@ -129,4 +145,3 @@ int main() { return 0; } #endif /* HAVE_OPENSSL */ - 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 */ - diff --git a/vio/test-sslserver.c b/vio/test-sslserver.c index 610a4173875..988019a012b 100644 --- a/vio/test-sslserver.c +++ b/vio/test-sslserver.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> @@ -78,7 +94,7 @@ main( int argc __attribute__((unused)), int err; size_t client_len; int reuseaddr = 1; /* better testing, uh? */ - + MY_INIT(argv[0]); DBUG_PROCESS(argv[0]); DBUG_PUSH(default_dbug_option); @@ -97,17 +113,17 @@ main( int argc __attribute__((unused)), listen_sd = socket (AF_INET, SOCK_STREAM, 0); setsockopt(listen_sd, SOL_SOCKET, SO_REUSEADDR, &reuseaddr, sizeof(&reuseaddr)); - + memset (&sa_serv, '\0', sizeof(sa_serv)); sa_serv.sin_family = AF_INET; sa_serv.sin_addr.s_addr = INADDR_ANY; sa_serv.sin_port = htons (1111); /* Server Port number */ - + err = bind(listen_sd, (struct sockaddr*) &sa_serv, sizeof (sa_serv)); - + /* Receive a TCP connection. */ - + err = listen (listen_sd, 5); client_len = sizeof(sa_cli); th_args.sd = accept (listen_sd, (struct sockaddr*) &sa_cli, &client_len); @@ -115,7 +131,7 @@ main( int argc __attribute__((unused)), printf ("Connection from %lx, port %x\n", (long)sa_cli.sin_addr.s_addr, sa_cli.sin_port); - + /* ----------------------------------------------- */ /* TCP connection is ready. Do server side SSL. */ @@ -139,4 +155,3 @@ int main() { return 0; } #endif /* HAVE_OPENSSL */ - diff --git a/vio/vio.c b/vio/vio.c index 6fe0be20906..62814e50240 100644 --- a/vio/vio.c +++ b/vio/vio.c @@ -1,15 +1,15 @@ -/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB - +/* 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 */ diff --git a/vio/viosocket.c b/vio/viosocket.c index f6f62924b00..14b4305b95a 100644 --- a/vio/viosocket.c +++ b/vio/viosocket.c @@ -1,19 +1,18 @@ -/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, +/* 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with this library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, - MA 02111-1307, USA */ + 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 */ /* Note that we can't have assertion on file descriptors; The reason for diff --git a/vio/viossl.c b/vio/viossl.c index e6c1cd31e41..6d85b119f20 100644 --- a/vio/viossl.c +++ b/vio/viossl.c @@ -1,19 +1,18 @@ -/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, +/* 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with this library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, - MA 02111-1307, USA */ + 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 */ /* Note that we can't have assertion on file descriptors; The reason for @@ -296,7 +295,7 @@ void sslaccept(struct st_VioSSLAcceptorFd* ptr, Vio* vio, long timeout) X509_free (client_cert); } else DBUG_PRINT("info",("Client does not have certificate.")); - + str=SSL_get_shared_ciphers(vio->ssl_, buf, sizeof(buf)); if(str) { diff --git a/vio/viosslfactories.c b/vio/viosslfactories.c index 579f37f3dda..322c1ce01e4 100644 --- a/vio/viosslfactories.c +++ b/vio/viosslfactories.c @@ -1,20 +1,18 @@ -/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, +/* 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with this library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, - MA 02111-1307, USA */ + 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> @@ -344,6 +342,3 @@ ctor_failure: #endif /* HAVE_OPENSSL */ - - - diff --git a/vio/viotest-ssl.c b/vio/viotest-ssl.c index 5cdbd12a3db..8c549ae1d38 100644 --- a/vio/viotest-ssl.c +++ b/vio/viotest-ssl.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> |