zeek/scripts/policy/protocols
SG 42bf41aca1 check for the existance of f?$conns in file_sniff event in policy/protocols/ssl/log-hostcerts-only.zeek
In using the corelight/bro-xor-exe-plugin (https://github.com/corelight/bro-xor-exe-plugin) I noticed this error when running the PCAP trace file in its tests directory:

1428602842.525435 expression error in /opt/zeek/share/zeek/policy/protocols/ssl/log-hostcerts-only.zeek, line 44: field value missing (X509::f$conns)

Examining log-hostcerts-only.zeek, I saw that although f$conns is being checked for length, it's not being checked to see if it exists first.

This commit changes "if ( |f$conns| != 1 )" to "if (( ! f?$conns ) || ( |f$conns| != 1 ))" so that the script returns if there is no f$conns field.

In my local testing, this seems to fix the error. My testing was being done with v3.0.5, but I think this patch can be applied to both the 3.0.x and 3.1.x branches.
2020-04-16 10:19:59 -06:00
..
conn Remove concept of multiple timer managers 2020-01-31 10:13:09 -07:00
dhcp Remove deprecated functions/events 2019-05-02 12:06:39 -07:00
dns GH-234: rename Broxygen to Zeexygen along with roles/directives 2019-04-22 19:45:50 -07:00
ftp Merge remote-tracking branch 'origin/topic/seth/zeek_init' 2019-04-19 11:24:29 -07:00
http GH-234: rename Broxygen to Zeexygen along with roles/directives 2019-04-22 19:45:50 -07:00
krb Rename all scripts to have ".zeek" file extension 2019-04-11 21:12:40 -05:00
modbus Merge remote-tracking branch 'origin/topic/seth/zeek_init' 2019-04-19 11:24:29 -07:00
mqtt Fix documentation warnings for MQTT identifiers 2019-08-05 18:55:48 -07:00
mysql Rename all scripts to have ".zeek" file extension 2019-04-11 21:12:40 -05:00
rdp Rename all scripts to have ".zeek" file extension 2019-04-11 21:12:40 -05:00
smb Remove previously deprecated policy/protocols/smb/__load__ 2019-05-02 20:50:30 -07:00
smtp More bro-to-zeek renaming in scripts and other files 2019-05-16 02:36:41 -05:00
ssh GH-234: rename Broxygen to Zeexygen along with roles/directives 2019-04-22 19:45:50 -07:00
ssl check for the existance of f?$conns in file_sniff event in policy/protocols/ssl/log-hostcerts-only.zeek 2020-04-16 10:19:59 -06:00