aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/pubkey
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/pubkey')
-rw-r--r--src/lib/pubkey/pkcs8.cpp4
-rw-r--r--src/lib/pubkey/x509_key.cpp4
2 files changed, 4 insertions, 4 deletions
diff --git a/src/lib/pubkey/pkcs8.cpp b/src/lib/pubkey/pkcs8.cpp
index 8d3eba6dc..c91e436c7 100644
--- a/src/lib/pubkey/pkcs8.cpp
+++ b/src/lib/pubkey/pkcs8.cpp
@@ -97,7 +97,7 @@ secure_vector<uint8_t> PKCS8_decode(
}
catch(Decoding_Error& e)
{
- throw Decoding_Error("PKCS #8 private key decoding failed: " + std::string(e.what()));
+ throw Decoding_Error("PKCS #8 private key decoding", e);
}
try
@@ -126,7 +126,7 @@ secure_vector<uint8_t> PKCS8_decode(
}
catch(std::exception& e)
{
- throw Decoding_Error("PKCS #8 private key decoding failed: " + std::string(e.what()));
+ throw Decoding_Error("PKCS #8 private key decoding", e);
}
return key;
}
diff --git a/src/lib/pubkey/x509_key.cpp b/src/lib/pubkey/x509_key.cpp
index 6e49d953a..fff75ec44 100644
--- a/src/lib/pubkey/x509_key.cpp
+++ b/src/lib/pubkey/x509_key.cpp
@@ -62,13 +62,13 @@ Public_Key* load_key(DataSource& source)
}
if(key_bits.empty())
- throw Decoding_Error("X.509 public key decoding failed");
+ throw Decoding_Error("X.509 public key decoding");
return load_public_key(alg_id, key_bits).release();
}
catch(Decoding_Error& e)
{
- throw Decoding_Error("X.509 public key decoding failed: " + std::string(e.what()));
+ throw Decoding_Error("X.509 public key decoding", e);
}
}