summaryrefslogtreecommitdiff
path: root/extra/yassl/taocrypt/src/asn.cpp
diff options
context:
space:
mode:
authormsvensson@neptunus.(none) <>2006-09-25 16:40:29 +0200
committermsvensson@neptunus.(none) <>2006-09-25 16:40:29 +0200
commit64a64d0fbf29443cd0229bba0d7b2dfdf9624306 (patch)
tree1f8d7ab8dca1697f70a230f4fdcbd108cdf21ccf /extra/yassl/taocrypt/src/asn.cpp
parentd8e27606e1716d674ce03588cb8e763fbc260b62 (diff)
downloadmariadb-git-64a64d0fbf29443cd0229bba0d7b2dfdf9624306.tar.gz
Import yaSSL version 1.4.0
Diffstat (limited to 'extra/yassl/taocrypt/src/asn.cpp')
-rw-r--r--extra/yassl/taocrypt/src/asn.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/extra/yassl/taocrypt/src/asn.cpp b/extra/yassl/taocrypt/src/asn.cpp
index 45fb1e60a0c..3dc3638d85f 100644
--- a/extra/yassl/taocrypt/src/asn.cpp
+++ b/extra/yassl/taocrypt/src/asn.cpp
@@ -38,7 +38,8 @@
#include "sha.hpp"
#include "coding.hpp"
#include <time.h> // gmtime();
-#include "memory.hpp" // mySTL::auto_ptr
+#include "memory.hpp" // some auto_ptr don't have reset, also need auto_array
+
namespace TaoCrypt {
@@ -202,13 +203,13 @@ void PublicKey::SetKey(const byte* k)
void PublicKey::AddToEnd(const byte* data, word32 len)
{
- mySTL::auto_ptr<byte> tmp(NEW_TC byte[sz_ + len], tcArrayDelete);
+ mySTL::auto_array<byte> tmp(NEW_TC byte[sz_ + len]);
memcpy(tmp.get(), key_, sz_);
memcpy(tmp.get() + sz_, data, len);
byte* del = 0;
- mySTL::swap(del, key_);
+ STL::swap(del, key_);
tcArrayDelete(del);
key_ = tmp.release();
@@ -856,7 +857,7 @@ bool CertDecoder::ValidateSignature(SignerList* signers)
bool CertDecoder::ConfirmSignature(Source& pub)
{
HashType ht;
- mySTL::auto_ptr<HASH> hasher(tcDelete);
+ mySTL::auto_ptr<HASH> hasher;
if (signatureOID_ == MD5wRSA) {
hasher.reset(NEW_TC MD5);