pub fn write_key_data(
writer: &mut dyn Write,
tpm_key: &TpmKey,
output: Option<&Path>,
encoding: OutputEncoding,
) -> Result<(), CommandError>Expand description
Handles the output of a TpmKey, choosing PEM or DER format based on the
URI.
It will either save it to a file or print it to stdout as PEM, based on the provided output string.
ยงErrors
Returns CommandError on failure.