From 8175df0e47886bab94d727341dde974fd3549e5e Mon Sep 17 00:00:00 2001 From: Jakub Jelen Date: Tue, 12 May 2020 14:45:13 +0200 Subject: [PATCH] Make sure pcscd is started when using emulation Running from systemd has --auto-exit, which does not guaranee us that the process is running when we start emulators --- .travis.yml | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 4a15b7a8..da36daef 100644 --- a/.travis.yml +++ b/.travis.yml @@ -133,7 +133,7 @@ before_script: cd vsmartcard/virtualsmartcard; autoreconf -vis && ./configure && sudo make install; cd $TRAVIS_BUILD_DIR; - sudo /etc/init.d/pcscd restart; + sudo systemctl stop pcscd.service pcscd.socket; git clone https://github.com/martinpaljak/oracle_javacard_sdks.git; export JC_HOME=$PWD/oracle_javacard_sdks/jc222_kit; @@ -242,6 +242,9 @@ script: sudo make install; export LD_LIBRARY_PATH=/usr/local/lib; + sudo /usr/sbin/pcscd -f & + PCSCD_PID=$!; + java -noverify -cp IsoApplet/src/:jcardsim/target/jcardsim-3.0.5-SNAPSHOT.jar com.licel.jcardsim.remote.VSmartCard isoapplet_jcardsim.cfg >/dev/null & PID=$!; sleep 5; @@ -278,11 +281,13 @@ script: sleep 5; opensc-tool --card-driver default --send-apdu 80b80000120ba000000308000010000100050000020F0F7f; opensc-tool -n; - yubico-piv-tool -r 'Virtual PCD 00 00' -P 123456 -s 9a -a generate -A ECCP256; - yubico-piv-tool -r 'Virtual PCD 00 00' -P 123456 -s 9e -a generate -A RSA2048; + yubico-piv-tool -v 9999 -r 'Virtual PCD 00 00' -P 123456 -s 9e -a generate -A RSA2048; + yubico-piv-tool -v 9999 -r 'Virtual PCD 00 00' -P 123456 -s 9a -a generate -A ECCP256; pkcs11-tool -l -t -p 123456; kill -9 $PID; + sudo kill -9 $PCSCD_PID; + set +ex; fi