]> git.meshlink.io Git - meshlink/commitdiff
Allow running without ECDSA keys If ExperimentalProtocol is not explicitly set.
authorGuus Sliepen <guus@tinc-vpn.org>
Sun, 8 Dec 2013 20:06:03 +0000 (21:06 +0100)
committerGuus Sliepen <guus@tinc-vpn.org>
Sun, 8 Dec 2013 20:10:06 +0000 (21:10 +0100)
To make upgrading less painful, allow running tinc 1.1 without ECDSA keys
unless ExperimentalProtocol is explicitly set to yes.

src/net_setup.c

index 0085598e743f0f3259ae743b3d0f3f2c94ff64d0..c7f8faa3f49ac7faf5ee91572ff0de9abde3096a 100644 (file)
@@ -673,10 +673,13 @@ static bool setup_myself(void) {
 
        myself->options |= PROT_MINOR << 24;
 
-       get_config_bool(lookup_config(config_tree, "ExperimentalProtocol"), &experimental);
-
-       if(experimental && !read_ecdsa_private_key())
-               return false;
+       if(!get_config_bool(lookup_config(config_tree, "ExperimentalProtocol"), &experimental)) {
+               experimental = read_ecdsa_private_key();
+               logger(DEBUG_ALWAYS, LOG_WARNING, "Support for SPTPS disabled.");
+       } else {
+               if(experimental && !read_ecdsa_private_key())
+                       return false;
+       }
 
        if(!read_rsa_private_key())
                return false;