...
 
Commits (2)
......@@ -955,7 +955,7 @@ _asn1_check_identifier (asn1_node node)
if (p2 == NULL)
{
if (p->value)
_asn1_strcpy (_asn1_identifierMissing, p->value);
_asn1_str_cpy (_asn1_identifierMissing, sizeof(_asn1_identifierMissing), (char*)p->value);
else
_asn1_strcpy (_asn1_identifierMissing, "(null)");
return ASN1_IDENTIFIER_NOT_FOUND;
......@@ -968,9 +968,15 @@ _asn1_check_identifier (asn1_node node)
if (p2 && (type_field (p2->type) == ASN1_ETYPE_DEFAULT))
{
_asn1_str_cpy (name2, sizeof (name2), node->name);
_asn1_str_cat (name2, sizeof (name2), ".");
_asn1_str_cat (name2, sizeof (name2), (char *) p2->value);
_asn1_strcpy (_asn1_identifierMissing, p2->value);
if (p2->value)
{
_asn1_str_cat (name2, sizeof (name2), ".");
_asn1_str_cat (name2, sizeof (name2), (char *) p2->value);
_asn1_str_cpy (_asn1_identifierMissing, sizeof(_asn1_identifierMissing), (char*)p2->value);
}
else
_asn1_strcpy (_asn1_identifierMissing, "(null)");
p2 = asn1_find_node (node, name2);
if (!p2 || (type_field (p2->type) != ASN1_ETYPE_OBJECT_ID) ||
!(p2->type & CONST_ASSIGN))
......@@ -990,7 +996,8 @@ _asn1_check_identifier (asn1_node node)
_asn1_str_cpy (name2, sizeof (name2), node->name);
_asn1_str_cat (name2, sizeof (name2), ".");
_asn1_str_cat (name2, sizeof (name2), (char *) p2->value);
_asn1_strcpy (_asn1_identifierMissing, p2->value);
_asn1_str_cpy (_asn1_identifierMissing, sizeof(_asn1_identifierMissing), (char*)p2->value);
p2 = asn1_find_node (node, name2);
if (!p2 || (type_field (p2->type) != ASN1_ETYPE_OBJECT_ID)
|| !(p2->type & CONST_ASSIGN))
......
......@@ -22,6 +22,8 @@ AM_CPPFLAGS = -I$(top_srcdir)/lib -I$(top_srcdir)/gl -I../gl
AM_LDFLAGS = -no-install
LDADD = ../lib/libtasn1.la ../gl/libgnu.la
DISTCLEANFILES =
EXTRA_DIST = Test_parser.asn Test_tree.asn Test_tree_asn1_tab.c mscat.asn \
Test_encoding.asn pkix.asn TestIndef.p12 choice.asn coding-decoding2.asn \
TestIndef2.p12 TestIndef3.der TestCertOctetOverflow.der \
......@@ -52,7 +54,7 @@ EXTRA_DIST = Test_parser.asn Test_tree.asn Test_tree_asn1_tab.c mscat.asn \
# For crlf.
EXTRA_DIST += crlf.cer crl.der ocsp.der
dist_check_SCRIPTS = crlf benchmark threadsafety decoding decoding-invalid-x509 \
decoding-invalid-pkcs7 coding
decoding-invalid-pkcs7 coding soname
MOSTLYCLEANFILES = Test_parser_ERROR.asn
......@@ -67,7 +69,7 @@ TESTS = Test_parser Test_tree Test_encoding Test_indefinite \
Test_strings Test_choice Test_encdec copynode coding-decoding2 \
strict-der Test_choice_ocsp decoding decoding-invalid-x509 \
ocsp-basic-response octet-string coding-long-oid object-id-decoding \
spc_pe_image_data decoding-invalid-pkcs7 coding
spc_pe_image_data decoding-invalid-pkcs7 coding soname
TESTS_ENVIRONMENT = \
ASN1PARSER=$(srcdir)/Test_parser.asn \
......@@ -89,4 +91,8 @@ TESTS_ENVIRONMENT = \
THREADSAFETY_FILES=`find $(top_srcdir)/lib -name \*.c` \
EXEEXT=$(EXEEXT) \
LSAN_OPTIONS=suppressions=libtasn1.supp \
$(VALGRIND)
build_triplet="$(build_triplet)" \
host_triplet="$(host_triplet)" \
builddir="$(builddir)" \
top_builddir="$(top_builddir)" \
srcdir="$(srcdir)"
#!/bin/sh
set -e
srcdir=${srcdir:-.}
top_builddir=${top_builddir:-.}
build_triplet=${build_triplet:-.}
host_triplet=${host_triplet:-.}
if [ "${build_triplet}" != "${host_triplet}" ]; then
echo "cross-compiling, not running soname check." 2>&1
exit 77
fi
if ! echo "${build_triplet}" | grep linux > /dev/null ; then
exit 77
fi
if ! [ -x "$(command -v objdump)" ]; then
echo "objdump not available" 1>&2
exit 77
fi
newsoname=$(objdump -p ${top_builddir}/lib/.libs/libtasn1.so | sed -n '/^ *SONAME /s/^ *SONAME *//p')
[ "${newsoname}" = "libtasn1.so.6" ]