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>
41 #if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 5)
42 #define __attribute__(Spec) /* empty */
46 /* the number of elements in the priority structures.
50 extern const char str_unknown
[];
52 int print_info (gnutls_session_t state
, int verbose
, int print_cert
);
53 void print_cert_info (gnutls_session_t
, int flag
, int print_cert
);
54 void print_cert_info_compact (gnutls_session_t session
);
56 void print_list (const char* priorities
, int verbose
);
57 int cert_verify (gnutls_session_t session
, const char* hostname
);
59 const char *raw_to_string (const unsigned char *raw
, size_t raw_size
);
60 void pkcs11_common (void);
61 int check_command(gnutls_session_t session
, const char* str
);
64 pin_callback (void *user
, int attempt
, const char *token_url
,
65 const char *token_label
, unsigned int flags
, char *pin
,
68 void pkcs11_common (void);