diff options
Diffstat (limited to 'src/signer.cc')
| -rw-r--r-- | src/signer.cc | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/signer.cc b/src/signer.cc index 8f0114a2..a0d9912a 100644 --- a/src/signer.cc +++ b/src/signer.cc @@ -114,7 +114,10 @@ Signer::add_signature_value (xmlpp::Node* parent, string ns) const throw MiscError ("could not create signature context"); } - signature_context->signKey = xmlSecCryptoAppKeyLoad (_key.string().c_str(), xmlSecKeyDataFormatPem, 0, 0, 0); + signature_context->signKey = xmlSecCryptoAppKeyLoadMemory ( + reinterpret_cast<const unsigned char *> (_key.c_str()), _key.size(), xmlSecKeyDataFormatPem, 0, 0, 0 + ); + if (signature_context->signKey == 0) { throw FileError ("could not load private key file", _key, 0); } |
