File tree Expand file tree Collapse file tree 5 files changed +10
-10
lines changed
cryptography-x509-verification/src/policy Expand file tree Collapse file tree 5 files changed +10
-10
lines changed Original file line number Diff line number Diff line change @@ -592,7 +592,7 @@ mod tests {
592592 critical : bool ,
593593 ext : & T ,
594594 ) -> Vec < u8 > {
595- let ext_value = asn1:: write_single ( & ext) . unwrap ( ) ;
595+ let ext_value = asn1:: write_single ( ext) . unwrap ( ) ;
596596 let ext = Extension {
597597 extn_id : oid,
598598 critical,
Original file line number Diff line number Diff line change @@ -680,7 +680,7 @@ mod tests {
680680 assert ! ( WEBPKI_PERMITTED_SIGNATURE_ALGORITHMS . contains( & RSASSA_PSS_SHA256 . deref( ) ) ) ;
681681 let exp_encoding = b"0A\x06 \t *\x86 H\x86 \xf7 \r \x01 \x01 \n 04\xa0 \x0f 0\r \x06 \t `\x86 H\x01 e\x03 \x04 \x02 \x01 \x05 \x00 \xa1 \x1c 0\x1a \x06 \t *\x86 H\x86 \xf7 \r \x01 \x01 \x08 0\r \x06 \t `\x86 H\x01 e\x03 \x04 \x02 \x01 \x05 \x00 \xa2 \x03 \x02 \x01 " ;
682682 assert_eq ! (
683- asn1:: write_single( & RSASSA_PSS_SHA256 . deref( ) ) . unwrap( ) ,
683+ asn1:: write_single( RSASSA_PSS_SHA256 . deref( ) ) . unwrap( ) ,
684684 exp_encoding
685685 ) ;
686686 }
@@ -689,7 +689,7 @@ mod tests {
689689 assert ! ( WEBPKI_PERMITTED_SIGNATURE_ALGORITHMS . contains( & RSASSA_PSS_SHA384 . deref( ) ) ) ;
690690 let exp_encoding = b"0A\x06 \t *\x86 H\x86 \xf7 \r \x01 \x01 \n 04\xa0 \x0f 0\r \x06 \t `\x86 H\x01 e\x03 \x04 \x02 \x02 \x05 \x00 \xa1 \x1c 0\x1a \x06 \t *\x86 H\x86 \xf7 \r \x01 \x01 \x08 0\r \x06 \t `\x86 H\x01 e\x03 \x04 \x02 \x02 \x05 \x00 \xa2 \x03 \x02 \x01 0" ;
691691 assert_eq ! (
692- asn1:: write_single( & RSASSA_PSS_SHA384 . deref( ) ) . unwrap( ) ,
692+ asn1:: write_single( RSASSA_PSS_SHA384 . deref( ) ) . unwrap( ) ,
693693 exp_encoding
694694 ) ;
695695 }
@@ -698,7 +698,7 @@ mod tests {
698698 assert ! ( WEBPKI_PERMITTED_SIGNATURE_ALGORITHMS . contains( & RSASSA_PSS_SHA512 . deref( ) ) ) ;
699699 let exp_encoding = b"0A\x06 \t *\x86 H\x86 \xf7 \r \x01 \x01 \n 04\xa0 \x0f 0\r \x06 \t `\x86 H\x01 e\x03 \x04 \x02 \x03 \x05 \x00 \xa1 \x1c 0\x1a \x06 \t *\x86 H\x86 \xf7 \r \x01 \x01 \x08 0\r \x06 \t `\x86 H\x01 e\x03 \x04 \x02 \x03 \x05 \x00 \xa2 \x03 \x02 \x01 @" ;
700700 assert_eq ! (
701- asn1:: write_single( & RSASSA_PSS_SHA512 . deref( ) ) . unwrap( ) ,
701+ asn1:: write_single( RSASSA_PSS_SHA512 . deref( ) ) . unwrap( ) ,
702702 exp_encoding
703703 ) ;
704704 }
Original file line number Diff line number Diff line change @@ -190,9 +190,9 @@ fn sign_and_serialize<'p>(
190190 // Subset of values OpenSSL provides:
191191 // https://github.com/openssl/openssl/blob/667a8501f0b6e5705fd611d5bb3ca24848b07154/crypto/pkcs7/pk7_smime.c#L150
192192 // removing all the ones that are bad cryptography
193- & asn1:: SequenceOfWriter :: new ( [ oid:: AES_256_CBC_OID ] ) ,
194- & asn1:: SequenceOfWriter :: new ( [ oid:: AES_192_CBC_OID ] ) ,
195- & asn1:: SequenceOfWriter :: new ( [ oid:: AES_128_CBC_OID ] ) ,
193+ asn1:: SequenceOfWriter :: new ( [ oid:: AES_256_CBC_OID ] ) ,
194+ asn1:: SequenceOfWriter :: new ( [ oid:: AES_192_CBC_OID ] ) ,
195+ asn1:: SequenceOfWriter :: new ( [ oid:: AES_128_CBC_OID ] ) ,
196196 ] ) ) ?;
197197
198198 #[ allow( clippy:: type_complexity) ]
Original file line number Diff line number Diff line change @@ -93,7 +93,7 @@ impl Certificate {
9393 py : pyo3:: Python < ' p > ,
9494 algorithm : & pyo3:: Bound < ' p , pyo3:: PyAny > ,
9595 ) -> CryptographyResult < pyo3:: Bound < ' p , pyo3:: types:: PyBytes > > {
96- let serialized = asn1:: write_single ( & self . raw . borrow_dependent ( ) ) ?;
96+ let serialized = asn1:: write_single ( self . raw . borrow_dependent ( ) ) ?;
9797
9898 let mut h = hashes:: Hash :: new ( py, algorithm, None ) ?;
9999 h. update_bytes ( & serialized) ?;
Original file line number Diff line number Diff line change @@ -93,7 +93,7 @@ pub(crate) struct CertificateRevocationList {
9393
9494impl CertificateRevocationList {
9595 fn public_bytes_der ( & self ) -> CryptographyResult < Vec < u8 > > {
96- Ok ( asn1:: write_single ( & self . owned . borrow_dependent ( ) ) ?)
96+ Ok ( asn1:: write_single ( self . owned . borrow_dependent ( ) ) ?)
9797 }
9898
9999 fn revoked_cert ( & self , py : pyo3:: Python < ' _ > , idx : usize ) -> RevokedCertificate {
@@ -239,7 +239,7 @@ impl CertificateRevocationList {
239239 py : pyo3:: Python < ' p > ,
240240 encoding : pyo3:: Bound < ' p , pyo3:: PyAny > ,
241241 ) -> CryptographyResult < pyo3:: Bound < ' p , pyo3:: types:: PyBytes > > {
242- let result = asn1:: write_single ( & self . owned . borrow_dependent ( ) ) ?;
242+ let result = asn1:: write_single ( self . owned . borrow_dependent ( ) ) ?;
243243
244244 encode_der_data ( py, "X509 CRL" . to_string ( ) , result, & encoding)
245245 }
You can’t perform that action at this time.
0 commit comments