aboutsummaryrefslogtreecommitdiffstats
path: root/src/cert/x509store
diff options
context:
space:
mode:
authorlloyd <[email protected]>2012-05-18 20:32:36 +0000
committerlloyd <[email protected]>2012-05-18 20:32:36 +0000
commitc691561f3198f481c13457433efbccc1c9fcd898 (patch)
treea45ea2c5a30e0cb009fbcb68a61ef39332ff790c /src/cert/x509store
parentd76700f01c7ecac5633edf75f8d7408b46c5dbac (diff)
Fairly huge update that replaces the old secmem types with std::vector
using a custom allocator. Currently our allocator just does new/delete with a memset before deletion, and the mmap and mlock allocators have been removed.
Diffstat (limited to 'src/cert/x509store')
-rw-r--r--src/cert/x509store/x509stor.cpp16
-rw-r--r--src/cert/x509store/x509stor.h4
2 files changed, 10 insertions, 10 deletions
diff --git a/src/cert/x509store/x509stor.cpp b/src/cert/x509store/x509stor.cpp
index a635b3930..ccce9abce 100644
--- a/src/cert/x509store/x509stor.cpp
+++ b/src/cert/x509store/x509stor.cpp
@@ -36,8 +36,8 @@ s32bit validity_check(const X509_Time& start, const X509_Time& end,
/*
* Compare the value of unique ID fields
*/
-bool compare_ids(const MemoryVector<byte>& id1,
- const MemoryVector<byte>& id2)
+bool compare_ids(const std::vector<byte>& id1,
+ const std::vector<byte>& id2)
{
if(!id1.size() || !id2.size())
return true;
@@ -136,10 +136,10 @@ bool X509_Store::CRL_Data::operator<(const X509_Store::CRL_Data& other) const
if(*this == other)
return false;
- const MemoryVector<byte>& serial1 = serial;
- const MemoryVector<byte>& key_id1 = auth_key_id;
- const MemoryVector<byte>& serial2 = other.serial;
- const MemoryVector<byte>& key_id2 = other.auth_key_id;
+ const std::vector<byte>& serial1 = serial;
+ const std::vector<byte>& key_id1 = auth_key_id;
+ const std::vector<byte>& serial2 = other.serial;
+ const std::vector<byte>& key_id2 = other.auth_key_id;
if(compare_ids(key_id1, key_id2) == false)
{
@@ -252,7 +252,7 @@ X509_Code X509_Store::validate_cert(const X509_Certificate& cert,
* Find this certificate
*/
size_t X509_Store::find_cert(const X509_DN& subject_dn,
- const MemoryRegion<byte>& subject_key_id) const
+ const std::vector<byte>& subject_key_id) const
{
for(size_t j = 0; j != certs.size(); ++j)
{
@@ -270,7 +270,7 @@ size_t X509_Store::find_cert(const X509_DN& subject_dn,
size_t X509_Store::find_parent_of(const X509_Certificate& cert)
{
const X509_DN issuer_dn = cert.issuer_dn();
- const MemoryVector<byte> auth_key_id = cert.authority_key_id();
+ const std::vector<byte> auth_key_id = cert.authority_key_id();
size_t index = find_cert(issuer_dn, auth_key_id);
diff --git a/src/cert/x509store/x509stor.h b/src/cert/x509store/x509stor.h
index 532db6190..3945f9fd3 100644
--- a/src/cert/x509store/x509stor.h
+++ b/src/cert/x509store/x509stor.h
@@ -87,7 +87,7 @@ class BOTAN_DLL X509_Store
{
public:
X509_DN issuer;
- MemoryVector<byte> serial, auth_key_id;
+ std::vector<byte> serial, auth_key_id;
bool operator==(const CRL_Data&) const;
bool operator!=(const CRL_Data&) const;
bool operator<(const CRL_Data&) const;
@@ -112,7 +112,7 @@ class BOTAN_DLL X509_Store
static X509_Code check_sig(const X509_Object&, Public_Key*);
- size_t find_cert(const X509_DN&, const MemoryRegion<byte>&) const;
+ size_t find_cert(const X509_DN&, const std::vector<byte>&) const;
X509_Code check_sig(const Cert_Info&, const Cert_Info&) const;
void recompute_revoked_info() const;