Skip to content

Commit 4a549e7

Browse files
committed
SSL directives on crt/key file contents
1 parent ca8b690 commit 4a549e7

File tree

1 file changed

+16
-2
lines changed

1 file changed

+16
-2
lines changed

backend/src/bin/load_balancer.rs

+16-2
Original file line numberDiff line numberDiff line change
@@ -275,9 +275,23 @@ http {
275275
})?;
276276

277277
let cert_file = &format!("{host}.crt.jbl");
278-
fs::write(cert_file, cert)?;
278+
fs::write(
279+
cert_file,
280+
&format!(
281+
"-----BEGIN TRUSTED CERTIFICATE-----
282+
{cert}
283+
-----END TRUSTED CERTIFICATE-----"
284+
),
285+
)?;
279286
let key_file = &format!("{host}.key.jbl");
280-
fs::write(key_file, key)?;
287+
fs::write(
288+
key_file,
289+
&format!(
290+
"-----BEGIN PRIVATE KEY-----
291+
{key}
292+
-----END PRIVATE KEY-----"
293+
),
294+
)?;
281295

282296
log::info!(
283297
"Wrote cert and key for server {host} in namespace {namespace} to files {cert_file} and {key_file}...",

0 commit comments

Comments
 (0)