We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7386b08 commit ee7f798Copy full SHA for ee7f798
src/main.rs
@@ -50,7 +50,13 @@ impl CertAuth {
50
let keypair = rcgen::KeyPair::generate().unwrap();
51
let cert = params.self_signed(&keypair).unwrap();
52
53
- let path = "/tmp/fopro-ca.crt";
+ let temp_dir = std::env::temp_dir();
54
+ if !temp_dir.exists() {
55
+ tracing::info!("Creating temp dir {temp_dir:?}");
56
+ std::fs::create_dir_all(&temp_dir).unwrap();
57
+ }
58
+ let path = temp_dir.join("fopro-ca.crt");
59
+
60
tokio::fs::write(path, cert.pem()).await.unwrap();
61
tracing::info!("Wrote CA cert to /tmp/fopro-ca.crt (in PEM format)");
62
0 commit comments