1607020014.v7-10-g321c5cd.keys-return-null-if-jose-jwk-pub-fails.patch 639 B

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