summaryrefslogtreecommitdiff
path: root/extra/yassl/taocrypt/include
diff options
context:
space:
mode:
authorunknown <msvensson@shellback.(none)>2006-05-22 15:49:57 +0200
committerunknown <msvensson@shellback.(none)>2006-05-22 15:49:57 +0200
commitb959d36bce2c71b45b65ae86b730feb108951760 (patch)
tree435cf1e3d081d3837f4215a39c9b798e621de571 /extra/yassl/taocrypt/include
parent07188950aefdebe5d55af86b14fe8179e52b5987 (diff)
downloadmariadb-git-b959d36bce2c71b45b65ae86b730feb108951760.tar.gz
Import from yaSSL
Fixes for HPUX etc. Don't define exceptions operator new on hpux as the linker will look for the function extra/yassl/examples/echoserver/echoserver.cpp: Import patch yassl.diff extra/yassl/include/openssl/ssl.h: Import patch yassl.diff extra/yassl/include/socket_wrapper.hpp: Import patch yassl.diff extra/yassl/src/handshake.cpp: Import patch yassl.diff extra/yassl/src/socket_wrapper.cpp: Import patch yassl.diff extra/yassl/src/ssl.cpp: Import patch yassl.diff extra/yassl/src/template_instnt.cpp: Import patch yassl.diff extra/yassl/src/timer.cpp: Import patch yassl.diff extra/yassl/src/yassl_error.cpp: Import patch yassl.diff extra/yassl/src/yassl_int.cpp: Import patch yassl.diff extra/yassl/taocrypt/include/block.hpp: Import patch yassl.diff extra/yassl/taocrypt/include/md4.hpp: Import patch yassl.diff extra/yassl/taocrypt/include/runtime.hpp: Import patch yassl.diff extra/yassl/taocrypt/src/md4.cpp: Import patch yassl.diff extra/yassl/taocrypt/src/template_instnt.cpp: Import patch yassl.diff extra/yassl/taocrypt/taocrypt.dsp: Import patch yassl.diff extra/yassl/taocrypt/test/test.cpp: Import patch yassl.diff extra/yassl/testsuite/test.hpp: Import patch yassl.diff extra/yassl/mySTL/stdexcept.hpp: Don't define exceptions operator new on hpux as the linker will look for the function extra/yassl/taocrypt/src/Makefile.am: Add md4.cpp to Makefile.am
Diffstat (limited to 'extra/yassl/taocrypt/include')
-rw-r--r--extra/yassl/taocrypt/include/block.hpp2
-rw-r--r--extra/yassl/taocrypt/include/md4.hpp65
-rw-r--r--extra/yassl/taocrypt/include/runtime.hpp4
3 files changed, 66 insertions, 5 deletions
diff --git a/extra/yassl/taocrypt/include/block.hpp b/extra/yassl/taocrypt/include/block.hpp
index 4c262e1a540..76836615ce6 100644
--- a/extra/yassl/taocrypt/include/block.hpp
+++ b/extra/yassl/taocrypt/include/block.hpp
@@ -96,7 +96,7 @@ public:
pointer allocate(size_type n, const void* = 0)
{
- CheckSize(n);
+ this->CheckSize(n);
if (n == 0)
return 0;
return NEW_TC T[n];
diff --git a/extra/yassl/taocrypt/include/md4.hpp b/extra/yassl/taocrypt/include/md4.hpp
new file mode 100644
index 00000000000..aac930d7498
--- /dev/null
+++ b/extra/yassl/taocrypt/include/md4.hpp
@@ -0,0 +1,65 @@
+/* md4.hpp
+ *
+ * Copyright (C) 2003 Sawtooth Consulting Ltd.
+ *
+ * This file is part of yaSSL.
+ *
+ * yaSSL is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * yaSSL is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
+ */
+
+/* md4.hpp provides MD4 digest support
+ * WANRING: MD4 is considered insecure, only use if you have to, e.g., yaSSL
+ * libcurl supports needs this for NTLM authentication
+*/
+
+#ifndef TAO_CRYPT_MD4_HPP
+#define TAO_CRYPT_MD4_HPP
+
+#include "hash.hpp"
+
+namespace TaoCrypt {
+
+
+// MD4 digest
+class MD4 : public HASHwithTransform {
+public:
+ enum { BLOCK_SIZE = 64, DIGEST_SIZE = 16, PAD_SIZE = 56,
+ TAO_BYTE_ORDER = LittleEndianOrder }; // in Bytes
+ MD4() : HASHwithTransform(DIGEST_SIZE / sizeof(word32), BLOCK_SIZE)
+ { Init(); }
+ ByteOrder getByteOrder() const { return ByteOrder(TAO_BYTE_ORDER); }
+ word32 getBlockSize() const { return BLOCK_SIZE; }
+ word32 getDigestSize() const { return DIGEST_SIZE; }
+ word32 getPadSize() const { return PAD_SIZE; }
+
+ MD4(const MD4&);
+ MD4& operator= (const MD4&);
+
+ void Init();
+ void Swap(MD4&);
+private:
+ void Transform();
+};
+
+inline void swap(MD4& a, MD4& b)
+{
+ a.Swap(b);
+}
+
+
+} // namespace
+
+#endif // TAO_CRYPT_MD4_HPP
+
diff --git a/extra/yassl/taocrypt/include/runtime.hpp b/extra/yassl/taocrypt/include/runtime.hpp
index 09ca7524ef3..3a5cf62865a 100644
--- a/extra/yassl/taocrypt/include/runtime.hpp
+++ b/extra/yassl/taocrypt/include/runtime.hpp
@@ -28,10 +28,6 @@
#ifndef yaSSL_NEW_HPP
#define yaSSL_NEW_HPP
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
#ifdef __sun