]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
Auto format sodiumsigners.cc
authorFred Morcos <fred.morcos@open-xchange.com>
Thu, 9 Feb 2023 16:35:10 +0000 (17:35 +0100)
committerFred Morcos <fred.morcos@open-xchange.com>
Tue, 14 Feb 2023 09:09:12 +0000 (10:09 +0100)
.not-formatted
pdns/sodiumsigners.cc

index 42c8e93dc6bc3d6611521a78e012f92c7df1b31b..9e5ef9e135074eb28bd0f91c7d9cbd45eda4d80d 100644 (file)
 ./pdns/snmp-agent.hh
 ./pdns/sodcrypto.cc
 ./pdns/sodcrypto.hh
-./pdns/sodiumsigners.cc
 ./pdns/sortlist.cc
 ./pdns/sortlist.hh
 ./pdns/speedtest.cc
index 4d7cf8df8735dc7d1bfd302f94ae0acdb78b0c33..7b0768349e1f721474b082d6d6aa3e571d823bd5 100644 (file)
@@ -1,6 +1,7 @@
 #include <openssl/evp.h>
 #include <openssl/pem.h>
-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<std::string, std::string>& stormap )
+void SodiumED25519DNSCryptoKeyEngine::fromISCMap(DNSKEYRecordContent& drc, std::map<std::string, std::string>& 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()