Merge rama.(none):/home/jimw/my/tmp_merge
into rama.(none):/home/jimw/my/mysql-5.1-clean
This commit is contained in:
commit
f7e19b40f3
@ -1093,7 +1093,7 @@ static int read_and_execute(bool interactive)
|
|||||||
(We want to allow help, print and clear anywhere at line start
|
(We want to allow help, print and clear anywhere at line start
|
||||||
*/
|
*/
|
||||||
if ((named_cmds || glob_buffer.is_empty())
|
if ((named_cmds || glob_buffer.is_empty())
|
||||||
&& !in_string && (com=find_command(line,0)))
|
&& !ml_comment && !in_string && (com=find_command(line,0)))
|
||||||
{
|
{
|
||||||
if ((*com->func)(&glob_buffer,line) > 0)
|
if ((*com->func)(&glob_buffer,line) > 0)
|
||||||
break;
|
break;
|
||||||
@ -2995,6 +2995,7 @@ static int
|
|||||||
com_use(String *buffer __attribute__((unused)), char *line)
|
com_use(String *buffer __attribute__((unused)), char *line)
|
||||||
{
|
{
|
||||||
char *tmp, buff[FN_REFLEN + 1];
|
char *tmp, buff[FN_REFLEN + 1];
|
||||||
|
int select_db;
|
||||||
|
|
||||||
bzero(buff, sizeof(buff));
|
bzero(buff, sizeof(buff));
|
||||||
strmov(buff, line);
|
strmov(buff, line);
|
||||||
@ -3014,8 +3015,27 @@ com_use(String *buffer __attribute__((unused)), char *line)
|
|||||||
if (!current_db || cmp_database(charset_info, current_db,tmp))
|
if (!current_db || cmp_database(charset_info, current_db,tmp))
|
||||||
{
|
{
|
||||||
if (one_database)
|
if (one_database)
|
||||||
|
{
|
||||||
skip_updates= 1;
|
skip_updates= 1;
|
||||||
|
select_db= 0; // don't do mysql_select_db()
|
||||||
|
}
|
||||||
else
|
else
|
||||||
|
select_db= 2; // do mysql_select_db() and build_completion_hash()
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
/*
|
||||||
|
USE to the current db specified.
|
||||||
|
We do need to send mysql_select_db() to make server
|
||||||
|
update database level privileges, which might
|
||||||
|
change since last USE (see bug#10979).
|
||||||
|
For performance purposes, we'll skip rebuilding of completion hash.
|
||||||
|
*/
|
||||||
|
skip_updates= 0;
|
||||||
|
select_db= 1; // do only mysql_select_db(), without completion
|
||||||
|
}
|
||||||
|
|
||||||
|
if (select_db)
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
reconnect once if connection is down or if connection was found to
|
reconnect once if connection is down or if connection was found to
|
||||||
@ -3036,12 +3056,11 @@ com_use(String *buffer __attribute__((unused)), char *line)
|
|||||||
my_free(current_db,MYF(MY_ALLOW_ZERO_PTR));
|
my_free(current_db,MYF(MY_ALLOW_ZERO_PTR));
|
||||||
current_db=my_strdup(tmp,MYF(MY_WME));
|
current_db=my_strdup(tmp,MYF(MY_WME));
|
||||||
#ifdef HAVE_READLINE
|
#ifdef HAVE_READLINE
|
||||||
|
if (select_db > 1)
|
||||||
build_completion_hash(rehash, 1);
|
build_completion_hash(rehash, 1);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
}
|
|
||||||
else
|
|
||||||
skip_updates= 0;
|
|
||||||
put_info("Database changed",INFO_INFO);
|
put_info("Database changed",INFO_INFO);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -2385,17 +2385,18 @@ static void dump_table(char *table, char *db)
|
|||||||
goto err;
|
goto err;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (opt_disable_keys)
|
|
||||||
{
|
|
||||||
fprintf(md_result_file, "\n/*!40000 ALTER TABLE %s DISABLE KEYS */;\n",
|
|
||||||
opt_quoted_table);
|
|
||||||
check_io(md_result_file);
|
|
||||||
}
|
|
||||||
if (opt_lock)
|
if (opt_lock)
|
||||||
{
|
{
|
||||||
fprintf(md_result_file,"LOCK TABLES %s WRITE;\n", opt_quoted_table);
|
fprintf(md_result_file,"LOCK TABLES %s WRITE;\n", opt_quoted_table);
|
||||||
check_io(md_result_file);
|
check_io(md_result_file);
|
||||||
}
|
}
|
||||||
|
/* Moved disable keys to after lock per bug 15977 */
|
||||||
|
if (opt_disable_keys)
|
||||||
|
{
|
||||||
|
fprintf(md_result_file, "/*!40000 ALTER TABLE %s DISABLE KEYS */;\n",
|
||||||
|
opt_quoted_table);
|
||||||
|
check_io(md_result_file);
|
||||||
|
}
|
||||||
|
|
||||||
total_length= opt_net_buffer_length; /* Force row break */
|
total_length= opt_net_buffer_length; /* Force row break */
|
||||||
row_break=0;
|
row_break=0;
|
||||||
@ -2657,17 +2658,19 @@ static void dump_table(char *table, char *db)
|
|||||||
error= EX_CONSCHECK;
|
error= EX_CONSCHECK;
|
||||||
goto err;
|
goto err;
|
||||||
}
|
}
|
||||||
if (opt_lock)
|
|
||||||
{
|
/* Moved enable keys to before unlock per bug 15977 */
|
||||||
fputs("UNLOCK TABLES;\n", md_result_file);
|
|
||||||
check_io(md_result_file);
|
|
||||||
}
|
|
||||||
if (opt_disable_keys)
|
if (opt_disable_keys)
|
||||||
{
|
{
|
||||||
fprintf(md_result_file,"/*!40000 ALTER TABLE %s ENABLE KEYS */;\n",
|
fprintf(md_result_file,"/*!40000 ALTER TABLE %s ENABLE KEYS */;\n",
|
||||||
opt_quoted_table);
|
opt_quoted_table);
|
||||||
check_io(md_result_file);
|
check_io(md_result_file);
|
||||||
}
|
}
|
||||||
|
if (opt_lock)
|
||||||
|
{
|
||||||
|
fputs("UNLOCK TABLES;\n", md_result_file);
|
||||||
|
check_io(md_result_file);
|
||||||
|
}
|
||||||
if (opt_autocommit)
|
if (opt_autocommit)
|
||||||
{
|
{
|
||||||
fprintf(md_result_file, "commit;\n");
|
fprintf(md_result_file, "commit;\n");
|
||||||
@ -3059,6 +3062,12 @@ static my_bool dump_all_views_in_db(char *database)
|
|||||||
uint numrows;
|
uint numrows;
|
||||||
char table_buff[NAME_LEN*2+3];
|
char table_buff[NAME_LEN*2+3];
|
||||||
|
|
||||||
|
if (mysql_select_db(sock, database))
|
||||||
|
{
|
||||||
|
DB_error(sock, "when selecting the database");
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
if (opt_xml)
|
if (opt_xml)
|
||||||
print_xml_tag1(md_result_file, "", "database name=", database, "\n");
|
print_xml_tag1(md_result_file, "", "database name=", database, "\n");
|
||||||
if (lock_tables)
|
if (lock_tables)
|
||||||
@ -3720,12 +3729,13 @@ static my_bool get_view_structure(char *table, char* db)
|
|||||||
mysql_free_result(table_res);
|
mysql_free_result(table_res);
|
||||||
|
|
||||||
/* Get the result from "select ... information_schema" */
|
/* Get the result from "select ... information_schema" */
|
||||||
if (!(table_res= mysql_store_result(sock)))
|
if (!(table_res= mysql_store_result(sock)) ||
|
||||||
|
!(row= mysql_fetch_row(table_res)))
|
||||||
{
|
{
|
||||||
safe_exit(EX_MYSQLERR);
|
safe_exit(EX_MYSQLERR);
|
||||||
DBUG_RETURN(1);
|
DBUG_RETURN(1);
|
||||||
}
|
}
|
||||||
row= mysql_fetch_row(table_res);
|
|
||||||
lengths= mysql_fetch_lengths(table_res);
|
lengths= mysql_fetch_lengths(table_res);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -618,7 +618,7 @@ AC_ARG_ENABLE(assembler,
|
|||||||
|
|
||||||
AC_MSG_CHECKING(if we should use assembler functions)
|
AC_MSG_CHECKING(if we should use assembler functions)
|
||||||
# For now we only support assembler on i386 and sparc systems
|
# For now we only support assembler on i386 and sparc systems
|
||||||
AM_CONDITIONAL(ASSEMBLER_x86, test "$ENABLE_ASSEMBLER" = "yes" -a "$BASE_MACHINE_TYPE" = "i386")
|
AM_CONDITIONAL(ASSEMBLER_x86, test "$ENABLE_ASSEMBLER" = "yes" -a "$BASE_MACHINE_TYPE" = "i386" && $AS strings/strings-x86.s -o checkassembler >/dev/null 2>&1 && test -f checkassembler && (rm -f checkassembler; exit 0;))
|
||||||
AM_CONDITIONAL(ASSEMBLER_sparc32, test "$ENABLE_ASSEMBLER" = "yes" -a "$BASE_MACHINE_TYPE" = "sparc")
|
AM_CONDITIONAL(ASSEMBLER_sparc32, test "$ENABLE_ASSEMBLER" = "yes" -a "$BASE_MACHINE_TYPE" = "sparc")
|
||||||
AM_CONDITIONAL(ASSEMBLER_sparc64, test "$ENABLE_ASSEMBLER" = "yes" -a "$BASE_MACHINE_TYPE" = "sparcv9")
|
AM_CONDITIONAL(ASSEMBLER_sparc64, test "$ENABLE_ASSEMBLER" = "yes" -a "$BASE_MACHINE_TYPE" = "sparcv9")
|
||||||
AM_CONDITIONAL(ASSEMBLER, test "$ASSEMBLER_x86_TRUE" = "" -o "$ASSEMBLER_sparc32_TRUE" = "")
|
AM_CONDITIONAL(ASSEMBLER, test "$ASSEMBLER_x86_TRUE" = "" -o "$ASSEMBLER_sparc32_TRUE" = "")
|
||||||
|
120
extra/yassl/FLOSS-EXCEPTIONS
Normal file
120
extra/yassl/FLOSS-EXCEPTIONS
Normal file
@ -0,0 +1,120 @@
|
|||||||
|
yaSSL FLOSS License Exception
|
||||||
|
****************************************
|
||||||
|
|
||||||
|
Version 0.1, 26 June 2006
|
||||||
|
|
||||||
|
The Sawtooth Consulting Ltd. Exception for Free/Libre and Open Source
|
||||||
|
Software-only Applications Using yaSSL Libraries (the "FLOSS Exception").
|
||||||
|
|
||||||
|
*Exception Intent*
|
||||||
|
|
||||||
|
We want specified Free/Libre and Open Source Software ("FLOSS")
|
||||||
|
applications to be able to use specified GPL-licensed yaSSL
|
||||||
|
libraries (the "Program") despite the fact that not all FLOSS
|
||||||
|
licenses are compatible with version 2 of the GNU General Public
|
||||||
|
License (the "GPL").
|
||||||
|
|
||||||
|
*Legal Terms and Conditions*
|
||||||
|
|
||||||
|
As a special exception to the terms and conditions of version 2.0 of
|
||||||
|
the GPL:
|
||||||
|
|
||||||
|
1. You are free to distribute a Derivative Work that is formed
|
||||||
|
entirely from the Program and one or more works (each, a "FLOSS
|
||||||
|
Work") licensed under one or more of the licenses listed below
|
||||||
|
in section 1, as long as:
|
||||||
|
|
||||||
|
1. You obey the GPL in all respects for the Program and the
|
||||||
|
Derivative Work, except for identifiable sections of the
|
||||||
|
Derivative Work which are not derived from the Program,
|
||||||
|
and which can reasonably be considered independent and
|
||||||
|
separate works in themselves,
|
||||||
|
|
||||||
|
2. all identifiable sections of the Derivative Work which
|
||||||
|
are not derived from the Program, and which can reasonably be
|
||||||
|
considered independent and separate works in themselves,
|
||||||
|
|
||||||
|
* i
|
||||||
|
|
||||||
|
are distributed subject to one of the FLOSS licenses
|
||||||
|
listed below, and
|
||||||
|
|
||||||
|
* ii
|
||||||
|
|
||||||
|
the object code or executable form of those sections are
|
||||||
|
accompanied by the complete corresponding machine-readable
|
||||||
|
source code for those sections on the same medium and under
|
||||||
|
the same FLOSS license as the corresponding object code or
|
||||||
|
executable forms of those sections, and
|
||||||
|
|
||||||
|
|
||||||
|
3. any works which are aggregated with the Program or with
|
||||||
|
a Derivative Work on a volume of a storage or distribution
|
||||||
|
medium in accordance with the GPL, can reasonably be considered
|
||||||
|
independent and separate works in themselves which are not
|
||||||
|
derivatives of either the Program, a Derivative Work or a FLOSS
|
||||||
|
Work.
|
||||||
|
|
||||||
|
|
||||||
|
If the above conditions are not met, then the Program may only be
|
||||||
|
copied, modified, distributed or used under the terms and
|
||||||
|
conditions of the GPL or another valid licensing option from
|
||||||
|
Sawtooth Consulting Ltd.
|
||||||
|
|
||||||
|
2. FLOSS License List
|
||||||
|
|
||||||
|
*License name* *Version(s)/Copyright Date*
|
||||||
|
Academic Free License 2.0
|
||||||
|
Apache Software License 1.0/1.1/2.0
|
||||||
|
Apple Public Source License 2.0
|
||||||
|
Artistic license From Perl 5.8.0
|
||||||
|
BSD license "July 22 1999"
|
||||||
|
Common Development and Distribution License (CDDL) 1.0
|
||||||
|
Common Public License 1.0
|
||||||
|
GNU Library or "Lesser" General Public 2.0/2.1
|
||||||
|
License (LGPL)
|
||||||
|
Jabber Open Source License 1.0
|
||||||
|
MIT license -
|
||||||
|
Mozilla Public License (MPL) 1.0/1.1
|
||||||
|
Open Software License 2.0
|
||||||
|
PHP License 3.0
|
||||||
|
Python license (CNRI Python License) -
|
||||||
|
Python Software Foundation License 2.1.1
|
||||||
|
Sleepycat License "1999"
|
||||||
|
W3C License "2001"
|
||||||
|
X11 License "2001"
|
||||||
|
Zlib/libpng License -
|
||||||
|
Zope Public License 2.0
|
||||||
|
|
||||||
|
Due to the many variants of some of the above licenses, we require
|
||||||
|
that any version follow the 2003 version of the Free Software
|
||||||
|
Foundation's Free Software Definition
|
||||||
|
(http://www.gnu.org/philosophy/free-sw.html
|
||||||
|
(http://www.gnu.org/philosophy/free-sw.html)) or version 1.9 of
|
||||||
|
the Open Source Definition by the Open Source Initiative
|
||||||
|
(http://www.opensource.org/docs/definition.php
|
||||||
|
(http://www.opensource.org/docs/definition.php)).
|
||||||
|
|
||||||
|
3. Definitions
|
||||||
|
|
||||||
|
1. Terms used, but not defined, herein shall have the
|
||||||
|
meaning provided in the GPL.
|
||||||
|
|
||||||
|
2. Derivative Work means a derivative work under copyright
|
||||||
|
law.
|
||||||
|
|
||||||
|
|
||||||
|
4. Applicability This FLOSS Exception applies to all Programs that
|
||||||
|
contain a notice placed by Sawtooth Consulting Ltd. saying that the
|
||||||
|
Program may be distributed under the terms of this FLOSS Exception.
|
||||||
|
If you create or distribute a work which is a Derivative Work of
|
||||||
|
both the Program and any other work licensed under the GPL, then
|
||||||
|
this FLOSS Exception is not available for that work; thus, you
|
||||||
|
must remove the FLOSS Exception notice from that work and
|
||||||
|
comply with the GPL in all respects, including by retaining all
|
||||||
|
GPL notices. You may choose to redistribute a copy of the
|
||||||
|
Program exclusively under the terms of the GPL by removing the
|
||||||
|
FLOSS Exception notice from that copy of the Program, provided
|
||||||
|
that the copy has never been modified by you or any third party.
|
||||||
|
|
||||||
|
|
@ -1,4 +1,14 @@
|
|||||||
yaSSL Release notes, version 1.3.5 (06/01/06)
|
yaSSL Release notes, version 1.3.7 (06/26/06)
|
||||||
|
|
||||||
|
|
||||||
|
This release of yaSSL contains bug fixes, portability enhancements,
|
||||||
|
and libcurl 7.15.4 support (any newer versions may not build).
|
||||||
|
|
||||||
|
See normal build instructions below under 1.0.6.
|
||||||
|
See libcurl build instructions below under 1.3.0.
|
||||||
|
|
||||||
|
|
||||||
|
********************yaSSL Release notes, version 1.3.5 (06/01/06)
|
||||||
|
|
||||||
|
|
||||||
This release of yaSSL contains bug fixes, portability enhancements,
|
This release of yaSSL contains bug fixes, portability enhancements,
|
||||||
|
@ -9,6 +9,10 @@
|
|||||||
* the Free Software Foundation; either version 2 of the License, or
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
* (at your option) any later version.
|
* (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,
|
* yaSSL is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
@ -9,6 +9,10 @@
|
|||||||
* the Free Software Foundation; either version 2 of the License, or
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
* (at your option) any later version.
|
* (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,
|
* yaSSL is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
@ -9,6 +9,10 @@
|
|||||||
* the Free Software Foundation; either version 2 of the License, or
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
* (at your option) any later version.
|
* (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,
|
* yaSSL is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
@ -36,6 +40,7 @@
|
|||||||
#define yaSSL_CRYPTO_WRAPPER_HPP
|
#define yaSSL_CRYPTO_WRAPPER_HPP
|
||||||
|
|
||||||
#include "yassl_types.hpp"
|
#include "yassl_types.hpp"
|
||||||
|
#include <stdio.h> // FILE
|
||||||
|
|
||||||
|
|
||||||
namespace yaSSL {
|
namespace yaSSL {
|
||||||
@ -410,7 +415,8 @@ private:
|
|||||||
|
|
||||||
class x509;
|
class x509;
|
||||||
|
|
||||||
x509* PemToDer(const char*, CertType);
|
|
||||||
|
x509* PemToDer(FILE*, CertType);
|
||||||
|
|
||||||
|
|
||||||
} // naemspace
|
} // naemspace
|
||||||
|
@ -9,6 +9,10 @@
|
|||||||
* the Free Software Foundation; either version 2 of the License, or
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
* (at your option) any later version.
|
* (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,
|
* yaSSL is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
@ -9,6 +9,10 @@
|
|||||||
* the Free Software Foundation; either version 2 of the License, or
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
* (at your option) any later version.
|
* (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,
|
* yaSSL is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
@ -55,7 +59,7 @@ void sendCertificateVerify(SSL&, BufferOutput = buffered);
|
|||||||
int sendData(SSL&, const void*, int);
|
int sendData(SSL&, const void*, int);
|
||||||
int sendAlert(SSL& ssl, const Alert& alert);
|
int sendAlert(SSL& ssl, const Alert& alert);
|
||||||
|
|
||||||
int receiveData(SSL&, Data&);
|
int receiveData(SSL&, Data&, bool peek = false);
|
||||||
void processReply(SSL&);
|
void processReply(SSL&);
|
||||||
|
|
||||||
void buildFinished(SSL&, Finished&, const opaque*);
|
void buildFinished(SSL&, Finished&, const opaque*);
|
||||||
|
@ -9,6 +9,10 @@
|
|||||||
* the Free Software Foundation; either version 2 of the License, or
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
* (at your option) any later version.
|
* (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,
|
* yaSSL is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
@ -9,6 +9,10 @@
|
|||||||
* the Free Software Foundation; either version 2 of the License, or
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
* (at your option) any later version.
|
* (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,
|
* yaSSL is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
@ -9,6 +9,10 @@
|
|||||||
* the Free Software Foundation; either version 2 of the License, or
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
* (at your option) any later version.
|
* (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,
|
* yaSSL is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
@ -36,6 +40,10 @@
|
|||||||
#include "opensslv.h" /* for version number */
|
#include "opensslv.h" /* for version number */
|
||||||
#include "rsa.h"
|
#include "rsa.h"
|
||||||
|
|
||||||
|
|
||||||
|
#define YASSL_VERSION "1.3.7"
|
||||||
|
|
||||||
|
|
||||||
#if defined(__cplusplus)
|
#if defined(__cplusplus)
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
@ -414,6 +422,7 @@ int RAND_load_file(const char*, long);
|
|||||||
|
|
||||||
/* for libcurl */
|
/* for libcurl */
|
||||||
int RAND_status(void);
|
int RAND_status(void);
|
||||||
|
int RAND_bytes(unsigned char* buf, int num);
|
||||||
|
|
||||||
int DES_set_key(const_DES_cblock*, DES_key_schedule*);
|
int DES_set_key(const_DES_cblock*, DES_key_schedule*);
|
||||||
void DES_set_odd_parity(DES_cblock*);
|
void DES_set_odd_parity(DES_cblock*);
|
||||||
@ -421,6 +430,7 @@ void DES_ecb_encrypt(DES_cblock*, DES_cblock*, DES_key_schedule*, int);
|
|||||||
|
|
||||||
void SSL_CTX_set_default_passwd_cb_userdata(SSL_CTX*, void* userdata);
|
void SSL_CTX_set_default_passwd_cb_userdata(SSL_CTX*, void* userdata);
|
||||||
void SSL_SESSION_free(SSL_SESSION* session);
|
void SSL_SESSION_free(SSL_SESSION* session);
|
||||||
|
int SSL_peek(SSL* ssl, void* buf, int num);
|
||||||
|
|
||||||
X509* SSL_get_certificate(SSL* ssl);
|
X509* SSL_get_certificate(SSL* ssl);
|
||||||
EVP_PKEY* SSL_get_privatekey(SSL* ssl);
|
EVP_PKEY* SSL_get_privatekey(SSL* ssl);
|
||||||
@ -513,6 +523,8 @@ void MD5_Init(MD5_CTX*);
|
|||||||
void MD5_Update(MD5_CTX*, const void*, unsigned long);
|
void MD5_Update(MD5_CTX*, const void*, unsigned long);
|
||||||
void MD5_Final(unsigned char*, MD5_CTX*);
|
void MD5_Final(unsigned char*, MD5_CTX*);
|
||||||
|
|
||||||
|
#define MD5_DIGEST_LENGTH 16
|
||||||
|
|
||||||
|
|
||||||
#define SSL_DEFAULT_CIPHER_LIST "" /* default all */
|
#define SSL_DEFAULT_CIPHER_LIST "" /* default all */
|
||||||
|
|
||||||
|
@ -9,6 +9,10 @@
|
|||||||
* the Free Software Foundation; either version 2 of the License, or
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
* (at your option) any later version.
|
* (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,
|
* yaSSL is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
@ -9,6 +9,10 @@
|
|||||||
* the Free Software Foundation; either version 2 of the License, or
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
* (at your option) any later version.
|
* (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,
|
* yaSSL is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
@ -9,6 +9,10 @@
|
|||||||
* the Free Software Foundation; either version 2 of the License, or
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
* (at your option) any later version.
|
* (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,
|
* yaSSL is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
@ -9,6 +9,10 @@
|
|||||||
* the Free Software Foundation; either version 2 of the License, or
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
* (at your option) any later version.
|
* (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,
|
* yaSSL is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
@ -664,9 +668,9 @@ struct Parameters {
|
|||||||
char cipher_name_[MAX_SUITE_NAME];
|
char cipher_name_[MAX_SUITE_NAME];
|
||||||
char cipher_list_[MAX_CIPHERS][MAX_SUITE_NAME];
|
char cipher_list_[MAX_CIPHERS][MAX_SUITE_NAME];
|
||||||
|
|
||||||
Parameters(ConnectionEnd, const Ciphers&, ProtocolVersion);
|
Parameters(ConnectionEnd, const Ciphers&, ProtocolVersion, bool haveDH);
|
||||||
|
|
||||||
void SetSuites(ProtocolVersion pv);
|
void SetSuites(ProtocolVersion pv, bool removeDH = false);
|
||||||
void SetCipherNames();
|
void SetCipherNames();
|
||||||
private:
|
private:
|
||||||
Parameters(const Parameters&); // hide copy
|
Parameters(const Parameters&); // hide copy
|
||||||
|
@ -9,6 +9,10 @@
|
|||||||
* the Free Software Foundation; either version 2 of the License, or
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
* (at your option) any later version.
|
* (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,
|
* yaSSL is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
@ -429,9 +433,10 @@ private:
|
|||||||
|
|
||||||
// holds input and output buffers
|
// holds input and output buffers
|
||||||
class Buffers {
|
class Buffers {
|
||||||
|
public:
|
||||||
typedef mySTL::list<input_buffer*> inputList;
|
typedef mySTL::list<input_buffer*> inputList;
|
||||||
typedef mySTL::list<output_buffer*> outputList;
|
typedef mySTL::list<output_buffer*> outputList;
|
||||||
|
private:
|
||||||
inputList dataList_; // list of users app data / handshake
|
inputList dataList_; // list of users app data / handshake
|
||||||
outputList handShakeList_; // buffered handshake msgs
|
outputList handShakeList_; // buffered handshake msgs
|
||||||
public:
|
public:
|
||||||
@ -458,7 +463,7 @@ class Security {
|
|||||||
bool resuming_; // trying to resume
|
bool resuming_; // trying to resume
|
||||||
public:
|
public:
|
||||||
Security(ProtocolVersion, RandomPool&, ConnectionEnd, const Ciphers&,
|
Security(ProtocolVersion, RandomPool&, ConnectionEnd, const Ciphers&,
|
||||||
SSL_CTX*);
|
SSL_CTX*, bool);
|
||||||
|
|
||||||
const SSL_CTX* GetContext() const;
|
const SSL_CTX* GetContext() const;
|
||||||
const Connection& get_connection() const;
|
const Connection& get_connection() const;
|
||||||
@ -521,6 +526,7 @@ public:
|
|||||||
void makeTLSMasterSecret();
|
void makeTLSMasterSecret();
|
||||||
void addData(input_buffer* data);
|
void addData(input_buffer* data);
|
||||||
void fillData(Data&);
|
void fillData(Data&);
|
||||||
|
void PeekData(Data&);
|
||||||
void addBuffer(output_buffer* b);
|
void addBuffer(output_buffer* b);
|
||||||
void flushBuffer();
|
void flushBuffer();
|
||||||
void verifyState(const RecordLayerHeader&);
|
void verifyState(const RecordLayerHeader&);
|
||||||
|
@ -9,6 +9,10 @@
|
|||||||
* the Free Software Foundation; either version 2 of the License, or
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
* (at your option) any later version.
|
* (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,
|
* yaSSL is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
@ -9,6 +9,10 @@
|
|||||||
* the Free Software Foundation; either version 2 of the License, or
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
* (at your option) any later version.
|
* (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,
|
* yaSSL is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
@ -9,6 +9,10 @@
|
|||||||
* the Free Software Foundation; either version 2 of the License, or
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
* (at your option) any later version.
|
* (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,
|
* yaSSL is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
@ -9,6 +9,10 @@
|
|||||||
* the Free Software Foundation; either version 2 of the License, or
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
* (at your option) any later version.
|
* (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,
|
* yaSSL is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
@ -9,6 +9,10 @@
|
|||||||
* the Free Software Foundation; either version 2 of the License, or
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
* (at your option) any later version.
|
* (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,
|
* yaSSL is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
@ -9,6 +9,10 @@
|
|||||||
* the Free Software Foundation; either version 2 of the License, or
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
* (at your option) any later version.
|
* (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,
|
* yaSSL is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
@ -9,6 +9,10 @@
|
|||||||
* the Free Software Foundation; either version 2 of the License, or
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
* (at your option) any later version.
|
* (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,
|
* yaSSL is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
@ -9,6 +9,10 @@
|
|||||||
* the Free Software Foundation; either version 2 of the License, or
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
* (at your option) any later version.
|
* (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,
|
* yaSSL is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
@ -9,6 +9,10 @@
|
|||||||
* the Free Software Foundation; either version 2 of the License, or
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
* (at your option) any later version.
|
* (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,
|
* yaSSL is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
@ -9,6 +9,10 @@
|
|||||||
* the Free Software Foundation; either version 2 of the License, or
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
* (at your option) any later version.
|
* (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,
|
* yaSSL is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
@ -182,7 +186,8 @@ int CertManager::CopyCaCert(const x509* x)
|
|||||||
signers_.push_back(NEW_YS TaoCrypt::Signer(key.GetKey(), key.size(),
|
signers_.push_back(NEW_YS TaoCrypt::Signer(key.GetKey(), key.size(),
|
||||||
cert.GetCommonName(), cert.GetHash()));
|
cert.GetCommonName(), cert.GetHash()));
|
||||||
}
|
}
|
||||||
return cert.GetError().What();
|
// just don't add, not an error return cert.GetError().What();
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -9,6 +9,10 @@
|
|||||||
* the Free Software Foundation; either version 2 of the License, or
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
* (at your option) any later version.
|
* (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,
|
* yaSSL is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
@ -904,7 +908,7 @@ void DiffieHellman::get_parms(byte* bp, byte* bg, byte* bpub) const
|
|||||||
|
|
||||||
|
|
||||||
// convert PEM file to DER x509 type
|
// convert PEM file to DER x509 type
|
||||||
x509* PemToDer(const char* fname, CertType type)
|
x509* PemToDer(FILE* file, CertType type)
|
||||||
{
|
{
|
||||||
using namespace TaoCrypt;
|
using namespace TaoCrypt;
|
||||||
|
|
||||||
@ -919,10 +923,6 @@ x509* PemToDer(const char* fname, CertType type)
|
|||||||
strncpy(footer, "-----END RSA PRIVATE KEY-----", sizeof(header));
|
strncpy(footer, "-----END RSA PRIVATE KEY-----", sizeof(header));
|
||||||
}
|
}
|
||||||
|
|
||||||
FILE* file = fopen(fname, "rb");
|
|
||||||
if (!file)
|
|
||||||
return 0;
|
|
||||||
|
|
||||||
long begin = -1;
|
long begin = -1;
|
||||||
long end = 0;
|
long end = 0;
|
||||||
bool foundEnd = false;
|
bool foundEnd = false;
|
||||||
@ -943,18 +943,14 @@ x509* PemToDer(const char* fname, CertType type)
|
|||||||
else
|
else
|
||||||
end = ftell(file);
|
end = ftell(file);
|
||||||
|
|
||||||
if (begin == -1 || !foundEnd) {
|
if (begin == -1 || !foundEnd)
|
||||||
fclose(file);
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
|
||||||
|
|
||||||
input_buffer tmp(end - begin);
|
input_buffer tmp(end - begin);
|
||||||
fseek(file, begin, SEEK_SET);
|
fseek(file, begin, SEEK_SET);
|
||||||
size_t bytes = fread(tmp.get_buffer(), end - begin, 1, file);
|
size_t bytes = fread(tmp.get_buffer(), end - begin, 1, file);
|
||||||
if (bytes != 1) {
|
if (bytes != 1)
|
||||||
fclose(file);
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
|
||||||
|
|
||||||
Source der(tmp.get_buffer(), end - begin);
|
Source der(tmp.get_buffer(), end - begin);
|
||||||
Base64Decoder b64Dec(der);
|
Base64Decoder b64Dec(der);
|
||||||
@ -963,7 +959,6 @@ x509* PemToDer(const char* fname, CertType type)
|
|||||||
mySTL::auto_ptr<x509> x(NEW_YS x509(sz), ysDelete);
|
mySTL::auto_ptr<x509> x(NEW_YS x509(sz), ysDelete);
|
||||||
memcpy(x->use_buffer(), der.get_buffer(), sz);
|
memcpy(x->use_buffer(), der.get_buffer(), sz);
|
||||||
|
|
||||||
fclose(file);
|
|
||||||
return x.release();
|
return x.release();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -9,6 +9,10 @@
|
|||||||
* the Free Software Foundation; either version 2 of the License, or
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
* (at your option) any later version.
|
* (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,
|
* yaSSL is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
@ -912,7 +916,7 @@ int sendAlert(SSL& ssl, const Alert& alert)
|
|||||||
|
|
||||||
|
|
||||||
// process input data
|
// process input data
|
||||||
int receiveData(SSL& ssl, Data& data)
|
int receiveData(SSL& ssl, Data& data, bool peek)
|
||||||
{
|
{
|
||||||
if (ssl.GetError() == YasslError(SSL_ERROR_WANT_READ))
|
if (ssl.GetError() == YasslError(SSL_ERROR_WANT_READ))
|
||||||
ssl.SetError(no_error);
|
ssl.SetError(no_error);
|
||||||
@ -922,9 +926,13 @@ int receiveData(SSL& ssl, Data& data)
|
|||||||
|
|
||||||
if (!ssl.bufferedData())
|
if (!ssl.bufferedData())
|
||||||
processReply(ssl);
|
processReply(ssl);
|
||||||
ssl.fillData(data);
|
|
||||||
ssl.useLog().ShowData(data.get_length());
|
|
||||||
|
|
||||||
|
if (peek)
|
||||||
|
ssl.PeekData(data);
|
||||||
|
else
|
||||||
|
ssl.fillData(data);
|
||||||
|
|
||||||
|
ssl.useLog().ShowData(data.get_length());
|
||||||
if (ssl.GetError()) return -1;
|
if (ssl.GetError()) return -1;
|
||||||
|
|
||||||
if (data.get_length() == 0 && ssl.getSocket().WouldBlock()) {
|
if (data.get_length() == 0 && ssl.getSocket().WouldBlock()) {
|
||||||
|
@ -9,6 +9,10 @@
|
|||||||
* the Free Software Foundation; either version 2 of the License, or
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
* (at your option) any later version.
|
* (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,
|
* yaSSL is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
@ -9,6 +9,10 @@
|
|||||||
* the Free Software Foundation; either version 2 of the License, or
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
* (at your option) any later version.
|
* (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,
|
* yaSSL is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
@ -9,6 +9,10 @@
|
|||||||
* the Free Software Foundation; either version 2 of the License, or
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
* (at your option) any later version.
|
* (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,
|
* yaSSL is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
@ -9,6 +9,10 @@
|
|||||||
* the Free Software Foundation; either version 2 of the License, or
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
* (at your option) any later version.
|
* (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,
|
* yaSSL is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
@ -64,12 +68,15 @@ int read_file(SSL_CTX* ctx, const char* file, int format, CertType type)
|
|||||||
return SSL_BAD_FILE;
|
return SSL_BAD_FILE;
|
||||||
|
|
||||||
if (type == CA) {
|
if (type == CA) {
|
||||||
x509* ptr = PemToDer(file, Cert);
|
// may have a bunch of CAs
|
||||||
if (!ptr) {
|
x509* ptr;
|
||||||
|
while ( (ptr = PemToDer(input, Cert)) )
|
||||||
|
ctx->AddCA(ptr);
|
||||||
|
|
||||||
|
if (!feof(input)) {
|
||||||
fclose(input);
|
fclose(input);
|
||||||
return SSL_BAD_FILE;
|
return SSL_BAD_FILE;
|
||||||
}
|
}
|
||||||
ctx->AddCA(ptr); // takes ownership
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
x509*& x = (type == Cert) ? ctx->certificate_ : ctx->privateKey_;
|
x509*& x = (type == Cert) ? ctx->certificate_ : ctx->privateKey_;
|
||||||
@ -86,7 +93,7 @@ int read_file(SSL_CTX* ctx, const char* file, int format, CertType type)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
x = PemToDer(file, type);
|
x = PemToDer(input, type);
|
||||||
if (!x) {
|
if (!x) {
|
||||||
fclose(input);
|
fclose(input);
|
||||||
return SSL_BAD_FILE;
|
return SSL_BAD_FILE;
|
||||||
@ -1189,6 +1196,35 @@ void MD5_Final(unsigned char* hash, MD5_CTX* md5)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
int RAND_bytes(unsigned char* buf, int num)
|
||||||
|
{
|
||||||
|
RandomPool ran;
|
||||||
|
|
||||||
|
if (ran.GetError()) return 0;
|
||||||
|
|
||||||
|
ran.Fill(buf, num);
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
int SSL_peek(SSL* ssl, void* buffer, int sz)
|
||||||
|
{
|
||||||
|
Data data(min(sz, MAX_RECORD_SIZE), static_cast<opaque*>(buffer));
|
||||||
|
return receiveData(*ssl, data, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
int SSL_pending(SSL* ssl)
|
||||||
|
{
|
||||||
|
// Just in case there's pending data that hasn't been processed yet...
|
||||||
|
char c;
|
||||||
|
SSL_peek(ssl, &c, 1);
|
||||||
|
|
||||||
|
return ssl->bufferedData();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// functions for stunnel
|
// functions for stunnel
|
||||||
|
|
||||||
void RAND_screen()
|
void RAND_screen()
|
||||||
@ -1352,12 +1388,6 @@ void MD5_Final(unsigned char* hash, MD5_CTX* md5)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int SSL_pending(SSL*)
|
|
||||||
{
|
|
||||||
return SSL_SUCCESS; // TODO:
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
int SSL_want_read(SSL*)
|
int SSL_want_read(SSL*)
|
||||||
{
|
{
|
||||||
return 0; // TODO:
|
return 0; // TODO:
|
||||||
|
@ -9,6 +9,10 @@
|
|||||||
* the Free Software Foundation; either version 2 of the License, or
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
* (at your option) any later version.
|
* (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,
|
* yaSSL is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
@ -9,6 +9,10 @@
|
|||||||
* the Free Software Foundation; either version 2 of the License, or
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
* (at your option) any later version.
|
* (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,
|
* yaSSL is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
@ -9,6 +9,10 @@
|
|||||||
* the Free Software Foundation; either version 2 of the License, or
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
* (at your option) any later version.
|
* (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,
|
* yaSSL is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
@ -9,6 +9,10 @@
|
|||||||
* the Free Software Foundation; either version 2 of the License, or
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
* (at your option) any later version.
|
* (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,
|
* yaSSL is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
@ -9,6 +9,10 @@
|
|||||||
* the Free Software Foundation; either version 2 of the License, or
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
* (at your option) any later version.
|
* (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,
|
* yaSSL is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
@ -428,7 +432,7 @@ opaque* DH_Server::get_serverKey() const
|
|||||||
|
|
||||||
// set available suites
|
// set available suites
|
||||||
Parameters::Parameters(ConnectionEnd ce, const Ciphers& ciphers,
|
Parameters::Parameters(ConnectionEnd ce, const Ciphers& ciphers,
|
||||||
ProtocolVersion pv) : entity_(ce)
|
ProtocolVersion pv, bool haveDH) : entity_(ce)
|
||||||
{
|
{
|
||||||
pending_ = true; // suite not set yet
|
pending_ = true; // suite not set yet
|
||||||
|
|
||||||
@ -438,11 +442,11 @@ Parameters::Parameters(ConnectionEnd ce, const Ciphers& ciphers,
|
|||||||
SetCipherNames();
|
SetCipherNames();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
SetSuites(pv); // defaults
|
SetSuites(pv, ce == server_end && !haveDH); // defaults
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void Parameters::SetSuites(ProtocolVersion pv)
|
void Parameters::SetSuites(ProtocolVersion pv, bool removeDH)
|
||||||
{
|
{
|
||||||
int i = 0;
|
int i = 0;
|
||||||
// available suites, best first
|
// available suites, best first
|
||||||
@ -450,19 +454,23 @@ void Parameters::SetSuites(ProtocolVersion pv)
|
|||||||
// MAX_CIPHERS is big enough
|
// MAX_CIPHERS is big enough
|
||||||
|
|
||||||
if (isTLS(pv)) {
|
if (isTLS(pv)) {
|
||||||
|
if (!removeDH) {
|
||||||
suites_[i++] = 0x00;
|
suites_[i++] = 0x00;
|
||||||
suites_[i++] = TLS_DHE_RSA_WITH_AES_256_CBC_SHA;
|
suites_[i++] = TLS_DHE_RSA_WITH_AES_256_CBC_SHA;
|
||||||
suites_[i++] = 0x00;
|
suites_[i++] = 0x00;
|
||||||
suites_[i++] = TLS_DHE_DSS_WITH_AES_256_CBC_SHA;
|
suites_[i++] = TLS_DHE_DSS_WITH_AES_256_CBC_SHA;
|
||||||
|
}
|
||||||
suites_[i++] = 0x00;
|
suites_[i++] = 0x00;
|
||||||
suites_[i++] = TLS_RSA_WITH_AES_256_CBC_SHA;
|
suites_[i++] = TLS_RSA_WITH_AES_256_CBC_SHA;
|
||||||
|
|
||||||
suites_[i++] = 0x00;
|
if (!removeDH) {
|
||||||
suites_[i++] = TLS_RSA_WITH_AES_128_CBC_SHA;
|
|
||||||
suites_[i++] = 0x00;
|
suites_[i++] = 0x00;
|
||||||
suites_[i++] = TLS_DHE_RSA_WITH_AES_128_CBC_SHA;
|
suites_[i++] = TLS_DHE_RSA_WITH_AES_128_CBC_SHA;
|
||||||
suites_[i++] = 0x00;
|
suites_[i++] = 0x00;
|
||||||
suites_[i++] = TLS_DHE_DSS_WITH_AES_128_CBC_SHA;
|
suites_[i++] = TLS_DHE_DSS_WITH_AES_128_CBC_SHA;
|
||||||
|
}
|
||||||
|
suites_[i++] = 0x00;
|
||||||
|
suites_[i++] = TLS_RSA_WITH_AES_128_CBC_SHA;
|
||||||
|
|
||||||
suites_[i++] = 0x00;
|
suites_[i++] = 0x00;
|
||||||
suites_[i++] = TLS_RSA_WITH_AES_256_CBC_RMD160;
|
suites_[i++] = TLS_RSA_WITH_AES_256_CBC_RMD160;
|
||||||
@ -471,6 +479,7 @@ void Parameters::SetSuites(ProtocolVersion pv)
|
|||||||
suites_[i++] = 0x00;
|
suites_[i++] = 0x00;
|
||||||
suites_[i++] = TLS_RSA_WITH_3DES_EDE_CBC_RMD160;
|
suites_[i++] = TLS_RSA_WITH_3DES_EDE_CBC_RMD160;
|
||||||
|
|
||||||
|
if (!removeDH) {
|
||||||
suites_[i++] = 0x00;
|
suites_[i++] = 0x00;
|
||||||
suites_[i++] = TLS_DHE_RSA_WITH_AES_256_CBC_RMD160;
|
suites_[i++] = TLS_DHE_RSA_WITH_AES_256_CBC_RMD160;
|
||||||
suites_[i++] = 0x00;
|
suites_[i++] = 0x00;
|
||||||
@ -485,6 +494,7 @@ void Parameters::SetSuites(ProtocolVersion pv)
|
|||||||
suites_[i++] = 0x00;
|
suites_[i++] = 0x00;
|
||||||
suites_[i++] = TLS_DHE_DSS_WITH_3DES_EDE_CBC_RMD160;
|
suites_[i++] = TLS_DHE_DSS_WITH_3DES_EDE_CBC_RMD160;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
suites_[i++] = 0x00;
|
suites_[i++] = 0x00;
|
||||||
suites_[i++] = SSL_RSA_WITH_RC4_128_SHA;
|
suites_[i++] = SSL_RSA_WITH_RC4_128_SHA;
|
||||||
@ -496,6 +506,7 @@ void Parameters::SetSuites(ProtocolVersion pv)
|
|||||||
suites_[i++] = 0x00;
|
suites_[i++] = 0x00;
|
||||||
suites_[i++] = SSL_RSA_WITH_DES_CBC_SHA;
|
suites_[i++] = SSL_RSA_WITH_DES_CBC_SHA;
|
||||||
|
|
||||||
|
if (!removeDH) {
|
||||||
suites_[i++] = 0x00;
|
suites_[i++] = 0x00;
|
||||||
suites_[i++] = SSL_DHE_RSA_WITH_3DES_EDE_CBC_SHA;
|
suites_[i++] = SSL_DHE_RSA_WITH_3DES_EDE_CBC_SHA;
|
||||||
suites_[i++] = 0x00;
|
suites_[i++] = 0x00;
|
||||||
@ -505,6 +516,7 @@ void Parameters::SetSuites(ProtocolVersion pv)
|
|||||||
suites_[i++] = SSL_DHE_RSA_WITH_DES_CBC_SHA;
|
suites_[i++] = SSL_DHE_RSA_WITH_DES_CBC_SHA;
|
||||||
suites_[i++] = 0x00;
|
suites_[i++] = 0x00;
|
||||||
suites_[i++] = SSL_DHE_DSS_WITH_DES_CBC_SHA;
|
suites_[i++] = SSL_DHE_DSS_WITH_DES_CBC_SHA;
|
||||||
|
}
|
||||||
|
|
||||||
suites_size_ = i;
|
suites_size_ = i;
|
||||||
|
|
||||||
|
@ -9,6 +9,10 @@
|
|||||||
* the Free Software Foundation; either version 2 of the License, or
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
* (at your option) any later version.
|
* (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,
|
* yaSSL is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
@ -260,7 +264,8 @@ const ClientKeyFactory& sslFactory::getClientKey() const
|
|||||||
// extract context parameters and store
|
// extract context parameters and store
|
||||||
SSL::SSL(SSL_CTX* ctx)
|
SSL::SSL(SSL_CTX* ctx)
|
||||||
: secure_(ctx->getMethod()->getVersion(), crypto_.use_random(),
|
: secure_(ctx->getMethod()->getVersion(), crypto_.use_random(),
|
||||||
ctx->getMethod()->getSide(), ctx->GetCiphers(), ctx)
|
ctx->getMethod()->getSide(), ctx->GetCiphers(), ctx,
|
||||||
|
ctx->GetDH_Parms().set_)
|
||||||
{
|
{
|
||||||
if (int err = crypto_.get_random().GetError()) {
|
if (int err = crypto_.get_random().GetError()) {
|
||||||
SetError(YasslError(err));
|
SetError(YasslError(err));
|
||||||
@ -986,6 +991,36 @@ void SSL::fillData(Data& data)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// like Fill but keep data in buffer
|
||||||
|
void SSL::PeekData(Data& data)
|
||||||
|
{
|
||||||
|
if (GetError()) return;
|
||||||
|
uint dataSz = data.get_length(); // input, data size to fill
|
||||||
|
uint elements = buffers_.getData().size();
|
||||||
|
|
||||||
|
data.set_length(0); // output, actual data filled
|
||||||
|
dataSz = min(dataSz, bufferedData());
|
||||||
|
|
||||||
|
Buffers::inputList::iterator front = buffers_.getData().begin();
|
||||||
|
|
||||||
|
while (elements) {
|
||||||
|
uint frontSz = (*front)->get_remaining();
|
||||||
|
uint readSz = min(dataSz - data.get_length(), frontSz);
|
||||||
|
uint before = (*front)->get_current();
|
||||||
|
|
||||||
|
(*front)->read(data.set_buffer() + data.get_length(), readSz);
|
||||||
|
data.set_length(data.get_length() + readSz);
|
||||||
|
(*front)->set_current(before);
|
||||||
|
|
||||||
|
if (data.get_length() == dataSz)
|
||||||
|
break;
|
||||||
|
|
||||||
|
elements--;
|
||||||
|
front++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// flush output buffer
|
// flush output buffer
|
||||||
void SSL::flushBuffer()
|
void SSL::flushBuffer()
|
||||||
{
|
{
|
||||||
@ -1910,9 +1945,9 @@ Buffers::outputList& Buffers::useHandShake()
|
|||||||
|
|
||||||
|
|
||||||
Security::Security(ProtocolVersion pv, RandomPool& ran, ConnectionEnd ce,
|
Security::Security(ProtocolVersion pv, RandomPool& ran, ConnectionEnd ce,
|
||||||
const Ciphers& ciphers, SSL_CTX* ctx)
|
const Ciphers& ciphers, SSL_CTX* ctx, bool haveDH)
|
||||||
: conn_(pv, ran), parms_(ce, ciphers, pv), resumeSession_(ran), ctx_(ctx),
|
: conn_(pv, ran), parms_(ce, ciphers, pv, haveDH), resumeSession_(ran),
|
||||||
resuming_(false)
|
ctx_(ctx), resuming_(false)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
@ -9,6 +9,10 @@
|
|||||||
* the Free Software Foundation; either version 2 of the License, or
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
* (at your option) any later version.
|
* (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,
|
* yaSSL is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
@ -9,6 +9,10 @@
|
|||||||
* the Free Software Foundation; either version 2 of the License, or
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
* (at your option) any later version.
|
* (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,
|
* yaSSL is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
@ -9,6 +9,10 @@
|
|||||||
* the Free Software Foundation; either version 2 of the License, or
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
* (at your option) any later version.
|
* (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,
|
* yaSSL is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
@ -9,6 +9,10 @@
|
|||||||
* the Free Software Foundation; either version 2 of the License, or
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
* (at your option) any later version.
|
* (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,
|
* yaSSL is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
@ -9,6 +9,10 @@
|
|||||||
* the Free Software Foundation; either version 2 of the License, or
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
* (at your option) any later version.
|
* (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,
|
* yaSSL is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
@ -9,6 +9,10 @@
|
|||||||
* the Free Software Foundation; either version 2 of the License, or
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
* (at your option) any later version.
|
* (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,
|
* yaSSL is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
@ -9,6 +9,10 @@
|
|||||||
* the Free Software Foundation; either version 2 of the License, or
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
* (at your option) any later version.
|
* (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,
|
* yaSSL is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
@ -9,6 +9,10 @@
|
|||||||
* the Free Software Foundation; either version 2 of the License, or
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
* (at your option) any later version.
|
* (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,
|
* yaSSL is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
@ -9,6 +9,10 @@
|
|||||||
* the Free Software Foundation; either version 2 of the License, or
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
* (at your option) any later version.
|
* (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,
|
* yaSSL is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
@ -9,6 +9,10 @@
|
|||||||
* the Free Software Foundation; either version 2 of the License, or
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
* (at your option) any later version.
|
* (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,
|
* yaSSL is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
@ -9,6 +9,10 @@
|
|||||||
* the Free Software Foundation; either version 2 of the License, or
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
* (at your option) any later version.
|
* (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,
|
* yaSSL is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
@ -9,6 +9,10 @@
|
|||||||
* the Free Software Foundation; either version 2 of the License, or
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
* (at your option) any later version.
|
* (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,
|
* yaSSL is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
@ -9,6 +9,10 @@
|
|||||||
* the Free Software Foundation; either version 2 of the License, or
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
* (at your option) any later version.
|
* (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,
|
* yaSSL is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
@ -9,6 +9,10 @@
|
|||||||
* the Free Software Foundation; either version 2 of the License, or
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
* (at your option) any later version.
|
* (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,
|
* yaSSL is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
@ -9,6 +9,10 @@
|
|||||||
* the Free Software Foundation; either version 2 of the License, or
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
* (at your option) any later version.
|
* (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,
|
* yaSSL is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
@ -9,6 +9,10 @@
|
|||||||
* the Free Software Foundation; either version 2 of the License, or
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
* (at your option) any later version.
|
* (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,
|
* yaSSL is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
@ -9,6 +9,10 @@
|
|||||||
* the Free Software Foundation; either version 2 of the License, or
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
* (at your option) any later version.
|
* (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,
|
* yaSSL is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
@ -9,6 +9,10 @@
|
|||||||
* the Free Software Foundation; either version 2 of the License, or
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
* (at your option) any later version.
|
* (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,
|
* yaSSL is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
@ -9,6 +9,10 @@
|
|||||||
* the Free Software Foundation; either version 2 of the License, or
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
* (at your option) any later version.
|
* (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,
|
* yaSSL is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
@ -9,6 +9,10 @@
|
|||||||
* the Free Software Foundation; either version 2 of the License, or
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
* (at your option) any later version.
|
* (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,
|
* yaSSL is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
@ -9,6 +9,10 @@
|
|||||||
* the Free Software Foundation; either version 2 of the License, or
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
* (at your option) any later version.
|
* (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,
|
* yaSSL is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
@ -9,6 +9,10 @@
|
|||||||
* the Free Software Foundation; either version 2 of the License, or
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
* (at your option) any later version.
|
* (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,
|
* yaSSL is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
@ -9,6 +9,10 @@
|
|||||||
* the Free Software Foundation; either version 2 of the License, or
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
* (at your option) any later version.
|
* (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,
|
* yaSSL is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
@ -9,6 +9,10 @@
|
|||||||
* the Free Software Foundation; either version 2 of the License, or
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
* (at your option) any later version.
|
* (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,
|
* yaSSL is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
@ -9,6 +9,10 @@
|
|||||||
* the Free Software Foundation; either version 2 of the License, or
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
* (at your option) any later version.
|
* (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,
|
* yaSSL is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
@ -9,6 +9,10 @@
|
|||||||
* the Free Software Foundation; either version 2 of the License, or
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
* (at your option) any later version.
|
* (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,
|
* yaSSL is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
@ -9,6 +9,10 @@
|
|||||||
* the Free Software Foundation; either version 2 of the License, or
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
* (at your option) any later version.
|
* (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,
|
* yaSSL is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
@ -9,6 +9,10 @@
|
|||||||
* the Free Software Foundation; either version 2 of the License, or
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
* (at your option) any later version.
|
* (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,
|
* yaSSL is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
@ -9,6 +9,10 @@
|
|||||||
* the Free Software Foundation; either version 2 of the License, or
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
* (at your option) any later version.
|
* (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,
|
* yaSSL is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
@ -9,6 +9,10 @@
|
|||||||
* the Free Software Foundation; either version 2 of the License, or
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
* (at your option) any later version.
|
* (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,
|
* yaSSL is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
@ -9,6 +9,10 @@
|
|||||||
* the Free Software Foundation; either version 2 of the License, or
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
* (at your option) any later version.
|
* (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,
|
* yaSSL is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
@ -9,6 +9,10 @@
|
|||||||
* the Free Software Foundation; either version 2 of the License, or
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
* (at your option) any later version.
|
* (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,
|
* yaSSL is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
@ -9,6 +9,10 @@
|
|||||||
* the Free Software Foundation; either version 2 of the License, or
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
* (at your option) any later version.
|
* (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,
|
* yaSSL is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
@ -9,6 +9,10 @@
|
|||||||
* the Free Software Foundation; either version 2 of the License, or
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
* (at your option) any later version.
|
* (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,
|
* yaSSL is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
@ -9,6 +9,10 @@
|
|||||||
* the Free Software Foundation; either version 2 of the License, or
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
* (at your option) any later version.
|
* (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,
|
* yaSSL is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
@ -9,6 +9,10 @@
|
|||||||
* the Free Software Foundation; either version 2 of the License, or
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
* (at your option) any later version.
|
* (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,
|
* yaSSL is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
@ -472,16 +476,7 @@ void CertDecoder::Decode(SignerList* signers, CertType ct)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ct == CA) {
|
if (ct != CA && verify_ && !ValidateSignature(signers))
|
||||||
if ( memcmp(issuerHash_, subjectHash_, SHA::DIGEST_SIZE) == 0 ) {
|
|
||||||
if (!ValidateSelfSignature() && verify_)
|
|
||||||
source_.SetError(SIG_CONFIRM_E);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
if (!ValidateSignature(signers) && verify_)
|
|
||||||
source_.SetError(SIG_OTHER_E);
|
|
||||||
}
|
|
||||||
else if (!ValidateSignature(signers) && verify_)
|
|
||||||
source_.SetError(SIG_OTHER_E);
|
source_.SetError(SIG_OTHER_E);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -9,6 +9,10 @@
|
|||||||
* the Free Software Foundation; either version 2 of the License, or
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
* (at your option) any later version.
|
* (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,
|
* yaSSL is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
@ -9,6 +9,10 @@
|
|||||||
* the Free Software Foundation; either version 2 of the License, or
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
* (at your option) any later version.
|
* (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,
|
* yaSSL is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
@ -9,6 +9,10 @@
|
|||||||
* the Free Software Foundation; either version 2 of the License, or
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
* (at your option) any later version.
|
* (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,
|
* yaSSL is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
@ -9,6 +9,10 @@
|
|||||||
* the Free Software Foundation; either version 2 of the License, or
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
* (at your option) any later version.
|
* (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,
|
* yaSSL is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
@ -9,6 +9,10 @@
|
|||||||
* the Free Software Foundation; either version 2 of the License, or
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
* (at your option) any later version.
|
* (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,
|
* yaSSL is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
@ -9,6 +9,10 @@
|
|||||||
* the Free Software Foundation; either version 2 of the License, or
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
* (at your option) any later version.
|
* (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,
|
* yaSSL is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
@ -9,6 +9,10 @@
|
|||||||
* the Free Software Foundation; either version 2 of the License, or
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
* (at your option) any later version.
|
* (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,
|
* yaSSL is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
@ -9,6 +9,10 @@
|
|||||||
* the Free Software Foundation; either version 2 of the License, or
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
* (at your option) any later version.
|
* (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,
|
* yaSSL is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
@ -9,6 +9,10 @@
|
|||||||
* the Free Software Foundation; either version 2 of the License, or
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
* (at your option) any later version.
|
* (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,
|
* yaSSL is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
@ -9,6 +9,10 @@
|
|||||||
* the Free Software Foundation; either version 2 of the License, or
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
* (at your option) any later version.
|
* (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,
|
* yaSSL is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
@ -9,6 +9,10 @@
|
|||||||
* the Free Software Foundation; either version 2 of the License, or
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
* (at your option) any later version.
|
* (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,
|
* yaSSL is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
@ -9,6 +9,10 @@
|
|||||||
* the Free Software Foundation; either version 2 of the License, or
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
* (at your option) any later version.
|
* (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,
|
* yaSSL is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
@ -9,6 +9,10 @@
|
|||||||
* the Free Software Foundation; either version 2 of the License, or
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
* (at your option) any later version.
|
* (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,
|
* yaSSL is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
@ -9,6 +9,10 @@
|
|||||||
* the Free Software Foundation; either version 2 of the License, or
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
* (at your option) any later version.
|
* (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,
|
* yaSSL is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
@ -9,6 +9,10 @@
|
|||||||
* the Free Software Foundation; either version 2 of the License, or
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
* (at your option) any later version.
|
* (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,
|
* yaSSL is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
@ -9,6 +9,10 @@
|
|||||||
* the Free Software Foundation; either version 2 of the License, or
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
* (at your option) any later version.
|
* (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,
|
* yaSSL is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
@ -9,6 +9,10 @@
|
|||||||
* the Free Software Foundation; either version 2 of the License, or
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
* (at your option) any later version.
|
* (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,
|
* yaSSL is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
@ -9,6 +9,10 @@
|
|||||||
* the Free Software Foundation; either version 2 of the License, or
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
* (at your option) any later version.
|
* (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,
|
* yaSSL is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
@ -9,6 +9,10 @@
|
|||||||
* the Free Software Foundation; either version 2 of the License, or
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
* (at your option) any later version.
|
* (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,
|
* yaSSL is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
@ -9,6 +9,10 @@
|
|||||||
* the Free Software Foundation; either version 2 of the License, or
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
* (at your option) any later version.
|
* (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,
|
* yaSSL is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
@ -236,6 +236,7 @@ typedef struct character_set
|
|||||||
} MY_CHARSET_INFO;
|
} MY_CHARSET_INFO;
|
||||||
|
|
||||||
struct st_mysql_methods;
|
struct st_mysql_methods;
|
||||||
|
struct st_mysql_stmt;
|
||||||
|
|
||||||
typedef struct st_mysql
|
typedef struct st_mysql
|
||||||
{
|
{
|
||||||
@ -293,6 +294,12 @@ typedef struct st_mysql
|
|||||||
/* needed for embedded server - no net buffer to store the 'info' */
|
/* needed for embedded server - no net buffer to store the 'info' */
|
||||||
char *info_buffer;
|
char *info_buffer;
|
||||||
#endif
|
#endif
|
||||||
|
/*
|
||||||
|
In embedded server it points to the statement that is processed
|
||||||
|
in the current query. We store some results directly in statement
|
||||||
|
fields then.
|
||||||
|
*/
|
||||||
|
struct st_mysql_stmt *current_stmt;
|
||||||
} MYSQL;
|
} MYSQL;
|
||||||
|
|
||||||
typedef struct st_mysql_res {
|
typedef struct st_mysql_res {
|
||||||
@ -745,7 +752,8 @@ typedef struct st_mysql_methods
|
|||||||
unsigned long header_length,
|
unsigned long header_length,
|
||||||
const char *arg,
|
const char *arg,
|
||||||
unsigned long arg_length,
|
unsigned long arg_length,
|
||||||
my_bool skip_check);
|
my_bool skip_check,
|
||||||
|
MYSQL_STMT *stmt);
|
||||||
MYSQL_DATA *(*read_rows)(MYSQL *mysql,MYSQL_FIELD *mysql_fields,
|
MYSQL_DATA *(*read_rows)(MYSQL *mysql,MYSQL_FIELD *mysql_fields,
|
||||||
unsigned int fields);
|
unsigned int fields);
|
||||||
MYSQL_RES * (*use_result)(MYSQL *mysql);
|
MYSQL_RES * (*use_result)(MYSQL *mysql);
|
||||||
@ -835,8 +843,11 @@ int STDCALL mysql_drop_db(MYSQL *mysql, const char *DB);
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#define simple_command(mysql, command, arg, length, skip_check) \
|
#define simple_command(mysql, command, arg, length, skip_check) \
|
||||||
(*(mysql)->methods->advanced_command)(mysql, command, \
|
(*(mysql)->methods->advanced_command)(mysql, command, NullS, \
|
||||||
NullS, 0, arg, length, skip_check)
|
0, arg, length, skip_check, NULL)
|
||||||
|
#define stmt_command(mysql, command, arg, length, stmt) \
|
||||||
|
(*(mysql)->methods->advanced_command)(mysql, command, NullS, \
|
||||||
|
0, arg, length, 1, stmt)
|
||||||
unsigned long net_safe_read(MYSQL* mysql);
|
unsigned long net_safe_read(MYSQL* mysql);
|
||||||
|
|
||||||
#ifdef __NETWARE__
|
#ifdef __NETWARE__
|
||||||
|
@ -34,7 +34,8 @@ void mysql_read_default_options(struct st_mysql_options *options,
|
|||||||
my_bool
|
my_bool
|
||||||
cli_advanced_command(MYSQL *mysql, enum enum_server_command command,
|
cli_advanced_command(MYSQL *mysql, enum enum_server_command command,
|
||||||
const char *header, ulong header_length,
|
const char *header, ulong header_length,
|
||||||
const char *arg, ulong arg_length, my_bool skip_check);
|
const char *arg, ulong arg_length, my_bool skip_check,
|
||||||
|
MYSQL_STMT *stmt);
|
||||||
|
|
||||||
void set_stmt_errmsg(MYSQL_STMT * stmt, const char *err, int errcode,
|
void set_stmt_errmsg(MYSQL_STMT * stmt, const char *err, int errcode,
|
||||||
const char *sqlstate);
|
const char *sqlstate);
|
||||||
|
@ -2055,7 +2055,7 @@ mysql_stmt_prepare(MYSQL_STMT *stmt, const char *query, ulong length)
|
|||||||
mysql_use_result it won't be freed in mysql_stmt_free_result and
|
mysql_use_result it won't be freed in mysql_stmt_free_result and
|
||||||
we should get 'Commands out of sync' here.
|
we should get 'Commands out of sync' here.
|
||||||
*/
|
*/
|
||||||
if (simple_command(mysql, COM_STMT_CLOSE, buff, 4, 1))
|
if (stmt_command(mysql, COM_STMT_CLOSE, buff, 4, stmt))
|
||||||
{
|
{
|
||||||
set_stmt_errmsg(stmt, mysql->net.last_error, mysql->net.last_errno,
|
set_stmt_errmsg(stmt, mysql->net.last_error, mysql->net.last_errno,
|
||||||
mysql->net.sqlstate);
|
mysql->net.sqlstate);
|
||||||
@ -2064,7 +2064,7 @@ mysql_stmt_prepare(MYSQL_STMT *stmt, const char *query, ulong length)
|
|||||||
stmt->state= MYSQL_STMT_INIT_DONE;
|
stmt->state= MYSQL_STMT_INIT_DONE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (simple_command(mysql, COM_STMT_PREPARE, query, length, 1))
|
if (stmt_command(mysql, COM_STMT_PREPARE, query, length, stmt))
|
||||||
{
|
{
|
||||||
set_stmt_errmsg(stmt, mysql->net.last_error, mysql->net.last_errno,
|
set_stmt_errmsg(stmt, mysql->net.last_error, mysql->net.last_errno,
|
||||||
mysql->net.sqlstate);
|
mysql->net.sqlstate);
|
||||||
@ -2480,7 +2480,7 @@ static my_bool execute(MYSQL_STMT *stmt, char *packet, ulong length)
|
|||||||
buff[4]= (char) stmt->flags;
|
buff[4]= (char) stmt->flags;
|
||||||
int4store(buff+5, 1); /* iteration count */
|
int4store(buff+5, 1); /* iteration count */
|
||||||
if (cli_advanced_command(mysql, COM_STMT_EXECUTE, buff, sizeof(buff),
|
if (cli_advanced_command(mysql, COM_STMT_EXECUTE, buff, sizeof(buff),
|
||||||
packet, length, 1) ||
|
packet, length, 1, NULL) ||
|
||||||
(*mysql->methods->read_query_result)(mysql))
|
(*mysql->methods->read_query_result)(mysql))
|
||||||
{
|
{
|
||||||
set_stmt_errmsg(stmt, net->last_error, net->last_errno, net->sqlstate);
|
set_stmt_errmsg(stmt, net->last_error, net->last_errno, net->sqlstate);
|
||||||
@ -2693,7 +2693,8 @@ stmt_read_row_from_cursor(MYSQL_STMT *stmt, unsigned char **row)
|
|||||||
int4store(buff, stmt->stmt_id);
|
int4store(buff, stmt->stmt_id);
|
||||||
int4store(buff + 4, stmt->prefetch_rows); /* number of rows to fetch */
|
int4store(buff + 4, stmt->prefetch_rows); /* number of rows to fetch */
|
||||||
if ((*mysql->methods->advanced_command)(mysql, COM_STMT_FETCH,
|
if ((*mysql->methods->advanced_command)(mysql, COM_STMT_FETCH,
|
||||||
buff, sizeof(buff), NullS, 0, 1))
|
buff, sizeof(buff), NullS, 0,
|
||||||
|
1, NULL))
|
||||||
{
|
{
|
||||||
set_stmt_errmsg(stmt, net->last_error, net->last_errno, net->sqlstate);
|
set_stmt_errmsg(stmt, net->last_error, net->last_errno, net->sqlstate);
|
||||||
return 1;
|
return 1;
|
||||||
@ -3360,7 +3361,7 @@ mysql_stmt_send_long_data(MYSQL_STMT *stmt, uint param_number,
|
|||||||
*/
|
*/
|
||||||
if ((*mysql->methods->advanced_command)(mysql, COM_STMT_SEND_LONG_DATA,
|
if ((*mysql->methods->advanced_command)(mysql, COM_STMT_SEND_LONG_DATA,
|
||||||
buff, sizeof(buff), data,
|
buff, sizeof(buff), data,
|
||||||
length, 1))
|
length, 1, NULL))
|
||||||
{
|
{
|
||||||
set_stmt_errmsg(stmt, mysql->net.last_error,
|
set_stmt_errmsg(stmt, mysql->net.last_error,
|
||||||
mysql->net.last_errno, mysql->net.sqlstate);
|
mysql->net.last_errno, mysql->net.sqlstate);
|
||||||
@ -4748,7 +4749,7 @@ int STDCALL mysql_stmt_store_result(MYSQL_STMT *stmt)
|
|||||||
int4store(buff, stmt->stmt_id);
|
int4store(buff, stmt->stmt_id);
|
||||||
int4store(buff + 4, (int)~0); /* number of rows to fetch */
|
int4store(buff + 4, (int)~0); /* number of rows to fetch */
|
||||||
if (cli_advanced_command(mysql, COM_STMT_FETCH, buff, sizeof(buff),
|
if (cli_advanced_command(mysql, COM_STMT_FETCH, buff, sizeof(buff),
|
||||||
NullS, 0, 1))
|
NullS, 0, 1, NULL))
|
||||||
{
|
{
|
||||||
set_stmt_errmsg(stmt, net->last_error, net->last_errno, net->sqlstate);
|
set_stmt_errmsg(stmt, net->last_error, net->last_errno, net->sqlstate);
|
||||||
DBUG_RETURN(1);
|
DBUG_RETURN(1);
|
||||||
@ -4942,7 +4943,7 @@ static my_bool reset_stmt_handle(MYSQL_STMT *stmt, uint flags)
|
|||||||
char buff[MYSQL_STMT_HEADER]; /* packet header: 4 bytes for stmt id */
|
char buff[MYSQL_STMT_HEADER]; /* packet header: 4 bytes for stmt id */
|
||||||
int4store(buff, stmt->stmt_id);
|
int4store(buff, stmt->stmt_id);
|
||||||
if ((*mysql->methods->advanced_command)(mysql, COM_STMT_RESET, buff,
|
if ((*mysql->methods->advanced_command)(mysql, COM_STMT_RESET, buff,
|
||||||
sizeof(buff), 0, 0, 0))
|
sizeof(buff), 0, 0, 0, NULL))
|
||||||
{
|
{
|
||||||
set_stmt_errmsg(stmt, mysql->net.last_error, mysql->net.last_errno,
|
set_stmt_errmsg(stmt, mysql->net.last_error, mysql->net.last_errno,
|
||||||
mysql->net.sqlstate);
|
mysql->net.sqlstate);
|
||||||
@ -5016,7 +5017,7 @@ my_bool STDCALL mysql_stmt_close(MYSQL_STMT *stmt)
|
|||||||
mysql->status= MYSQL_STATUS_READY;
|
mysql->status= MYSQL_STATUS_READY;
|
||||||
}
|
}
|
||||||
int4store(buff, stmt->stmt_id);
|
int4store(buff, stmt->stmt_id);
|
||||||
if ((rc= simple_command(mysql, COM_STMT_CLOSE, buff, 4, 1)))
|
if ((rc= stmt_command(mysql, COM_STMT_CLOSE, buff, 4, stmt)))
|
||||||
{
|
{
|
||||||
set_stmt_errmsg(stmt, mysql->net.last_error, mysql->net.last_errno,
|
set_stmt_errmsg(stmt, mysql->net.last_error, mysql->net.last_errno,
|
||||||
mysql->net.sqlstate);
|
mysql->net.sqlstate);
|
||||||
|
@ -18,9 +18,9 @@
|
|||||||
|
|
||||||
C_MODE_START
|
C_MODE_START
|
||||||
void lib_connection_phase(NET *net, int phase);
|
void lib_connection_phase(NET *net, int phase);
|
||||||
void init_embedded_mysql(MYSQL *mysql, int client_flag, char *db);
|
void init_embedded_mysql(MYSQL *mysql, int client_flag);
|
||||||
void *create_embedded_thd(int client_flag, char *db);
|
void *create_embedded_thd(int client_flag);
|
||||||
int check_embedded_connection(MYSQL *mysql);
|
int check_embedded_connection(MYSQL *mysql, const char *db);
|
||||||
void free_old_query(MYSQL *mysql);
|
void free_old_query(MYSQL *mysql);
|
||||||
extern MYSQL_METHODS embedded_methods;
|
extern MYSQL_METHODS embedded_methods;
|
||||||
|
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user