pub fn extract_public(
path: &Path,
out: Option<&Path>,
) -> Result<(), GitwayError>Expand description
Extracts the public key from a private-key file and writes it to out.
If out is None, the public key is written to <path>.pub.
Passphrase handling: if the private key is encrypted, passphrase must
be supplied. Public-key extraction does not strictly require decryption
(the public part is stored alongside the private), so an unencrypted
.pub is still produced.
ยงErrors
Returns GitwayError on I/O or parsing failure.