summaryrefslogtreecommitdiff
path: root/src/signer.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2014-03-15 17:49:40 +0000
committerCarl Hetherington <cth@carlh.net>2014-03-15 17:49:40 +0000
commit6e72e1d36f23a4236c4677f22792a6a4590943a3 (patch)
tree7a205cfb00d3c9bd0f74cd8003aaef19bdd558fc /src/signer.cc
parent57d6bed6141838329b1039ab52c66cc98273af91 (diff)
Clean up OS X build slightly. Better error on failure of xmlSecDSigCtxSign.
Diffstat (limited to 'src/signer.cc')
-rw-r--r--src/signer.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/signer.cc b/src/signer.cc
index 63da8d8e..11cf5eb8 100644
--- a/src/signer.cc
+++ b/src/signer.cc
@@ -25,6 +25,7 @@
#include <libcxml/cxml.h>
#include "signer.h"
#include "exceptions.h"
+#include "compose.hpp"
using std::string;
using std::list;
@@ -107,8 +108,9 @@ Signer::add_signature_value (xmlpp::Node* parent, string ns) const
throw MiscError ("could not set key name");
}
- if (xmlSecDSigCtxSign (signature_context, parent->cobj ()) < 0) {
- throw MiscError ("could not sign");
+ int const r = xmlSecDSigCtxSign (signature_context, parent->cobj ());
+ if (r < 0) {
+ throw MiscError (String::compose ("could not sign (%1)", r));
}
xmlSecDSigCtxDestroy (signature_context);