diff options
author | Omar Polo <op@omarpolo.com> | 2023-06-12 21:09:49 +0000 |
---|---|---|
committer | Omar Polo <op@omarpolo.com> | 2023-06-12 21:09:49 +0000 |
commit | 89cfcb456921ed65a812b6e960de390553ac0ae5 (patch) | |
tree | 3cc4f818cdc2ffb002bfb282192654c9560ba909 /config.c | |
parent | 5d160453f27672bda82e8497aa96a4230705ffbd (diff) |
simplify config_send_kp: use config_send_file
Diffstat (limited to 'config.c')
-rw-r--r-- | config.c | 6 |
1 files changed, 1 insertions, 5 deletions
@@ -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) |