summaryrefslogtreecommitdiff
path: root/src/kdm.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2014-01-08 10:05:49 +0000
committerCarl Hetherington <cth@carlh.net>2014-01-08 10:05:49 +0000
commit83591a4390db550a7d1495b9699c62315e2d7710 (patch)
tree29c93f38853ae2d99c7bca8c7b52d2c294881c0e /src/kdm.cc
parent3a148fab61d2b23379589a4f0f256c21950742b8 (diff)
Throw better file errors (with numbers).
Diffstat (limited to 'src/kdm.cc')
-rw-r--r--src/kdm.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/kdm.cc b/src/kdm.cc
index 9d40cff7..4132b242 100644
--- a/src/kdm.cc
+++ b/src/kdm.cc
@@ -52,13 +52,13 @@ KDM::KDM (boost::filesystem::path kdm, boost::filesystem::path private_key)
FILE* private_key_file = fopen_boost (private_key, "r");
if (!private_key_file) {
- throw FileError ("could not find RSA private key file", private_key);
+ throw FileError ("could not find RSA private key file", private_key, errno);
}
RSA* rsa = PEM_read_RSAPrivateKey (private_key_file, 0, 0, 0);
fclose (private_key_file);
if (!rsa) {
- throw FileError ("could not read RSA private key file", private_key);
+ throw FileError ("could not read RSA private key file", private_key, errno);
}
/* Use it to decrypt the keys */