}
}
- 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 {
#endif
/* Compression */
- if(get_config_int(lookup_config(&config_tree, "Compression"), &myself->incompression)) {
+ int incompression = 0;
+
+ if(get_config_int(lookup_config(&config_tree, "Compression"), &incompression)) {
+ myself->incompression = incompression;
+
switch(myself->incompression) {
case COMPRESS_LZ4:
#ifdef HAVE_LZ4
myself->incompression = COMPRESS_NONE;
}
- myself->connection->outcompression = COMPRESS_NONE;
-
/* Done */
myself->nexthop = myself;