aboutsummaryrefslogtreecommitdiffstats
path: root/src/cert/x509/x509stor.cpp
diff options
context:
space:
mode:
authorlloyd <[email protected]>2009-11-19 17:35:33 +0000
committerlloyd <[email protected]>2009-11-19 17:35:33 +0000
commit46eb21cd08a0268d860eeef449e7474fb615b050 (patch)
tree029d5bdea51f1606ecb6f241c5964881b98b1d5f /src/cert/x509/x509stor.cpp
parentac3db1c524fdecbc069a5e1323d93e4a3b933152 (diff)
parent2af8cfbaf23033250a6819be9f45f82bf03e898d (diff)
propagate from branch 'net.randombit.botan' (head 2f3665f775fafbdfa517ecdca7f872e35bd90277)
to branch 'net.randombit.botan.c++0x' (head 45169719ddd8977b1eb20637576bc855dbc867a0)
Diffstat (limited to 'src/cert/x509/x509stor.cpp')
-rw-r--r--src/cert/x509/x509stor.cpp13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/cert/x509/x509stor.cpp b/src/cert/x509/x509stor.cpp
index 40801148c..323890f2d 100644
--- a/src/cert/x509/x509stor.cpp
+++ b/src/cert/x509/x509stor.cpp
@@ -10,7 +10,7 @@
#include <botan/pubkey.h>
#include <botan/look_pk.h>
#include <botan/oids.h>
-#include <botan/timer.h>
+#include <botan/time.h>
#include <algorithm>
#include <memory>
@@ -380,8 +380,8 @@ X509_Code X509_Store::check_sig(const Cert_Info& cert_info,
*/
X509_Code X509_Store::check_sig(const X509_Object& object, Public_Key* key)
{
- std::auto_ptr<Public_Key> pub_key(key);
- std::auto_ptr<PK_Verifier> verifier;
+ std::unique_ptr<Public_Key> pub_key(key);
+ std::unique_ptr<PK_Verifier> verifier;
try {
std::vector<std::string> sig_info =
@@ -464,12 +464,12 @@ bool X509_Store::is_revoked(const X509_Certificate& cert) const
* Retrieve all the certificates in the store
*/
std::vector<X509_Certificate>
-X509_Store::get_certs(const Search_Func& search) const
+X509_Store::get_certs(std::function<bool (const X509_Certificate&)> pred) const
{
std::vector<X509_Certificate> found_certs;
for(u32bit j = 0; j != certs.size(); ++j)
{
- if(search.match(certs[j].cert))
+ if(pred(certs[j].cert))
found_certs.push_back(certs[j].cert);
}
return found_certs;
@@ -603,8 +603,7 @@ X509_Code X509_Store::add_crl(const X509_CRL& crl)
revoked_info.serial = revoked_certs[j].serial_number();
revoked_info.auth_key_id = crl.authority_key_id();
- std::vector<CRL_Data>::iterator p =
- std::find(revoked.begin(), revoked.end(), revoked_info);
+ auto p = std::find(revoked.begin(), revoked.end(), revoked_info);
if(revoked_certs[j].reason_code() == REMOVE_FROM_CRL)
{