mirror of
https://github.com/zeek/zeek.git
synced 2025-10-07 00:58:19 +00:00

The generalizedtime support in for certificates now fits more seamlessly to how the rest of the code was structured and does the different processing for UTC and generalized times at the beginning, when checking for them. The test does not output the common name anymore, since the output format might change accross openssl versions (inserted the serial instead). I also added a bit more error checking for the UTC time case.
10 lines
614 B
Text
10 lines
614 B
Text
# @TEST-EXEC: bro -C -r $TRACES/tls/x509-generalizedtime.pcap %INPUT >>output 2>&1
|
|
# @TEST-EXEC: bro -C -r $TRACES/tls/tls1.2.trace %INPUT >>output 2>&1
|
|
# @TEST-EXEC: btest-diff output
|
|
event x509_certificate(f: fa_file, cert_ref: opaque of x509, cert: X509::Certificate)
|
|
{
|
|
print "----- x509_certificate ----";
|
|
print fmt("serial: %s", cert$serial);
|
|
print fmt("not_valid_before: %T (epoch: %s)", cert$not_valid_before, cert$not_valid_before);
|
|
print fmt("not_valid_after : %T (epoch: %s)", cert$not_valid_after, cert$not_valid_after);
|
|
}
|