MCPcopy Create free account
hub / github.com/ElementsProject/lightning / to_key

Method to_key

plugins/grpc-plugin/src/tls.rs:15–19  ·  view source on GitHub ↗
(&self)

Source from the content-addressed store, hash-verified

13
14impl Identity {
15 fn to_key(&self) -> Result<KeyPair> {
16 let keystr = String::from_utf8_lossy(&self.key);
17 let key = KeyPair::from_pem(&keystr)?;
18 Ok(key)
19 }
20
21 pub fn to_tonic_identity(&self) -> tonic::transport::Identity {
22 tonic::transport::Identity::from_pem(&self.certificate, &self.key)

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected