|
|
|
|
@ -448,6 +448,10 @@ static DetectTlsData *DetectTlsIssuerDNParse(char *str)
|
|
|
|
|
#define MAX_SUBSTRINGS 30
|
|
|
|
|
int ret = 0, res = 0;
|
|
|
|
|
int ov[MAX_SUBSTRINGS];
|
|
|
|
|
const char *str_ptr;
|
|
|
|
|
char *orig;
|
|
|
|
|
char *tmp_str;
|
|
|
|
|
uint32_t flag = 0;
|
|
|
|
|
|
|
|
|
|
ret = pcre_exec(issuerdn_parse_regex, issuerdn_parse_regex_study, str, strlen(str), 0, 0,
|
|
|
|
|
ov, MAX_SUBSTRINGS);
|
|
|
|
|
@ -457,12 +461,6 @@ static DetectTlsData *DetectTlsIssuerDNParse(char *str)
|
|
|
|
|
goto error;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (ret == 3) {
|
|
|
|
|
const char *str_ptr;
|
|
|
|
|
char *orig;
|
|
|
|
|
char *tmp_str;
|
|
|
|
|
uint32_t flag = 0;
|
|
|
|
|
|
|
|
|
|
res = pcre_get_substring((char *)str, ov, MAX_SUBSTRINGS, 1, &str_ptr);
|
|
|
|
|
if (res < 0) {
|
|
|
|
|
SCLogError(SC_ERR_PCRE_GET_SUBSTRING, "pcre_get_substring failed");
|
|
|
|
|
@ -501,8 +499,7 @@ static DetectTlsData *DetectTlsIssuerDNParse(char *str)
|
|
|
|
|
|
|
|
|
|
SCFree(orig);
|
|
|
|
|
|
|
|
|
|
SCLogDebug("will look for TLS issuerdn %s", tls->issuerdn);
|
|
|
|
|
}
|
|
|
|
|
SCLogDebug("Will look for TLS issuerdn %s", tls->issuerdn);
|
|
|
|
|
|
|
|
|
|
return tls;
|
|
|
|
|
|
|
|
|
|
|