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 {
142142 ) ;
143143
144144 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 ;
151148 }
152149
153150 let context = ( * * element) . pCertContext ;
Original file line number Diff line number Diff line change @@ -139,7 +139,7 @@ impl CngSigner {
139139
140140 unsafe {
141141 let status = BCryptHash (
142- alg as * mut core :: ffi :: c_void ,
142+ alg,
143143 std:: ptr:: null_mut ( ) , // pbSecret
144144 0 , // cbSecret
145145 message. as_ptr ( ) as * mut u8 ,
Original file line number Diff line number Diff line change @@ -227,12 +227,9 @@ impl CertStore {
227227 CERT_SHA256_HASH_PROP_ID ,
228228 prop_data. as_mut_ptr ( ) as * mut c_void ,
229229 & 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) )
236233 }
237234 }
238235 }
You can’t perform that action at this time.
0 commit comments