Import gcrypt public-key cryptography and implement signature checking.
This commit is contained in:
parent
535714bdcf
commit
5e3b8dcbb5
238 changed files with 40500 additions and 417 deletions
|
@ -54,6 +54,7 @@ typedef struct grub_file *grub_file_t;
|
|||
/* Filters with lower ID are executed first. */
|
||||
typedef enum grub_file_filter_id
|
||||
{
|
||||
GRUB_FILE_FILTER_PUBKEY,
|
||||
GRUB_FILE_FILTER_GZIO,
|
||||
GRUB_FILE_FILTER_XZIO,
|
||||
GRUB_FILE_FILTER_LZOPIO,
|
||||
|
@ -62,7 +63,7 @@ typedef enum grub_file_filter_id
|
|||
GRUB_FILE_FILTER_COMPRESSION_LAST = GRUB_FILE_FILTER_LZOPIO,
|
||||
} grub_file_filter_id_t;
|
||||
|
||||
typedef grub_file_t (*grub_file_filter_t) (grub_file_t in);
|
||||
typedef grub_file_t (*grub_file_filter_t) (grub_file_t in, const char *filename);
|
||||
|
||||
extern grub_file_filter_t EXPORT_VAR(grub_file_filters_all)[GRUB_FILE_FILTER_MAX];
|
||||
extern grub_file_filter_t EXPORT_VAR(grub_file_filters_enabled)[GRUB_FILE_FILTER_MAX];
|
||||
|
@ -72,20 +73,20 @@ grub_file_filter_register (grub_file_filter_id_t id, grub_file_filter_t filter)
|
|||
{
|
||||
grub_file_filters_all[id] = filter;
|
||||
grub_file_filters_enabled[id] = filter;
|
||||
};
|
||||
}
|
||||
|
||||
static inline void
|
||||
grub_file_filter_unregister (grub_file_filter_id_t id)
|
||||
{
|
||||
grub_file_filters_all[id] = 0;
|
||||
grub_file_filters_enabled[id] = 0;
|
||||
};
|
||||
}
|
||||
|
||||
static inline void
|
||||
grub_file_filter_disable (grub_file_filter_id_t id)
|
||||
{
|
||||
grub_file_filters_enabled[id] = 0;
|
||||
};
|
||||
}
|
||||
|
||||
static inline void
|
||||
grub_file_filter_disable_compression (void)
|
||||
|
@ -95,7 +96,23 @@ grub_file_filter_disable_compression (void)
|
|||
for (id = GRUB_FILE_FILTER_COMPRESSION_FIRST;
|
||||
id <= GRUB_FILE_FILTER_COMPRESSION_LAST; id++)
|
||||
grub_file_filters_enabled[id] = 0;
|
||||
};
|
||||
}
|
||||
|
||||
static inline void
|
||||
grub_file_filter_disable_all (void)
|
||||
{
|
||||
grub_file_filter_id_t id;
|
||||
|
||||
for (id = 0;
|
||||
id < GRUB_FILE_FILTER_MAX; id++)
|
||||
grub_file_filters_enabled[id] = 0;
|
||||
}
|
||||
|
||||
static inline void
|
||||
grub_file_filter_disable_pubkey (void)
|
||||
{
|
||||
grub_file_filters_enabled[GRUB_FILE_FILTER_PUBKEY] = 0;
|
||||
}
|
||||
|
||||
/* Get a device name from NAME. */
|
||||
char *EXPORT_FUNC(grub_file_get_device_name) (const char *name);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue