Browse Source

Cherry-pick "Keys: return NULL if jose_jwk_pub() fails"

Christoph Biedl 3 years ago
parent
commit
1e20628243

+ 17 - 0
debian/patches/cherry-pick/1607020014.v7-10-g321c5cd.keys-return-null-if-jose-jwk-pub-fails.patch

@@ -0,0 +1,17 @@
+Subject: Keys: return NULL if jose_jwk_pub() fails
+Origin: v7-10-g321c5cd <https://github.com/latchset/tang/commit/v7-10-g321c5cd>
+Upstream-Author: Sergio Correia <scorreia@redhat.com>
+Date: Thu Dec 3 15:26:54 2020 -0300
+
+    Follow-up from 60905058, where we added functions for key manipulation.
+
+--- a/src/keys.c
++++ b/src/keys.c
+@@ -226,6 +226,7 @@
+     json_auto_t* to_sign_copy = json_deep_copy(to_sign);
+     if (!jose_jwk_pub(NULL, to_sign_copy)) {
+         fprintf(stderr, "Error removing private material from data to sign\n");
++        return NULL;
+     }
+ 
+     json_auto_t* payload = json_pack("{s:O}", "keys", to_sign_copy);

+ 1 - 0
debian/patches/series

@@ -6,6 +6,7 @@ cherry-pick/1594371716.v7-5-g2ef4acf.just-correct-some-spelling.patch
 cherry-pick/1606480249.v7-6-g6090505.add-functions-for-key-manipulation.patch
 cherry-pick/1606480958.v7-7-gc71df1d.add-tests-for-key-manipulation-functions.patch
 cherry-pick/1606525324.v7-8-g7119454.move-key-handling-to-tang-itself.patch
+cherry-pick/1607020014.v7-10-g321c5cd.keys-return-null-if-jose-jwk-pub-fails.patch
 
 # patches for upstream
 for-upstream/2018-08-11.use-asciidoctor-to-build-manpages.patch