Act on deprecation of LONG and ZLONG, step 1
Don't compile code that still uses LONG when it's deprecated Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/3126)
This commit is contained in:
parent
7eb4c1eb50
commit
31ae516116
3 changed files with 14 additions and 0 deletions
|
@ -78,7 +78,9 @@ static ASN1_ITEM_EXP *asn1_item_list[] = {
|
|||
ASN1_ITEM_ref(IPAddressRange),
|
||||
#endif
|
||||
ASN1_ITEM_ref(ISSUING_DIST_POINT),
|
||||
#if OPENSSL_API_COMPAT < 0x10200000L
|
||||
ASN1_ITEM_ref(LONG),
|
||||
#endif
|
||||
ASN1_ITEM_ref(NAME_CONSTRAINTS),
|
||||
ASN1_ITEM_ref(NETSCAPE_CERT_SEQUENCE),
|
||||
ASN1_ITEM_ref(NETSCAPE_SPKAC),
|
||||
|
@ -159,7 +161,9 @@ static ASN1_ITEM_EXP *asn1_item_list[] = {
|
|||
ASN1_ITEM_ref(X509_SIG),
|
||||
ASN1_ITEM_ref(X509_VAL),
|
||||
ASN1_ITEM_ref(X509),
|
||||
#if OPENSSL_API_COMPAT < 0x10200000L
|
||||
ASN1_ITEM_ref(ZLONG),
|
||||
#endif
|
||||
ASN1_ITEM_ref(INT32),
|
||||
ASN1_ITEM_ref(UINT32),
|
||||
ASN1_ITEM_ref(ZINT32),
|
||||
|
|
|
@ -100,7 +100,9 @@ static ASN1_ITEM_EXP *item_type[] = {
|
|||
ASN1_ITEM_ref(IPAddressRange),
|
||||
#endif
|
||||
ASN1_ITEM_ref(ISSUING_DIST_POINT),
|
||||
#if OPENSSL_API_COMPAT < 0x10200000L
|
||||
ASN1_ITEM_ref(LONG),
|
||||
#endif
|
||||
ASN1_ITEM_ref(NAME_CONSTRAINTS),
|
||||
ASN1_ITEM_ref(NETSCAPE_CERT_SEQUENCE),
|
||||
ASN1_ITEM_ref(NETSCAPE_SPKAC),
|
||||
|
@ -180,7 +182,9 @@ static ASN1_ITEM_EXP *item_type[] = {
|
|||
ASN1_ITEM_ref(X509_REVOKED),
|
||||
ASN1_ITEM_ref(X509_SIG),
|
||||
ASN1_ITEM_ref(X509_VAL),
|
||||
#if OPENSSL_API_COMPAT < 0x10200000L
|
||||
ASN1_ITEM_ref(ZLONG),
|
||||
#endif
|
||||
ASN1_ITEM_ref(INT32),
|
||||
ASN1_ITEM_ref(ZINT32),
|
||||
ASN1_ITEM_ref(UINT32),
|
||||
|
|
|
@ -170,6 +170,7 @@ typedef struct {
|
|||
ENCDEC_DATA(-1, -1), \
|
||||
ENCDEC_DATA(0, ASN1_LONG_UNDEF)
|
||||
|
||||
#if OPENSSL_API_COMPAT < 0x10200000L
|
||||
/***** LONG ******************************************************************/
|
||||
|
||||
typedef struct {
|
||||
|
@ -255,6 +256,7 @@ static TEST_PACKAGE long_test_package_64bit = {
|
|||
(i2d_fn *)i2d_ASN1_LONG_DATA, (d2i_fn *)d2i_ASN1_LONG_DATA,
|
||||
(ifree_fn *)ASN1_LONG_DATA_free
|
||||
};
|
||||
#endif
|
||||
|
||||
/***** INT32 *****************************************************************/
|
||||
|
||||
|
@ -676,6 +678,7 @@ static int test_intern(const TEST_PACKAGE *package)
|
|||
return fail == 0;
|
||||
}
|
||||
|
||||
#if OPENSSL_API_COMPAT < 0x10200000L
|
||||
static int test_long_32bit(void)
|
||||
{
|
||||
return test_intern(&long_test_package_32bit);
|
||||
|
@ -685,6 +688,7 @@ static int test_long_64bit(void)
|
|||
{
|
||||
return test_intern(&long_test_package_64bit);
|
||||
}
|
||||
#endif
|
||||
|
||||
static int test_int32(void)
|
||||
{
|
||||
|
@ -708,8 +712,10 @@ static int test_uint64(void)
|
|||
|
||||
void register_tests(void)
|
||||
{
|
||||
#if OPENSSL_API_COMPAT < 0x10200000L
|
||||
ADD_TEST(test_long_32bit);
|
||||
ADD_TEST(test_long_64bit);
|
||||
#endif
|
||||
ADD_TEST(test_int32);
|
||||
ADD_TEST(test_uint32);
|
||||
ADD_TEST(test_int64);
|
||||
|
|
Loading…
Reference in a new issue