2 * Copyright (C) 2001, 2002, 2003, 2004, 2005, 2007, 2008, 2009, 2010
3 * Free Software Foundation, Inc.
5 * Author: Nikos Mavrogiannopoulos
7 * This file is part of GNUTLS.
9 * The GNUTLS library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Lesser General Public License
11 * as published by the Free Software Foundation; either version 2.1 of
12 * the License, or (at your option) any later version.
14 * This library is distributed in the hope that it will be useful, but
15 * WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 * Lesser General Public License for more details.
19 * You should have received a copy of the GNU Lesser General Public
20 * License along with this library; if not, write to the Free Software
21 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
26 #include "gnutls_int.h"
27 #include "gnutls_errors.h"
33 _gnutls_packet2str (content_type_t packet
)
37 case GNUTLS_CHANGE_CIPHER_SPEC
:
38 return "Change Cipher Spec";
41 case GNUTLS_HANDSHAKE
:
43 case GNUTLS_APPLICATION_DATA
:
44 return "Application Data";
45 case GNUTLS_INNER_APPLICATION
:
46 return "Inner Application";
49 return "Unknown Packet";
54 _gnutls_handshake2str (gnutls_handshake_description_t handshake
)
59 case GNUTLS_HANDSHAKE_HELLO_REQUEST
:
60 return "HELLO REQUEST";
62 case GNUTLS_HANDSHAKE_CLIENT_HELLO
:
63 return "CLIENT HELLO";
65 case GNUTLS_HANDSHAKE_SERVER_HELLO
:
66 return "SERVER HELLO";
68 case GNUTLS_HANDSHAKE_CERTIFICATE_PKT
:
71 case GNUTLS_HANDSHAKE_SERVER_KEY_EXCHANGE
:
72 return "SERVER KEY EXCHANGE";
74 case GNUTLS_HANDSHAKE_CERTIFICATE_REQUEST
:
75 return "CERTIFICATE REQUEST";
77 case GNUTLS_HANDSHAKE_SERVER_HELLO_DONE
:
78 return "SERVER HELLO DONE";
80 case GNUTLS_HANDSHAKE_CERTIFICATE_VERIFY
:
81 return "CERTIFICATE VERIFY";
83 case GNUTLS_HANDSHAKE_CLIENT_KEY_EXCHANGE
:
84 return "CLIENT KEY EXCHANGE";
86 case GNUTLS_HANDSHAKE_FINISHED
:
89 case GNUTLS_HANDSHAKE_SUPPLEMENTAL
:
90 return "SUPPLEMENTAL";
92 case GNUTLS_HANDSHAKE_NEW_SESSION_TICKET
:
93 return "NEW SESSION TICKET";
96 return "Unknown Handshake packet";