2015-09-15 06:57:03 +00:00
|
|
|
language: c
|
2015-01-21 15:57:02 +00:00
|
|
|
|
2019-01-05 23:04:23 +00:00
|
|
|
matrix:
|
|
|
|
include:
|
|
|
|
- compiler: clang
|
|
|
|
os: osx
|
2020-05-01 10:48:10 +00:00
|
|
|
osx_image: xcode9.4
|
2019-01-05 23:04:23 +00:00
|
|
|
env: DO_PUSH_ARTIFACT=yes
|
2020-05-18 15:28:46 +00:00
|
|
|
- compiler: clang
|
|
|
|
os: linux
|
|
|
|
dist: bionic
|
2019-01-05 23:04:23 +00:00
|
|
|
- compiler: gcc
|
|
|
|
os: linux
|
2020-05-07 19:19:04 +00:00
|
|
|
dist: bionic
|
2019-01-05 23:04:23 +00:00
|
|
|
env:
|
2019-05-22 10:49:18 +00:00
|
|
|
- DO_SIMULATION=javacard
|
2019-01-05 23:04:23 +00:00
|
|
|
- ENABLE_DOC=--enable-doc
|
2019-05-22 10:49:18 +00:00
|
|
|
- compiler: gcc
|
|
|
|
os: linux
|
2019-08-26 10:57:35 +00:00
|
|
|
dist: bionic
|
2019-05-22 10:49:18 +00:00
|
|
|
env:
|
|
|
|
- DO_SIMULATION=oseid
|
2019-01-05 23:04:23 +00:00
|
|
|
- env:
|
|
|
|
- HOST=x86_64-w64-mingw32
|
|
|
|
- DO_PUSH_ARTIFACT=yes
|
|
|
|
- env:
|
|
|
|
- HOST=i686-w64-mingw32
|
|
|
|
- DO_PUSH_ARTIFACT=yes
|
|
|
|
- env: DO_COVERITY_SCAN=yes
|
2019-08-20 13:17:14 +00:00
|
|
|
- compiler: gcc
|
|
|
|
os: linux
|
|
|
|
dist: bionic
|
|
|
|
env:
|
|
|
|
- DO_SIMULATION=cac
|
2019-01-05 23:04:23 +00:00
|
|
|
|
|
|
|
env:
|
|
|
|
global:
|
|
|
|
# The next declaration are encrypted envirnmet variables, created via the
|
|
|
|
# "travis encrypt" command using the project repo's public key
|
|
|
|
# COVERITY_SCAN_TOKEN
|
|
|
|
- secure: "UkHn7wy4im8V1nebCWbAetnDSOLRUbOlF6++ovk/7Bnso1/lnhXHelyzgRxfD/oI68wm9nnRV+RQEZ9+72Ug1CyvHxyyxxkwal/tPeHH4B/L+aGdPi0id+5OZSKIm77VP3m5s102sJMJgH7DFd03+nUd0K26p0tk8ad4j1geV4c="
|
|
|
|
# GH_TOKEN
|
|
|
|
- secure: "cUAvpN/XUPMIN5cgWAbIOhghRoLXyw7SCydzGaJ1Ucqb9Ml2v5iuLLuN57YbZHTiWw03vy6rYVzzwMDrHX8r3oUALsv7ViJHG4PzIe7fAFZsZpHECmGsp6SEnue7m7BNy3FT8KYbiXxnxDO0SxmFXlrPAYR0WMZCWx2TENYcafs="
|
|
|
|
- COVERITY_SCAN_BRANCH_PATTERN="(master|coverity.*)"
|
|
|
|
- COVERITY_SCAN_NOTIFICATION_EMAIL="viktor.tarasov@gmail.com"
|
|
|
|
- COVERITY_SCAN_BUILD_COMMAND="make -j 4"
|
|
|
|
- COVERITY_SCAN_PROJECT_NAME="$TRAVIS_REPO_SLUG"
|
|
|
|
- SOURCE_DATE_EPOCH=$(git log -1 --pretty=%ct)
|
|
|
|
|
2015-09-15 06:57:03 +00:00
|
|
|
addons:
|
|
|
|
apt_packages:
|
|
|
|
- binutils-mingw-w64-i686
|
|
|
|
- binutils-mingw-w64-x86-64
|
|
|
|
- docbook-xsl
|
|
|
|
- gcc-mingw-w64-i686
|
|
|
|
- gcc-mingw-w64-x86-64
|
|
|
|
- libpcsclite-dev
|
|
|
|
- mingw-w64
|
|
|
|
- xsltproc
|
2015-11-06 07:24:16 +00:00
|
|
|
- gengetopt
|
PKCS#11 testsuite (#1224)
* Initial version of pkcs11 testsuite
* Refactor test cases to several files, clean up awful and unused stuff
* Static mechanism list based on the actual token offer
* Get rid of magic numbers
* Documentation
* License update based on the original project
* Verbose readme
* Cleanup unused code, long lines and method order
* Typo; More verbose errors
* Use fallback mechanisms
* Refactor object allocation and certificate search
* PKCS11SPY mentioned, more TODO
* add SHA mechanisms
* Do not try to Finalize already finalized cryptoki
* Add more flags and mechanisms
* Do not list table for no results
* Logical order of the tests (regression last)
* read ALWAYS_AUTHENTICATE from correct place
* ALWAYS_AUTHENTICATE for decryption
* Test EC key length signature based on the actual key length
* Shorten CKM_ list output, add keygen types detection
* Skip decrypting on non-supported mechanisms
* Fail hard if the C_Login fails
* Reorganize local FLAGS_ constants
* Test RSA Digest mechanisms
* Correct mechanisms naming, typos
* Do not attempt to do signature using empty keys
* CKM_ECDSA_SHA1 support
* Correct type cast when getting attributes
* Report failures from all mechanisms
* Standardize return values, eliminate complete fails, documentation interface
* Wait for slot event test
* Add switch to allow interaction with a card (WaitForSlotEvent)
* At least try to verify using C_Verify, if it fails, fall back to openssl
* Get rid of function_pointers
* Get rid of additional newline
* Share always_authenticate() function between the test cases
* Refactor Encrypt&decrypt test to functions
* Do not overwrite bits if they are not provided by CKA, indentation
* Cleanup and Break to more functions Sign&Verify test
* CKM_RSA_X_509 sign and verify with openssl padding
* More TODO's
* Proper abstracted padding with RSA_X_509 mechanism
* Add ongoing tasks from different TODO list
* Update instructions. Another todo
* Variables naming
* Increase mechanism list size, use different static buffers for flags and mechanism names
* nonstandard mechanism CKM_SHA224_RSA_PKCS supported by some softotkens
* Get rid of loop initial declarations
* Loop initial declaration, typos, strict warnings
* Move the p11test to the new folder to avoid problems with dynamically linked opensc.so
* Update path in README
* Possibility to validate the testsuite agains software tokens
* Add possibility to select slot ID on command-line (when there are more cards present)
* Clean up readme to reflect current options and TODOs
* Do not attempt to use keys without advertised sign&verify bits to avoid false positives
* Get and present more object attributes in readonly test; refactor table
* New test checking if the set of attributes (usage flags) is reasonable
* Test multipart signatures. There is not reasonable mechanism supporting multipart encryption
* Use PKCS#11 encryption if possible (with openssl fallback)
* Identify few more mechanisms (PSS) in the lest
* Resize table to fit new mechanisms
* Remove initial loop declaration from multipart test
* Use pkcs11-tool instead of p11tool form most of the operations (master have most of the features)
* Preparation for machine readable results
* Refactor log variables out of the main context, try to export generic data
* Do not write to non-existing FD if not logging
* Export missing data into the log file in JSON
* Store database in json
* Sanity check
* Avoid uninitialized structure fields using in state structure
* Dump always_authenticate attribute too
* Manual selection of slots with possibility to use slots without tokens
* Do not free before finalizing
* Proper cleanup of message in all cases
* Proper allocation and deallocation of messages
* Sanitize missing cases (memory leaks)
* Suppressions for testing under valgrind
* Better handling message_lengt during sign&verify (avoid invalid access)
* Suppress another PCSC error
* Do not use default PIN. Fail if none specified
* Sanitize initialization. Skip incomplete key pairs
* Add missing newline in errors
* Fix condition for certificate search
* Avoid several calls for attributes of zero length
* Handle if the private key is not present on the card
* Improve memory handling, silent GCC warning of 'unused' variable
* Fail early with missing private key, cleanup the messages
* Use correct padding for encryption
* Cache if the card supports Verify/Encrypt and avoid trying over and over again
* Loosen the condition for the Usage flags
* OpenSSL 1.1.0 compatibility
* Add missing mechanisms
* Do not require certificates on the card and pass valid data for RSA_PKCS mechanisms
* Add missing PIN argument in runtest.sh
* Add OpenSSL < 1.1 comatible bits
* Add SHA2 ECDSA mechanisms handling
* Use public key from PKCS#11 if the certificate is missing (or compare it with certificate)
* Avoid long definitions in OpenSSL compat layer
* In older OpenSSL, the header file is ecdsa.h
* Add missing config.h to apply compat OpenSSL layer
* ASN1_STRING_get0_data() is also new in 1.1.0
* Return back RSA_X_509 mechanism
* Drop bogus CKM_* in the definitions
* Drop CKM_SHA224_RSA_PKCS as it is already in pkcs11.h
* Update documentation
* Use NDEBUG as intended
* typos, cleanup
* Typos, cleanup, update copyright
* Additional check for OpenCryptoki, generate more key types on soft tokens
* Prepare for RSA-PSS and RSA-OAEP
* Use usage&result flags for the tests, gracefully ignore PSS&OAEP
* pkcs11.h: Add missing definitions for PSS
* PSS and OAEP tests
readonly: Typos, reformat
* Working version, memory leak
* Tweak message lengths for OAEP and PSS
* Skip tests that are not aplicable for tokens
* configure.ac: New switch --enable-tests
Do not attempt to build tests if cmocka is not available or
--enable-tests is provided. It makes also more lightweight release
builds out of the box (or with --disable-tests).
* travis: Install cmocka if not available
* Do not build tests on Windows and make dist pass
* Try to install cmocka from apt and from brew
* Do not require sudo (cmocka from apt and brew works)
2018-05-18 10:31:55 +00:00
|
|
|
- libcmocka-dev
|
2019-01-02 09:39:51 +00:00
|
|
|
- help2man
|
|
|
|
- pcscd
|
2019-05-22 10:49:18 +00:00
|
|
|
- pcsc-tools
|
2019-01-02 09:39:51 +00:00
|
|
|
- check
|
2019-07-17 10:10:01 +00:00
|
|
|
- ant
|
|
|
|
- socat
|
2015-09-14 20:45:13 +00:00
|
|
|
|
2015-11-06 07:24:16 +00:00
|
|
|
before_install:
|
2019-05-03 23:53:55 +00:00
|
|
|
# brew install gengetopt help2man cmocka ccache llvm;
|
|
|
|
# export PATH="/usr/local/opt/ccache/libexec:/usr/local/opt/llvm/bin:$PATH";
|
2020-04-06 13:42:30 +00:00
|
|
|
# add magic notarization flags for macOS, see https://github.com/akeru-inc/xcnotary/blob/master/README.md
|
2019-05-22 10:49:18 +00:00
|
|
|
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then
|
2015-11-06 07:24:16 +00:00
|
|
|
brew update;
|
|
|
|
brew uninstall libtool;
|
|
|
|
brew install libtool;
|
2019-01-02 09:39:51 +00:00
|
|
|
brew install gengetopt help2man cmocka ccache;
|
2019-05-21 17:36:17 +00:00
|
|
|
export PATH="/usr/local/opt/ccache/libexec:$PATH";
|
2020-04-06 13:42:30 +00:00
|
|
|
openssl aes-256-cbc -K $encrypted_3b9f0b9d36d1_key -iv $encrypted_3b9f0b9d36d1_iv -in .github/secrets.tar.enc -out .github/secrets.tar -d;
|
|
|
|
.github/add_signing_key.sh;
|
|
|
|
export OTHER_CODE_SIGN_FLAGS=--timestamp CODE_SIGN_INJECT_BASE_ENTITLEMENTS=NO CODE_SIGN_STYLE=Manual;
|
|
|
|
git clone https://github.com/frankmorgner/OpenSCToken.git;
|
2015-11-06 07:24:16 +00:00
|
|
|
fi
|
2020-05-12 08:36:11 +00:00
|
|
|
- if [ "${DO_SIMULATION}" = "javacard" ]; then
|
|
|
|
sudo apt-get install -y openjdk-8-jdk;
|
|
|
|
sudo update-java-alternatives -s java-1.8.0-openjdk-amd64;
|
|
|
|
sudo update-alternatives --get-selections | grep ^java;
|
|
|
|
export PATH="/usr/lib/jvm/java-8-openjdk-amd64/bin/:$PATH";
|
|
|
|
export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64/;
|
|
|
|
env | grep -i openjdk;
|
|
|
|
fi
|
2019-08-20 13:17:14 +00:00
|
|
|
- if [ "${DO_SIMULATION}" = "cac" ]; then
|
|
|
|
sudo apt-get install -y libglib2.0-dev libnss3-dev pkgconf libtool make autoconf autoconf-archive automake libsofthsm2-dev softhsm2 softhsm2-common help2man gnutls-bin libcmocka-dev libusb-dev libudev-dev flex libnss3-tools libssl-dev libpcsclite1;
|
|
|
|
export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig;
|
|
|
|
fi
|
|
|
|
- if [ -n "${HOST}" ]; then
|
|
|
|
sudo apt-get install -y wine;
|
|
|
|
fi
|
2015-11-06 07:24:16 +00:00
|
|
|
|
2015-01-21 15:57:02 +00:00
|
|
|
before_script:
|
2019-05-22 10:49:18 +00:00
|
|
|
- if [ "$TRAVIS_BRANCH" = "master" -a "$TRAVIS_PULL_REQUEST" = "false" ]; then
|
2019-01-21 09:29:13 +00:00
|
|
|
./bootstrap;
|
|
|
|
fi
|
2019-05-22 10:49:18 +00:00
|
|
|
- if [ "$TRAVIS_BRANCH" = "master" -a "$TRAVIS_PULL_REQUEST" != "false" ]; then
|
2019-01-21 09:29:13 +00:00
|
|
|
./bootstrap.ci -s "-pr$TRAVIS_PULL_REQUEST";
|
|
|
|
fi
|
2019-05-22 10:49:18 +00:00
|
|
|
- if [ "$TRAVIS_BRANCH" != "master" -a "$TRAVIS_PULL_REQUEST" = "false" ]; then
|
2019-01-21 09:29:13 +00:00
|
|
|
./bootstrap.ci -s "-$TRAVIS_BRANCH";
|
|
|
|
fi
|
|
|
|
- if [ "$TRAVIS_BRANCH" != "master" -a "$TRAVIS_PULL_REQUEST" != "false" ]; then
|
|
|
|
./bootstrap.ci -s "-$TRAVIS_BRANCH-pr$TRAVIS_PULL_REQUEST";
|
|
|
|
fi
|
2015-01-21 15:57:02 +00:00
|
|
|
- if [ -z "$HOST" ]; then
|
2017-08-02 20:04:17 +00:00
|
|
|
CFLAGS="-Werror" ./configure $ENABLE_DOC --enable-dnie-ui;
|
2015-01-21 15:57:02 +00:00
|
|
|
else
|
2015-09-15 06:57:03 +00:00
|
|
|
if [ ! -f "$(winepath 'C:/Program Files (x86)/Inno Setup 5/ISCC.exe')" ]; then
|
|
|
|
/sbin/start-stop-daemon --start --quiet --pidfile /tmp/custom_xvfb_99.pid --make-pidfile --background --exec /usr/bin/Xvfb -- :99 -ac -screen 0 1280x1024x16;
|
|
|
|
export DISPLAY=:99.0;
|
2020-03-03 09:09:38 +00:00
|
|
|
[ -d isetup ] || mkdir isetup;
|
|
|
|
pushd isetup;
|
2019-01-02 09:39:51 +00:00
|
|
|
[ -f isetup-5.5.6.exe ] || wget http://files.jrsoftware.org/is/5/isetup-5.5.6.exe;
|
2015-09-15 06:57:03 +00:00
|
|
|
wine isetup-5.5.6.exe /SILENT /VERYSILENT /SP- /SUPPRESSMSGBOXES /NORESTART;
|
2020-03-03 09:09:38 +00:00
|
|
|
popd;
|
2015-09-15 06:57:03 +00:00
|
|
|
fi;
|
2015-01-21 15:57:02 +00:00
|
|
|
unset CC;
|
|
|
|
unset CXX;
|
2018-11-14 11:56:04 +00:00
|
|
|
./configure --host=$HOST --with-completiondir=/tmp --disable-openssl --disable-readline --disable-zlib --disable-notify --prefix=${TRAVIS_BUILD_DIR}/win32/opensc || cat config.log;
|
2015-01-21 15:57:02 +00:00
|
|
|
fi
|
2018-04-07 11:09:29 +00:00
|
|
|
# Optionally try to upload to Coverity Scan
|
|
|
|
# On error (propably quota is exhausted), just continue
|
|
|
|
- if [ "${DO_COVERITY_SCAN}" = "yes" ]; then curl -s 'https://scan.coverity.com/scripts/travisci_build_coverity_scan.sh' | bash || true; fi
|
2015-01-21 15:57:02 +00:00
|
|
|
|
2019-05-22 10:49:18 +00:00
|
|
|
- if [ "${DO_SIMULATION}" = "javacard" ]; then
|
2020-05-07 18:01:17 +00:00
|
|
|
set -ex;
|
2019-01-02 09:39:51 +00:00
|
|
|
git clone https://github.com/frankmorgner/vsmartcard.git;
|
|
|
|
cd vsmartcard/virtualsmartcard;
|
|
|
|
autoreconf -vis && ./configure && sudo make install;
|
|
|
|
cd $TRAVIS_BUILD_DIR;
|
2020-05-12 12:45:13 +00:00
|
|
|
sudo systemctl stop pcscd.service pcscd.socket;
|
2019-01-02 09:39:51 +00:00
|
|
|
|
|
|
|
git clone https://github.com/martinpaljak/oracle_javacard_sdks.git;
|
|
|
|
export JC_HOME=$PWD/oracle_javacard_sdks/jc222_kit;
|
|
|
|
export JC_CLASSIC_HOME=$PWD/oracle_javacard_sdks/jc305u3_kit;
|
|
|
|
|
|
|
|
git clone https://github.com/arekinath/jcardsim.git;
|
|
|
|
cd jcardsim;
|
2020-05-12 08:36:11 +00:00
|
|
|
env | grep -i openjdk;
|
|
|
|
export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64/;
|
2019-01-02 09:39:51 +00:00
|
|
|
mvn initialize && mvn clean install;
|
|
|
|
cd $TRAVIS_BUILD_DIR;
|
|
|
|
|
|
|
|
git clone https://github.com/philipWendland/IsoApplet.git;
|
|
|
|
javac -classpath jcardsim/target/jcardsim-3.0.5-SNAPSHOT.jar IsoApplet/src/net/pwendland/javacard/pki/isoapplet/*.java;
|
|
|
|
echo "com.licel.jcardsim.card.applet.0.AID=F276A288BCFBA69D34F31001" > isoapplet_jcardsim.cfg;
|
|
|
|
echo "com.licel.jcardsim.card.applet.0.Class=net.pwendland.javacard.pki.isoapplet.IsoApplet" >> isoapplet_jcardsim.cfg;
|
|
|
|
echo "com.licel.jcardsim.card.ATR=3B80800101" >> isoapplet_jcardsim.cfg;
|
|
|
|
echo "com.licel.jcardsim.vsmartcard.host=localhost" >> isoapplet_jcardsim.cfg;
|
|
|
|
echo "com.licel.jcardsim.vsmartcard.port=35963" >> isoapplet_jcardsim.cfg;
|
|
|
|
|
|
|
|
git clone https://github.com/vletoux/GidsApplet.git;
|
|
|
|
javac -classpath jcardsim/target/jcardsim-3.0.5-SNAPSHOT.jar GidsApplet/src/com/mysmartlogon/gidsApplet/*.java;
|
|
|
|
echo "com.licel.jcardsim.card.applet.0.AID=A000000397425446590201" > gids_jcardsim.cfg;
|
|
|
|
echo "com.licel.jcardsim.card.applet.0.Class=com.mysmartlogon.gidsApplet.GidsApplet" >> gids_jcardsim.cfg;
|
|
|
|
echo "com.licel.jcardsim.card.ATR=3B80800101" >> gids_jcardsim.cfg;
|
|
|
|
echo "com.licel.jcardsim.vsmartcard.host=localhost" >> gids_jcardsim.cfg;
|
|
|
|
echo "com.licel.jcardsim.vsmartcard.port=35963" >> gids_jcardsim.cfg;
|
|
|
|
|
|
|
|
git clone --recursive https://github.com/Yubico/ykneo-openpgp.git;
|
|
|
|
cd ykneo-openpgp;
|
|
|
|
ant -DJAVACARD_HOME=${JC_HOME};
|
|
|
|
cd $TRAVIS_BUILD_DIR;
|
|
|
|
echo "com.licel.jcardsim.card.applet.0.AID=D2760001240102000000000000010000" > openpgp_jcardsim.cfg;
|
|
|
|
echo "com.licel.jcardsim.card.applet.0.Class=openpgpcard.OpenPGPApplet" >> openpgp_jcardsim.cfg;
|
|
|
|
echo "com.licel.jcardsim.card.ATR=3B80800101" >> openpgp_jcardsim.cfg;
|
|
|
|
echo "com.licel.jcardsim.vsmartcard.host=localhost" >> openpgp_jcardsim.cfg;
|
|
|
|
echo "com.licel.jcardsim.vsmartcard.port=35963" >> openpgp_jcardsim.cfg;
|
|
|
|
|
|
|
|
git clone --recursive https://github.com/arekinath/PivApplet.git;
|
|
|
|
cd PivApplet;
|
2020-05-07 17:59:05 +00:00
|
|
|
JC_HOME=${JC_CLASSIC_HOME} ant dist;
|
2019-01-02 09:39:51 +00:00
|
|
|
cd $TRAVIS_BUILD_DIR;
|
|
|
|
|
|
|
|
git clone https://github.com/Yubico/yubico-piv-tool.git;
|
|
|
|
cd yubico-piv-tool;
|
|
|
|
autoreconf -vis && ./configure && sudo make install;
|
|
|
|
cd $TRAVIS_BUILD_DIR;
|
2020-05-07 18:01:17 +00:00
|
|
|
set +ex;
|
2019-01-02 09:39:51 +00:00
|
|
|
fi
|
|
|
|
|
2019-05-22 10:49:18 +00:00
|
|
|
- if [ "${DO_SIMULATION}" = "oseid" ]; then
|
|
|
|
git clone https://github.com/popovec/oseid;
|
|
|
|
cd oseid/src/;
|
|
|
|
make -f Makefile.console;
|
|
|
|
mkdir tmp;
|
|
|
|
socat -d -d pty,link=tmp/OsEIDsim.socket,raw,echo=0 "exec:build/console/console ...,pty,raw,echo=0" &
|
2020-05-07 16:36:33 +00:00
|
|
|
PID=$!;
|
2019-05-22 10:49:18 +00:00
|
|
|
sleep 1;
|
|
|
|
echo "# OsEIDsim" > tmp/reader.conf;
|
|
|
|
echo 'FRIENDLYNAME "OsEIDsim"' >> tmp/reader.conf;
|
|
|
|
echo "DEVICENAME ${TRAVIS_BUILD_DIR}/oseid/src/tmp/OsEIDsim.socket" >> tmp/reader.conf;
|
|
|
|
echo "LIBPATH ${TRAVIS_BUILD_DIR}/oseid/src/build/console/libOsEIDsim.so.0.0.1" >> tmp/reader.conf;
|
|
|
|
echo "CHANNELID 1" >> tmp/reader.conf;
|
|
|
|
sudo mv tmp/reader.conf /etc/reader.conf.d/reader.conf;
|
|
|
|
cat /etc/reader.conf.d/reader.conf;
|
|
|
|
cd $TRAVIS_BUILD_DIR;
|
|
|
|
|
|
|
|
sudo /etc/init.d/pcscd restart;
|
|
|
|
fi
|
|
|
|
|
2019-08-20 13:17:14 +00:00
|
|
|
- if [ "${DO_SIMULATION}" = "cac" ]; then
|
|
|
|
git clone https://github.com/frankmorgner/vsmartcard.git;
|
|
|
|
cd vsmartcard/virtualsmartcard;
|
|
|
|
autoreconf -vis && ./configure && make -j4 && sudo make install;
|
|
|
|
|
|
|
|
cd $TRAVIS_BUILD_DIR;
|
|
|
|
git clone https://gitlab.freedesktop.org/spice/libcacard.git;
|
|
|
|
cd libcacard && ./autogen.sh --prefix=/usr && make -j4 && sudo make install;
|
|
|
|
|
|
|
|
cd $TRAVIS_BUILD_DIR;
|
|
|
|
git clone https://github.com/PL4typus/virt_cacard.git;
|
|
|
|
cd virt_cacard && ./autogen.sh && ./configure && make;
|
|
|
|
|
|
|
|
cd $TRAVIS_BUILD_DIR;
|
|
|
|
sudo /etc/init.d/pcscd restart;
|
|
|
|
fi
|
|
|
|
|
2015-01-21 15:57:02 +00:00
|
|
|
script:
|
2018-04-07 10:08:08 +00:00
|
|
|
- if [ "${DO_COVERITY_SCAN}" != "yes" ]; then
|
2019-05-22 10:49:18 +00:00
|
|
|
if [ "${TRAVIS_OS_NAME}" = "osx" ]; then
|
2016-02-29 19:47:09 +00:00
|
|
|
./MacOSX/build;
|
2015-03-31 22:13:19 +00:00
|
|
|
else
|
2019-01-02 09:39:51 +00:00
|
|
|
make -j 4;
|
2015-03-31 22:13:19 +00:00
|
|
|
fi;
|
2015-01-21 15:57:02 +00:00
|
|
|
fi
|
2019-05-22 10:49:18 +00:00
|
|
|
- if [ -z "$HOST" -a "${DO_COVERITY_SCAN}" != "yes" -a -z "$DO_SIMULATION" ]; then
|
2018-04-04 13:46:49 +00:00
|
|
|
make check && make dist;
|
2015-01-21 15:57:02 +00:00
|
|
|
fi
|
2018-04-07 10:08:08 +00:00
|
|
|
- if [ ! -z "$HOST" -a "${DO_COVERITY_SCAN}" != "yes" ]; then
|
2015-09-14 20:45:13 +00:00
|
|
|
make install;
|
|
|
|
wine "C:/Program Files (x86)/Inno Setup 5/ISCC.exe" win32/OpenSC.iss;
|
|
|
|
fi
|
2015-09-15 06:57:03 +00:00
|
|
|
|
2019-05-22 10:49:18 +00:00
|
|
|
- if [ "${DO_SIMULATION}" = "javacard" ]; then
|
2019-01-02 09:39:51 +00:00
|
|
|
set -ex;
|
|
|
|
sudo make install;
|
|
|
|
export LD_LIBRARY_PATH=/usr/local/lib;
|
|
|
|
|
2020-05-12 12:45:13 +00:00
|
|
|
sudo /usr/sbin/pcscd -f &
|
|
|
|
PCSCD_PID=$!;
|
|
|
|
|
2019-01-02 09:39:51 +00:00
|
|
|
java -noverify -cp IsoApplet/src/:jcardsim/target/jcardsim-3.0.5-SNAPSHOT.jar com.licel.jcardsim.remote.VSmartCard isoapplet_jcardsim.cfg >/dev/null &
|
2020-05-07 16:36:33 +00:00
|
|
|
PID=$!;
|
2019-01-02 09:39:51 +00:00
|
|
|
sleep 5;
|
|
|
|
opensc-tool --card-driver default --send-apdu 80b800001a0cf276a288bcfba69d34f310010cf276a288bcfba69d34f3100100;
|
|
|
|
opensc-tool -n;
|
2019-04-12 20:39:46 +00:00
|
|
|
pkcs15-init --create-pkcs15 --so-pin 123456 --so-puk 0123456789abcdef;
|
2020-06-01 12:38:58 +00:00
|
|
|
pkcs15-tool --change-pin --pin 123456 --new-pin 654321;
|
|
|
|
pkcs15-tool --unblock-pin --puk 0123456789abcdef --new-pin 123456;
|
2019-04-12 20:39:46 +00:00
|
|
|
pkcs15-init --generate-key rsa/2048 --id 1 --key-usage decrypt,sign --auth-id FF --pin 123456;
|
|
|
|
pkcs15-init --generate-key rsa/2048 --id 2 --key-usage decrypt --auth-id FF --pin 123456;
|
|
|
|
pkcs15-init --generate-key ec/secp256r1 --id 3 --key-usage sign --auth-id FF --pin 123456;
|
|
|
|
pkcs15-tool -D;
|
|
|
|
pkcs11-tool -l -t -p 123456;
|
2020-05-07 16:36:33 +00:00
|
|
|
kill -9 $PID;
|
2019-01-02 09:39:51 +00:00
|
|
|
|
|
|
|
java -noverify -cp GidsApplet/src/:jcardsim/target/jcardsim-3.0.5-SNAPSHOT.jar com.licel.jcardsim.remote.VSmartCard gids_jcardsim.cfg >/dev/null &
|
2020-05-07 16:36:33 +00:00
|
|
|
PID=$!;
|
2019-01-02 09:39:51 +00:00
|
|
|
sleep 5;
|
|
|
|
opensc-tool --card-driver default --send-apdu 80b80000190bA0000003974254465902010bA00000039742544659020100;
|
|
|
|
opensc-tool -n;
|
|
|
|
gids-tool --initialize --pin 123456 --admin-key 000000000000000000000000000000000000000000000000 --serial 00000000000000000000000000000000;
|
2020-05-07 16:36:33 +00:00
|
|
|
kill -9 $PID;
|
2019-01-02 09:39:51 +00:00
|
|
|
|
|
|
|
java -noverify -cp ykneo-openpgp/applet/bin:jcardsim/target/jcardsim-3.0.5-SNAPSHOT.jar com.licel.jcardsim.remote.VSmartCard openpgp_jcardsim.cfg >/dev/null &
|
2020-05-07 16:36:33 +00:00
|
|
|
PID=$!;
|
2019-01-02 09:39:51 +00:00
|
|
|
sleep 5;
|
|
|
|
opensc-tool --card-driver default --send-apdu 80b800002210D276000124010200000000000001000010D276000124010200000000000001000000;
|
|
|
|
opensc-tool -n;
|
2019-08-22 13:45:22 +00:00
|
|
|
openpgp-tool --verify CHV3 --pin 12345678 --gen-key 2;
|
|
|
|
pkcs15-init --verify --auth-id 3 --pin 12345678 --delete-objects privkey,pubkey --id 2 --generate-key rsa/2048;
|
2019-01-02 09:39:51 +00:00
|
|
|
pkcs11-tool -l -t -p 123456;
|
2020-05-07 16:36:33 +00:00
|
|
|
kill -9 $PID;
|
2019-01-02 09:39:51 +00:00
|
|
|
|
|
|
|
java -noverify -cp PivApplet/bin/:jcardsim/target/jcardsim-3.0.5-SNAPSHOT.jar com.licel.jcardsim.remote.VSmartCard PivApplet/test/jcardsim.cfg >/dev/null &
|
2020-05-07 16:36:33 +00:00
|
|
|
PID=$!;
|
2019-01-02 09:39:51 +00:00
|
|
|
sleep 5;
|
|
|
|
opensc-tool --card-driver default --send-apdu 80b80000120ba000000308000010000100050000020F0F7f;
|
|
|
|
opensc-tool -n;
|
2020-05-12 12:45:13 +00:00
|
|
|
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;
|
2019-01-02 09:39:51 +00:00
|
|
|
pkcs11-tool -l -t -p 123456;
|
2020-05-07 16:36:33 +00:00
|
|
|
kill -9 $PID;
|
2019-05-22 10:49:18 +00:00
|
|
|
|
2020-05-12 12:45:13 +00:00
|
|
|
sudo kill -9 $PCSCD_PID;
|
|
|
|
|
2019-05-22 10:49:18 +00:00
|
|
|
set +ex;
|
|
|
|
fi
|
|
|
|
|
|
|
|
- if [ "${DO_SIMULATION}" = "oseid" ]; then
|
|
|
|
set -ex;
|
|
|
|
sudo make install;
|
|
|
|
export LD_LIBRARY_PATH=/usr/local/lib;
|
|
|
|
|
|
|
|
cd oseid/tools;
|
|
|
|
echo | ./OsEID-tool INIT;
|
|
|
|
./OsEID-tool RSA-CREATE-KEYS;
|
|
|
|
./OsEID-tool RSA-UPLOAD-KEYS;
|
|
|
|
./OsEID-tool RSA-DECRYPT-TEST;
|
|
|
|
./OsEID-tool EC-CREATE-KEYS;
|
|
|
|
./OsEID-tool EC-UPLOAD-KEYS;
|
|
|
|
./OsEID-tool EC-SIGN-TEST;
|
|
|
|
./OsEID-tool EC-ECDH-TEST;
|
2020-05-07 16:36:33 +00:00
|
|
|
kill -9 $PID;
|
2019-05-22 10:49:18 +00:00
|
|
|
|
2019-01-02 09:39:51 +00:00
|
|
|
set +ex;
|
|
|
|
fi
|
2019-08-20 13:17:14 +00:00
|
|
|
- if [ "${DO_SIMULATION}" = "cac" ]; then
|
|
|
|
cd $TRAVIS_BUILD_DIR;
|
2020-01-31 20:03:20 +00:00
|
|
|
make check && sudo make install || (cat tests/*log src/tests/unittests/*log && exit);
|
2019-08-20 13:17:14 +00:00
|
|
|
export LD_LIBRARY_PATH=/usr/local/lib;
|
|
|
|
cd src/tests/p11test/;
|
|
|
|
./p11test -s 0 -p 12345678 -i &
|
|
|
|
sleep 5;
|
|
|
|
cd $TRAVIS_BUILD_DIR/virt_cacard;
|
|
|
|
./setup-softhsm2.sh;
|
|
|
|
export SOFTHSM2_CONF=$PWD/softhsm2.conf;
|
|
|
|
./virt_cacard &
|
|
|
|
wait $(ps aux | grep '[p]11test'| awk '{print $2}');
|
|
|
|
kill -9 $(ps aux | grep '[v]irt_cacard'| awk '{print $2}');
|
|
|
|
fi
|
2019-01-02 09:39:51 +00:00
|
|
|
|
2017-02-24 21:52:35 +00:00
|
|
|
after_script:
|
|
|
|
# kill process started during compilation to finish the build, see
|
|
|
|
# https://github.com/moodlerooms/moodle-plugin-ci/issues/33 for details
|
2017-03-03 10:03:32 +00:00
|
|
|
- if [ ! -z "$HOST" ]; then
|
2017-02-24 21:52:35 +00:00
|
|
|
killall services.exe;
|
|
|
|
fi
|
|
|
|
|
2018-05-24 09:55:25 +00:00
|
|
|
# keep in sync with appveyor.yml
|
2019-03-21 21:27:04 +00:00
|
|
|
- if [ "${DO_PUSH_ARTIFACT}" = "yes" -a "$TRAVIS_PULL_REQUEST" = "false" -a "$TRAVIS_REPO_SLUG" = "OpenSC/OpenSC" ]; then
|
2018-05-24 09:55:25 +00:00
|
|
|
git config --global user.email "builds@travis-ci.org";
|
|
|
|
git config --global user.name "Travis CI";
|
|
|
|
.github/push_artifacts.sh "Travis CI build ${TRAVIS_JOB_NUMBER}";
|
|
|
|
fi
|
2020-04-06 13:42:30 +00:00
|
|
|
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then
|
|
|
|
.github/remove_signing_key.sh;
|
|
|
|
rm -f .github/secrets.tar;
|
|
|
|
fi
|
2018-05-24 09:55:25 +00:00
|
|
|
|
2019-01-05 23:04:23 +00:00
|
|
|
before_cache:
|
2019-08-20 13:17:14 +00:00
|
|
|
- brew cleanup
|
2019-01-05 23:04:23 +00:00
|
|
|
|
2019-01-02 09:39:51 +00:00
|
|
|
cache:
|
|
|
|
apt: true
|
|
|
|
ccache: true
|
|
|
|
directories:
|
2019-08-20 13:17:14 +00:00
|
|
|
- $HOME/.m2/
|
|
|
|
- $HOME/Library/Caches/Homebrew
|
|
|
|
- openssl_bin
|
|
|
|
- openpace_bin
|
2020-03-03 09:09:38 +00:00
|
|
|
- isetup
|