Do not log common name by default (it is most interesting for scripts)

and add a test case.
This commit is contained in:
Johanna Amann 2015-03-03 16:38:25 -08:00
parent 252d57fd2c
commit e48c6ccc4a
4 changed files with 29 additions and 13 deletions

View file

@ -0,0 +1,13 @@
# This tests a normal SSL connection and the log it outputs.
# @TEST-EXEC: bro -r $TRACES/tls/tls-conn-with-extensions.trace %INPUT
# @TEST-EXEC: bro -C -r $TRACES/tls/cert-no-cn.pcap %INPUT
# @TEST-EXEC: btest-diff .stdout
event x509_certificate(f: fa_file, cert_ref: opaque of x509, cert: X509::Certificate)
{
if ( cert?$cn )
print cert$cn;
else
print "No CN";
}