@@ -76,12 +76,18 @@ impl RSAPublicKey {
7676}
7777
7878#[ doc( hidden) ]
79- #[ derive( Debug , Clone ) ]
79+ #[ derive( Clone ) ]
8080pub struct RSAKeyPair {
8181 rsa_sk : Rsa < Private > ,
8282 metadata : Option < KeyMetadata > ,
8383}
8484
85+ impl std:: fmt:: Debug for RSAKeyPair {
86+ fn fmt ( & self , f : & mut std:: fmt:: Formatter < ' _ > ) -> std:: fmt:: Result {
87+ write ! ( f, "Rsa" )
88+ }
89+ }
90+
8591impl AsRef < Rsa < Private > > for RSAKeyPair {
8692 fn as_ref ( & self ) -> & Rsa < Private > {
8793 & self . rsa_sk
@@ -255,12 +261,18 @@ pub trait RSAPublicKeyLike {
255261 }
256262}
257263
258- #[ derive( Debug , Clone ) ]
264+ #[ derive( Clone ) ]
259265pub struct RS256KeyPair {
260266 key_pair : RSAKeyPair ,
261267 key_id : Option < String > ,
262268}
263269
270+ impl std:: fmt:: Debug for RS256KeyPair {
271+ fn fmt ( & self , f : & mut std:: fmt:: Formatter < ' _ > ) -> std:: fmt:: Result {
272+ write ! ( f, "Rsa" )
273+ }
274+ }
275+
264276#[ derive( Debug , Clone ) ]
265277pub struct RS256PublicKey {
266278 pk : RSAPublicKey ,
@@ -417,12 +429,18 @@ impl RS256PublicKey {
417429
418430//
419431
420- #[ derive( Debug , Clone ) ]
432+ #[ derive( Clone ) ]
421433pub struct RS512KeyPair {
422434 key_pair : RSAKeyPair ,
423435 key_id : Option < String > ,
424436}
425437
438+ impl std:: fmt:: Debug for RS512KeyPair {
439+ fn fmt ( & self , f : & mut std:: fmt:: Formatter < ' _ > ) -> std:: fmt:: Result {
440+ write ! ( f, "Rsa" )
441+ }
442+ }
443+
426444#[ derive( Debug , Clone ) ]
427445pub struct RS512PublicKey {
428446 pk : RSAPublicKey ,
@@ -579,12 +597,18 @@ impl RS512PublicKey {
579597
580598//
581599
582- #[ derive( Debug , Clone ) ]
600+ #[ derive( Clone ) ]
583601pub struct RS384KeyPair {
584602 key_pair : RSAKeyPair ,
585603 key_id : Option < String > ,
586604}
587605
606+ impl std:: fmt:: Debug for RS384KeyPair {
607+ fn fmt ( & self , f : & mut std:: fmt:: Formatter < ' _ > ) -> std:: fmt:: Result {
608+ write ! ( f, "Rsa" )
609+ }
610+ }
611+
588612#[ derive( Debug , Clone ) ]
589613pub struct RS384PublicKey {
590614 pk : RSAPublicKey ,
@@ -741,12 +765,18 @@ impl RS384PublicKey {
741765
742766//
743767
744- #[ derive( Debug , Clone ) ]
768+ #[ derive( Clone ) ]
745769pub struct PS256KeyPair {
746770 key_pair : RSAKeyPair ,
747771 key_id : Option < String > ,
748772}
749773
774+ impl std:: fmt:: Debug for PS256KeyPair {
775+ fn fmt ( & self , f : & mut std:: fmt:: Formatter < ' _ > ) -> std:: fmt:: Result {
776+ write ! ( f, "Rsa" )
777+ }
778+ }
779+
750780#[ derive( Debug , Clone ) ]
751781pub struct PS256PublicKey {
752782 pk : RSAPublicKey ,
@@ -895,12 +925,18 @@ impl PS256PublicKey {
895925
896926//
897927
898- #[ derive( Debug , Clone ) ]
928+ #[ derive( Clone ) ]
899929pub struct PS512KeyPair {
900930 key_pair : RSAKeyPair ,
901931 key_id : Option < String > ,
902932}
903933
934+ impl std:: fmt:: Debug for PS512KeyPair {
935+ fn fmt ( & self , f : & mut std:: fmt:: Formatter < ' _ > ) -> std:: fmt:: Result {
936+ write ! ( f, "Rsa" )
937+ }
938+ }
939+
904940#[ derive( Debug , Clone ) ]
905941pub struct PS512PublicKey {
906942 pk : RSAPublicKey ,
@@ -1057,12 +1093,18 @@ impl PS512PublicKey {
10571093
10581094//
10591095
1060- #[ derive( Debug , Clone ) ]
1096+ #[ derive( Clone ) ]
10611097pub struct PS384KeyPair {
10621098 key_pair : RSAKeyPair ,
10631099 key_id : Option < String > ,
10641100}
10651101
1102+ impl std:: fmt:: Debug for PS384KeyPair {
1103+ fn fmt ( & self , f : & mut std:: fmt:: Formatter < ' _ > ) -> std:: fmt:: Result {
1104+ write ! ( f, "Rsa" )
1105+ }
1106+ }
1107+
10661108#[ derive( Debug , Clone ) ]
10671109pub struct PS384PublicKey {
10681110 pk : RSAPublicKey ,
0 commit comments