From: Bert Hubert Date: Sun, 27 Feb 2011 09:33:39 +0000 (+0000) Subject: fix up the ECDSA from the crypto++ too for the new BIND field ordering X-Git-Tag: auth-3.0~193 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2263e8271250689bfee5032774242c06e34a1ea3;p=pdns fix up the ECDSA from the crypto++ too for the new BIND field ordering git-svn-id: svn://svn.powerdns.com/pdns/trunk/pdns@2055 d19b8d6e-7fed-0310-83ef-9ca221ded41b --- diff --git a/pdns/cryptoppsigners.cc b/pdns/cryptoppsigners.cc index de72402fe..d44255cb1 100644 --- a/pdns/cryptoppsigners.cc +++ b/pdns/cryptoppsigners.cc @@ -16,7 +16,7 @@ public: {} void create(unsigned int bits); string getName() const { return "CryptoPP ECDSA"; } - stormap_t convertToISCMap() const; + storvector_t convertToISCVector() const; std::string getPubKeyHash() const; std::string sign(const std::string& msg) const; std::string hash(const std::string& hash) const; @@ -61,7 +61,7 @@ int CryptoPPECDSADNSCryptoKeyEngine::getBits() const } template -std::map CryptoPPECDSADNSCryptoKeyEngine::convertToISCMap() const +DNSCryptoKeyEngine::storvector_t CryptoPPECDSADNSCryptoKeyEngine::convertToISCVector() const { /* Algorithm: 13 (ECDSAP256SHA256) PrivateKey: GU6SnQ/Ou+xC5RumuIUIuJZteXT2z0O/ok1s38Et6mQ= */ @@ -73,14 +73,14 @@ std::map CryptoPPECDSADNSCryptoKeyEngine stormap; - stormap["Algorithm"]=algostr; + storvector_t storvect; + storvect.push_back(make_pair("Algorithm", algostr)); const CryptoPP::Integer& pe=d_key->GetPrivateExponent(); unsigned char buffer[pe.MinEncodedSize()]; pe.Encode(buffer, pe.MinEncodedSize()); - stormap["PrivateKey"] = string((char*)buffer, sizeof(buffer)); - return stormap; + storvect.push_back(make_pair("PrivateKey", string((char*)buffer, sizeof(buffer)))); + return storvect; } template void CryptoPPECDSADNSCryptoKeyEngine::fromISCMap(DNSKEYRecordContent& drc, std::map& stormap )