Skip to content

Commit

Permalink
Fix for cert output to catch multiword values. (#1316)
Browse files Browse the repository at this point in the history
  • Loading branch information
nsnelson402 authored Apr 9, 2023
1 parent 5ce9c9f commit 8890b6a
Show file tree
Hide file tree
Showing 5 changed files with 174 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,19 @@ Value STATUS ([\s\S]+?)
Value SERIAL_NUMBER (\S+)
Value CERTIFICATE_USAGE ([\s\S]+?)
Value ISSUER_E (\S+)
Value ISSUER_CN (\S+)
Value ISSUER_OU (\S+)
Value ISSUER_O (\S+)
Value ISSUER_L (\S+)
Value ISSUER_ST (\S+)
Value ISSUER_C (\S+)
Value ISSUER_CN ([\s\S]+)
Value ISSUER_OU ([\s\S]+)
Value ISSUER_O ([\s\S]+)
Value ISSUER_L ([\s\S]+)
Value ISSUER_ST ([\s\S]+)
Value ISSUER_C ([\s\S]+)
Value SUBJECT_E (\S+)
Value SUBJECT_CN (\S+)
Value SUBJECT_OU (\S+)
Value SUBJECT_O (\S+)
Value SUBJECT_L (\S+)
Value SUBJECT_ST (\S+)
Value SUBJECT_C (\S+)
Value SUBJECT_CN ([\s\S]+)
Value SUBJECT_OU ([\s\S]+)
Value SUBJECT_O ([\s\S]+)
Value SUBJECT_L ([\s\S]+)
Value SUBJECT_ST ([\s\S]+)
Value SUBJECT_C ([\s\S]+)
Value SUBJECT_NAME (\S+)
Value SUBJECT_SERIAL_NUMBER (\S+)
Value SUBJECT_HOSTNAME (\S+)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
Certificate
Status: Available
Certificate Serial Number (hex): 1234567890ABCDEFGHIJK
Certificate Usage: General Purpose
Issuer:
[email protected]
cn=Apparently These Can Have Spaces In Them
ou=one two three
o=one two three
l=one two three
st=one two three
c=one two three
Subject:
Name: ROUTERNAME.domain.com
Serial Number: 1234ABCD
hostname=ROUTERNAME.domain.com
serialNumber=1234ABCD
CRL Distribution Points:
http://cdp.domain.com/crl/issuing-ca.crl
Validity Date:
start date: 09:17:52 UTC Jun 22 2022
end date: 09:17:52 UTC Jun 22 2023
renew date: 09:19:52 UTC Apr 10 2023
Associated Trustpoints: caserver.domain.com
Storage: nvram:certfile.cer

CA Certificate
Status: Available
Certificate Serial Number (hex): ABCDEFGHIJK1234567890
Certificate Usage: Signature
Issuer:
[email protected]
cn=one two three
ou=one two three
o=one two three
l=one two three
st=one two three
c=one two three
Subject:
[email protected]
cn=one two three
ou=one two three
o=one two three
l=one two three
st=one two three
c=one two three
CRL Distribution Points:
http://cdp.domain.com/crl/issuing-ca.crl
Validity Date:
start date: 00:00:00 UTC Nov 9 2018
end date: 00:00:00 UTC Nov 9 2028
Associated Trustpoints: caserver.domain.com
Storage: nvram:certfile.cer

CA Certificate
Status: Available
Certificate Serial Number (hex): 12345ABCDEFGHIJK67890
Certificate Usage: Signature
Issuer:
[email protected]
cn=one two three
ou=one two three
o=one two three
l=one two three
st=one two three
c=one two three
Subject:
[email protected]
cn=one two three
ou=one two three
o=one two three
l=one two three
st=one two three
c=one two three
Validity Date:
start date: 00:00:00 UTC Nov 5 2018
end date: 00:00:00 UTC Nov 5 2038
Associated Trustpoints: ROOT-CA
Storage: nvram:certfile.cer
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
---
parsed_sample:
- certificate_type: "Certificate"
status: "Available"
serial_number: "1234567890ABCDEFGHIJK"
certificate_usage: "General Purpose"
issuer_e: "[email protected]"
issuer_cn: "Apparently These Can Have Spaces In Them"
issuer_ou: "one two three"
issuer_o: "one two three"
issuer_l: "one two three"
issuer_st: "one two three"
issuer_c: "one two three"
subject_e: ""
subject_cn: ""
subject_ou: ""
subject_o: ""
subject_l: ""
subject_st: ""
subject_c: ""
subject_name: "ROUTERNAME.domain.com"
subject_serial_number: "1234ABCD"
subject_hostname: "ROUTERNAME.domain.com"
crl_distribution_point: "http://cdp.domain.com/crl/issuing-ca.crl"
start_date: "09:17:52 UTC Jun 22 2022"
end_date: "09:17:52 UTC Jun 22 2023"
renew_date: "09:19:52 UTC Apr 10 2023"
associated_trustpoints: "caserver.domain.com"
storage: "nvram:certfile.cer"
- certificate_type: "CA Certificate"
status: "Available"
serial_number: "ABCDEFGHIJK1234567890"
certificate_usage: "Signature"
issuer_e: "[email protected]"
issuer_cn: "one two three"
issuer_ou: "one two three"
issuer_o: "one two three"
issuer_l: "one two three"
issuer_st: "one two three"
issuer_c: "one two three"
subject_e: "[email protected]"
subject_cn: "one two three"
subject_ou: "one two three"
subject_o: "one two three"
subject_l: "one two three"
subject_st: "one two three"
subject_c: "one two three"
subject_name: ""
subject_serial_number: ""
subject_hostname: ""
crl_distribution_point: "http://cdp.domain.com/crl/issuing-ca.crl"
start_date: "00:00:00 UTC Nov 9 2018"
end_date: "00:00:00 UTC Nov 9 2028"
renew_date: ""
associated_trustpoints: "caserver.domain.com"
storage: "nvram:certfile.cer"
- certificate_type: "CA Certificate"
status: "Available"
serial_number: "12345ABCDEFGHIJK67890"
certificate_usage: "Signature"
issuer_e: "[email protected]"
issuer_cn: "one two three"
issuer_ou: "one two three"
issuer_o: "one two three"
issuer_l: "one two three"
issuer_st: "one two three"
issuer_c: "one two three"
subject_e: "[email protected]"
subject_cn: "one two three"
subject_ou: "one two three"
subject_o: "one two three"
subject_l: "one two three"
subject_st: "one two three"
subject_c: "one two three"
subject_name: ""
subject_serial_number: ""
subject_hostname: ""
crl_distribution_point: ""
start_date: "00:00:00 UTC Nov 5 2018"
end_date: "00:00:00 UTC Nov 5 2038"
renew_date: ""
associated_trustpoints: "ROOT-CA"
storage: "nvram:certfile.cer"

0 comments on commit 8890b6a

Please sign in to comment.