Validity format fix
This commit is contained in:
@@ -1110,11 +1110,11 @@ static void printFlow(u_int16_t id, struct ndpi_flow_info *flow, u_int16_t threa
|
||||
|
||||
if(flow->ssh_tls.notBefore && flow->ssh_tls.notAfter) {
|
||||
char notBefore[32], notAfter[32];
|
||||
struct tm *before = gmtime(&flow->ssh_tls.notBefore);
|
||||
struct tm *after = gmtime(&flow->ssh_tls.notAfter);
|
||||
|
||||
ctime_r(&flow->ssh_tls.notBefore, notBefore);
|
||||
notBefore[strlen(notBefore)-1] = '\0'; /* Remove trailer \n */
|
||||
ctime_r(&flow->ssh_tls.notAfter, notAfter);
|
||||
notAfter[strlen(notAfter)-1] = '\0'; /* Remove trailer \n */
|
||||
strftime(notBefore, sizeof(notBefore), "%F %T", before);
|
||||
strftime(notAfter, sizeof(notAfter), "%F %T", after);
|
||||
|
||||
fprintf(out, "[Validity: %s - %s]", notBefore, notAfter);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user