forked from Yubico/yubihsm-shell
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
95 lines (89 loc) · 3.32 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
env:
global:
- secure: "hg3zpwTsdl1hawBZjLlZw5ErUMSqQA+FEvnbeAXTPW1d+5oa/Yu5z6bYl9MqnKxx0Kyux9QJdgov/nkqQLTVy88U4w9qkEtQ6auKQxYdku9OWeduFy3P5oeI6IUkhOibxkqY9EDolBRKctTKyyDwKjDanTTttGYFeQq4jz7xkb05WmZ9gB1HPO0QPYljzPJyDw26pt2b4KC6eszeyHkwwOEAPblKkdpKILMrL/AWSiA6XkE9WN6pepHEKgfVf4g9tRupYJ9Ika9NAJpH0xHRIMb5Blu+8ccgXnyFGNVxcWrsgSYrMhXXP5MREMB4GuD2FbZya4bOZJwEGE5h3Q8wbLjneVpJsMk1zTZfWpKFs9o6gvJ4nzFWm0fcpvM7FeDmAmdvUtZk032SKEtQ337heSwS3F8pRjNdo2mqHkuH8CoKIxHI7W3kkRSnVCbLZ0HnvKh6UNcGPrn1Lm+3mfXvudjHLwchMr+XOgY41OahLhtcL+hhQhxvznapJnHbwyn3IItiurK+9x5q66UZ2ZUXwN8QiNrZKWSe4Ixb1ccaC3W7uOhiX859O7JxgCuSBbhrXqpDbUpF2VVn5+m/gJl9//hqPhI/m++EoP+ZgxB5xwD3cn2VZlKRSXSoT80zYP1ZrjG2CMJT9dPTwC4mtGNvdDZ1oUL9HeeUtVvp4E4bqIs="
before_install:
- openssl aes-256-cbc -k "$tlspwd" -md sha256 -in ./.ci/client-combined.pem.enc -out ./.ci/client-combined.pem -d
- git clone https://github.com/YubicoLabs/python-pkcs11tester.git /tmp/python-pkcs11tester
- git clone https://github.com/YubicoLabs/pkcs11test.git /tmp/pkcs11test
language: c
addons:
apt:
packages:
- cmake
- gengetopt
- help2man
- lcov
- libcurl4-openssl-dev
- libedit-dev
libengine-pkcs11-openssl
- libpcsclite-dev
- libssl-dev
- libusb-1.0-0-dev
- opensc
- pkg-config
- swig
homebrew:
packages:
- cmake
- gengetopt
- help2man
- libedit
- libusb
- pcsc-lite
- pkg-config
- swig
- truncate
update: true
matrix:
include:
- os: linux
dist: xenial
compiler: gcc
env:
- CMAKE_EXTRA="-DENABLE_COVERAGE=1"
- LIBEXT="so"
after_success:
- gem install coveralls-lcov
- cmake --build build --target lcov
- coveralls-lcov build/lcov/data/capture/all_targets.info
- os: linux
dist: xenial
compiler: clang
env:
- LIBEXT="so"
- os: osx
compiler: clang
env:
- LIBEXT="dylib"
script:
- pushd /tmp/pkcs11test
- make
- export PKCS11TEST_PATH="/tmp/pkcs11test"
- popd
- export krnl="$(uname -s | tr '[:upper:]' '[:lower:]')"
- wget https://github.com/square/ghostunnel/releases/download/v1.3.1/ghostunnel-v1.3.1-$krnl-amd64-with-pkcs11 -O ghostunnel
- chmod +x ./ghostunnel
- ./ghostunnel client --listen localhost:12345 --target hsm-connector01.sthlm.in.yubico.org:8443 --keystore ./.ci/client-combined.pem --cacert ./.ci/server-crt.pem 2>/dev/null &
- sleep 3
- export DEFAULT_CONNECTOR_URL=$(curl http://localhost:12345/dispatcher/request)
- echo $DEFAULT_CONNECTOR_URL
- cmake -Bbuild -H. -DENABLE_EXPERIMENTAL_YKYH=1 -DDEFAULT_CONNECTOR_URL="$DEFAULT_CONNECTOR_URL" $CMAKE_EXTRA
- cmake --build build -- --jobs=2 VERBOSE=1
- test -e ./build/src/yubihsm-shell
- test -e ./build/lib/libyubihsm.$LIBEXT
- test -e ./build/pkcs11/yubihsm_pkcs11.$LIBEXT
- test -e ./build/yhwrap/yubihsm-wrap
- pushd build
- ./src/yubihsm-shell --connector "$DEFAULT_CONNECTOR_URL" -p password -a reset
- sleep 3
- ctest --output-on-failure
- export YUBIHSM_PKCS11_MODULE="$PWD/pkcs11/yubihsm_pkcs11.$LIBEXT"
- popd
- pushd /tmp/python-pkcs11tester
- echo "connector=$DEFAULT_CONNECTOR_URL" >yubihsm_pkcs11.conf
- pip install --user pykcs11==1.5.2
- python setup.py test
- popd
after_script:
curl "http://localhost:12345/dispatcher/release?connector=$DEFAULT_CONNECTOR_URL"