aboutsummaryrefslogtreecommitdiffstats
path: root/src/cms/cms_dalg.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/cms/cms_dalg.cpp')
-rw-r--r--src/cms/cms_dalg.cpp17
1 files changed, 9 insertions, 8 deletions
diff --git a/src/cms/cms_dalg.cpp b/src/cms/cms_dalg.cpp
index 2935f3070..96bdd5be3 100644
--- a/src/cms/cms_dalg.cpp
+++ b/src/cms/cms_dalg.cpp
@@ -20,7 +20,7 @@ namespace {
/*
* Compute the hash of some content
*/
-SecureVector<byte> hash_of(const SecureVector<byte>& content,
+secure_vector<byte> hash_of(const secure_vector<byte>& content,
const AlgorithmIdentifier& hash_algo,
std::string& hash_name)
{
@@ -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
@@ -105,11 +106,11 @@ void read_orig_info(BER_Decoder& info, X509_Store& store)
/*
* Decode any Attributes, and check type
*/
-SecureVector<byte> decode_attributes(BER_Decoder& ber, const OID& type,
+secure_vector<byte> decode_attributes(BER_Decoder& ber, const OID& type,
bool& bad_attributes)
{
BER_Object obj = ber.get_next_object();
- SecureVector<byte> digest;
+ secure_vector<byte> digest;
bool got_digest = false;
bool got_content_type = false;
@@ -177,7 +178,7 @@ void CMS_Decoder::decode_layer()
{
size_t version;
AlgorithmIdentifier hash_algo;
- SecureVector<byte> digest;
+ secure_vector<byte> digest;
BER_Decoder hash_info = decoder.start_cons(SEQUENCE);
@@ -212,7 +213,7 @@ void CMS_Decoder::decode_layer()
while(signer_infos.more_items())
{
AlgorithmIdentifier sig_algo, hash_algo;
- SecureVector<byte> signature, digest;
+ secure_vector<byte> signature, digest;
size_t version;
BER_Decoder signer_info = BER::get_subsequence(signer_infos);