Commit 45f2f764 authored by unknown's avatar unknown
Browse files

Import yassl 1.6.0


extra/yassl/README:
  Import patch yassl.diff
extra/yassl/include/buffer.hpp:
  Import patch yassl.diff
extra/yassl/include/crypto_wrapper.hpp:
  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/include/yassl_imp.hpp:
  Import patch yassl.diff
extra/yassl/include/yassl_int.hpp:
  Import patch yassl.diff
extra/yassl/src/crypto_wrapper.cpp:
  Import patch yassl.diff
extra/yassl/src/ssl.cpp:
  Import patch yassl.diff
extra/yassl/taocrypt/README:
  Import patch yassl.diff
extra/yassl/taocrypt/benchmark/benchmark.cpp:
  Import patch yassl.diff
extra/yassl/taocrypt/include/algebra.hpp:
  Import patch yassl.diff
extra/yassl/taocrypt/include/des.hpp:
  Import patch yassl.diff
extra/yassl/taocrypt/include/hash.hpp:
  Import patch yassl.diff
extra/yassl/taocrypt/include/hmac.hpp:
  Import patch yassl.diff
extra/yassl/taocrypt/include/misc.hpp:
  Import patch yassl.diff
extra/yassl/taocrypt/include/modarith.hpp:
  Import patch yassl.diff
extra/yassl/taocrypt/include/modes.hpp:
  Import patch yassl.diff
extra/yassl/taocrypt/include/rsa.hpp:
  Import patch yassl.diff
extra/yassl/taocrypt/include/sha.hpp:
  Import patch yassl.diff
extra/yassl/taocrypt/include/type_traits.hpp:
  Import patch yassl.diff
extra/yassl/taocrypt/include/types.hpp:
  Import patch yassl.diff
extra/yassl/taocrypt/mySTL/list.hpp:
  Import patch yassl.diff
extra/yassl/taocrypt/src/aes.cpp:
  Import patch yassl.diff
extra/yassl/taocrypt/src/algebra.cpp:
  Import patch yassl.diff
extra/yassl/taocrypt/src/asn.cpp:
  Import patch yassl.diff
extra/yassl/taocrypt/src/hash.cpp:
  Import patch yassl.diff
extra/yassl/taocrypt/src/integer.cpp:
  Import patch yassl.diff
extra/yassl/taocrypt/src/sha.cpp:
  Import patch yassl.diff
extra/yassl/taocrypt/test/test.cpp:
  Import patch yassl.diff
extra/yassl/testsuite/testsuite.cpp:
  Import patch yassl.diff
parent 2176fef4
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
*****************yaSSL Release notes, version 1.6.0 (2/22/07)

    This release of yaSSL contains bug fixes, portability enhancements, and
    better X509 support.

See normal  build instructions below under 1.0.6.
See libcurl build instructions below under 1.3.0 and note in 1.5.8.

*****************yaSSL Release notes, version 1.5.8 (1/10/07)

    This release of yaSSL contains bug fixes, portability enhancements, and
+0 −3
Original line number Diff line number Diff line
@@ -49,13 +49,11 @@ const uint AUTO = 0xFEEDBEEF;
// Checking Policy should implement a check function that tests whether the
// index is within the size limit of the array
struct Check {
    Check() {}
    void check(uint i, uint limit);
};


struct NoCheck {
    NoCheck() {}
    void check(uint, uint);
};

@@ -193,7 +191,6 @@ inline void checked_delete(T* p)
// sets pointer to zero so safe for std conatiners
struct del_ptr_zero
{
    del_ptr_zero() {}
    template <typename T>
    void operator()(T*& p) const
    {
+0 −6
Original line number Diff line number Diff line
@@ -42,7 +42,6 @@ namespace yaSSL {
// Digest policy should implement a get_digest, update, and get sizes for pad
// and  digest
struct Digest : public virtual_base {
    Digest() {}
    virtual void   get_digest(byte*) = 0;
    virtual void   get_digest(byte*, const byte*, unsigned int) = 0;
    virtual void   update(const byte*, unsigned int) = 0;
@@ -54,7 +53,6 @@ struct Digest : public virtual_base {

// For use with NULL Digests
struct NO_MAC : public Digest {
    NO_MAC() {}
    void   get_digest(byte*);
    void   get_digest(byte*, const byte*, unsigned int);
    void   update(const byte*, unsigned int);
@@ -179,7 +177,6 @@ private:
// BulkCipher policy should implement encrypt, decrypt, get block size, 
// and set keys for encrypt and decrypt
struct BulkCipher : public virtual_base {
    BulkCipher() {}
    virtual void   encrypt(byte*, const byte*, unsigned int) = 0;
    virtual void   decrypt(byte*, const byte*, unsigned int) = 0;
    virtual void   set_encryptKey(const byte*, const byte* = 0) = 0;
@@ -193,7 +190,6 @@ struct BulkCipher : public virtual_base {

// For use with NULL Ciphers
struct NO_Cipher : public BulkCipher {
    NO_Cipher() {}
    void   encrypt(byte*, const byte*, unsigned int) {}
    void   decrypt(byte*, const byte*, unsigned int) {}
    void   set_encryptKey(const byte*, const byte*)  {}
@@ -315,14 +311,12 @@ struct Auth : public virtual_base {
    virtual bool verify(const byte*, unsigned int, const byte*,
                        unsigned int) = 0;
    virtual uint get_signatureLength() const = 0;
    Auth() {}
    virtual ~Auth() {}
};


// For use with NULL Authentication schemes
struct NO_Auth : public Auth {
    NO_Auth() {}
    void   sign(byte*, const byte*, unsigned int, const RandomPool&) {}
    bool   verify(const byte*, unsigned int, const byte*, unsigned int) 
                    { return true; }
+3 −7
Original line number Diff line number Diff line
@@ -33,7 +33,8 @@
#include "opensslv.h" /* for version number */
#include "rsa.h"

#define YASSL_VERSION "1.5.8"

#define YASSL_VERSION "1.6.5"


#if defined(__cplusplus)
@@ -189,16 +190,11 @@ enum { /* ERR Constants */
    EVP_R_BAD_DECRYPT = 2
};

#ifdef WIN
    typedef SOCKET socket_t;
#else
    typedef int socket_t;
#endif


SSL_CTX* SSL_CTX_new(SSL_METHOD*);
SSL* SSL_new(SSL_CTX*);
int  SSL_set_fd (SSL*, socket_t);
int  SSL_set_fd (SSL*, int);
int  SSL_connect(SSL*);
int  SSL_write(SSL*, const void*, int);
int  SSL_read(SSL*, void*, int);
+4 −2
Original line number Diff line number Diff line
@@ -38,14 +38,16 @@
    #include <netinet/in.h>
    #include <arpa/inet.h>
#endif
#include "openssl/ssl.h"                        /* for socket_t */


namespace yaSSL {

typedef unsigned int uint;

#ifndef _WIN32
#ifdef _WIN32
    typedef SOCKET socket_t;
#else
    typedef int socket_t;
    const socket_t INVALID_SOCKET = -1;
    const int SD_RECEIVE   = 0;
    const int SD_SEND      = 1;
Loading