diff --git a/security/py-cryptography/patches/patch-modcargo-crates_openssl-0_10_74_src_ec_rs b/security/py-cryptography/patches/patch-modcargo-crates_openssl-0_10_74_src_ec_rs new file mode 100644 index 000000000000..c47983ba4a6e --- /dev/null +++ b/security/py-cryptography/patches/patch-modcargo-crates_openssl-0_10_74_src_ec_rs @@ -0,0 +1,57 @@ +Index: modcargo-crates/openssl-0.10.74/src/ec.rs +--- modcargo-crates/openssl-0.10.74/src/ec.rs.orig ++++ modcargo-crates/openssl-0.10.74/src/ec.rs +@@ -168,7 +168,7 @@ impl EcGroup { + impl EcGroupRef { + /// Places the components of a curve over a prime field in the provided `BigNum`s. + /// The components make up the formula `y^2 mod p = x^3 + ax + b mod p`. +- #[corresponds(EC_GROUP_get_curve_GFp)] ++ #[corresponds(EC_GROUP_get_curve)] + pub fn components_gfp( + &self, + p: &mut BigNumRef, +@@ -177,7 +177,7 @@ impl EcGroupRef { + ctx: &mut BigNumContextRef, + ) -> Result<(), ErrorStack> { + unsafe { +- cvt(ffi::EC_GROUP_get_curve_GFp( ++ cvt(ffi::EC_GROUP_get_curve( + self.as_ptr(), + p.as_ptr(), + a.as_ptr(), +@@ -541,7 +541,7 @@ impl EcPointRef { + + /// Places affine coordinates of a curve over a prime field in the provided + /// `x` and `y` `BigNum`s +- #[corresponds(EC_POINT_get_affine_coordinates_GFp)] ++ #[corresponds(EC_POINT_get_affine_coordinates)] + pub fn affine_coordinates_gfp( + &self, + group: &EcGroupRef, +@@ -550,7 +550,7 @@ impl EcPointRef { + ctx: &mut BigNumContextRef, + ) -> Result<(), ErrorStack> { + unsafe { +- cvt(ffi::EC_POINT_get_affine_coordinates_GFp( ++ cvt(ffi::EC_POINT_get_affine_coordinates( + group.as_ptr(), + self.as_ptr(), + x.as_ptr(), +@@ -586,7 +586,7 @@ impl EcPointRef { + + /// Sets affine coordinates of a curve over a prime field using the provided + /// `x` and `y` `BigNum`s +- #[corresponds(EC_POINT_set_affine_coordinates_GFp)] ++ #[corresponds(EC_POINT_set_affine_coordinates)] + pub fn set_affine_coordinates_gfp( + &mut self, + group: &EcGroupRef, +@@ -595,7 +595,7 @@ impl EcPointRef { + ctx: &mut BigNumContextRef, + ) -> Result<(), ErrorStack> { + unsafe { +- cvt(ffi::EC_POINT_set_affine_coordinates_GFp( ++ cvt(ffi::EC_POINT_set_affine_coordinates( + group.as_ptr(), + self.as_ptr(), + x.as_ptr(), diff --git a/security/py-cryptography/patches/patch-modcargo-crates_openssl-sys-0_9_110_src_handwritten_ec_rs b/security/py-cryptography/patches/patch-modcargo-crates_openssl-sys-0_9_110_src_handwritten_ec_rs new file mode 100644 index 000000000000..3adfff56a323 --- /dev/null +++ b/security/py-cryptography/patches/patch-modcargo-crates_openssl-sys-0_9_110_src_handwritten_ec_rs @@ -0,0 +1,36 @@ +Index: modcargo-crates/openssl-sys-0.9.110/src/handwritten/ec.rs +--- modcargo-crates/openssl-sys-0.9.110/src/handwritten/ec.rs.orig ++++ modcargo-crates/openssl-sys-0.9.110/src/handwritten/ec.rs +@@ -170,6 +170,16 @@ extern "C" { + #[cfg(not(osslconf = "OPENSSL_NO_EC2M"))] + pub fn EC_GF2m_simple_method() -> *const EC_METHOD; + ++ #[cfg(any(ossl111, boringssl, libressl, awslc))] ++ pub fn EC_GROUP_get_curve( ++ group: *const EC_GROUP, ++ p: *mut BIGNUM, ++ a: *mut BIGNUM, ++ b: *mut BIGNUM, ++ ctx: *mut BN_CTX, ++ ) -> c_int; ++ ++ #[cfg(not(libressl420))] + pub fn EC_GROUP_get_curve_GFp( + group: *const EC_GROUP, + p: *mut BIGNUM, +@@ -187,6 +197,7 @@ extern "C" { + ctx: *mut BN_CTX, + ) -> c_int; + ++ #[cfg(not(libressl420))] + pub fn EC_POINT_get_affine_coordinates_GFp( + group: *const EC_GROUP, + p: *const EC_POINT, +@@ -195,6 +206,7 @@ extern "C" { + ctx: *mut BN_CTX, + ) -> c_int; + ++ #[cfg(not(libressl420))] + pub fn EC_POINT_set_affine_coordinates_GFp( + group: *const EC_GROUP, + p: *mut EC_POINT, diff --git a/security/py-cryptography/patches/patch-src__cffi_src_openssl_asn1_py b/security/py-cryptography/patches/patch-src__cffi_src_openssl_asn1_py new file mode 100644 index 000000000000..ca6d08a41eb3 --- /dev/null +++ b/security/py-cryptography/patches/patch-src__cffi_src_openssl_asn1_py @@ -0,0 +1,17 @@ +Index: src/_cffi_src/openssl/asn1.py +--- src/_cffi_src/openssl/asn1.py.orig ++++ src/_cffi_src/openssl/asn1.py +@@ -13,12 +13,7 @@ typedef int... time_t; + + typedef ... ASN1_INTEGER; + +-struct asn1_string_st { +- int length; +- int type; +- unsigned char *data; +- long flags; +-}; ++struct asn1_string_st; + + typedef struct asn1_string_st ASN1_OCTET_STRING; + typedef struct asn1_string_st ASN1_IA5STRING;