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);