1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
|
/* SPDX-License-Identifier: MIT */
/*
* Private header for the 'fsverity' program
*
* Copyright 2018 Google LLC
*
* Use of this source code is governed by an MIT-style
* license that can be found in the LICENSE file or at
* https://opensource.org/licenses/MIT.
*/
#ifndef PROGRAMS_FSVERITY_H
#define PROGRAMS_FSVERITY_H
#include "utils.h"
#include "../common/fsverity_uapi.h"
/*
* Largest digest size among all hash algorithms supported by fs-verity.
* This can be increased if needed.
*/
#define FS_VERITY_MAX_DIGEST_SIZE 64
enum {
OPT_BLOCK_SIZE,
OPT_CERT,
OPT_COMPACT,
OPT_FOR_BUILTIN_SIG,
OPT_HASH_ALG,
OPT_KEY,
OPT_SALT,
OPT_SIGNATURE,
};
struct fsverity_command;
/* cmd_digest.c */
int fsverity_cmd_digest(const struct fsverity_command *cmd,
int argc, char *argv[]);
/* cmd_enable.c */
int fsverity_cmd_enable(const struct fsverity_command *cmd,
int argc, char *argv[]);
/* cmd_measure.c */
int fsverity_cmd_measure(const struct fsverity_command *cmd,
int argc, char *argv[]);
/* cmd_sign.c */
int fsverity_cmd_sign(const struct fsverity_command *cmd,
int argc, char *argv[]);
/* fsverity.c */
void usage(const struct fsverity_command *cmd, FILE *fp);
bool parse_tree_param(int opt_char, const char *arg,
struct libfsverity_merkle_tree_params *params);
void destroy_tree_params(struct libfsverity_merkle_tree_params *params);
#endif /* PROGRAMS_FSVERITY_H */
|