Commit 27b7f85a authored by unknown's avatar unknown
Browse files

Fixes for numerous compatibility problems in yaSSL.


extra/yassl/include/openssl/ssl.h:
  Fix -std=c++98 mode compilation failures.
extra/yassl/include/yassl_error.hpp:
  Fix -std=c++98 mode compilation failures.
extra/yassl/include/yassl_types.hpp:
  Fix -std=c++98 mode compilation failures.
extra/yassl/mySTL/helpers.hpp:
  Fix AIX 5.2 compilation problem.
extra/yassl/taocrypt/include/asn.hpp:
  Fix -std=c++98 mode compilation failures.
vio/Makefile.am:
  Add a dummy C++ file to SSL tests to make libtool use a C++ linker:
  this lets ssl tests link when using yaSSL and a non-gcc C++ compiler.
parent 78d81529
Loading
Loading
Loading
Loading
+5 −5
Original line number Diff line number Diff line
@@ -149,7 +149,7 @@ enum { /* X509 Constants */
    X509_V_ERR_CRL_SIGNATURE_FAILURE          = 10,
    X509_V_ERR_ERROR_IN_CRL_NEXT_UPDATE_FIELD = 11,
    X509_V_ERR_CRL_HAS_EXPIRED                = 12,
    X509_V_ERR_CERT_REVOKED                   = 13,
    X509_V_ERR_CERT_REVOKED                   = 13

};

@@ -166,7 +166,7 @@ int ERR_GET_REASON(int);

enum {  /* ERR Constants */
    ERR_TXT_STRING = 1,
    EVP_R_BAD_DECRYPT = 2,
    EVP_R_BAD_DECRYPT = 2
};


@@ -263,8 +263,8 @@ enum { /* ssl Constants */
    SSL_UNKNOWN         = -2,
    SSL_FATAL_ERROR     = -1,
    SSL_NORMAL_SHUTDOWN =  0,
    SSL_ERROR_NONE      =  0,   // for most functions
    SSL_FAILURE         =  0,   // for some functions
    SSL_ERROR_NONE      =  0,   /* for most functions */
    SSL_FAILURE         =  0,   /* for some functions */
    SSL_SUCCESS	        =  1,

    SSL_FILETYPE_ASN1    = 10,
@@ -320,7 +320,7 @@ enum { /* ssl Constants */
    SSL_ST_ACCEPT         = 94,
    SSL_CB_ALERT          = 95,
    SSL_CB_READ           = 96,
    SSL_CB_HANDSHAKE_DONE = 97,
    SSL_CB_HANDSHAKE_DONE = 97

};

+1 −1
Original line number Diff line number Diff line
@@ -51,7 +51,7 @@ enum YasslError {
    verify_error        = 112,
    send_error          = 113,
    receive_error       = 114,
    certificate_error   = 115,
    certificate_error   = 115

    // 1000+ from TaoCrypt error.hpp

+2 −2
Original line number Diff line number Diff line
@@ -129,7 +129,7 @@ enum PublicValueEncoding { implicit_encoding, explicit_encoding };

enum ConnectionEnd { server_end, client_end };

enum AlertLevel { warning = 1, fatal = 2, };
enum AlertLevel { warning = 1, fatal = 2 };



@@ -381,7 +381,7 @@ const char* const cipher_names[128] =
    "DES-CBC3-RMD", //  TLS_RSA_WITH_3DES_EDE_CBC_RMD160     = 124
    "AES128-RMD",   //  TLS_RSA_WITH_AES_128_CBC_RMD160      = 125
    "AES256-RMD",   //  TLS_RSA_WITH_AES_256_CBC_RMD160      = 126
    null_str, // 127
    null_str // 127
};

// fill with MD5 pad size since biggest required
+14 −2
Original line number Diff line number Diff line
@@ -27,16 +27,28 @@
#ifndef mySTL_HELPERS_HPP
#define mySTL_HELPERS_HPP

#include <cstdlib>
#include <stdlib.h>


#ifdef __IBMCPP__
/*
  Workaround the lack of operator new(size_t, void*)
  in IBM VA CPP 6.0
*/
struct Dummy {};
inline void *operator new(size_t size, Dummy *d) { return (void*) d; }
typedef Dummy *yassl_pointer;
#else
typedef void *yassl_pointer;
#endif

namespace mySTL {


template <typename T, typename T2>
inline void construct(T* p, const T2& value)
{
    new (static_cast<void*>(p)) T(value);
    new ((yassl_pointer) p) T(value);
}


+4 −0
Original line number Diff line number Diff line
/*
  To make libtool always use a C++ linker when compiling with yaSSL we need
  to add a dummy C++ file to the source list.
*/
Loading