2 * Copyright (C) 2002-2012 Free Software Foundation, Inc.
4 * Author: Timo Schulz, Nikos Mavrogiannopoulos
6 * This file is part of GnuTLS.
8 * The GnuTLS is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Lesser General Public License
10 * as published by the Free Software Foundation; either version 3 of
11 * the License, or (at your option) any later version.
13 * This library is distributed in the hope that it will be useful, but
14 * WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * Lesser General Public License for more details.
18 * You should have received a copy of the GNU Lesser General Public License
19 * along with this program. If not, see <http://www.gnu.org/licenses/>
27 #ifndef GNUTLS_OPENPGP_LOCAL_H
28 #define GNUTLS_OPENPGP_LOCAL_H
30 #include <auth/cert.h>
32 #include <gnutls/abstract.h>
34 /* OpenCDK compatible */
38 KEY_ATTR_SHORT_KEYID
= 3,
43 int gnutls_openpgp_count_key_names (const gnutls_datum_t
* cert
);
45 int gnutls_openpgp_get_key (gnutls_datum_t
* key
,
46 gnutls_openpgp_keyring_t keyring
,
47 key_attr_t by
, uint8_t * pattern
);
51 _gnutls_openpgp_privkey_cpy (gnutls_openpgp_privkey_t dest
, gnutls_openpgp_privkey_t src
);
54 _gnutls_openpgp_request_key (gnutls_session_t
,
56 const gnutls_certificate_credentials_t cred
,
57 uint8_t * key_fpr
, int key_fpr_size
);
59 int _gnutls_openpgp_verify_key (const gnutls_certificate_credentials_t
,
61 const gnutls_datum_t
* cert_list
,
62 int cert_list_length
, unsigned int *status
);
63 int _gnutls_openpgp_fingerprint (const gnutls_datum_t
* cert
,
64 unsigned char *fpr
, size_t * fprlen
);
65 time_t _gnutls_openpgp_get_raw_key_creation_time (const gnutls_datum_t
*
67 time_t _gnutls_openpgp_get_raw_key_expiration_time (const gnutls_datum_t
*
71 _gnutls_openpgp_privkey_sign_hash (gnutls_openpgp_privkey_t key
,
72 const gnutls_datum_t
* hash
,
73 gnutls_datum_t
* signature
);
77 _gnutls_openpgp_privkey_decrypt_data (gnutls_openpgp_privkey_t key
,
79 const gnutls_datum_t
* ciphertext
,
80 gnutls_datum_t
* plaintext
);
82 #endif /*GNUTLS_OPENPGP_LOCAL_H */
84 #endif /*ENABLE_OPENPGP */