@@ -174,7 +174,7 @@ def _get_asn1_time(timestamp):
174
174
elif (
175
175
_lib .ASN1_STRING_type (string_timestamp ) == _lib .V_ASN1_GENERALIZEDTIME
176
176
):
177
- return _ffi .string (_lib .ASN1_STRING_data (string_timestamp ))
177
+ return _ffi .string (_lib .ASN1_STRING_get0_data (string_timestamp ))
178
178
else :
179
179
generalized_timestamp = _ffi .new ("ASN1_GENERALIZEDTIME**" )
180
180
_lib .ASN1_TIME_to_generalizedtime (timestamp , generalized_timestamp )
@@ -193,7 +193,7 @@ def _get_asn1_time(timestamp):
193
193
string_timestamp = _ffi .cast (
194
194
"ASN1_STRING*" , generalized_timestamp [0 ]
195
195
)
196
- string_data = _lib .ASN1_STRING_data (string_timestamp )
196
+ string_data = _lib .ASN1_STRING_get0_data (string_timestamp )
197
197
string_result = _ffi .string (string_data )
198
198
_lib .ASN1_GENERALIZEDTIME_free (generalized_timestamp [0 ])
199
199
return string_result
@@ -715,7 +715,7 @@ def get_components(self):
715
715
# ffi.string does not handle strings containing NULL bytes
716
716
# (which may have been generated by old, broken software)
717
717
value = _ffi .buffer (
718
- _lib .ASN1_STRING_data (fval ), _lib .ASN1_STRING_length (fval )
718
+ _lib .ASN1_STRING_get0_data (fval ), _lib .ASN1_STRING_length (fval )
719
719
)[:]
720
720
result .append ((_ffi .string (name ), value ))
721
721
@@ -869,7 +869,7 @@ def get_data(self):
869
869
"""
870
870
octet_result = _lib .X509_EXTENSION_get_data (self ._extension )
871
871
string_result = _ffi .cast ("ASN1_STRING*" , octet_result )
872
- char_result = _lib .ASN1_STRING_data (string_result )
872
+ char_result = _lib .ASN1_STRING_get0_data (string_result )
873
873
result_length = _lib .ASN1_STRING_length (string_result )
874
874
return _ffi .buffer (char_result , result_length )[:]
875
875
0 commit comments