From: Fred Morcos Date: Thu, 9 Feb 2023 16:35:10 +0000 (+0100) Subject: Auto format sodiumsigners.cc X-Git-Tag: dnsdist-1.8.0-rc1~18^2~10 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=90be1ce77f2bfd5eeb0811c95e4a68ee86f69965;p=thirdparty%2Fpdns.git Auto format sodiumsigners.cc --- diff --git a/.not-formatted b/.not-formatted index 42c8e93dc6..9e5ef9e135 100644 --- a/.not-formatted +++ b/.not-formatted @@ -244,7 +244,6 @@ ./pdns/snmp-agent.hh ./pdns/sodcrypto.cc ./pdns/sodcrypto.hh -./pdns/sodiumsigners.cc ./pdns/sortlist.cc ./pdns/sortlist.hh ./pdns/speedtest.cc diff --git a/pdns/sodiumsigners.cc b/pdns/sodiumsigners.cc index 4d7cf8df87..7b0768349e 100644 --- a/pdns/sodiumsigners.cc +++ b/pdns/sodiumsigners.cc @@ -1,6 +1,7 @@ #include #include -extern "C" { +extern "C" +{ #ifdef HAVE_CONFIG_H #include "config.h" #endif @@ -12,7 +13,8 @@ extern "C" { class SodiumED25519DNSCryptoKeyEngine : public DNSCryptoKeyEngine { public: - explicit SodiumED25519DNSCryptoKeyEngine(unsigned int algo) : DNSCryptoKeyEngine(algo) + explicit SodiumED25519DNSCryptoKeyEngine(unsigned int algo) : + DNSCryptoKeyEngine(algo) {} string getName() const override { return "Sodium ED25519"; } void create(unsigned int bits) override; @@ -70,8 +72,8 @@ private: void SodiumED25519DNSCryptoKeyEngine::create(unsigned int bits) { - if(bits != crypto_sign_ed25519_SEEDBYTES * 8) { - throw runtime_error("Unsupported key length of "+std::to_string(bits)+" bits requested, SodiumED25519 class"); + if (bits != crypto_sign_ed25519_SEEDBYTES * 8) { + throw runtime_error("Unsupported key length of " + std::to_string(bits) + " bits requested, SodiumED25519 class"); } crypto_sign_ed25519_keypair(d_pubkey, d_seckey); } @@ -140,7 +142,7 @@ DNSCryptoKeyEngine::storvector_t SodiumED25519DNSCryptoKeyEngine::convertToISCVe return storvector; } -void SodiumED25519DNSCryptoKeyEngine::fromISCMap(DNSKEYRecordContent& drc, std::map& stormap ) +void SodiumED25519DNSCryptoKeyEngine::fromISCMap(DNSKEYRecordContent& drc, std::map& stormap) { /* Private-key-format: v1.2 @@ -194,7 +196,8 @@ bool SodiumED25519DNSCryptoKeyEngine::verify(const std::string& msg, const std:: return crypto_sign_ed25519_verify_detached((const unsigned char*)signature.c_str(), (const unsigned char*)msg.c_str(), msg.length(), d_pubkey) == 0; } -namespace { +namespace +{ const struct LoaderSodiumStruct { LoaderSodiumStruct()