Skip to content

Commit e0891bc

Browse files
authored
Merge pull request #3 from istepic/p11-from-source
ci: install patched p11 from source
2 parents efb8dd1 + d7e2cba commit e0891bc

File tree

5 files changed

+770
-7
lines changed

5 files changed

+770
-7
lines changed

.github/actions/build-docker/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,5 @@ runs:
1717
- name: "Build Docker image"
1818
shell: bash
1919
run: |
20-
docker build -t ${{ inputs.docker_tag }} - < ${{ inputs.docker_file_path }}
20+
docker build -t ${{ inputs.docker_tag }} ${{ inputs.docker_file_path }}
2121

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@ on:
88

99
env:
1010
DOCKER_TAG: buildenv
11-
DOCKER_FILE_PATH: ./docker-build-env/Dockerfile
11+
DOCKER_FILE_PATH: ./dockerfiles/base
1212

1313
DOCKER_WITH_HSM_TAG: buildenv_with_hsm
14-
DOCKER_WITH_HSM_FILE_PATH: ./docker-build-env/Dockerfile-With-HSM
14+
DOCKER_WITH_HSM_FILE_PATH: ./dockerfiles/hsm-support
1515

1616
TOKEN_LABEL: token-label
1717
USER_PIN: 1234
Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,27 @@ FROM buildenv
22

33
# Install MoCOCrW dependencies (except OpenSSL)
44
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get -y --no-install-recommends install \
5-
# libp11 engine
6-
libengine-pkcs11-openssl \
7-
# headers for p11 engine
8-
libp11-dev \
95
# for pkcs11-tool which we use to create keys in token
106
opensc \
117
# p11-kit-modules allows loading of libp11 engine without having to edit openssl.cnf
128
p11-kit-modules \
139
# softhsm2: includes both softhsm2-util and libsofthsm2
1410
softhsm2 \
11+
# libp11 needs this
12+
libtool \
1513
&& rm -rf /var/lib/apt/lists/*
14+
15+
ADD keygen.patch /tmp/
16+
17+
RUN cd /tmp && \
18+
wget https://github.com/OpenSC/libp11/releases/download/libp11-0.4.12/libp11-0.4.12.tar.gz && \
19+
tar xvf libp11-0.4.12.tar.gz && \
20+
cd libp11-0.4.12 && \
21+
git apply /tmp/keygen.patch && \
22+
echo "Successfully patched libp11" && \
23+
autoreconf --verbose --install --force && \
24+
./configure --enable-strict && \
25+
make -j$(nproc) && \
26+
make check && \
27+
make install
28+

0 commit comments

Comments
 (0)