aboutsummaryrefslogtreecommitdiffstats
path: root/src/cms
diff options
context:
space:
mode:
authorlloyd <[email protected]>2010-07-09 20:34:39 +0000
committerlloyd <[email protected]>2010-07-09 20:34:39 +0000
commit5463afbee47c10686c6829e7db809772dfba4e13 (patch)
treef40635e1efbd58942f6d0c755ba9205b0e511502 /src/cms
parent4d1fe920cd6aa1c3af61cf8232297413908d31de (diff)
parente366bebf7a6cd85668ccd173e0f279dc80a246aa (diff)
propagate from branch 'net.randombit.botan' (head 8761f1c3082e4ce33af57e557f9be9ef838d92a7)
to branch 'net.randombit.botan.c++0x' (head e9cc5dade8fca66cdf08e4609154ad9d2a583839)
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 50a2397e5..f727f2a3f 100644
--- a/src/cms/cms_dalg.cpp
+++ b/src/cms/cms_dalg.cpp
@@ -29,7 +29,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");
diff --git a/src/cms/cms_ealg.cpp b/src/cms/cms_ealg.cpp
index 3ddf8a39e..b910b89d2 100644
--- a/src/cms/cms_ealg.cpp
+++ b/src/cms/cms_ealg.cpp
@@ -58,7 +58,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);
}
@@ -97,7 +97,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();