File tree Expand file tree Collapse file tree 3 files changed +7
-13
lines changed Expand file tree Collapse file tree 3 files changed +7
-13
lines changed Original file line number Diff line number Diff line change @@ -142,12 +142,9 @@ impl CertContext {
142
142
) ;
143
143
144
144
for ( index, element) in elements. iter ( ) . enumerate ( ) {
145
- if index != 0 {
146
- if 0 != ( ( * * element) . TrustStatus . dwInfoStatus
147
- & CERT_TRUST_IS_SELF_SIGNED )
148
- {
149
- break ;
150
- }
145
+ if index != 0 && 0 != ( ( * * element) . TrustStatus . dwInfoStatus
146
+ & CERT_TRUST_IS_SELF_SIGNED ) {
147
+ break ;
151
148
}
152
149
153
150
let context = ( * * element) . pCertContext ;
Original file line number Diff line number Diff line change @@ -139,7 +139,7 @@ impl CngSigner {
139
139
140
140
unsafe {
141
141
let status = BCryptHash (
142
- alg as * mut core :: ffi :: c_void ,
142
+ alg,
143
143
std:: ptr:: null_mut ( ) , // pbSecret
144
144
0 , // cbSecret
145
145
message. as_ptr ( ) as * mut u8 ,
Original file line number Diff line number Diff line change @@ -227,12 +227,9 @@ impl CertStore {
227
227
CERT_SHA256_HASH_PROP_ID ,
228
228
prop_data. as_mut_ptr ( ) as * mut c_void ,
229
229
& mut prop_data_len,
230
- ) != 0
231
- {
232
- if prop_data[ ..prop_data_len as usize ] == sha256_hash[ ..] {
233
- let cert = CertDuplicateCertificateContext ( cert) ;
234
- certs. push ( CertContext :: new_owned ( cert) )
235
- }
230
+ ) != 0 && prop_data[ ..prop_data_len as usize ] == sha256_hash[ ..] {
231
+ let cert = CertDuplicateCertificateContext ( cert) ;
232
+ certs. push ( CertContext :: new_owned ( cert) )
236
233
}
237
234
}
238
235
}
You can’t perform that action at this time.
0 commit comments