From 2837e915d82e439730624f15bfc8c820475c9d65 Mon Sep 17 00:00:00 2001 From: lloyd Date: Tue, 5 Jan 2010 23:06:31 +0000 Subject: Clean up exceptions. Remove some unused ones like Config_Error. Make Invalid_Argument just a typedef for std::invalid_argument. Make Botan::Exception a typedef for std::runtime_error. Make Memory_Exhaustion a public exception, and use it in other places where memory allocations can fail. --- src/cms/cms_ealg.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/cms/cms_ealg.cpp') diff --git a/src/cms/cms_ealg.cpp b/src/cms/cms_ealg.cpp index 2970e8e79..5efa33254 100644 --- a/src/cms/cms_ealg.cpp +++ b/src/cms/cms_ealg.cpp @@ -168,7 +168,7 @@ void CMS_Encoder::encrypt_kari(RandomNumberGenerator&, X509_PublicKey*, const std::string&) { - throw Exception("FIXME: unimplemented"); + throw Internal_Error("FIXME: unimplemented"); #if 0 SymmetricKey cek = setup_key(rng, cipher); @@ -198,7 +198,7 @@ void CMS_Encoder::encrypt(RandomNumberGenerator& rng, const SymmetricKey& kek, const std::string& user_cipher) { - throw Exception("FIXME: untested"); + throw Internal_Error("FIXME: untested"); const std::string cipher = choose_algo(user_cipher, "TripleDES"); SymmetricKey cek = setup_key(rng, cipher); @@ -232,7 +232,7 @@ void CMS_Encoder::encrypt(RandomNumberGenerator&, const std::string& user_cipher) { const std::string cipher = choose_algo(user_cipher, "TripleDES"); - throw Exception("FIXME: unimplemented"); + throw Internal_Error("FIXME: unimplemented"); /* SymmetricKey cek = setup_key(key); @@ -375,7 +375,7 @@ void CMS_Encoder::authenticate(const X509_Certificate&, const std::string& mac_algo) { const std::string mac = choose_algo(mac_algo, "HMAC(SHA-1)"); - throw Exception("FIXME: unimplemented"); + throw Internal_Error("FIXME: unimplemented"); } /* @@ -385,7 +385,7 @@ void CMS_Encoder::authenticate(const SymmetricKey&, const std::string& mac_algo) { const std::string mac = choose_algo(mac_algo, "HMAC(SHA-1)"); - throw Exception("FIXME: unimplemented"); + throw Internal_Error("FIXME: unimplemented"); } /* @@ -395,7 +395,7 @@ void CMS_Encoder::authenticate(const std::string&, const std::string& mac_algo) { const std::string mac = choose_algo(mac_algo, "HMAC(SHA-1)"); - throw Exception("FIXME: unimplemented"); + throw Internal_Error("FIXME: unimplemented"); } } -- cgit v1.2.3