diff --git a/tonic/src/transport/tls.rs b/tonic/src/transport/tls.rs index 1dd4c06a4..c2b7ef23f 100644 --- a/tonic/src/transport/tls.rs +++ b/tonic/src/transport/tls.rs @@ -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. ///