pub(crate) fn init(directory: &Path) -> Result<(Identity, Vec<u8>)> {
    let ca = generate_or_load_identity("cln Root CA", directory, "ca", None)?;
    let server = generate_or_load_identity("cln grpc Server", directory, "server", Some(&ca))?;
    let _client = generate_or_load_identity("cln grpc Client", directory, "client", Some(&ca))?;
    Ok((server, ca.certificate))
}
/// Ensure that we have a certificate authority, and child keypairs
/// and certificates for the server and the client. It'll generate
/// them in the provided `directory`. The following files are
/// included:
///
/// - `ca.pem`: The self-signed certificate of the CA
/// - `ca-key.pem`: The key used by the CA to sign certificates
/// - `server.pem`: The server certificate, signed by the CA
/// - `server-key.pem`: The server private key
/// - `client.pem`: The client certificate, signed by the CA
/// - `client-key.pem`: The client private key
///
/// The `grpc-plugin` will use the `server.pem` certificate, while a
/// client is supposed to use the `client.pem` and associated
/// keys. Notice that this isn't strictly necessary since the server
/// will accept any client that is signed by the CA. In future we
/// might add runes, making the distinction more important.
///
/// Returns the server identity and the root CA certificate.
Ensure that we have a certificate authority, and child keypairs
and certificates for the server and the client. It'll generate
them in the provided `directory`. The following files are
included.





Returns the server identity and the root CA certificate.
Ensure that we have a certificate authority and child keypairs and certificates for the server and the client . It ' ll generate them in the provided ` directory ` . The following files are included . Returns the server identity and the root CA certificate .
pub(crate) fn init(directory: &Path) -> Result<(Identity, Vec<u8>)> {
    let ca = generate_or_load_identity("cln Root CA", directory, "ca", None)?;
    let server = generate_or_load_identity("cln grpc Server", directory, "server", Some(&ca))?;
    let _client = generate_or_load_identity("cln grpc Client", directory, "client", Some(&ca))?;
    Ok((server, ca.certificate))
}
pub ( crate ) fn init ( directory : & Path ) -> Result < ( Identity , Vec < u8 > ) > { let ca = generate_or_load_identity ( " " , directory , " " , None ) ? ; let server = generate_or_load_identity ( " " , directory , " " , Some ( & ca ) ) ? ; let _client = generate_or_load_identity ( " " , directory , " " , Some ( & ca ) ) ? ; Ok ( ( server , ca . certificate ) ) }
Ensure that we have a certificate authority, and child keypairs
and certificates for the server and the client.
Ensure that we have a certificate authority and child keypairs and certificates for the server and the client .
directory
&Path