Loading extra/yassl/include/factory.hpp +1 −1 Original line number Diff line number Diff line Loading @@ -67,7 +67,7 @@ public: init(*this); } // reservce place in vector before registering, used by init funcion // reserve place in vector before registering, used by init funcion void Reserve(size_t sz) { callbacks_.reserve(sz); Loading extra/yassl/include/yassl_int.hpp +1 −1 Original line number Diff line number Diff line Loading @@ -31,8 +31,8 @@ #include "yassl_imp.hpp" #include "crypto_wrapper.hpp" #include "cert_wrapper.hpp" #include "lock.hpp" #include "log.hpp" #include "lock.hpp" namespace yaSSL { Loading extra/yassl/include/yassl_types.hpp +0 −10 Original line number Diff line number Diff line Loading @@ -29,16 +29,6 @@ #include <stddef.h> namespace yaSSL { // library allocation struct new_t {}; // yaSSL New type extern new_t ys; // pass in parameter } // namespace yaSSL void* operator new (size_t, yaSSL::new_t); void* operator new[](size_t, yaSSL::new_t); namespace yaSSL { Loading extra/yassl/src/buffer.cpp +6 −6 Original line number Diff line number Diff line Loading @@ -62,13 +62,13 @@ input_buffer::input_buffer() input_buffer::input_buffer(uint s) : size_(0), current_(0), buffer_(new (ys) byte[s]), end_(buffer_ + s) : size_(0), current_(0), buffer_(new byte[s]), end_(buffer_ + s) {} // with assign input_buffer::input_buffer(uint s, const byte* t, uint len) : size_(0), current_(0), buffer_(new (ys) byte[s]), end_(buffer_ + s) : size_(0), current_(0), buffer_(new byte[s]), end_(buffer_ + s) { assign(t, len); } Loading @@ -84,7 +84,7 @@ input_buffer::~input_buffer() void input_buffer::allocate(uint s) { assert(!buffer_); // find realloc error buffer_ = new (ys) byte[s]; buffer_ = new byte[s]; end_ = buffer_ + s; } Loading Loading @@ -198,13 +198,13 @@ output_buffer::output_buffer() // with allocate output_buffer::output_buffer(uint s) : current_(0), buffer_(new (ys) byte[s]), end_(buffer_ + s) : current_(0), buffer_(new byte[s]), end_(buffer_ + s) {} // with assign output_buffer::output_buffer(uint s, const byte* t, uint len) : current_(0), buffer_(new (ys) byte[s]), end_(buffer_+ s) : current_(0), buffer_(new byte[s]), end_(buffer_+ s) { write(t, len); } Loading Loading @@ -239,7 +239,7 @@ void output_buffer::set_current(uint c) void output_buffer::allocate(uint s) { assert(!buffer_); // find realloc error buffer_ = new (ys) byte[s]; end_ = buffer_ + s; buffer_ = new byte[s]; end_ = buffer_ + s; } Loading extra/yassl/src/cert_wrapper.cpp +12 −12 Original line number Diff line number Diff line Loading @@ -39,7 +39,7 @@ namespace yaSSL { x509::x509(uint sz) : length_(sz), buffer_(new (ys) opaque[sz]) x509::x509(uint sz) : length_(sz), buffer_(new opaque[sz]) { } Loading @@ -51,7 +51,7 @@ x509::~x509() x509::x509(const x509& that) : length_(that.length_), buffer_(new (ys) opaque[length_]) buffer_(new opaque[length_]) { memcpy(buffer_, that.buffer_, length_); } Loading Loading @@ -153,7 +153,7 @@ void CertManager::AddPeerCert(x509* x) void CertManager::CopySelfCert(const x509* x) { if (x) list_.push_back(new (ys) x509(*x)); list_.push_back(new x509(*x)); } Loading @@ -165,7 +165,7 @@ int CertManager::CopyCaCert(const x509* x) if (!cert.GetError().What()) { const TaoCrypt::PublicKey& key = cert.GetPublicKey(); signers_.push_back(new (ys) TaoCrypt::Signer(key.GetKey(), key.size(), signers_.push_back(new TaoCrypt::Signer(key.GetKey(), key.size(), cert.GetCommonName(), cert.GetHash())); } return cert.GetError().What(); Loading Loading @@ -234,7 +234,7 @@ int CertManager::Validate() return err; const TaoCrypt::PublicKey& key = cert.GetPublicKey(); signers_.push_back(new (ys) TaoCrypt::Signer(key.GetKey(), key.size(), signers_.push_back(new TaoCrypt::Signer(key.GetKey(), key.size(), cert.GetCommonName(), cert.GetHash())); --last; --count; Loading @@ -259,7 +259,7 @@ int CertManager::Validate() int iSz = cert.GetIssuer() ? strlen(cert.GetIssuer()) + 1 : 0; int sSz = cert.GetCommonName() ? strlen(cert.GetCommonName()) + 1 : 0; peerX509_ = new (ys) X509(cert.GetIssuer(), iSz, cert.GetCommonName(), peerX509_ = new X509(cert.GetIssuer(), iSz, cert.GetCommonName(), sSz); } return 0; Loading @@ -273,13 +273,13 @@ int CertManager::SetPrivateKey(const x509& key) privateKey_.assign(key.get_buffer(), key.get_length()); // set key type if (x509* cert509 = list_.front()) { TaoCrypt::Source source(cert509->get_buffer(), cert509->get_length()); TaoCrypt::CertDecoder cert(source, false); cert.DecodeToKey(); if (int err = cert.GetError().What()) if (x509* cert = list_.front()) { TaoCrypt::Source source(cert->get_buffer(), cert->get_length()); TaoCrypt::CertDecoder cd(source, false); cd.DecodeToKey(); if (int err = cd.GetError().What()) return err; if (cert.GetKeyType() == TaoCrypt::RSAk) if (cd.GetKeyType() == TaoCrypt::RSAk) keyType_ = rsa_sa_algo; else keyType_ = dsa_sa_algo; Loading Loading
extra/yassl/include/factory.hpp +1 −1 Original line number Diff line number Diff line Loading @@ -67,7 +67,7 @@ public: init(*this); } // reservce place in vector before registering, used by init funcion // reserve place in vector before registering, used by init funcion void Reserve(size_t sz) { callbacks_.reserve(sz); Loading
extra/yassl/include/yassl_int.hpp +1 −1 Original line number Diff line number Diff line Loading @@ -31,8 +31,8 @@ #include "yassl_imp.hpp" #include "crypto_wrapper.hpp" #include "cert_wrapper.hpp" #include "lock.hpp" #include "log.hpp" #include "lock.hpp" namespace yaSSL { Loading
extra/yassl/include/yassl_types.hpp +0 −10 Original line number Diff line number Diff line Loading @@ -29,16 +29,6 @@ #include <stddef.h> namespace yaSSL { // library allocation struct new_t {}; // yaSSL New type extern new_t ys; // pass in parameter } // namespace yaSSL void* operator new (size_t, yaSSL::new_t); void* operator new[](size_t, yaSSL::new_t); namespace yaSSL { Loading
extra/yassl/src/buffer.cpp +6 −6 Original line number Diff line number Diff line Loading @@ -62,13 +62,13 @@ input_buffer::input_buffer() input_buffer::input_buffer(uint s) : size_(0), current_(0), buffer_(new (ys) byte[s]), end_(buffer_ + s) : size_(0), current_(0), buffer_(new byte[s]), end_(buffer_ + s) {} // with assign input_buffer::input_buffer(uint s, const byte* t, uint len) : size_(0), current_(0), buffer_(new (ys) byte[s]), end_(buffer_ + s) : size_(0), current_(0), buffer_(new byte[s]), end_(buffer_ + s) { assign(t, len); } Loading @@ -84,7 +84,7 @@ input_buffer::~input_buffer() void input_buffer::allocate(uint s) { assert(!buffer_); // find realloc error buffer_ = new (ys) byte[s]; buffer_ = new byte[s]; end_ = buffer_ + s; } Loading Loading @@ -198,13 +198,13 @@ output_buffer::output_buffer() // with allocate output_buffer::output_buffer(uint s) : current_(0), buffer_(new (ys) byte[s]), end_(buffer_ + s) : current_(0), buffer_(new byte[s]), end_(buffer_ + s) {} // with assign output_buffer::output_buffer(uint s, const byte* t, uint len) : current_(0), buffer_(new (ys) byte[s]), end_(buffer_+ s) : current_(0), buffer_(new byte[s]), end_(buffer_+ s) { write(t, len); } Loading Loading @@ -239,7 +239,7 @@ void output_buffer::set_current(uint c) void output_buffer::allocate(uint s) { assert(!buffer_); // find realloc error buffer_ = new (ys) byte[s]; end_ = buffer_ + s; buffer_ = new byte[s]; end_ = buffer_ + s; } Loading
extra/yassl/src/cert_wrapper.cpp +12 −12 Original line number Diff line number Diff line Loading @@ -39,7 +39,7 @@ namespace yaSSL { x509::x509(uint sz) : length_(sz), buffer_(new (ys) opaque[sz]) x509::x509(uint sz) : length_(sz), buffer_(new opaque[sz]) { } Loading @@ -51,7 +51,7 @@ x509::~x509() x509::x509(const x509& that) : length_(that.length_), buffer_(new (ys) opaque[length_]) buffer_(new opaque[length_]) { memcpy(buffer_, that.buffer_, length_); } Loading Loading @@ -153,7 +153,7 @@ void CertManager::AddPeerCert(x509* x) void CertManager::CopySelfCert(const x509* x) { if (x) list_.push_back(new (ys) x509(*x)); list_.push_back(new x509(*x)); } Loading @@ -165,7 +165,7 @@ int CertManager::CopyCaCert(const x509* x) if (!cert.GetError().What()) { const TaoCrypt::PublicKey& key = cert.GetPublicKey(); signers_.push_back(new (ys) TaoCrypt::Signer(key.GetKey(), key.size(), signers_.push_back(new TaoCrypt::Signer(key.GetKey(), key.size(), cert.GetCommonName(), cert.GetHash())); } return cert.GetError().What(); Loading Loading @@ -234,7 +234,7 @@ int CertManager::Validate() return err; const TaoCrypt::PublicKey& key = cert.GetPublicKey(); signers_.push_back(new (ys) TaoCrypt::Signer(key.GetKey(), key.size(), signers_.push_back(new TaoCrypt::Signer(key.GetKey(), key.size(), cert.GetCommonName(), cert.GetHash())); --last; --count; Loading @@ -259,7 +259,7 @@ int CertManager::Validate() int iSz = cert.GetIssuer() ? strlen(cert.GetIssuer()) + 1 : 0; int sSz = cert.GetCommonName() ? strlen(cert.GetCommonName()) + 1 : 0; peerX509_ = new (ys) X509(cert.GetIssuer(), iSz, cert.GetCommonName(), peerX509_ = new X509(cert.GetIssuer(), iSz, cert.GetCommonName(), sSz); } return 0; Loading @@ -273,13 +273,13 @@ int CertManager::SetPrivateKey(const x509& key) privateKey_.assign(key.get_buffer(), key.get_length()); // set key type if (x509* cert509 = list_.front()) { TaoCrypt::Source source(cert509->get_buffer(), cert509->get_length()); TaoCrypt::CertDecoder cert(source, false); cert.DecodeToKey(); if (int err = cert.GetError().What()) if (x509* cert = list_.front()) { TaoCrypt::Source source(cert->get_buffer(), cert->get_length()); TaoCrypt::CertDecoder cd(source, false); cd.DecodeToKey(); if (int err = cd.GetError().What()) return err; if (cert.GetKeyType() == TaoCrypt::RSAk) if (cd.GetKeyType() == TaoCrypt::RSAk) keyType_ = rsa_sa_algo; else keyType_ = dsa_sa_algo; Loading