From 5a427f84fc01bca2a4e62f79a4bbfe8d8c5c08f9 Mon Sep 17 00:00:00 2001 From: Aki Tuomi Date: Mon, 26 Oct 2015 17:51:24 +0200 Subject: [PATCH] Improve token not found error --- pdns/pkcs11signers.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pdns/pkcs11signers.cc b/pdns/pkcs11signers.cc index d156166aa..8db7a2667 100644 --- a/pdns/pkcs11signers.cc +++ b/pdns/pkcs11signers.cc @@ -666,9 +666,9 @@ CK_RV Pkcs11Slot::HuntSlot(const string& tokenId, CK_SLOT_ID &slotId, _CK_SLOT_I L< Pkcs11Slot::GetSlot(const std::string& module, const string& tokenId) { @@ -698,7 +698,7 @@ std::shared_ptr Pkcs11Slot::GetSlot(const std::string& module, const CK_SLOT_ID slotId; if ((err = Pkcs11Slot::HuntSlot(tokenId, slotId, &info, functions))) { - throw PDNSException(std::string("Cannot find PKCS#11 token ") + tokenId + std::string(" on module ") + module + std::string(": error code ") + boost::lexical_cast(err)); + throw PDNSException(std::string("Cannot find PKCS#11 token ") + tokenId + std::string(" on module ") + module + std::string(": ") + boost::str( boost::format("%s (0x%X)") % p11_kit_strerror(err) % err)); } // store slot -- 2.40.0