Skip to content

Commit

Permalink
filename as pointer
Browse files Browse the repository at this point in the history
  • Loading branch information
encbladexp committed Sep 28, 2024
1 parent 222c2dc commit 5704048
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ type Certificate struct {
Expired *time.Time
Revoked *time.Time
Serial string
Filename string
Filename *string
CN string
}

Expand Down Expand Up @@ -60,7 +60,10 @@ func (c *Certificates) process_line(line []string) {
cert.Revoked = revoked
}
cert.Status = line[CERT_STATUS]
cert.Filename = line[CERT_FILENAME]
filename := &line[CERT_FILENAME]
if *filename != "unknown" {
cert.Filename = &line[CERT_FILENAME]
}
cert.Serial = line[CERT_SERIAL]
switch cert.Status {
case "V":
Expand Down

0 comments on commit 5704048

Please sign in to comment.