]>
git.ipfire.org Git - people/ms/suricata.git/blob - src/app-layer-ssl.h
1 /* Copyright (C) 2007-2010 Open Information Security Foundation
3 * You can copy, redistribute or modify this Program under the terms of
4 * the GNU General Public License version 2 as published by the Free
7 * This program is distributed in the hope that it will be useful,
8 * but WITHOUT ANY WARRANTY; without even the implied warranty of
9 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10 * GNU General Public License for more details.
12 * You should have received a copy of the GNU General Public License
13 * version 2 along with this program; if not, write to the Free Software
14 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
21 * \author Gurvinder Singh <gurvindersinghdahiya@gmail.com>
24 #ifndef _APP_LAYER_SSL_H
25 #define _APP_LAYER_SSL_H
27 #define SSL_CLIENT_VERSION 0x0002
28 #define SSL_SERVER_VERSION 0x0002
31 #define SSL_FLAG_CLIENT_HS 0x01
32 #define SSL_FLAG_SERVER_HS 0x02
33 #define SSL_FLAG_CLIENT_MASTER_KEY 0x04
34 #define SSL_FLAG_CLIENT_SSN_ENCRYPTED 0x08
35 #define SSL_FLAG_SERVER_SSN_ENCRYPTED 0x10
36 #define SSL_FLAG_NO_SESSION_ID 0x20
38 /* SSL message types */
40 #define SSL_CLIENT_HELLO 1
41 #define SSL_CLIENT_MASTER_KEY 2
42 #define SSL_CLIENT_FINISHED 3
43 #define SSL_SERVER_HELLO 4
44 #define SSL_SERVER_VERIFY 5
45 #define SSL_SERVER_FINISHED 6
46 #define SSL_REQUEST_CERTIFICATE 7
47 #define SSL_CLIENT_CERTIFICATE 8
49 /* structure to store the SSL state values */
50 typedef struct SslState_
{
51 uint8_t client_content_type
; /**< Client content type storage field */
52 uint16_t client_version
; /**< Client SSL version storage field */
54 uint8_t server_content_type
; /**< Server content type storage field */
55 uint16_t server_version
; /**< Server SSL version storage field */
57 uint8_t flags
; /**< Flags to indicate the current SSL
61 typedef struct SslClient_
{
62 uint16_t length
; /**< Length of the received message */
66 uint16_t cipher_spec_len
;
67 uint16_t session_id_len
;
70 typedef struct SslServer_
{
79 void RegisterSSLParsers(void);
80 void SSLParserRegisterTests(void);
82 #endif /* _APP_LAYER_SSL_H */