aboutsummaryrefslogtreecommitdiff
path: root/config.c
diff options
context:
space:
mode:
authorOmar Polo <op@omarpolo.com>2023-06-12 21:09:49 +0000
committerOmar Polo <op@omarpolo.com>2023-06-12 21:09:49 +0000
commit89cfcb456921ed65a812b6e960de390553ac0ae5 (patch)
tree3cc4f818cdc2ffb002bfb282192654c9560ba909 /config.c
parent5d160453f27672bda82e8497aa96a4230705ffbd (diff)
simplify config_send_kp: use config_send_file
Diffstat (limited to 'config.c')
-rw-r--r--config.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/config.c b/config.c
index 3b19dea..a9c972f 100644
--- a/config.c
+++ b/config.c
@@ -208,15 +208,11 @@ config_send_kp(struct privsep *ps, int cert_type, int key_type,
config_send_file(ps, PROC_CRYPTO, cert_type, d, NULL, 0) == -1)
return -1;
- log_debug("sending %s", key);
- if ((fd = open(key, O_RDONLY)) == -1)
- return -1;
-
key_target = PROC_CRYPTO;
if (!conf->use_privsep_crypto)
key_target = PROC_SERVER;
- if (config_send_file(ps, key_target, key_type, fd, NULL, 0) == -1)
+ if (config_open_send(ps, key_target, key_type, key) == -1)
return -1;
if (proc_flush_imsg(ps, PROC_SERVER, -1) == -1)