From dba0a7e10293c184d23fef88e8e9738e157a0b85 Mon Sep 17 00:00:00 2001 From: Sergio Arroutbi Date: Thu, 20 Jan 2022 17:56:06 +0100 Subject: [PATCH] Dump server information on server error communication resolves: rhbz#2022423 Signed-off-by: Sergio Arroutbi --- 0005-tang-dump-url-on-error-communication.patch | 16 ++++++++++++++++ clevis.spec | 7 ++++++- 2 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 0005-tang-dump-url-on-error-communication.patch diff --git a/0005-tang-dump-url-on-error-communication.patch b/0005-tang-dump-url-on-error-communication.patch new file mode 100644 index 0000000..c8224bb --- /dev/null +++ b/0005-tang-dump-url-on-error-communication.patch @@ -0,0 +1,16 @@ +--- clevis-18.ori/src/pins/tang/clevis-decrypt-tang 2021-04-15 13:00:19.969067600 +0200 ++++ clevis-18/src/pins/tang/clevis-decrypt-tang 2022-01-20 17:29:21.859897964 +0100 +@@ -99,10 +99,10 @@ + + xfr="$(jose jwk exc -i '{"alg":"ECMR"}' -l- -r- <<< "$clt$eph")" + +-url="$url/rec/$kid" ++rec_url="$url/rec/$kid" + ct="Content-Type: application/jwk+json" +-if ! rep="$(curl -sfg -X POST -H "$ct" --data-binary @- "$url" <<< "$xfr")"; then +- echo "Error communicating with the server!" >&2 ++if ! rep="$(curl -sfg -X POST -H "$ct" --data-binary @- "$rec_url" <<< "$xfr")"; then ++ echo "Error communicating with the server $url" >&2 + exit 1 + fi + diff --git a/clevis.spec b/clevis.spec index 9d525b9..992558d 100644 --- a/clevis.spec +++ b/clevis.spec @@ -1,6 +1,6 @@ Name: clevis Version: 18 -Release: 7%{?dist} +Release: 100%{?dist} Summary: Automated decryption framework License: GPLv3+ @@ -12,6 +12,7 @@ Patch0001: 0001-sss-use-BN_set_word-x-0-instead-of-BN_zero.patch Patch0002: 0002-systemd-account-for-unlocking-failures-in-clevis-luk.patch Patch0003: 0003-luks-enable-debugging-in-clevis-scripts-when-rd.debu.patch Patch0004: 0004-luks-explicitly-specify-pbkdf-iterations-to-cryptset.patch +Patch0005: 0005-tang-dump-url-on-error-communication.patch BuildRequires: git-core BuildRequires: gcc @@ -196,6 +197,10 @@ exit 0 %attr(4755, root, root) %{_libexecdir}/%{name}-luks-udisks2 %changelog +* Thu Jan 20 2022 Sergio Arroutbi - 18-100 +- Dump server information on server error communication + Resolves: rhbz#2022423 + * Tue Jan 04 2022 Sergio Correia - 18-7 - Explicitly specify pbkdf iterations to cryptsetup Resolves: rhbz#2022416