suricata
detect-tls-cert-validity.h
Go to the documentation of this file.
1/* Copyright (C) 2015 Open Information Security Foundation
2 *
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
5 * Software Foundation.
6 *
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.
11 *
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
15 * 02110-1301, USA.
16 */
17
18/**
19 * \file
20 *
21 * \author Mats Klepsland <mats.klepsland@gmail.com>
22 */
23
24#ifndef SURICATA_DETECT_TLS_VALIDITY_H
25#define SURICATA_DETECT_TLS_VALIDITY_H
26
27#define DETECT_TLS_VALIDITY_EQ (1) /* equal */
28#define DETECT_TLS_VALIDITY_LT (1<<1) /* less than */
29#define DETECT_TLS_VALIDITY_GT (1<<2) /* greater than */
30#define DETECT_TLS_VALIDITY_RA (1<<3) /* range */
31
32/* Used by tls_cert_expired */
33#define DETECT_TLS_VALIDITY_EX (1<<4) /* expired */
34
35/* Used by tls_cert_valid */
36#define DETECT_TLS_VALIDITY_VA (1<<5) /* valid */
37
38#define DETECT_TLS_TYPE_NOTBEFORE 0
39#define DETECT_TLS_TYPE_NOTAFTER 1
40
41typedef struct DetectTlsValidityData_ {
42 time_t epoch;
43 time_t epoch2;
44 uint8_t mode;
45 uint8_t type;
47
48/* prototypes */
50
51#endif /* SURICATA_DETECT_TLS_VALIDITY_H */
void DetectTlsValidityRegister(void)
Registration function for tls validity keywords.
struct DetectTlsValidityData_ DetectTlsValidityData