Skip to content

Commit e2a8124

Browse files
committed
asn1.py: treat asn1_string_st as opaque
OpenSSL 4 plans to make ASN1_STRING opaque [1]. Using a forward declaration rather than a redefinition avoids the build breakage in cryptography's cffi when it tries to validate the sizes of the members. [1]: openssl/openssl#29117
1 parent ac5e3eb commit e2a8124

File tree

1 file changed

+4
-12
lines changed

1 file changed

+4
-12
lines changed

src/_cffi_src/openssl/asn1.py

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -12,19 +12,11 @@
1212
typedef int... time_t;
1313
1414
typedef ... ASN1_INTEGER;
15-
16-
struct asn1_string_st {
17-
int length;
18-
int type;
19-
unsigned char *data;
20-
long flags;
21-
};
22-
23-
typedef struct asn1_string_st ASN1_OCTET_STRING;
24-
typedef struct asn1_string_st ASN1_IA5STRING;
25-
typedef struct asn1_string_st ASN1_TIME;
15+
typedef ... ASN1_OCTET_STRING;
16+
typedef ... ASN1_IA5STRING;
17+
typedef ... ASN1_TIME;
2618
typedef ... ASN1_OBJECT;
27-
typedef struct asn1_string_st ASN1_STRING;
19+
typedef ... ASN1_STRING;
2820
typedef ... ASN1_GENERALIZEDTIME;
2921
typedef ... ASN1_ENUMERATED;
3022

0 commit comments

Comments
 (0)