From: Aki Tuomi Date: Sun, 17 May 2015 15:07:41 +0000 (+0300) Subject: Make sure PIN is always set to at least empty X-Git-Tag: dnsdist-1.0.0-alpha1~248^2~28^2~42^2~3 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=f0a0745b86a7b7ad947fea4f7b69defac36e1c82;p=thirdparty%2Fpdns.git Make sure PIN is always set to at least empty --- diff --git a/pdns/dnssecinfra.cc b/pdns/dnssecinfra.cc index 078159a68f..3dcfb71b6e 100644 --- a/pdns/dnssecinfra.cc +++ b/pdns/dnssecinfra.cc @@ -80,6 +80,10 @@ DNSCryptoKeyEngine* DNSCryptoKeyEngine::makeFromISCString(DNSKEYRecordContent& d if (pkcs11) { #ifdef HAVE_P11KIT1 + if (stormap.find("slot") == stormap.end()) + throw PDNSException("Cannot load PKCS#11 key, no Slot specified"); + // we need PIN to be at least empty + if (stormap.find("pin") == stormap.end()) stormap["pin"] = ""; dpk = PKCS11DNSCryptoKeyEngine::maker(algorithm); #else throw PDNSException("Cannot load PKCS#11 key without support for it");