You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
chore: update the rcgen dev dependency for the API server (#330)
This needed to be done manually due to breaking changes that occurred in
[v0.13.0](https://github.com/rustls/rcgen/releases/tag/v0.13.0).
More context:
The `generate_simple_self_signed` used to be implemented this way prior
to `0.13.0`:
```rust
pub fn generate_simple_self_signed(
subject_alt_names: impl Into<Vec<String>>,
) -> Result<Certificate, Error> {
Certificate::from_params(CertificateParams::new(subject_alt_names))
}
```
(link
[here](https://github.com/rustls/rcgen/blob/1d2df16085eacf2fe9cd0f54dcb2ccc5980c9a8e/rcgen/src/lib.rs#L106))
But in `0.13.0` was updated to this, and now returns a `CertifiedKey`
instead of just a `Certificate`:
```rust
pub fn generate_simple_self_signed(
subject_alt_names: impl Into<Vec<String>>,
) -> Result<CertifiedKey, Error> {
let key_pair = KeyPair::generate()?;
let cert = CertificateParams::new(subject_alt_names)?.self_signed(&key_pair)?;
Ok(CertifiedKey { cert, key_pair })
}
```
(see
[here](https://github.com/rustls/rcgen/blob/447322c693d6ef6420ce61fdcdb6de516c04660a/rcgen/src/lib.rs#L124))
And beyond that in general some things have been moved around.
0 commit comments