Skip to content

Commit 6f81be1

Browse files
committed
tests: Migrate off gpg2 and regenerate key ed25519
Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
1 parent df3f8e2 commit 6f81be1

4 files changed

Lines changed: 10 additions & 18 deletions

File tree

tests/Dockerfile

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ ARG PYTHON_VERSION=3.12
44
FROM python:${PYTHON_VERSION}
55

66
RUN apt-get update && apt-get -y install --no-install-recommends \
7-
gnupg2 \
7+
gnupg \
88
pass
99

1010
# Add SSH keys and set permissions
@@ -14,10 +14,10 @@ RUN sed -i '1s;^;dpy-dind-ssh ;' /root/.ssh/known_hosts
1414
RUN chmod -R 600 /root/.ssh
1515

1616
COPY ./tests/gpg-keys /gpg-keys
17-
RUN gpg2 --import gpg-keys/secret
18-
RUN gpg2 --import-ownertrust gpg-keys/ownertrust
19-
RUN yes | pass init $(gpg2 --no-auto-check-trustdb --list-secret-key | awk '/^sec/{getline; $1=$1; print}')
20-
RUN gpg2 --check-trustdb
17+
RUN gpg --batch --pinentry-mode loopback --passphrase '' --import gpg-keys/secret
18+
RUN gpg --import-ownertrust gpg-keys/ownertrust
19+
RUN yes | pass init $(gpg --no-auto-check-trustdb --list-secret-key | awk '/^sec/{getline; $1=$1; print}')
20+
RUN gpg --check-trustdb
2121
ARG CREDSTORE_VERSION=v0.6.3
2222
RUN curl -sSL -o /opt/docker-credential-pass.tar.gz \
2323
https://github.com/docker/docker-credential-helpers/releases/download/$CREDSTORE_VERSION/docker-credential-pass-$CREDSTORE_VERSION-amd64.tar.gz && \

tests/gpg-keys/ownertrust

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
# List of assigned trustvalues, created Wed 25 Apr 2018 01:28:17 PM PDT
1+
# List of assigned trustvalues, created Wed May 6 10:29:17 2026 UTC
22
# (Use "gpg --import-ownertrust" to restore them)
3-
9781B87DAB042E6FD51388A5464ED987A7B21401:6:
3+
9B87CDB4965061C06C6557BC377FA74706852BF9:6:

tests/gpg-keys/secret

-474 Bytes
Binary file not shown.
Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,4 @@
11
#!/usr/bin/sh
2-
haveged
3-
gpg --batch --gen-key <<-EOF
4-
%echo Generating a standard key
5-
Key-Type: DSA
6-
Key-Length: 1024
7-
Subkey-Type: ELG-E
8-
Subkey-Length: 1024
9-
Name-Real: Sakuya Izayoi
10-
Name-Email: sakuya@gensokyo.jp
11-
Expire-Date: 0
12-
EOF
2+
gpg --batch --passphrase '' --quick-gen-key 'Sakuya Izayoi <sakuya@gensokyo.jp>' ed25519 cert 0
3+
FINGERPRINT=$(gpg --no-auto-check-trustdb --list-secret-keys --with-colons | awk -F: '/^fpr/{print $10; exit}')
4+
gpg --batch --passphrase '' --quick-add-key "$FINGERPRINT" cv25519 encr 0

0 commit comments

Comments
 (0)