summaryrefslogtreecommitdiff
path: root/extra/yassl
diff options
context:
space:
mode:
authorSergei Golubchik <sergii@pisem.net>2010-11-25 18:17:28 +0100
committerSergei Golubchik <sergii@pisem.net>2010-11-25 18:17:28 +0100
commit65ca700def99289cc31a7040537f5aa6e12bf485 (patch)
tree97b3a07299b626c519da0e80c122b5b79b933914 /extra/yassl
parent2ab57de38d13d927ddff2d51aed4af34e13998f5 (diff)
parent6e5bcca7935d3c62f84bb640e5357664a210ee12 (diff)
downloadmariadb-git-65ca700def99289cc31a7040537f5aa6e12bf485.tar.gz
merge.
checkpoint. does not compile.
Diffstat (limited to 'extra/yassl')
-rw-r--r--extra/yassl/src/crypto_wrapper.cpp7
-rw-r--r--extra/yassl/src/yassl_error.cpp2
-rw-r--r--extra/yassl/src/yassl_imp.cpp3
-rw-r--r--extra/yassl/taocrypt/include/block.hpp3
-rw-r--r--extra/yassl/taocrypt/src/aes.cpp3
-rw-r--r--extra/yassl/taocrypt/src/algebra.cpp1
-rw-r--r--extra/yassl/taocrypt/src/blowfish.cpp3
-rw-r--r--extra/yassl/taocrypt/src/misc.cpp9
-rw-r--r--extra/yassl/taocrypt/src/twofish.cpp3
9 files changed, 24 insertions, 10 deletions
diff --git a/extra/yassl/src/crypto_wrapper.cpp b/extra/yassl/src/crypto_wrapper.cpp
index b968ec1e6c3..09afc835fce 100644
--- a/extra/yassl/src/crypto_wrapper.cpp
+++ b/extra/yassl/src/crypto_wrapper.cpp
@@ -954,8 +954,11 @@ x509* PemToDer(FILE* file, CertType type, EncryptedInfo* info)
}
}
// get blank line
- if (fgets(line, sizeof(line), file))
- begin = ftell(file);
+ if (fgets(line,sizeof(line), file) == 0)
+ {
+ /* Impossible case */
+ }
+ begin = ftell(file);
}
}
diff --git a/extra/yassl/src/yassl_error.cpp b/extra/yassl/src/yassl_error.cpp
index dd30348cd93..cea2ddb553e 100644
--- a/extra/yassl/src/yassl_error.cpp
+++ b/extra/yassl/src/yassl_error.cpp
@@ -60,7 +60,7 @@ void SetErrorString(unsigned long error, char* buffer)
using namespace TaoCrypt;
const int max = MAX_ERROR_SZ; // shorthand
- switch (error) {
+ switch ((int) error) {
// yaSSL proper errors
case range_error :
diff --git a/extra/yassl/src/yassl_imp.cpp b/extra/yassl/src/yassl_imp.cpp
index 86799f961ae..5128c00418e 100644
--- a/extra/yassl/src/yassl_imp.cpp
+++ b/extra/yassl/src/yassl_imp.cpp
@@ -1298,8 +1298,7 @@ void ServerHello::Process(input_buffer&, SSL& ssl)
else
ssl.useSecurity().use_connection().sessionID_Set_ = false;
- if (ssl.getSecurity().get_resuming())
- {
+ if (ssl.getSecurity().get_resuming()) {
if (memcmp(session_id_, ssl.getSecurity().get_resume().GetID(),
ID_LEN) == 0) {
ssl.set_masterSecret(ssl.getSecurity().get_resume().GetSecret());
diff --git a/extra/yassl/taocrypt/include/block.hpp b/extra/yassl/taocrypt/include/block.hpp
index bb34db5e07f..d5bc8756fdd 100644
--- a/extra/yassl/taocrypt/include/block.hpp
+++ b/extra/yassl/taocrypt/include/block.hpp
@@ -167,7 +167,8 @@ public:
void CleanNew(word32 newSize)
{
New(newSize);
- memset(buffer_, 0, sz_ * sizeof(T));
+ if (sz_ > 0)
+ memset(buffer_, 0, sz_ * sizeof(T));
}
void New(word32 newSize)
diff --git a/extra/yassl/taocrypt/src/aes.cpp b/extra/yassl/taocrypt/src/aes.cpp
index 63eff1d91fc..42cb0622e56 100644
--- a/extra/yassl/taocrypt/src/aes.cpp
+++ b/extra/yassl/taocrypt/src/aes.cpp
@@ -51,7 +51,8 @@ void AES::Process(byte* out, const byte* in, word32 sz)
out += BLOCK_SIZE;
in += BLOCK_SIZE;
}
- else if (mode_ == CBC) {
+ else if (mode_ == CBC)
+ {
if (dir_ == ENCRYPTION)
while (blocks--) {
r_[0] ^= *(word32*)in;
diff --git a/extra/yassl/taocrypt/src/algebra.cpp b/extra/yassl/taocrypt/src/algebra.cpp
index 47a660d5c96..437563b9093 100644
--- a/extra/yassl/taocrypt/src/algebra.cpp
+++ b/extra/yassl/taocrypt/src/algebra.cpp
@@ -18,7 +18,6 @@
/* based on Wei Dai's algebra.cpp from CryptoPP */
#undef NDEBUG
-#define DEBUG // GCC 4.0 bug if NDEBUG and Optimize > 1
#include "runtime.hpp"
#include "algebra.hpp"
diff --git a/extra/yassl/taocrypt/src/blowfish.cpp b/extra/yassl/taocrypt/src/blowfish.cpp
index 2097b045278..2a5ae7ffadf 100644
--- a/extra/yassl/taocrypt/src/blowfish.cpp
+++ b/extra/yassl/taocrypt/src/blowfish.cpp
@@ -53,7 +53,8 @@ void Blowfish::Process(byte* out, const byte* in, word32 sz)
out += BLOCK_SIZE;
in += BLOCK_SIZE;
}
- else if (mode_ == CBC) {
+ else if (mode_ == CBC)
+ {
if (dir_ == ENCRYPTION)
while (blocks--) {
r_[0] ^= *(word32*)in;
diff --git a/extra/yassl/taocrypt/src/misc.cpp b/extra/yassl/taocrypt/src/misc.cpp
index 11dd4dc6d66..978665b2f7c 100644
--- a/extra/yassl/taocrypt/src/misc.cpp
+++ b/extra/yassl/taocrypt/src/misc.cpp
@@ -177,6 +177,15 @@ word Crop(word value, unsigned int size)
#ifdef TAOCRYPT_X86ASM_AVAILABLE
+#ifdef NOT_USED
+#ifndef _MSC_VER
+ static jmp_buf s_env;
+ static void SigIllHandler(int)
+ {
+ longjmp(s_env, 1);
+ }
+#endif
+#endif
bool HaveCpuId()
{
diff --git a/extra/yassl/taocrypt/src/twofish.cpp b/extra/yassl/taocrypt/src/twofish.cpp
index 71601c08162..85feaa23280 100644
--- a/extra/yassl/taocrypt/src/twofish.cpp
+++ b/extra/yassl/taocrypt/src/twofish.cpp
@@ -54,7 +54,8 @@ void Twofish::Process(byte* out, const byte* in, word32 sz)
out += BLOCK_SIZE;
in += BLOCK_SIZE;
}
- else if (mode_ == CBC) {
+ else if (mode_ == CBC)
+ {
if (dir_ == ENCRYPTION)
while (blocks--) {
r_[0] ^= *(word32*)in;