mirror of
https://github.com/zeek/zeek.git
synced 2025-10-09 01:58:20 +00:00
Finishing touches of the x509 file analyzer.
Mostly baseline updates and new tests. addresses BIT-953, BIT-760, BIT-1150
This commit is contained in:
parent
74d728656d
commit
4da0718511
44 changed files with 712 additions and 148 deletions
|
@ -70,8 +70,7 @@ function get_file_handle(c: connection, is_orig: bool): string
|
|||
|
||||
function describe_file(f: fa_file): string
|
||||
{
|
||||
# This shouldn't be needed, but just in case...
|
||||
if ( f$source != "SSL" )
|
||||
if ( f$source != "SSL" || ! f?$info || ! f$info?$x509 || ! f$info$x509?$certificate )
|
||||
return "";
|
||||
|
||||
# It is difficult to reliably describe a certificate - especially since
|
||||
|
@ -88,7 +87,9 @@ function describe_file(f: fa_file): string
|
|||
}
|
||||
}
|
||||
|
||||
return "";
|
||||
return cat("Serial: ", f$info$x509$certificate$serial, " Subject: ",
|
||||
f$info$x509$certificate$subject, " Issuer: ",
|
||||
f$info$x509$certificate$issuer);
|
||||
}
|
||||
|
||||
event bro_init() &priority=5
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue