mirror of
https://gitea.osmocom.org/sim-card/simtrace2.git
synced 2026-11-08 23:43:11 +03:00
osmo_apdu_segment_in() doesn't have the context of the previous APDU,
for nearly all calls this is fine, except for GP GET DATA, which can be
a case 2 or case 4 APDU.
GP GET DATA defines the Le field as 0x00 which is used by osmo_apdu_segment_in
to detect if it is a case 2 or case 4.
However a card can respond with the SW 6cXX, which means the previous
command must be resend with a Le field XX, which got misinterpreted by
the osmo_apdu_segment_in() as a case 4 resulting in a timeout waiting for
more data.
Modem <-> Card
81cadf2000 ->
<- 6c0b
81cadf200b ->
-- Simtrace waits for more data because it wrongly decodes it as APDU case 4
instead of case 2.
Related: SYS#8147
Change-Id: Ie238662e7e6a10dd4283ede0c8d8d73bc375c247
41 lines
1.5 KiB
Makefile
41 lines
1.5 KiB
Makefile
SUBDIRS = apdu_dispatch
|
|
|
|
# The `:;' works around a Bash 3.2 bug when the output is not writeable.
|
|
$(srcdir)/package.m4: $(top_srcdir)/configure.ac
|
|
:;{ \
|
|
echo '# Signature of the current package.' && \
|
|
echo 'm4_define([AT_PACKAGE_NAME],' && \
|
|
echo ' [$(PACKAGE_NAME)])' && \
|
|
echo 'm4_define([AT_PACKAGE_TARNAME],' && \
|
|
echo ' [$(PACKAGE_TARNAME)])' && \
|
|
echo 'm4_define([AT_PACKAGE_VERSION],' && \
|
|
echo ' [$(PACKAGE_VERSION)])' && \
|
|
echo 'm4_define([AT_PACKAGE_STRING],' && \
|
|
echo ' [$(PACKAGE_STRING)])' && \
|
|
echo 'm4_define([AT_PACKAGE_BUGREPORT],' && \
|
|
echo ' [$(PACKAGE_BUGREPORT)])'; \
|
|
echo 'm4_define([AT_PACKAGE_URL],' && \
|
|
echo ' [$(PACKAGE_URL)])'; \
|
|
} >'$(srcdir)/package.m4'
|
|
|
|
EXTRA_DIST = testsuite.at $(srcdir)/package.m4 $(TESTSUITE)
|
|
TESTSUITE = $(srcdir)/testsuite
|
|
DISTCLEANFILES = atconfig
|
|
|
|
check-local: atconfig $(TESTSUITE)
|
|
$(SHELL) '$(TESTSUITE)' $(TESTSUITEFLAGS)
|
|
|
|
installcheck-local: atconfig $(TESTSUITE)
|
|
$(SHELL) '$(TESTSUITE)' AUTOTEST_PATH='$(bindir)' \
|
|
$(TESTSUITEFLAGS)
|
|
|
|
clean-local:
|
|
test ! -f '$(TESTSUITE)' || \
|
|
$(SHELL) '$(TESTSUITE)' --clean
|
|
|
|
AUTOM4TE = $(SHELL) $(top_srcdir)/missing --run autom4te
|
|
AUTOTEST = $(AUTOM4TE) --language=autotest
|
|
$(TESTSUITE): $(srcdir)/testsuite.at $(srcdir)/package.m4
|
|
$(AUTOTEST) -I '$(srcdir)' -o $@.tmp $@.at
|
|
mv $@.tmp $@
|