X-Git-Url: https://www.tinc-vpn.org/git/browse?p=tinc;a=blobdiff_plain;f=src%2Fnet_setup.c;h=6157993cccd3deabdf7eee7aafbfb5b9e5ae3ea8;hp=421315b8fbf5eb2d77114177cab13307f5381154;hb=51bddfd4dd95161afae2cac4aa5d31970fef5714;hpb=3d41e7d71247998b7c4a3dd4eacb93bd3529428d diff --git a/src/net_setup.c b/src/net_setup.c index 421315b8..6157993c 100644 --- a/src/net_setup.c +++ b/src/net_setup.c @@ -747,7 +747,9 @@ static bool setup_myself(void) { if(!get_config_string(lookup_config(config_tree, "Cipher"), &cipher)) cipher = xstrdup("blowfish"); - if(!(myself->incipher = cipher_open_by_name(cipher))) { + if(!strcasecmp(cipher, "none")) { + myself->incipher = NULL; + } else if(!(myself->incipher = cipher_open_by_name(cipher))) { logger(DEBUG_ALWAYS, LOG_ERR, "Unrecognized cipher type!"); return false; } @@ -769,7 +771,9 @@ static bool setup_myself(void) { if(!get_config_string(lookup_config(config_tree, "Digest"), &digest)) digest = xstrdup("sha1"); - if(!(myself->indigest = digest_open_by_name(digest, maclength))) { + if(!strcasecmp(digest, "none")) { + myself->indigest = NULL; + } else if(!(myself->indigest = digest_open_by_name(digest, maclength))) { logger(DEBUG_ALWAYS, LOG_ERR, "Unrecognized digest type!"); return false; }