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 
41 typedef struct DetectTlsValidityData_ {
42  time_t epoch;
43  time_t epoch2;
44  uint8_t mode;
45  uint8_t type;
47 
48 /* prototypes */
49 void DetectTlsValidityRegister (void);
50 
51 #endif /* SURICATA_DETECT_TLS_VALIDITY_H */
DetectTlsValidityData_::type
uint8_t type
Definition: detect-tls-cert-validity.h:45
DetectTlsValidityData_
Definition: detect-tls-cert-validity.h:41
DetectTlsValidityRegister
void DetectTlsValidityRegister(void)
Registration function for tls validity keywords.
Definition: detect-tls-cert-validity.c:80
DetectTlsValidityData_::mode
uint8_t mode
Definition: detect-tls-cert-validity.h:44
DetectTlsValidityData_::epoch2
time_t epoch2
Definition: detect-tls-cert-validity.h:43
DetectTlsValidityData_::epoch
time_t epoch
Definition: detect-tls-cert-validity.h:42
DetectTlsValidityData
struct DetectTlsValidityData_ DetectTlsValidityData