Guile: Fix `x509-certificate-dn-oid' and related functions.
[gnutls.git] / lib / gnutls_extra_hooks.c
blobf2bfb3f25f825252f18e45f143d907ec8e2e7ab1
1 /*
2 * Copyright (C) 2007 Free Software Foundation
4 * Author: Simon Josefsson
6 * This file is part of GNUTLS.
8 * The GNUTLS library 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 2.1 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
19 * License along with this library; if not, write to the Free Software
20 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
21 * USA
25 #include <gnutls_int.h>
26 #include <gnutls_extra_hooks.h>
28 /* Variables used by libgnutls, set by
29 _gnutls_add_openpgp_functions(), typically invoked by
30 libgnutls_extra. */
31 _gnutls_openpgp_verify_key_func _E_gnutls_openpgp_verify_key;
32 _gnutls_openpgp_key_creation_time_func
33 _E_gnutls_openpgp_get_raw_key_creation_time;
34 _gnutls_openpgp_key_expiration_time_func
35 _E_gnutls_openpgp_get_raw_key_expiration_time;
36 _gnutls_openpgp_fingerprint_func _E_gnutls_openpgp_fingerprint;
37 _gnutls_openpgp_key_request_func _E_gnutls_openpgp_request_key;
38 _gnutls_openpgp_raw_key_to_gcert_func _E_gnutls_openpgp_raw_key_to_gcert;
39 _gnutls_openpgp_raw_privkey_to_gkey_func _E_gnutls_openpgp_raw_privkey_to_gkey;
40 _gnutls_openpgp_key_to_gcert_func _E_gnutls_openpgp_key_to_gcert;
41 _gnutls_openpgp_privkey_to_gkey_func _E_gnutls_openpgp_privkey_to_gkey;
42 _gnutls_openpgp_key_deinit_func _E_gnutls_openpgp_key_deinit;
43 _gnutls_openpgp_privkey_deinit_func _E_gnutls_openpgp_privkey_deinit;
45 /* Called by libgnutls_extra to set the OpenPGP functions that are
46 needed by GnuTLS. */
47 extern void
48 _gnutls_add_openpgp_functions
49 (_gnutls_openpgp_verify_key_func verify_key,
50 _gnutls_openpgp_key_creation_time_func key_creation_time,
51 _gnutls_openpgp_key_expiration_time_func key_expiration_time,
52 _gnutls_openpgp_fingerprint_func fingerprint,
53 _gnutls_openpgp_key_request_func request_key,
54 _gnutls_openpgp_raw_key_to_gcert_func raw_key_to_gcert,
55 _gnutls_openpgp_raw_privkey_to_gkey_func raw_privkey_to_gkey,
56 _gnutls_openpgp_key_to_gcert_func key_to_gcert,
57 _gnutls_openpgp_privkey_to_gkey_func privkey_to_gkey,
58 _gnutls_openpgp_key_deinit_func key_deinit,
59 _gnutls_openpgp_privkey_deinit_func privkey_deinit)
61 _E_gnutls_openpgp_verify_key = verify_key;
62 _E_gnutls_openpgp_get_raw_key_creation_time = key_creation_time;
63 _E_gnutls_openpgp_get_raw_key_expiration_time = key_expiration_time;
64 _E_gnutls_openpgp_fingerprint = fingerprint;
65 _E_gnutls_openpgp_request_key = request_key;
66 _E_gnutls_openpgp_raw_key_to_gcert = raw_key_to_gcert;
67 _E_gnutls_openpgp_raw_privkey_to_gkey = raw_privkey_to_gkey;
68 _E_gnutls_openpgp_key_to_gcert = key_to_gcert;
69 _E_gnutls_openpgp_privkey_to_gkey = privkey_to_gkey;
70 _E_gnutls_openpgp_key_deinit = key_deinit;
71 _E_gnutls_openpgp_privkey_deinit = privkey_deinit;