File tree 1 file changed +3
-3
lines changed
1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -61,6 +61,8 @@ impl InReleaseVerifier {
61
61
}
62
62
63
63
pub fn from_key_block ( block : & str , trusted : bool ) -> VerifyResult < Self > {
64
+ // 这个点存在只是表示换行,因此把它替换掉
65
+ let block = block. replace ( '.' , "" ) ;
64
66
let mut certs: Vec < Cert > = Vec :: new ( ) ;
65
67
let ppr = PacketParserBuilder :: from_bytes ( block. as_bytes ( ) ) ?. build ( ) ?;
66
68
let cert = CertParser :: from ( ppr) ;
@@ -141,9 +143,7 @@ pub fn verify_inrelease(
141
143
& p,
142
144
None ,
143
145
if let Some ( deb822_inner_signed_by_str) = deb822_inner_signed_by_str {
144
- // 这个点存在只是表示换行,因此把它替换掉
145
- let signed_by_str = deb822_inner_signed_by_str. replace ( '.' , "" ) ;
146
- InReleaseVerifier :: from_key_block ( & signed_by_str, trusted) ?
146
+ InReleaseVerifier :: from_key_block ( deb822_inner_signed_by_str, trusted) ?
147
147
} else {
148
148
InReleaseVerifier :: from_paths ( & certs, trusted) ?
149
149
} ,
You can’t perform that action at this time.
0 commit comments