@ -30,6 +30,7 @@
# include <openssl/x509v3.h>
# include <openssl/x509v3.h>
# include "../test/test_util.h"
# include "../test/test_util.h"
# include "internal.h"
// kTag128 is an ASN.1 structure with a universal tag with number 128.
// kTag128 is an ASN.1 structure with a universal tag with number 128.
@ -1119,6 +1120,15 @@ TEST(ASN1Test, InvalidMSTRING) {
EXPECT_EQ ( - 1 , i2d_DIRECTORYSTRING ( obj . get ( ) , nullptr ) ) ;
EXPECT_EQ ( - 1 , i2d_DIRECTORYSTRING ( obj . get ( ) , nullptr ) ) ;
}
}
TEST ( ASN1Test , StringTableSorted ) {
const ASN1_STRING_TABLE * table ;
size_t table_len ;
asn1_get_string_table_for_testing ( & table , & table_len ) ;
for ( size_t i = 1 ; i < table_len ; i + + ) {
EXPECT_LT ( table [ i - 1 ] . nid , table [ i ] . nid ) ;
}
}
// The ASN.1 macros do not work on Windows shared library builds, where usage of
// The ASN.1 macros do not work on Windows shared library builds, where usage of
// |OPENSSL_EXPORT| is a bit stricter.
// |OPENSSL_EXPORT| is a bit stricter.
# if !defined(OPENSSL_WINDOWS) || !defined(BORINGSSL_SHARED_LIBRARY)
# if !defined(OPENSSL_WINDOWS) || !defined(BORINGSSL_SHARED_LIBRARY)