mirror of
https://git.proxmox.com/git/fwupd
synced 2025-05-14 23:31:32 +00:00

A Jcat file can be used to store GPG, PKCS-7 and SHA-256 checksums for multiple files. This allows us to sign a firmware or metadata multiple times (perhaps by the OEM and also then the LVFS) which further decentralizes the trust model of the LVFS. The Jcat format was chosen as the Microsoft catalog format is nonfree and not documented. We also don't want to modify an existing .cat file created from WU as this may make it unsuitable to use on Windows. More information can be found here: https://github.com/hughsie/libjcat
39 lines
938 B
C
39 lines
938 B
C
/*
|
|
* Copyright (C) 2017-2020 Richard Hughes <richard@hughsie.com>
|
|
*
|
|
* SPDX-License-Identifier: LGPL-2.1+
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include <glib-object.h>
|
|
#include <xmlb.h>
|
|
#include <jcat.h>
|
|
|
|
#define FU_TYPE_CABINET (fu_cabinet_get_type ())
|
|
|
|
G_DECLARE_FINAL_TYPE (FuCabinet, fu_cabinet, FU, CABINET, GObject)
|
|
|
|
/**
|
|
* FuCabinetParseFlags:
|
|
* @FU_CABINET_PARSE_FLAG_NONE: No flags set
|
|
*
|
|
* The flags to use when loading the cabinet.
|
|
**/
|
|
typedef enum {
|
|
FU_CABINET_PARSE_FLAG_NONE = 0,
|
|
/*< private >*/
|
|
FU_CABINET_PARSE_FLAG_LAST
|
|
} FuCabinetParseFlags;
|
|
|
|
FuCabinet *fu_cabinet_new (void);
|
|
void fu_cabinet_set_size_max (FuCabinet *self,
|
|
guint64 size_max);
|
|
void fu_cabinet_set_jcat_context (FuCabinet *self,
|
|
JcatContext *jcat_context);
|
|
gboolean fu_cabinet_parse (FuCabinet *self,
|
|
GBytes *data,
|
|
FuCabinetParseFlags flags,
|
|
GError **error);
|
|
XbSilo *fu_cabinet_get_silo (FuCabinet *self);
|