File tree 3 files changed +12
-4
lines changed
3 files changed +12
-4
lines changed Original file line number Diff line number Diff line change @@ -362,7 +362,8 @@ where
362
362
let mut encapsulate_bytes = vec ! [ 0u8 ; self . algorithm. encapsulate_key_size( ) ] ;
363
363
let encapsulate_key_size = self
364
364
. evp_pkey
365
- . as_const ( ) . marshal_raw_public_to_buffer ( & mut encapsulate_bytes) ?;
365
+ . as_const ( )
366
+ . marshal_raw_public_to_buffer ( & mut encapsulate_bytes) ?;
366
367
367
368
debug_assert_eq ! ( encapsulate_key_size, encapsulate_bytes. len( ) ) ;
368
369
encapsulate_bytes. truncate ( encapsulate_key_size) ;
Original file line number Diff line number Diff line change @@ -71,7 +71,8 @@ impl AsDer<Pkcs8V1Der<'static>> for PqdsaPrivateKey<'_> {
71
71
Ok ( Pkcs8V1Der :: new (
72
72
self . 0
73
73
. evp_pkey
74
- . as_const ( ) . marshal_rfc5208_private_key ( pkcs8:: Version :: V1 ) ?,
74
+ . as_const ( )
75
+ . marshal_rfc5208_private_key ( pkcs8:: Version :: V1 ) ?,
75
76
) )
76
77
}
77
78
}
@@ -171,7 +172,9 @@ impl PqdsaKeyPair {
171
172
/// Returns `Unspecified` if serialization fails.
172
173
pub fn to_pkcs8 ( & self ) -> Result < Document , Unspecified > {
173
174
Ok ( Document :: new (
174
- self . evp_pkey . as_const ( ) . marshal_rfc5208_private_key ( Version :: V1 ) ?,
175
+ self . evp_pkey
176
+ . as_const ( )
177
+ . marshal_rfc5208_private_key ( Version :: V1 ) ?,
175
178
) )
176
179
}
177
180
Original file line number Diff line number Diff line change @@ -21,7 +21,11 @@ pub(in crate::rsa) mod rfc8017 {
21
21
let mut pubkey_bytes = null_mut :: < u8 > ( ) ;
22
22
let mut outlen: usize = 0 ;
23
23
if 1 != unsafe {
24
- RSA_public_key_to_bytes ( & mut pubkey_bytes, & mut outlen, * pubkey. as_const ( ) . get_rsa ( ) ?)
24
+ RSA_public_key_to_bytes (
25
+ & mut pubkey_bytes,
26
+ & mut outlen,
27
+ * pubkey. as_const ( ) . get_rsa ( ) ?,
28
+ )
25
29
} {
26
30
return Err ( Unspecified ) ;
27
31
}
You can’t perform that action at this time.
0 commit comments