2 * Copyright (C) 2000-2012 Free Software Foundation, Inc.
3 * Author: Nikos Mavrogiannopoulos
5 * This file is part of GnuTLS.
7 * GnuTLS is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation, either version 3 of the License, or
10 * (at your option) any later version.
12 * GnuTLS 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
15 * GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with this program. If not, see <http://www.gnu.org/licenses/>.
21 #define SERVER "127.0.0.1"
24 #include <gnutls/gnutls.h>
26 #include <sys/socket.h>
30 # include <netinet/in.h>
40 #if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 5)
41 #define __attribute__(Spec) /* empty */
45 /* the number of elements in the priority structures.
49 extern const char str_unknown
[];
51 int print_info (gnutls_session_t state
, int print_cert
);
52 void print_cert_info (gnutls_session_t
, int flag
, int print_cert
);
53 void print_cert_info_compact (gnutls_session_t session
);
55 void print_list (const char* priorities
, int verbose
);
56 int cert_verify (gnutls_session_t session
, const char* hostname
);
58 const char *raw_to_string (const unsigned char *raw
, size_t raw_size
);
59 void pkcs11_common (void);
60 int check_command(gnutls_session_t session
, const char* str
);