]> granicus.if.org Git - pdns/commitdiff
DNSCrypt: Document certificates versions
authorRemi Gacogne <remi.gacogne@powerdns.com>
Sun, 29 Oct 2017 17:50:04 +0000 (18:50 +0100)
committerRemi Gacogne <remi.gacogne@powerdns.com>
Thu, 8 Mar 2018 09:05:23 +0000 (10:05 +0100)
pdns/dnsdist-lua-vars.cc
pdns/dnsdistdist/docs/reference/dnscrypt.rst

index 8c9ec6fce3e28872f48a156b5a4aab410d4aa682..5699decb0706562589c4afe9c367a0d449697e9b 100644 (file)
@@ -94,4 +94,11 @@ void setupLuaVars()
   for(const auto& n : rcodes)
     dd.push_back({n.first, n.second});
   g_lua.writeVariable("dnsdist", dd);
+
+#ifdef HAVE_DNSCRYPT
+    g_lua.writeVariable("DNSCryptExchangeVersion", std::unordered_map<string,int>{
+        { "VERSION1", DNSCryptExchangeVersion::VERSION1 },
+        { "VERSION2", DNSCryptExchangeVersion::VERSION2 },
+    });
+#endif
 }
index 75ef9f2fe540b9a0e0af25d020eb88ad5282920f..f023e96a8443363befd4f567e774f625d7f040f2 100644 (file)
@@ -26,7 +26,7 @@ DNSCrypt objects and functions
   :param string publicKey: path to write the public key to
   :param string privateKey: path to write the private key to
 
-.. function:: generateDNSCryptCertificate(privatekey, certificate, keyfile, serial, validFrom, validUntil)
+.. function:: generateDNSCryptCertificate(privatekey, certificate, keyfile, serial, validFrom, validUntil, version)
 
   generate a new resolver private key and related certificate, valid from the ``validFrom`` UNIX timestamp until the ``validUntil`` one, signed with the provider private key.
 
@@ -36,6 +36,7 @@ DNSCrypt objects and functions
   :param int serial: The certificate's serial number.
   :param int validFrom: Unix timestamp from when the certificate will be valid.
   :param int validUntil: Unix timestamp until when the certificate will be valid.
+  :param DNSCryptExchangeVersion version: The exchange version to use. Possible values are ``DNSCryptExchangeVersion::VERSION1`` (default, X25519-XSalsa20Poly1305) and ``DNSCryptExchangeVersion::VERSION2`` (X25519-XChacha20Poly1305).
 
 .. function:: printDNSCryptProviderFingerprint(keyfile)