blob: 6920bb0d0ac5935c2e4f9e65d14f17138f252828 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
|
/* Copyright (C) 2011 TightVNC Team. All Rights Reserved.
*
* This is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This software 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 General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this software; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
* USA.
*/
#ifndef OS_TLS_H
#define OS_TLS_H
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#if defined(HAVE_GNUTLS)
#include <gnutls/gnutls.h>
#ifndef HAVE_GNUTLS_DATUM_T
typedef gnutls_datum gnutls_datum_t;
#endif
#ifndef HAVE_GNUTLS_X509_CRT_T
typedef gnutls_x509_crt gnutls_x509_crt_t;
#endif
#ifndef HAVE_GNUTLS_PK_ALGORITHM_T
typedef gnutls_pk_algorithm gnutls_pk_algorithm_t;
#endif
#ifndef HAVE_GNUTLS_SIGN_ALGORITHM_T
typedef gnutls_sign_algorithm gnutls_sign_algorithm_t;
#endif
#ifndef HAVE_GNUTLS_X509_CRT_PRINT
typedef enum {
GNUTLS_CRT_PRINT_ONELINE = 1
} gnutls_certificate_print_formats_t;
/*
* Prints certificate in human-readable form.
*/
int
gnutls_x509_crt_print(gnutls_x509_crt_t cert,
gnutls_certificate_print_formats_t format,
gnutls_datum_t * out);
#endif /* HAVE_GNUTLS_X509_CRT_PRINT */
#endif /* HAVE_GNUTLS */
#endif /* OS_TLS_H */
|