projects
/
tinc
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
connection_t: allocate legacy context on first use
[tinc]
/
src
/
net_setup.c
diff --git
a/src/net_setup.c
b/src/net_setup.c
index
a829e82
..
f2534a4
100644
(file)
--- a/
src/net_setup.c
+++ b/
src/net_setup.c
@@
-788,9
+788,11
@@
static bool setup_myself(void) {
}
}
}
}
-
myself->connection->
rsa = read_rsa_private_key(&config_tree, NULL);
+
rsa_t *
rsa = read_rsa_private_key(&config_tree, NULL);
- if(!myself->connection->rsa) {
+ if(rsa) {
+ myself->connection->legacy = new_legacy_ctx(rsa);
+ } else {
if(experimental) {
logger(DEBUG_ALWAYS, LOG_WARNING, "Support for legacy protocol disabled.");
} else {
if(experimental) {
logger(DEBUG_ALWAYS, LOG_WARNING, "Support for legacy protocol disabled.");
} else {