Skip to content

Commit

Permalink
feat(tls): Implement AsMut for Certificate (#1621)
Browse files Browse the repository at this point in the history
  • Loading branch information
tottoto committed Feb 8, 2024
1 parent 23106dd commit 4263f87
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tonic/src/transport/tls.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,12 @@ impl AsRef<[u8]> for Certificate {
}
}

impl AsMut<[u8]> for Certificate {
fn as_mut(&mut self) -> &mut [u8] {
self.pem.as_mut()
}
}

impl Identity {
/// Parse a PEM encoded certificate and private key.
///
Expand Down

0 comments on commit 4263f87

Please sign in to comment.