aboutsummaryrefslogtreecommitdiffstats
path: root/src/wrap/python
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/wrap/python
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/wrap/python')
-rw-r--r--src/wrap/python/python_botan.h2
-rw-r--r--src/wrap/python/rsa.cpp4
-rw-r--r--src/wrap/python/x509.cpp2
3 files changed, 4 insertions, 4 deletions
diff --git a/src/wrap/python/python_botan.h b/src/wrap/python/python_botan.h
index ac0a17d7f..03bdd9156 100644
--- a/src/wrap/python/python_botan.h
+++ b/src/wrap/python/python_botan.h
@@ -34,7 +34,7 @@ inline std::string make_string(const byte input[], u32bit length)
return std::string((const char*)input, length);
}
-inline std::string make_string(const MemoryRegion<byte>& in)
+inline std::string make_string(const secure_vector<byte>& in)
{
return make_string(in.begin(), in.size());
}
diff --git a/src/wrap/python/rsa.cpp b/src/wrap/python/rsa.cpp
index dc6053503..3ff1edb07 100644
--- a/src/wrap/python/rsa.cpp
+++ b/src/wrap/python/rsa.cpp
@@ -40,7 +40,7 @@ class Py_RSA_PrivateKey
std::string to_ber() const
{
- SecureVector<byte> bits = PKCS8::BER_encode(*rsa_key);
+ secure_vector<byte> bits = PKCS8::BER_encode(*rsa_key);
return std::string(reinterpret_cast<const char*>(&bits[0]),
bits.size());
@@ -140,7 +140,7 @@ class Py_RSA_PublicKey
std::string to_ber() const
{
- SecureVector<byte> bits = X509::BER_encode(*rsa_key);
+ secure_vector<byte> bits = X509::BER_encode(*rsa_key);
return std::string(reinterpret_cast<const char*>(&bits[0]),
bits.size());
diff --git a/src/wrap/python/x509.cpp b/src/wrap/python/x509.cpp
index 4c248890d..0a29ad83a 100644
--- a/src/wrap/python/x509.cpp
+++ b/src/wrap/python/x509.cpp
@@ -63,7 +63,7 @@ void export_x509()
{
vector_to_list<std::string>();
vector_to_list<X509_Certificate>();
- memvec_to_hexstr<MemoryVector<byte> >();
+ memvec_to_hexstr<std::vector<byte> >();
python::class_<X509_Certificate>
("X509_Certificate", python::init<std::string>())