File tree Expand file tree Collapse file tree 1 file changed +1
-8
lines changed
Expand file tree Collapse file tree 1 file changed +1
-8
lines changed Original file line number Diff line number Diff line change @@ -594,14 +594,7 @@ pub fn parse_param(kv: &str) -> Result<Param, std::io::Error> {
594594
595595 match annotation {
596596 Some ( "pubkey" ) => {
597- let hex_key = value. strip_prefix ( "ed25519/" ) . ok_or_else ( || Error :: new (
598- ErrorKind :: Other ,
599- "Unsupported public key type. Only hex-encoded ed25519 public keys are supported. They must start with `ed25519/`." ,
600- ) ) ?;
601- let bytes =
602- hex:: decode ( hex_key) . map_err ( |e| Error :: new ( ErrorKind :: Other , format ! ( "{}" , & e) ) ) ;
603- let pubkey = PublicKey :: from_bytes ( & bytes?, Algorithm :: Ed25519 )
604- . map_err ( |e| Error :: new ( ErrorKind :: Other , format ! ( "{}" , & e) ) ) ?;
597+ let pubkey = value. parse ( ) . map_err ( Error :: other) ?;
605598 Ok ( Param :: PublicKey ( name. to_string ( ) , pubkey) )
606599 } ,
607600 Some ( "integer" ) => {
You can’t perform that action at this time.
0 commit comments