diff options
author | msvensson@neptunus.(none) <> | 2007-01-29 16:54:40 +0100 |
---|---|---|
committer | msvensson@neptunus.(none) <> | 2007-01-29 16:54:40 +0100 |
commit | 751d00c47eff2f61e42a43ff55f09d840da1b8bc (patch) | |
tree | b6a5e8e8caed2b74a28ec61b821d2450a1af4fa6 /extra/yassl/src | |
parent | 645de0c5d7525b0481197e4f0a6f67f0f2c2785f (diff) | |
download | mariadb-git-751d00c47eff2f61e42a43ff55f09d840da1b8bc.tar.gz |
Import latest version of yaSSL
- Replace SawTooth copyright header with MySQL's
- Bug#19209 Test 'rpl_openssl' hangs on Windows
- Spurious "2013 Connection to server lost" errors fixed
yaSSL doesn't close socket anymore, that is left to the application
Diffstat (limited to 'extra/yassl/src')
-rw-r--r-- | extra/yassl/src/buffer.cpp | 41 | ||||
-rw-r--r-- | extra/yassl/src/cert_wrapper.cpp | 41 | ||||
-rw-r--r-- | extra/yassl/src/crypto_wrapper.cpp | 41 | ||||
-rw-r--r-- | extra/yassl/src/handshake.cpp | 43 | ||||
-rw-r--r-- | extra/yassl/src/lock.cpp | 41 | ||||
-rw-r--r-- | extra/yassl/src/log.cpp | 41 | ||||
-rw-r--r-- | extra/yassl/src/socket_wrapper.cpp | 43 | ||||
-rw-r--r-- | extra/yassl/src/ssl.cpp | 42 | ||||
-rw-r--r-- | extra/yassl/src/template_instnt.cpp | 41 | ||||
-rw-r--r-- | extra/yassl/src/timer.cpp | 41 | ||||
-rw-r--r-- | extra/yassl/src/yassl.cpp | 41 | ||||
-rw-r--r-- | extra/yassl/src/yassl_error.cpp | 41 | ||||
-rw-r--r-- | extra/yassl/src/yassl_imp.cpp | 41 | ||||
-rw-r--r-- | extra/yassl/src/yassl_int.cpp | 53 |
14 files changed, 251 insertions, 340 deletions
diff --git a/extra/yassl/src/buffer.cpp b/extra/yassl/src/buffer.cpp index 4d396a8d29f..0c3f23b0cb8 100644 --- a/extra/yassl/src/buffer.cpp +++ b/extra/yassl/src/buffer.cpp @@ -1,27 +1,20 @@ -/* buffer.cpp - * - * Copyright (C) 2003 Sawtooth Consulting Ltd. - * - * This file is part of yaSSL. - * - * yaSSL 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. - * - * There are special exceptions to the terms and conditions of the GPL as it - * is applied to yaSSL. View the full text of the exception in the file - * FLOSS-EXCEPTIONS in the directory of this software distribution. - * - * yaSSL 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 - */ +/* + Copyright (C) 2000-2007 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; version 2 of the License. + + 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; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, + MA 02110-1301 USA. +*/ /* yaSSL buffer header implements input/output buffers to simulate streaming diff --git a/extra/yassl/src/cert_wrapper.cpp b/extra/yassl/src/cert_wrapper.cpp index c3ae9c0c561..5eacf9083f9 100644 --- a/extra/yassl/src/cert_wrapper.cpp +++ b/extra/yassl/src/cert_wrapper.cpp @@ -1,27 +1,20 @@ -/* cert_wrapper.cpp - * - * Copyright (C) 2003 Sawtooth Consulting Ltd. - * - * This file is part of yaSSL. - * - * yaSSL 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. - * - * There are special exceptions to the terms and conditions of the GPL as it - * is applied to yaSSL. View the full text of the exception in the file - * FLOSS-EXCEPTIONS in the directory of this software distribution. - * - * yaSSL 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 - */ +/* + Copyright (C) 2000-2007 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; version 2 of the License. + + 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; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, + MA 02110-1301 USA. +*/ /* The certificate wrapper source implements certificate management functions diff --git a/extra/yassl/src/crypto_wrapper.cpp b/extra/yassl/src/crypto_wrapper.cpp index 7344a70b367..28d7f1b5693 100644 --- a/extra/yassl/src/crypto_wrapper.cpp +++ b/extra/yassl/src/crypto_wrapper.cpp @@ -1,27 +1,20 @@ -/* crypto_wrapper.cpp - * - * Copyright (C) 2003 Sawtooth Consulting Ltd. - * - * This file is part of yaSSL. - * - * yaSSL 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. - * - * There are special exceptions to the terms and conditions of the GPL as it - * is applied to yaSSL. View the full text of the exception in the file - * FLOSS-EXCEPTIONS in the directory of this software distribution. - * - * yaSSL 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 - */ +/* + Copyright (C) 2000-2007 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; version 2 of the License. + + 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; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, + MA 02110-1301 USA. +*/ /* The crypto wrapper source implements the policies for the cipher * components used by SSL. diff --git a/extra/yassl/src/handshake.cpp b/extra/yassl/src/handshake.cpp index c03d72ff2ef..0cd0dfe9c7c 100644 --- a/extra/yassl/src/handshake.cpp +++ b/extra/yassl/src/handshake.cpp @@ -1,27 +1,20 @@ -/* handshake.cpp - * - * Copyright (C) 2003 Sawtooth Consulting Ltd. - * - * This file is part of yaSSL. - * - * yaSSL 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. - * - * There are special exceptions to the terms and conditions of the GPL as it - * is applied to yaSSL. View the full text of the exception in the file - * FLOSS-EXCEPTIONS in the directory of this software distribution. - * - * yaSSL 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 - */ +/* + Copyright (C) 2000-2007 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; version 2 of the License. + + 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; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, + MA 02110-1301 USA. +*/ /* The handshake source implements functions for creating and reading @@ -979,7 +972,7 @@ int receiveData(SSL& ssl, Data& data, bool peek) ssl.verfiyHandShakeComplete(); if (ssl.GetError()) return -1; - if (!ssl.bufferedData()) + if (!ssl.HasData()) processReply(ssl); if (peek) diff --git a/extra/yassl/src/lock.cpp b/extra/yassl/src/lock.cpp index 0f4c80b1616..6d8e9c17477 100644 --- a/extra/yassl/src/lock.cpp +++ b/extra/yassl/src/lock.cpp @@ -1,27 +1,20 @@ -/* lock.cpp - * - * Copyright (C) 2003 Sawtooth Consulting Ltd. - * - * This file is part of yaSSL. - * - * yaSSL 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. - * - * There are special exceptions to the terms and conditions of the GPL as it - * is applied to yaSSL. View the full text of the exception in the file - * FLOSS-EXCEPTIONS in the directory of this software distribution. - * - * yaSSL 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 - */ +/* + Copyright (C) 2000-2007 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; version 2 of the License. + + 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; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, + MA 02110-1301 USA. +*/ /* Locking functions */ diff --git a/extra/yassl/src/log.cpp b/extra/yassl/src/log.cpp index c8030787f3d..35db4136a54 100644 --- a/extra/yassl/src/log.cpp +++ b/extra/yassl/src/log.cpp @@ -1,27 +1,20 @@ -/* log.cpp - * - * Copyright (C) 2003 Sawtooth Consulting Ltd. - * - * This file is part of yaSSL. - * - * yaSSL 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. - * - * There are special exceptions to the terms and conditions of the GPL as it - * is applied to yaSSL. View the full text of the exception in the file - * FLOSS-EXCEPTIONS in the directory of this software distribution. - * - * yaSSL 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 - */ +/* + Copyright (C) 2000-2007 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; version 2 of the License. + + 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; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, + MA 02110-1301 USA. +*/ /* Debug logging functions */ diff --git a/extra/yassl/src/socket_wrapper.cpp b/extra/yassl/src/socket_wrapper.cpp index f281b81a24a..d53a109d70e 100644 --- a/extra/yassl/src/socket_wrapper.cpp +++ b/extra/yassl/src/socket_wrapper.cpp @@ -1,27 +1,20 @@ -/* socket_wrapper.cpp - * - * Copyright (C) 2003 Sawtooth Consulting Ltd. - * - * This file is part of yaSSL. - * - * yaSSL 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. - * - * There are special exceptions to the terms and conditions of the GPL as it - * is applied to yaSSL. View the full text of the exception in the file - * FLOSS-EXCEPTIONS in the directory of this software distribution. - * - * yaSSL 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 - */ +/* + Copyright (C) 2000-2007 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; version 2 of the License. + + 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; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, + MA 02110-1301 USA. +*/ /* The socket wrapper source implements a Socket class that hides the @@ -81,7 +74,7 @@ socket_t Socket::get_fd() const Socket::~Socket() { - closeSocket(); + // don't close automatically now } diff --git a/extra/yassl/src/ssl.cpp b/extra/yassl/src/ssl.cpp index 5ca7dec399d..70198af79b4 100644 --- a/extra/yassl/src/ssl.cpp +++ b/extra/yassl/src/ssl.cpp @@ -1,27 +1,20 @@ - /* ssl.cpp - * - * Copyright (C) 2003 Sawtooth Consulting Ltd. - * - * This file is part of yaSSL. - * - * yaSSL 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. - * - * There are special exceptions to the terms and conditions of the GPL as it - * is applied to yaSSL. View the full text of the exception in the file - * FLOSS-EXCEPTIONS in the directory of this software distribution. - * - * yaSSL 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 - */ +/* + Copyright (C) 2000-2007 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; version 2 of the License. + + 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; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, + MA 02110-1301 USA. +*/ /* SSL source implements all openssl compatibility API functions * @@ -407,7 +400,6 @@ int SSL_do_handshake(SSL* ssl) int SSL_clear(SSL* ssl) { - ssl->useSocket().closeSocket(); GetErrors().Remove(); return SSL_SUCCESS; diff --git a/extra/yassl/src/template_instnt.cpp b/extra/yassl/src/template_instnt.cpp index fb488e47672..f82f7924359 100644 --- a/extra/yassl/src/template_instnt.cpp +++ b/extra/yassl/src/template_instnt.cpp @@ -1,27 +1,20 @@ -/* template_instnt.cpp - * - * Copyright (C) 2003 Sawtooth Consulting Ltd. - * - * This file is part of yaSSL. - * - * yaSSL 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. - * - * There are special exceptions to the terms and conditions of the GPL as it - * is applied to yaSSL. View the full text of the exception in the file - * FLOSS-EXCEPTIONS in the directory of this software distribution. - * - * yaSSL 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 - */ +/* + Copyright (C) 2000-2007 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; version 2 of the License. + + 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; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, + MA 02110-1301 USA. +*/ /* Explicit template instantiation requests diff --git a/extra/yassl/src/timer.cpp b/extra/yassl/src/timer.cpp index 8500d09120b..c1286b0724c 100644 --- a/extra/yassl/src/timer.cpp +++ b/extra/yassl/src/timer.cpp @@ -1,27 +1,20 @@ - /* timer.cpp - * - * Copyright (C) 2003 Sawtooth Consulting Ltd. - * - * This file is part of yaSSL. - * - * yaSSL 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. - * - * There are special exceptions to the terms and conditions of the GPL as it - * is applied to yaSSL. View the full text of the exception in the file - * FLOSS-EXCEPTIONS in the directory of this software distribution. - * - * yaSSL 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 - */ +/* + Copyright (C) 2000-2007 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; version 2 of the License. + + 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; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, + MA 02110-1301 USA. +*/ /* timer.cpp implements a high res and low res timer * diff --git a/extra/yassl/src/yassl.cpp b/extra/yassl/src/yassl.cpp index e253ef84bb5..815277ce6f3 100644 --- a/extra/yassl/src/yassl.cpp +++ b/extra/yassl/src/yassl.cpp @@ -1,27 +1,20 @@ -/* yassl.cpp - * - * Copyright (C) 2003 Sawtooth Consulting Ltd. - * - * This file is part of yaSSL. - * - * yaSSL 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. - * - * There are special exceptions to the terms and conditions of the GPL as it - * is applied to yaSSL. View the full text of the exception in the file - * FLOSS-EXCEPTIONS in the directory of this software distribution. - * - * yaSSL 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 - */ +/* + Copyright (C) 2000-2007 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; version 2 of the License. + + 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; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, + MA 02110-1301 USA. +*/ /* yaSSL implements external API diff --git a/extra/yassl/src/yassl_error.cpp b/extra/yassl/src/yassl_error.cpp index 24fc602d4e9..dc120028e13 100644 --- a/extra/yassl/src/yassl_error.cpp +++ b/extra/yassl/src/yassl_error.cpp @@ -1,27 +1,20 @@ -/* yassl_error.cpp - * - * Copyright (C) 2003 Sawtooth Consulting Ltd. - * - * This file is part of yaSSL. - * - * yaSSL 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. - * - * There are special exceptions to the terms and conditions of the GPL as it - * is applied to yaSSL. View the full text of the exception in the file - * FLOSS-EXCEPTIONS in the directory of this software distribution. - * - * yaSSL 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 - */ +/* + Copyright (C) 2000-2007 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; version 2 of the License. + + 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; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, + MA 02110-1301 USA. +*/ /* yaSSL error implements and an exception class diff --git a/extra/yassl/src/yassl_imp.cpp b/extra/yassl/src/yassl_imp.cpp index bf10c4b8932..0bc95f64abc 100644 --- a/extra/yassl/src/yassl_imp.cpp +++ b/extra/yassl/src/yassl_imp.cpp @@ -1,27 +1,20 @@ -/* yassl_imp.cpp - * - * Copyright (C) 2003 Sawtooth Consulting Ltd. - * - * This file is part of yaSSL. - * - * yaSSL 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. - * - * There are special exceptions to the terms and conditions of the GPL as it - * is applied to yaSSL. View the full text of the exception in the file - * FLOSS-EXCEPTIONS in the directory of this software distribution. - * - * yaSSL 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 - */ +/* + Copyright (C) 2000-2007 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; version 2 of the License. + + 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; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, + MA 02110-1301 USA. +*/ /* yaSSL source implements all SSL.v3 secification structures. */ diff --git a/extra/yassl/src/yassl_int.cpp b/extra/yassl/src/yassl_int.cpp index 1a407ca8ba5..ae16abf9e49 100644 --- a/extra/yassl/src/yassl_int.cpp +++ b/extra/yassl/src/yassl_int.cpp @@ -1,27 +1,20 @@ -/* yassl_int.cpp - * - * Copyright (C) 2003 Sawtooth Consulting Ltd. - * - * This file is part of yaSSL. - * - * yaSSL 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. - * - * There are special exceptions to the terms and conditions of the GPL as it - * is applied to yaSSL. View the full text of the exception in the file - * FLOSS-EXCEPTIONS in the directory of this software distribution. - * - * yaSSL 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 - */ +/* + Copyright (C) 2000-2007 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; version 2 of the License. + + 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; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, + MA 02110-1301 USA. +*/ /* yaSSL internal source implements SSL supporting types not specified in the @@ -298,7 +291,7 @@ const ClientKeyFactory& sslFactory::getClientKey() const SSL::SSL(SSL_CTX* ctx) : secure_(ctx->getMethod()->getVersion(), crypto_.use_random(), ctx->getMethod()->getSide(), ctx->GetCiphers(), ctx, - ctx->GetDH_Parms().set_) + ctx->GetDH_Parms().set_), has_data_(false) { if (int err = crypto_.get_random().GetError()) { SetError(YasslError(err)); @@ -1054,6 +1047,8 @@ void SSL::fillData(Data& data) if (data.get_length() == dataSz) break; } + + if (buffers_.getData().size() == 0) has_data_ = false; // none left } @@ -1389,9 +1384,17 @@ bool SSL::isTLSv1_1() const } +// is there buffered data available, optimization to remove iteration on buffer +bool SSL::HasData() const +{ + return has_data_; +} + + void SSL::addData(input_buffer* data) { buffers_.useData().push_back(data); + if (!has_data_) has_data_ = true; } |