2 * Copyright (C) 2016 Raptor Engineering, LLC
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; version 2 of the License.
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21 #include <discover/boot.h>
26 PB_LOCKDOWN_DECRYPT = 2,
29 #if defined(HAVE_LIBGPGME)
31 #endif /* HAVE_LIBGPGME */
33 int lockdown_status(void);
35 struct pb_url * gpg_get_signature_url(void *ctx, struct pb_url *base_file);
37 int verify_file_signature(const char *plaintext_filename,
38 const char *signature_filename, FILE *authorized_signatures_handle,
39 const char *keyring_path);
41 int decrypt_file(const char * filename,
42 FILE * authorized_signatures_handle, const char * keyring_path);
44 int gpg_validate_boot_files(struct boot_task *boot_task);
46 void gpg_validate_boot_files_cleanup(struct boot_task *boot_task);
48 #if !defined(HAVE_LIBGPGME)
50 int lockdown_status(void) { return PB_LOCKDOWN_NONE; }
52 struct pb_url * gpg_get_signature_url(void *ctx __attribute__((unused)),
53 struct pb_url *base_file __attribute__((unused)))
58 int verify_file_signature(const char *plaintext_filename __attribute__((unused)),
59 const char *signature_filename __attribute__((unused)),
60 FILE *authorized_signatures_handle __attribute__((unused)),
61 const char *keyring_path __attribute__((unused)))
66 int decrypt_file(const char * filename __attribute__((unused)),
67 FILE * authorized_signatures_handle __attribute__((unused)),
68 const char * keyring_path __attribute__((unused)))
73 int gpg_validate_boot_files(struct boot_task *boot_task __attribute__((unused)))
78 void gpg_validate_boot_files_cleanup(struct boot_task *boot_task __attribute__((unused)))
81 #endif /* HAVE_LIBGPGME */
83 #endif /* _PB_GPG_H */