Librepo library 1.20.0
C library for downloading linux repository metadata and packages
Loading...
Searching...
No Matches
gpg.h
1/* librepo - A library providing (libcURL like) API to downloading repository
2 * Copyright (C) 2012 Tomas Mlcoch
3 * Copyright (C) 2022 Jaroslav Rohel <jrohel@redhat.com>
4 *
5 * Licensed under the GNU Lesser General Public License Version 2.1
6 *
7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Lesser General Public
9 * License as published by the Free Software Foundation; either
10 * version 2.1 of the License, or (at your option) any later version.
11 *
12 * This library is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Lesser General Public License for more details.
16 *
17 * You should have received a copy of the GNU Lesser General Public
18 * License along with this library; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
20 */
21
22#ifndef __LR_GPG_H__
23#define __LR_GPG_H__
24
25#include <glib.h>
26
27G_BEGIN_DECLS
28
36typedef struct tLrGpgSubkey LrGpgSubkey;
37
40typedef struct tLrGpgKey LrGpgKey;
41
51gboolean
53 int data_fd,
54 const char *home_dir,
55 GError **err);
56
66gboolean
67lr_gpg_check_signature(const char *signature_fn,
68 const char *data_fn,
69 const char *home_dir,
70 GError **err);
71
72
82gboolean
84 size_t key_len,
85 const char *home_dir,
86 GError **err);
87
96gboolean
98 const char *home_dir,
99 GError **err);
100
109gboolean
110lr_gpg_import_key(const char *key_fn,
111 const char *home_dir,
112 GError **err);
113
114
124LrGpgKey *
125lr_gpg_list_keys(gboolean export_keys,
126 const char *home_dir,
127 GError **err);
128
133const LrGpgKey *
135
140char * const *
142
147const char *
149
154const LrGpgSubkey *
156
160void
162
167const LrGpgSubkey *
169
174const char *
176
181const char *
183
188long int
190
195gboolean
197
200G_END_DECLS
201
202#endif
char *const * lr_gpg_key_get_userids(const LrGpgKey *key)
const char * lr_gpg_subkey_get_id(const LrGpgSubkey *subkey)
gboolean lr_gpg_check_signature_fd(int signature_fd, int data_fd, const char *home_dir, GError **err)
long int lr_gpg_subkey_get_timestamp(const LrGpgSubkey *subkey)
LrGpgKey * lr_gpg_list_keys(gboolean export_keys, const char *home_dir, GError **err)
const LrGpgKey * lr_gpg_key_get_next(const LrGpgKey *key)
const LrGpgSubkey * lr_gpg_subkey_get_next(const LrGpgSubkey *subkey)
gboolean lr_gpg_subkey_get_can_sign(const LrGpgSubkey *subkey)
struct tLrGpgSubkey LrGpgSubkey
Definition gpg.h:36
struct tLrGpgKey LrGpgKey
Definition gpg.h:40
gboolean lr_gpg_import_key_from_memory(const char *key, size_t key_len, const char *home_dir, GError **err)
const char * lr_gpg_key_get_raw_key(const LrGpgKey *key)
gboolean lr_gpg_import_key_from_fd(int key_fd, const char *home_dir, GError **err)
const char * lr_gpg_subkey_get_fingerprint(const LrGpgSubkey *subkey)
void lr_gpg_keys_free(LrGpgKey *key_array)
const LrGpgSubkey * lr_gpg_key_get_subkeys(const LrGpgKey *key)
gboolean lr_gpg_check_signature(const char *signature_fn, const char *data_fn, const char *home_dir, GError **err)
gboolean lr_gpg_import_key(const char *key_fn, const char *home_dir, GError **err)