Librepo library 1.22.1
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, see <https://www.gnu.org/licenses/>.
19 */
20
21#ifndef __LR_GPG_H__
22#define __LR_GPG_H__
23
24#include <glib.h>
25
26G_BEGIN_DECLS
27
32
35typedef struct tLrGpgSubkey LrGpgSubkey;
36
39typedef struct tLrGpgKey LrGpgKey;
40
50gboolean
52 int data_fd,
53 const char *home_dir,
54 GError **err);
55
65gboolean
66lr_gpg_check_signature(const char *signature_fn,
67 const char *data_fn,
68 const char *home_dir,
69 GError **err);
70
71
81gboolean
83 size_t key_len,
84 const char *home_dir,
85 GError **err);
86
95gboolean
97 const char *home_dir,
98 GError **err);
99
108gboolean
109lr_gpg_import_key(const char *key_fn,
110 const char *home_dir,
111 GError **err);
112
113
123LrGpgKey *
124lr_gpg_list_keys(gboolean export_keys,
125 const char *home_dir,
126 GError **err);
127
132const LrGpgKey *
134
139char * const *
141
146const char *
148
153const LrGpgSubkey *
155
159void
161
166const LrGpgSubkey *
168
173const char *
175
180const char *
182
187long int
189
194gboolean
196
198
199G_END_DECLS
200
201#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:35
struct tLrGpgKey LrGpgKey
Definition gpg.h:39
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)