Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package libjcat for openSUSE:Factory checked in at 2023-05-03 12:56:21 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/libjcat (Old) and /work/SRC/openSUSE:Factory/.libjcat.new.1533 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "libjcat" Wed May 3 12:56:21 2023 rev:10 rq:1083980 version:0.1.13 Changes: -------- --- /work/SRC/openSUSE:Factory/libjcat/libjcat.changes 2022-10-12 18:22:57.745405283 +0200 +++ /work/SRC/openSUSE:Factory/.libjcat.new.1533/libjcat.changes 2023-05-03 12:56:25.315530950 +0200 @@ -1,0 +2,10 @@ +Thu Apr 27 22:31:13 UTC 2023 - Dirk Müller <[email protected]> + +- update to 0.1.13: + * Add support for SHA512 checksums (Richard Hughes) + * Add the ability to add and remove support for blob types + * Fix header includes for clang-tidy (Richard Hughes) + * Show the expected SHA checksum in the error (Richard + Hughes) + +------------------------------------------------------------------- Old: ---- libjcat-0.1.12.tar.gz New: ---- libjcat-0.1.13.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ libjcat.spec ++++++ --- /var/tmp/diff_new_pack.vg7g0b/_old 2023-05-03 12:56:25.839534029 +0200 +++ /var/tmp/diff_new_pack.vg7g0b/_new 2023-05-03 12:56:25.859534146 +0200 @@ -1,7 +1,7 @@ # # spec file for package libjcat # -# Copyright (c) 2022 SUSE LLC +# Copyright (c) 2023 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -19,7 +19,7 @@ %define sover 1 Name: libjcat -Version: 0.1.12 +Version: 0.1.13 Release: 0 Summary: Library for reading and writing gzip-compressed JSON catalog files License: LGPL-2.1-or-later ++++++ libjcat-0.1.12.tar.gz -> libjcat-0.1.13.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libjcat-0.1.12/.clang-tidy new/libjcat-0.1.13/.clang-tidy --- old/libjcat-0.1.12/.clang-tidy 1970-01-01 01:00:00.000000000 +0100 +++ new/libjcat-0.1.13/.clang-tidy 2023-02-22 17:09:42.000000000 +0100 @@ -0,0 +1,42 @@ +--- +Checks: "-*,\ +bugprone-*,\ +-bugprone-assignment-in-if-condition,\ +-bugprone-easily-swappable-parameters,\ +-bugprone-implicit-widening-of-multiplication-result,\ +-bugprone-macro-parentheses,\ +-bugprone-misplaced-widening-cast,\ +-bugprone-narrowing-conversions,\ +-bugprone-reserved-identifier,\ +-bugprone-too-small-loop-variable,\ +-bugprone-unchecked-optional-access,\ +misc-*,\ +-misc-confusable-identifiers,\ +-misc-const-correctness,\ +-misc-non-private-member-variables-in-classes,\ +-misc-no-recursion,\ +-misc-static-assert,\ +-misc-unused-parameters,\ +modernize-*,\ +-modernize-macro-to-enum,\ +-modernize-use-trailing-return-type,\ +-modernize-use-transparent-functors,\ +performance-*,\ +-performance-inefficient-vector-operation,\ +-performance-no-int-to-ptr,\ +readability-*,\ +-readability-avoid-const-params-in-decls,\ +-readability-braces-around-statements,\ +-readability-function-cognitive-complexity,\ +-readability-identifier-length,\ +-readability-identifier-naming,\ +-readability-implicit-bool-conversion,\ +-readability-isolate-declaration,\ +-readability-magic-numbers,\ +-readability-non-const-parameter,\ +-readability-qualified-auto,\ +-readability-redundant-declaration,\ +-readability-suspicious-call-argument,\ +-readability-uppercase-literal-suffix,\ +" +... diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libjcat-0.1.12/NEWS new/libjcat-0.1.13/NEWS --- old/libjcat-0.1.12/NEWS 2022-09-11 12:28:47.000000000 +0200 +++ new/libjcat-0.1.13/NEWS 2023-02-22 17:09:42.000000000 +0100 @@ -1,3 +1,15 @@ +Version 0.1.13 +~~~~~~~~~~~~~~ +Released: 2023-02-22 + +New Features: + - Add support for SHA512 checksums (Richard Hughes) + - Add the ability to add and remove support for blob types (#72) (Richard Hughes) + +Bugfixes: + - Fix header includes for clang-tidy (Richard Hughes) + - Show the expected SHA checksum in the error (Richard Hughes) + Version 0.1.12 ~~~~~~~~~~~~~~ Released: 2022-09-11 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libjcat-0.1.12/README.md new/libjcat-0.1.13/README.md --- old/libjcat-0.1.12/README.md 2022-09-11 12:28:47.000000000 +0200 +++ new/libjcat-0.1.13/README.md 2023-02-22 17:09:42.000000000 +0100 @@ -131,7 +131,7 @@ Lets create a Jcat file with a single checksum: - $ jcat-tool sign test.jcat firmware.bin sha256 + $ jcat-tool self-sign test.jcat firmware.bin --kind sha256 $ jcat-tool info test.jcat JcatFile: Version: 0.1 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libjcat-0.1.12/RELEASE new/libjcat-0.1.13/RELEASE --- old/libjcat-0.1.12/RELEASE 2022-09-11 12:28:47.000000000 +0200 +++ new/libjcat-0.1.13/RELEASE 2023-02-22 17:09:42.000000000 +0100 @@ -2,11 +2,11 @@ 1. Write NEWS entries for libjcat in the same format as usual. -git shortlog 0.1.11.. | grep -i -v trivial | grep -v Merge > NEWS.new +git shortlog 0.1.12.. | grep -i -v trivial | grep -v Merge > NEWS.new -Version 0.1.12 +Version 0.1.13 ~~~~~~~~~~~~~~ -Released: 2022-xx-xx +Released: 2023-xx-xx New Features: Bugfixes: @@ -15,7 +15,7 @@ Commit changes to git: # MAKE SURE THESE ARE CORRECT -export release_ver="0.1.12" +export release_ver="0.1.13" git commit -a -m "Release libjcat ${release_ver}" git tag -s -f -m "Release libjcat ${release_ver}" "${release_ver}" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libjcat-0.1.12/libjcat/jcat-blob.c new/libjcat-0.1.13/libjcat/jcat-blob.c --- old/libjcat-0.1.12/libjcat/jcat-blob.c 2022-09-11 12:28:47.000000000 +0200 +++ new/libjcat-0.1.13/libjcat/jcat-blob.c 2023-02-22 17:09:42.000000000 +0100 @@ -77,6 +77,8 @@ return JCAT_BLOB_KIND_BT_VERIFIER; if (g_strcmp0(kind, "ed25519") == 0) return JCAT_BLOB_KIND_ED25519; + if (g_strcmp0(kind, "sha512") == 0) + return JCAT_BLOB_KIND_SHA512; return JCAT_BLOB_KIND_UNKNOWN; } @@ -111,6 +113,8 @@ return "bt-verifier"; if (kind == JCAT_BLOB_KIND_ED25519) return "ed25519"; + if (kind == JCAT_BLOB_KIND_SHA512) + return "sha512"; return NULL; } @@ -145,6 +149,8 @@ return "btverifier"; if (kind == JCAT_BLOB_KIND_ED25519) return "ed25519"; + if (kind == JCAT_BLOB_KIND_SHA512) + return "sha512"; return NULL; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libjcat-0.1.12/libjcat/jcat-blob.h new/libjcat-0.1.13/libjcat/jcat-blob.h --- old/libjcat-0.1.12/libjcat/jcat-blob.h 2022-09-11 12:28:47.000000000 +0200 +++ new/libjcat-0.1.13/libjcat/jcat-blob.h 2023-02-22 17:09:42.000000000 +0100 @@ -24,6 +24,7 @@ * @JCAT_BLOB_KIND_BT_INCLUSION_PROOF: Binary transparency inclusion proof * @JCAT_BLOB_KIND_BT_VERIFIER: Binary transparency verifier * @JCAT_BLOB_KIND_ED25519: ED25519 signature + * @JCAT_BLOB_KIND_SHA512: SHA-512 checksum * * The kind of blob stored as a signature on the item. **/ @@ -38,6 +39,7 @@ JCAT_BLOB_KIND_BT_INCLUSION_PROOF, /* Since: 0.1.9 */ JCAT_BLOB_KIND_BT_VERIFIER, /* Since: 0.1.9 */ JCAT_BLOB_KIND_ED25519, /* Since: 0.1.9 */ + JCAT_BLOB_KIND_SHA512, /* Since: 0.1.13 */ /*< private >*/ JCAT_BLOB_KIND_LAST } JcatBlobKind; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libjcat-0.1.12/libjcat/jcat-context.c new/libjcat-0.1.13/libjcat/jcat-context.c --- old/libjcat-0.1.12/libjcat/jcat-context.c 2022-09-11 12:28:47.000000000 +0200 +++ new/libjcat-0.1.13/libjcat/jcat-context.c 2023-02-22 17:09:42.000000000 +0100 @@ -27,6 +27,7 @@ GPtrArray *engines; GPtrArray *public_keys; gchar *keyring_path; + guint32 blob_kinds; } JcatContextPrivate; G_DEFINE_TYPE_WITH_PRIVATE(JcatContext, jcat_context, G_TYPE_OBJECT) @@ -54,6 +55,8 @@ jcat_context_init(JcatContext *self) { JcatContextPrivate *priv = GET_PRIVATE(self); + + priv->blob_kinds = G_MAXUINT32; priv->keyring_path = g_build_filename(g_get_user_data_dir(), PACKAGE_NAME, NULL); priv->engines = g_ptr_array_new_with_free_func((GDestroyNotify)g_object_unref); priv->public_keys = g_ptr_array_new_with_free_func(g_free); @@ -162,6 +165,13 @@ return priv->keyring_path; } +static gboolean +jcat_context_is_blob_kind_allowed(JcatContext *self, JcatBlobKind kind) +{ + JcatContextPrivate *priv = GET_PRIVATE(self); + return (priv->blob_kinds & (1ull << kind)) > 0; +} + /** * jcat_context_get_engine: * @self: #JcatContext @@ -182,6 +192,14 @@ g_return_val_if_fail(JCAT_IS_CONTEXT(self), NULL); + if (!jcat_context_is_blob_kind_allowed(self, kind)) { + g_set_error(error, + G_IO_ERROR, + G_IO_ERROR_NOT_SUPPORTED, + "Jcat engine kind '%s' not allowed", + jcat_blob_kind_to_string(kind)); + return NULL; + } for (guint i = 0; i < priv->engines->len; i++) { JcatEngine *engine = g_ptr_array_index(priv->engines, i); if (jcat_engine_get_kind(engine) == kind) @@ -234,6 +252,56 @@ } /** + * jcat_context_blob_kind_allow: + * @self: #JcatContext + * @kind: #JcatBlobKind, e.g. %JCAT_BLOB_KIND_GPG + * + * Adds a blob kind to the allowlist. By default, JCat will use all signature and checksum schemes + * compiled in at build time. Once this function has been called only specific blob kinds will be + * used in functions like jcat_context_verify_blob(). + * + * Since: 0.1.12 + **/ +void +jcat_context_blob_kind_allow(JcatContext *self, JcatBlobKind kind) +{ + JcatContextPrivate *priv = GET_PRIVATE(self); + + g_return_if_fail(JCAT_IS_CONTEXT(self)); + g_return_if_fail(kind < JCAT_BLOB_KIND_LAST); + + /* clear all */ + if (priv->blob_kinds == G_MAXUINT32) + priv->blob_kinds = 0x0; + + /* enable this */ + priv->blob_kinds |= 1ull << kind; +} + +/** + * jcat_context_blob_kind_disallow: + * @self: #JcatContext + * @kind: #JcatBlobKind, e.g. %JCAT_BLOB_KIND_GPG + * + * Removes a blob kind from the allowlist. By default, JCat will use all signature and checksum + * schemes compiled in at build time. Once this function has been called this @kind will not be + * used in functions like jcat_context_verify_blob(). + * + * Since: 0.1.12 + **/ +void +jcat_context_blob_kind_disallow(JcatContext *self, JcatBlobKind kind) +{ + JcatContextPrivate *priv = GET_PRIVATE(self); + + g_return_if_fail(JCAT_IS_CONTEXT(self)); + g_return_if_fail(kind < JCAT_BLOB_KIND_LAST); + + /* disable this */ + priv->blob_kinds &= ~(1ull << kind); +} + +/** * jcat_context_verify_item: * @self: #JcatContext * @data: #GBytes diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libjcat-0.1.12/libjcat/jcat-context.h new/libjcat-0.1.13/libjcat/jcat-context.h --- old/libjcat-0.1.12/libjcat/jcat-context.h 2022-09-11 12:28:47.000000000 +0200 +++ new/libjcat-0.1.13/libjcat/jcat-context.h 2023-02-22 17:09:42.000000000 +0100 @@ -45,3 +45,7 @@ JcatItem *item, JcatVerifyFlags flags, GError **error); +void +jcat_context_blob_kind_allow(JcatContext *self, JcatBlobKind kind); +void +jcat_context_blob_kind_disallow(JcatContext *self, JcatBlobKind kind); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libjcat-0.1.12/libjcat/jcat-result-private.h new/libjcat-0.1.13/libjcat/jcat-result-private.h --- old/libjcat-0.1.12/libjcat/jcat-result-private.h 2022-09-11 12:28:47.000000000 +0200 +++ new/libjcat-0.1.13/libjcat/jcat-result-private.h 2023-02-22 17:09:42.000000000 +0100 @@ -6,6 +6,7 @@ #pragma once +#include "jcat-engine.h" #include "jcat-result.h" void diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libjcat-0.1.12/libjcat/jcat-result.h new/libjcat-0.1.13/libjcat/jcat-result.h --- old/libjcat-0.1.12/libjcat/jcat-result.h 2022-09-11 12:28:47.000000000 +0200 +++ new/libjcat-0.1.13/libjcat/jcat-result.h 2023-02-22 17:09:42.000000000 +0100 @@ -6,7 +6,7 @@ #pragma once -#include <glib-object.h> +#include "jcat-blob.h" #define JCAT_TYPE_RESULT (jcat_result_get_type()) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libjcat-0.1.12/libjcat/jcat-self-test.c new/libjcat-0.1.13/libjcat/jcat-self-test.c --- old/libjcat-0.1.12/libjcat/jcat-self-test.c 2022-09-11 12:28:47.000000000 +0200 +++ new/libjcat-0.1.13/libjcat/jcat-self-test.c 2023-02-22 17:09:42.000000000 +0100 @@ -251,6 +251,12 @@ g_assert_nonnull(blob_sig2); sig = jcat_blob_get_data_as_string(blob_sig2); g_assert_cmpstr(sig, ==, sig_actual); + + /* not supported */ + jcat_context_blob_kind_disallow(context, JCAT_BLOB_KIND_SHA1); + engine = jcat_context_get_engine(context, JCAT_BLOB_KIND_SHA1, &error); + g_assert_error(error, G_IO_ERROR, G_IO_ERROR_NOT_SUPPORTED); + g_assert_null(engine); } static void @@ -702,6 +708,7 @@ g_autoptr(JcatEngine) engine3 = NULL; g_autoptr(JcatEngine) engine4 = NULL; g_autoptr(JcatResult) result = NULL; + g_autoptr(JcatResult) result_disallow = NULL; /* set up context */ jcat_context_set_keyring_path(context, "/tmp"); @@ -746,6 +753,16 @@ g_assert_cmpstr(jcat_result_get_authority(result), ==, "O=Linux Vendor Firmware Project,CN=LVFS CA"); + + /* not supported */ + jcat_context_blob_kind_disallow(context, JCAT_BLOB_KIND_PKCS7); + result_disallow = jcat_context_verify_blob(context, + data_fwbin, + blob, + JCAT_VERIFY_FLAG_DISABLE_TIME_CHECKS, + &error); + g_assert_error(error, G_IO_ERROR, G_IO_ERROR_NOT_SUPPORTED); + g_assert_null(result_disallow); #else g_test_skip("no GnuTLS support enabled"); #endif diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libjcat-0.1.12/libjcat/jcat-sha1-engine.c new/libjcat-0.1.13/libjcat/jcat-sha1-engine.c --- old/libjcat-0.1.12/libjcat/jcat-sha1-engine.c 2022-09-11 12:28:47.000000000 +0200 +++ new/libjcat-0.1.13/libjcat/jcat-sha1-engine.c 2023-02-22 17:09:42.000000000 +0100 @@ -38,11 +38,14 @@ tmp = g_compute_checksum_for_bytes(G_CHECKSUM_SHA1, data); data_tmp = g_bytes_new(tmp, strlen(tmp)); if (g_bytes_compare(data_tmp, blob_signature) != 0) { + g_autofree gchar *sig = g_strndup(g_bytes_get_data(blob_signature, NULL), + g_bytes_get_size(blob_signature)); g_set_error(error, G_IO_ERROR, G_IO_ERROR_INVALID_DATA, - "failed to verify data, expected %s", - tmp); + "failed to verify data, expected %s and got %s", + tmp, + sig); return NULL; } return JCAT_RESULT(g_object_new(JCAT_TYPE_RESULT, "engine", engine, NULL)); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libjcat-0.1.12/libjcat/jcat-sha256-engine.c new/libjcat-0.1.13/libjcat/jcat-sha256-engine.c --- old/libjcat-0.1.12/libjcat/jcat-sha256-engine.c 2022-09-11 12:28:47.000000000 +0200 +++ new/libjcat-0.1.13/libjcat/jcat-sha256-engine.c 2023-02-22 17:09:42.000000000 +0100 @@ -38,11 +38,14 @@ tmp = g_compute_checksum_for_bytes(G_CHECKSUM_SHA256, data); data_tmp = g_bytes_new(tmp, strlen(tmp)); if (g_bytes_compare(data_tmp, blob_signature) != 0) { + g_autofree gchar *sig = g_strndup(g_bytes_get_data(blob_signature, NULL), + g_bytes_get_size(blob_signature)); g_set_error(error, G_IO_ERROR, G_IO_ERROR_INVALID_DATA, - "failed to verify data, expected %s", - tmp); + "failed to verify data, expected %s and got %s", + tmp, + sig); return NULL; } return JCAT_RESULT(g_object_new(JCAT_TYPE_RESULT, "engine", engine, NULL)); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libjcat-0.1.12/libjcat/jcat-sha512-engine.c new/libjcat-0.1.13/libjcat/jcat-sha512-engine.c --- old/libjcat-0.1.12/libjcat/jcat-sha512-engine.c 1970-01-01 01:00:00.000000000 +0100 +++ new/libjcat-0.1.13/libjcat/jcat-sha512-engine.c 2023-02-22 17:09:42.000000000 +0100 @@ -0,0 +1,87 @@ +/* + * Copyright (C) 2020 Richard Hughes <[email protected]> + * + * SPDX-License-Identifier: LGPL-2.1+ + */ + +#include "config.h" + +#include <string.h> + +#include "jcat-engine-private.h" +#include "jcat-sha512-engine.h" + +struct _JcatSha512Engine { + JcatEngine parent_instance; +}; + +G_DEFINE_TYPE(JcatSha512Engine, jcat_sha512_engine, JCAT_TYPE_ENGINE) + +static JcatBlob * +jcat_sha512_engine_self_sign(JcatEngine *engine, GBytes *data, JcatSignFlags flags, GError **error) +{ + g_autofree gchar *tmp = NULL; + tmp = g_compute_checksum_for_bytes(G_CHECKSUM_SHA512, data); + return jcat_blob_new_utf8(JCAT_BLOB_KIND_SHA512, tmp); +} + +static JcatResult * +jcat_sha512_engine_self_verify(JcatEngine *engine, + GBytes *data, + GBytes *blob_signature, + JcatVerifyFlags flags, + GError **error) +{ + g_autofree gchar *tmp = NULL; + g_autoptr(GBytes) data_tmp = NULL; + + tmp = g_compute_checksum_for_bytes(G_CHECKSUM_SHA512, data); + data_tmp = g_bytes_new(tmp, strlen(tmp)); + if (g_bytes_compare(data_tmp, blob_signature) != 0) { + g_autofree gchar *sig = g_strndup(g_bytes_get_data(blob_signature, NULL), + g_bytes_get_size(blob_signature)); + g_set_error(error, + G_IO_ERROR, + G_IO_ERROR_INVALID_DATA, + "failed to verify data, expected %s and got %s", + tmp, + sig); + return NULL; + } + return JCAT_RESULT(g_object_new(JCAT_TYPE_RESULT, "engine", engine, NULL)); +} + +static void +jcat_sha512_engine_finalize(GObject *object) +{ + G_OBJECT_CLASS(jcat_sha512_engine_parent_class)->finalize(object); +} + +static void +jcat_sha512_engine_class_init(JcatSha512EngineClass *klass) +{ + GObjectClass *object_class = G_OBJECT_CLASS(klass); + JcatEngineClass *klass_app = JCAT_ENGINE_CLASS(klass); + klass_app->self_sign = jcat_sha512_engine_self_sign; + klass_app->self_verify = jcat_sha512_engine_self_verify; + object_class->finalize = jcat_sha512_engine_finalize; +} + +static void +jcat_sha512_engine_init(JcatSha512Engine *self) +{ +} + +JcatEngine * +jcat_sha512_engine_new(JcatContext *context) +{ + g_return_val_if_fail(JCAT_IS_CONTEXT(context), NULL); + return JCAT_ENGINE(g_object_new(JCAT_TYPE_SHA512_ENGINE, + "context", + context, + "kind", + JCAT_BLOB_KIND_SHA512, + "method", + JCAT_BLOB_METHOD_CHECKSUM, + NULL)); +} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libjcat-0.1.12/libjcat/jcat-sha512-engine.h new/libjcat-0.1.13/libjcat/jcat-sha512-engine.h --- old/libjcat-0.1.12/libjcat/jcat-sha512-engine.h 1970-01-01 01:00:00.000000000 +0100 +++ new/libjcat-0.1.13/libjcat/jcat-sha512-engine.h 2023-02-22 17:09:42.000000000 +0100 @@ -0,0 +1,17 @@ +/* + * Copyright (C) 2020 Richard Hughes <[email protected]> + * + * SPDX-License-Identifier: LGPL-2.1+ + */ + +#pragma once + +#include "jcat-context.h" +#include "jcat-engine.h" + +#define JCAT_TYPE_SHA512_ENGINE (jcat_sha512_engine_get_type()) + +G_DECLARE_FINAL_TYPE(JcatSha512Engine, jcat_sha512_engine, JCAT, SHA512_ENGINE, JcatEngine) + +JcatEngine * +jcat_sha512_engine_new(JcatContext *context); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libjcat-0.1.12/libjcat/jcat-tool.c new/libjcat-0.1.13/libjcat/jcat-tool.c --- old/libjcat-0.1.12/libjcat/jcat-tool.c 2022-09-11 12:28:47.000000000 +0200 +++ new/libjcat-0.1.13/libjcat/jcat-tool.c 2023-02-22 17:09:42.000000000 +0100 @@ -328,6 +328,9 @@ } else if (g_str_has_suffix(values[2], ".sha256") || g_str_has_suffix(values[2], ".SHA256")) { blob = jcat_blob_new_full(JCAT_BLOB_KIND_SHA256, data_sig, JCAT_BLOB_FLAG_IS_UTF8); + } else if (g_str_has_suffix(values[2], ".sha512") || + g_str_has_suffix(values[2], ".SHA512")) { + blob = jcat_blob_new_full(JCAT_BLOB_KIND_SHA512, data_sig, JCAT_BLOB_FLAG_IS_UTF8); } else { g_autoptr(GString) tmp = g_string_new(NULL); for (guint i = 1; i < JCAT_BLOB_KIND_LAST; i++) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libjcat-0.1.12/libjcat/jcat.map new/libjcat-0.1.13/libjcat/jcat.map --- old/libjcat-0.1.12/libjcat/jcat.map 2022-09-11 12:28:47.000000000 +0200 +++ new/libjcat-0.1.13/libjcat/jcat.map 2023-02-22 17:09:42.000000000 +0100 @@ -88,3 +88,10 @@ jcat_version_string; local: *; } LIBJCAT_0.1.9; + +LIBJCAT_0.1.12 { + global: + jcat_context_blob_kind_allow; + jcat_context_blob_kind_disallow; + local: *; +} LIBJCAT_0.1.11; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libjcat-0.1.12/libjcat/meson.build new/libjcat-0.1.13/libjcat/meson.build --- old/libjcat-0.1.12/libjcat/meson.build 2022-09-11 12:28:47.000000000 +0200 +++ new/libjcat-0.1.13/libjcat/meson.build 2023-02-22 17:09:42.000000000 +0100 @@ -50,6 +50,7 @@ 'jcat-engine.c', 'jcat-sha1-engine.c', 'jcat-sha256-engine.c', + 'jcat-sha512-engine.c', 'jcat-result.c', 'jcat-file.c', 'jcat-item.c', @@ -240,6 +241,7 @@ 'jcat-result.c', 'jcat-sha1-engine.c', 'jcat-sha256-engine.c', + 'jcat-sha512-engine.c', jcat_src, ], include_directories : [ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libjcat-0.1.12/meson.build new/libjcat-0.1.13/meson.build --- old/libjcat-0.1.12/meson.build 2022-09-11 12:28:47.000000000 +0200 +++ new/libjcat-0.1.13/meson.build 2023-02-22 17:09:42.000000000 +0100 @@ -1,5 +1,5 @@ project('libjcat', 'c', - version : '0.1.12', + version : '0.1.13', license : 'LGPL-2.1+', meson_version : '>=0.49.2', default_options : ['warning_level=2', 'c_std=c99'],
