X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=lib%2Fverity%2Fverity.h;h=2269649b073ddd1e2a8cbfff60c1b8ddcefeb960;hb=e4c1cef5a4674eb873a551d4f2a492d985e55e1e;hp=4f457cbce4889b5b02d12ed978b809e8d38c0082;hpb=1349efa34db577947083daee2e521770614fcfe0;p=platform%2Fupstream%2Fcryptsetup.git diff --git a/lib/verity/verity.h b/lib/verity/verity.h index 4f457cb..2269649 100644 --- a/lib/verity/verity.h +++ b/lib/verity/verity.h @@ -1,7 +1,7 @@ /* * dm-verity volume handling * - * Copyright (C) 2012, Red Hat, Inc. All rights reserved. + * Copyright (C) 2012-2021 Red Hat, Inc. All rights reserved. * * This file is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -21,7 +21,8 @@ #ifndef _VERITY_H #define _VERITY_H -#include +#include +#include #define VERITY_MAX_HASH_TYPE 1 #define VERITY_BLOCK_SIZE_OK(x) ((x) % 512 || (x) < 512 || \ @@ -29,6 +30,7 @@ struct crypt_device; struct crypt_params_verity; +struct device; int VERITY_read_sb(struct crypt_device *cd, uint64_t sb_offset, @@ -44,6 +46,8 @@ int VERITY_activate(struct crypt_device *cd, const char *name, const char *root_hash, size_t root_hash_size, + const char *signature_description, + struct device *fec_device, struct crypt_params_verity *verity_hdr, uint32_t activation_flags); @@ -54,11 +58,23 @@ int VERITY_verify(struct crypt_device *cd, int VERITY_create(struct crypt_device *cd, struct crypt_params_verity *verity_hdr, - char *root_hash, + const char *root_hash, size_t root_hash_size); +int VERITY_FEC_process(struct crypt_device *cd, + struct crypt_params_verity *params, + struct device *fec_device, + int check_fec, + unsigned int *errors); + uint64_t VERITY_hash_offset_block(struct crypt_params_verity *params); +uint64_t VERITY_hash_blocks(struct crypt_device *cd, struct crypt_params_verity *params); + +uint64_t VERITY_FEC_blocks(struct crypt_device *cd, + struct device *fec_device, + struct crypt_params_verity *params); + int VERITY_UUID_generate(struct crypt_device *cd, char **uuid_string); #endif