Commit d0703b45 authored by unknown's avatar unknown

Merge 192.168.0.20:mysql/yassl_import/my50-yassl_import

into  neptunus.(none):/home/msvensson/mysql/mysql-5.0

parents 9c9ff3d2 71ded739
...@@ -26,7 +26,6 @@ ...@@ -26,7 +26,6 @@
#ifndef yaSSL_ERROR_HPP #ifndef yaSSL_ERROR_HPP
#define yaSSL_ERROR_HPP #define yaSSL_ERROR_HPP
#include "stdexcept.hpp"
namespace yaSSL { namespace yaSSL {
...@@ -63,7 +62,7 @@ enum { MAX_ERROR_SZ = 80 }; ...@@ -63,7 +62,7 @@ enum { MAX_ERROR_SZ = 80 };
void SetErrorString(YasslError, char*); void SetErrorString(YasslError, char*);
/* remove for now, if go back to exceptions use this wrapper
// Base class for all yaSSL exceptions // Base class for all yaSSL exceptions
class Error : public mySTL::runtime_error { class Error : public mySTL::runtime_error {
YasslError error_; YasslError error_;
...@@ -75,6 +74,7 @@ public: ...@@ -75,6 +74,7 @@ public:
YasslError get_number() const; YasslError get_number() const;
Library get_lib() const; Library get_lib() const;
}; };
*/
} // naemspace } // naemspace
......
...@@ -46,10 +46,8 @@ public: ...@@ -46,10 +46,8 @@ public:
// for compiler generated call, never used // for compiler generated call, never used
static void operator delete(void*) { assert(0); } static void operator delete(void*) { assert(0); }
private: private:
#if defined(__hpux)
// don't allow dynamic creation of exceptions // don't allow dynamic creation of exceptions
static void* operator new(size_t); static void* operator new(size_t);
#endif
}; };
......
...@@ -27,10 +27,12 @@ ...@@ -27,10 +27,12 @@
#include "yassl_error.hpp" #include "yassl_error.hpp"
#include "error.hpp" // TaoCrypt error numbers #include "error.hpp" // TaoCrypt error numbers
#include "openssl/ssl.h" // SSL_ERROR_WANT_READ #include "openssl/ssl.h" // SSL_ERROR_WANT_READ
#include <string.h> // strncpy
namespace yaSSL { namespace yaSSL {
/* may bring back in future
Error::Error(const char* s, YasslError e, Library l) Error::Error(const char* s, YasslError e, Library l)
: mySTL::runtime_error(s), error_(e), lib_(l) : mySTL::runtime_error(s), error_(e), lib_(l)
{ {
...@@ -48,6 +50,7 @@ Library Error::get_lib() const ...@@ -48,6 +50,7 @@ Library Error::get_lib() const
return lib_; return lib_;
} }
*/
void SetErrorString(YasslError error, char* buffer) void SetErrorString(YasslError error, char* buffer)
......
...@@ -2106,9 +2106,14 @@ ASN1_STRING* StringHolder::GetString() ...@@ -2106,9 +2106,14 @@ ASN1_STRING* StringHolder::GetString()
extern "C" void yaSSL_CleanUp() extern "C" void yaSSL_CleanUp()
{ {
TaoCrypt::CleanUp(); TaoCrypt::CleanUp();
ysDelete(yaSSL::cryptProviderInstance); yaSSL::ysDelete(yaSSL::cryptProviderInstance);
ysDelete(yaSSL::sslFactoryInstance); yaSSL::ysDelete(yaSSL::sslFactoryInstance);
ysDelete(yaSSL::sessionsInstance); yaSSL::ysDelete(yaSSL::sessionsInstance);
// In case user calls more than once, prevent seg fault
yaSSL::cryptProviderInstance = 0;
yaSSL::sslFactoryInstance = 0;
yaSSL::sessionsInstance = 0;
} }
......
...@@ -2735,8 +2735,11 @@ void CleanUp() ...@@ -2735,8 +2735,11 @@ void CleanUp()
{ {
tcDelete(one); tcDelete(one);
tcDelete(zero); tcDelete(zero);
}
// In case user calls more than once, prevent seg fault
one = 0;
zero = 0;
}
Integer::Integer(RandomNumberGenerator& rng, const Integer& min, Integer::Integer(RandomNumberGenerator& rng, const Integer& min,
const Integer& max) const Integer& max)
......
...@@ -81,6 +81,19 @@ extern "C" { ...@@ -81,6 +81,19 @@ extern "C" {
} }
#if defined(__ICC) || defined(__INTEL_COMPILER)
extern "C" {
int __cxa_pure_virtual() {
assert("Pure virtual method called." == "Aborted");
return 0;
}
} // extern "C"
#endif
#endif // YASSL_PURE_C #endif // YASSL_PURE_C
......
...@@ -396,6 +396,27 @@ ...@@ -396,6 +396,27 @@
PreprocessorDefinitions=""/> PreprocessorDefinitions=""/>
</FileConfiguration> </FileConfiguration>
</File> </File>
<File
RelativePath="src\md4.cpp">
<FileConfiguration
Name="Debug|Win32">
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories=""
PreprocessorDefinitions=""
BasicRuntimeChecks="3"
BrowseInformation="1"/>
</FileConfiguration>
<FileConfiguration
Name="Release|Win32">
<Tool
Name="VCCLCompilerTool"
Optimization="2"
AdditionalIncludeDirectories=""
PreprocessorDefinitions=""/>
</FileConfiguration>
</File>
<File <File
RelativePath="src\md5.cpp"> RelativePath="src\md5.cpp">
<FileConfiguration <FileConfiguration
...@@ -571,6 +592,9 @@ ...@@ -571,6 +592,9 @@
<File <File
RelativePath="include\md2.hpp"> RelativePath="include\md2.hpp">
</File> </File>
<File
RelativePath="include\md4.hpp">
</File>
<File <File
RelativePath="include\md5.hpp"> RelativePath="include\md5.hpp">
</File> </File>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment