Loading...
Searching...
No Matches
gpg.h
/* librepo - A library providing (libcURL like) API to downloading repository
* Copyright (C) 2012 Tomas Mlcoch
* Copyright (C) 2022 Jaroslav Rohel <jrohel@redhat.com>
*
* Licensed under the GNU Lesser General Public License Version 2.1
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef __LR_GPG_H__
#define __LR_GPG_H__
#include <glib.h>
G_BEGIN_DECLS
typedef struct tLrGpgSubkey LrGpgSubkey;
typedef struct tLrGpgKey LrGpgKey;
gboolean
lr_gpg_check_signature_fd(int signature_fd,
int data_fd,
const char *home_dir,
GError **err);
gboolean
lr_gpg_check_signature(const char *signature_fn,
const char *data_fn,
const char *home_dir,
GError **err);
gboolean
lr_gpg_import_key_from_memory(const char *key,
size_t key_len,
const char *home_dir,
GError **err);
gboolean
lr_gpg_import_key_from_fd(int key_fd,
const char *home_dir,
GError **err);
gboolean
lr_gpg_import_key(const char *key_fn,
const char *home_dir,
GError **err);
LrGpgKey *
lr_gpg_list_keys(gboolean export_keys,
const char *home_dir,
GError **err);
const LrGpgKey *
lr_gpg_key_get_next(const LrGpgKey *key);
char * const *
lr_gpg_key_get_userids(const LrGpgKey *key);
const char *
lr_gpg_key_get_raw_key(const LrGpgKey *key);
const LrGpgSubkey *
lr_gpg_key_get_subkeys(const LrGpgKey *key);
void
lr_gpg_keys_free(LrGpgKey *key_array);
const LrGpgSubkey *
lr_gpg_subkey_get_next(const LrGpgSubkey *subkey);
const char *
lr_gpg_subkey_get_id(const LrGpgSubkey *subkey);
const char *
lr_gpg_subkey_get_fingerprint(const LrGpgSubkey *subkey);
long int
lr_gpg_subkey_get_timestamp(const LrGpgSubkey *subkey);
gboolean
lr_gpg_subkey_get_can_sign(const LrGpgSubkey *subkey);
G_END_DECLS
#endif
lr_gpg_key_get_userids
char *const * lr_gpg_key_get_userids(const LrGpgKey *key)
lr_gpg_subkey_get_id
const char * lr_gpg_subkey_get_id(const LrGpgSubkey *subkey)
lr_gpg_check_signature_fd
gboolean lr_gpg_check_signature_fd(int signature_fd, int data_fd, const char *home_dir, GError **err)
lr_gpg_subkey_get_timestamp
long int lr_gpg_subkey_get_timestamp(const LrGpgSubkey *subkey)
lr_gpg_list_keys
LrGpgKey * lr_gpg_list_keys(gboolean export_keys, const char *home_dir, GError **err)
lr_gpg_key_get_next
const LrGpgKey * lr_gpg_key_get_next(const LrGpgKey *key)
lr_gpg_subkey_get_next
const LrGpgSubkey * lr_gpg_subkey_get_next(const LrGpgSubkey *subkey)
lr_gpg_subkey_get_can_sign
gboolean lr_gpg_subkey_get_can_sign(const LrGpgSubkey *subkey)
LrGpgSubkey
struct tLrGpgSubkey LrGpgSubkey
Definition gpg.h:36
LrGpgKey
struct tLrGpgKey LrGpgKey
Definition gpg.h:40
lr_gpg_import_key_from_memory
gboolean lr_gpg_import_key_from_memory(const char *key, size_t key_len, const char *home_dir, GError **err)
lr_gpg_key_get_raw_key
const char * lr_gpg_key_get_raw_key(const LrGpgKey *key)
lr_gpg_import_key_from_fd
gboolean lr_gpg_import_key_from_fd(int key_fd, const char *home_dir, GError **err)
lr_gpg_subkey_get_fingerprint
const char * lr_gpg_subkey_get_fingerprint(const LrGpgSubkey *subkey)
lr_gpg_keys_free
void lr_gpg_keys_free(LrGpgKey *key_array)
lr_gpg_key_get_subkeys
const LrGpgSubkey * lr_gpg_key_get_subkeys(const LrGpgKey *key)
lr_gpg_check_signature
gboolean lr_gpg_check_signature(const char *signature_fn, const char *data_fn, const char *home_dir, GError **err)
lr_gpg_import_key
gboolean lr_gpg_import_key(const char *key_fn, const char *home_dir, GError **err)