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) {
|
if(flow->ssh_tls.notBefore && flow->ssh_tls.notAfter) {
|
||||||
char notBefore[32], notAfter[32];
|
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);
|
strftime(notBefore, sizeof(notBefore), "%F %T", before);
|
||||||
notBefore[strlen(notBefore)-1] = '\0'; /* Remove trailer \n */
|
strftime(notAfter, sizeof(notAfter), "%F %T", after);
|
||||||
ctime_r(&flow->ssh_tls.notAfter, notAfter);
|
|
||||||
notAfter[strlen(notAfter)-1] = '\0'; /* Remove trailer \n */
|
|
||||||
|
|
||||||
fprintf(out, "[Validity: %s - %s]", notBefore, notAfter);
|
fprintf(out, "[Validity: %s - %s]", notBefore, notAfter);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user