Commit 3f482d9 1 parent 611340f commit 3f482d9 Copy full SHA for 3f482d9
File tree 1 file changed +10
-1
lines changed
1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -64,13 +64,22 @@ impl fmt::Debug for KeyPairKind {
64
64
/// `openssl genrsa` doesn't work. See ring's [documentation](ring::signature::RsaKeyPair::from_pkcs8)
65
65
/// for how to generate RSA keys in the wanted format
66
66
/// and conversion between the formats.
67
- #[ derive( Debug ) ]
68
67
pub struct KeyPair {
69
68
pub ( crate ) kind : KeyPairKind ,
70
69
pub ( crate ) alg : & ' static SignatureAlgorithm ,
71
70
pub ( crate ) serialized_der : Vec < u8 > ,
72
71
}
73
72
73
+ impl fmt:: Debug for KeyPair {
74
+ fn fmt ( & self , f : & mut fmt:: Formatter < ' _ > ) -> fmt:: Result {
75
+ f. debug_struct ( "KeyPair" )
76
+ . field ( "kind" , & self . kind )
77
+ . field ( "alg" , & self . alg )
78
+ . field ( "serialized_der" , & "[secret key elided]" )
79
+ . finish ( )
80
+ }
81
+ }
82
+
74
83
impl KeyPair {
75
84
/// Generate a new random [`PKCS_ECDSA_P256_SHA256`] key pair
76
85
#[ cfg( feature = "crypto" ) ]
You can’t perform that action at this time.
0 commit comments