Commit Diff


commit - 5d160453f27672bda82e8497aa96a4230705ffbd
commit + 89cfcb456921ed65a812b6e960de390553ac0ae5
blob - 3b19dea29be1114a6755a2c9fa0e859d00cae3e6
blob + a9c972f6368b99b0314acf1515e0fe04866e38d3
--- config.c
+++ config.c
@@ -206,17 +206,13 @@ config_send_kp(struct privsep *ps, int cert_type, int 
 	}
 	if (conf->use_privsep_crypto &&
 	    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)