Skip to content

Commit 4930837

Browse files
authored
fix(relay)!: change default cert format from der to pem (#3204)
## Description PEM format is probably the more used option for this use case so switching around defaults. ~~Also adding `cert_format` so you can specify `DER` as an alternative.~~ ## Breaking Changes Changes the default cert format for `Reloading` certificate mode from `DER` to `PEM` ## Notes & open questions <!-- Any notes, remarks or open questions you have to make about the PR. --> ## Change checklist <!-- Remove any that are not relevant. --> - [ ] Self-review. - [ ] Documentation updates following the [style guide](https://rust-lang.github.io/rfcs/1574-more-api-documentation-conventions.html#appendix-a-full-conventions-text), if relevant. - [ ] Tests if relevant. - [ ] All breaking changes documented. - [ ] List all breaking changes in the above "Breaking Changes" section. - [ ] Open an issue or PR on any number0 repos that are affected by this breaking change. Give guidance on how the updates should be handled or do the actual updates themselves. The major ones are: - [ ] [`quic-rpc`](https://github.com/n0-computer/quic-rpc) - [ ] [`iroh-gossip`](https://github.com/n0-computer/iroh-gossip) - [ ] [`iroh-blobs`](https://github.com/n0-computer/iroh-blobs) - [ ] [`dumbpipe`](https://github.com/n0-computer/dumbpipe) - [ ] [`sendme`](https://github.com/n0-computer/sendme)
1 parent 7acfe39 commit 4930837

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

iroh-relay/src/main.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,7 @@ struct TlsConfig {
309309
///
310310
/// Defaults to the servers' current working directory.
311311
cert_dir: Option<PathBuf>,
312-
/// Path of where to read the certificate from for the `Manual` `cert_mode`.
312+
/// Path of where to read the certificate from for the `Manual` and `Reloading` `cert_mode`.
313313
///
314314
/// Defaults to `<cert_dir>/default.crt`.
315315
///
@@ -534,11 +534,11 @@ async fn maybe_load_tls(
534534

535535
let key_reader = rustls_cert_file_reader::FileReader::new(
536536
key_path,
537-
rustls_cert_file_reader::Format::DER,
537+
rustls_cert_file_reader::Format::PEM,
538538
);
539539
let certs_reader = rustls_cert_file_reader::FileReader::new(
540540
cert_path,
541-
rustls_cert_file_reader::Format::DER,
541+
rustls_cert_file_reader::Format::PEM,
542542
);
543543

544544
let loader: CertifiedKeyLoader<

0 commit comments

Comments
 (0)