aboutsummaryrefslogtreecommitdiffstats
path: root/src/cms
diff options
context:
space:
mode:
authorlloyd <[email protected]>2010-11-04 20:46:52 +0000
committerlloyd <[email protected]>2010-11-04 20:46:52 +0000
commite19a323006287c4dba58c6b530fbcafa47a8c8c5 (patch)
treec9da529f446e9a8b0119dfbb79dcd9787219deb4 /src/cms
parent5c1ca36f06ba06e2ba2e22efd7742571c8a7dcd3 (diff)
parentedf4cd93eedf8e6972edaccaea4b7b7ab45faded (diff)
propagate from branch 'net.randombit.botan' (head 303b2518a80553214b1e5ab4d9b96ef54629cbc7)
to branch 'net.randombit.botan.c++0x' (head d734eefabe4816be4dd3e3e6e7bb13b7ab5be148)
Diffstat (limited to 'src/cms')
-rw-r--r--src/cms/cms_dalg.cpp7
-rw-r--r--src/cms/cms_ealg.cpp4
2 files changed, 6 insertions, 5 deletions
diff --git a/src/cms/cms_dalg.cpp b/src/cms/cms_dalg.cpp
index 8b168902b..719b791d2 100644
--- a/src/cms/cms_dalg.cpp
+++ b/src/cms/cms_dalg.cpp
@@ -28,7 +28,7 @@ SecureVector<byte> hash_of(const SecureVector<byte>& content,
Algorithm_Factory& af = global_state().algorithm_factory();
- std::auto_ptr<HashFunction> hash_fn(af.make_hash_function(hash_name));
+ std::unique_ptr<HashFunction> hash_fn(af.make_hash_function(hash_name));
return hash_fn->process(content);
}
@@ -51,10 +51,11 @@ std::vector<X509_Certificate> get_cert(BER_Decoder& signer_info,
iands.decode(issuer);
iands.decode(serial);
- found = store.get_certs(IandS_Match(issuer, BigInt::encode(serial)));
+ found = store.get_certs(
+ X509_Store_Search::by_issuer_and_serial(issuer, serial));
}
else if(id.type_tag == 0 && id.class_tag == CONSTRUCTED)
- found = store.get_certs(SKID_Match(id.value));
+ found = store.get_certs(X509_Store_Search::by_skid(id.value));
else
throw Decoding_Error("CMS: Unknown tag for cert identifier");
#endif
diff --git a/src/cms/cms_ealg.cpp b/src/cms/cms_ealg.cpp
index 262c74b86..57b44b80e 100644
--- a/src/cms/cms_ealg.cpp
+++ b/src/cms/cms_ealg.cpp
@@ -57,7 +57,7 @@ SecureVector<byte> hash_of(const SecureVector<byte>& content,
const std::string& hash_name)
{
Algorithm_Factory& af = global_state().algorithm_factory();
- std::auto_ptr<HashFunction> hash_fn(af.make_hash_function(hash_name));
+ std::unique_ptr<HashFunction> hash_fn(af.make_hash_function(hash_name));
return hash_fn->process(content);
}
@@ -96,7 +96,7 @@ void CMS_Encoder::encrypt(RandomNumberGenerator& rng,
{
const std::string cipher = choose_algo(user_cipher, "TripleDES");
- std::auto_ptr<Public_Key> key(to.subject_public_key());
+ std::unique_ptr<Public_Key> key(to.subject_public_key());
const std::string algo = key->algo_name();
Key_Constraints constraints = to.constraints();