File tree 1 file changed +2
-2
lines changed
1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -269,13 +269,13 @@ fn compute_pkcs7_signature_algorithm<'p>(
269
269
rsa_padding : & ' p pyo3:: PyAny ,
270
270
) -> pyo3:: PyResult < common:: AlgorithmIdentifier < ' static > > {
271
271
let key_type = x509:: sign:: identify_key_type ( py, private_key) ?;
272
- let has_pss_padding = !rsa_padding . is_none ( ) && rsa_padding. is_instance ( types:: PSS . get ( py) ?) ?;
272
+ let has_pss_padding = rsa_padding. is_instance ( types:: PSS . get ( py) ?) ?;
273
273
// For RSA signatures (with no PSS padding), the OID is always the same no matter the
274
274
// digest algorithm. See RFC 3370 (section 3.2).
275
275
if key_type == x509:: sign:: KeyType :: Rsa && !has_pss_padding {
276
276
Ok ( common:: AlgorithmIdentifier {
277
277
oid : asn1:: DefinedByMarker :: marker ( ) ,
278
- params : common:: AlgorithmParameters :: Rsa ( None ) ,
278
+ params : common:: AlgorithmParameters :: Rsa ( Some ( ( ) ) ) ,
279
279
} )
280
280
} else {
281
281
x509:: sign:: compute_signature_algorithm ( py, private_key, hash_algorithm, rsa_padding)
You can’t perform that action at this time.
0 commit comments