Skip to content

Commit

Permalink
MEDIUM: add abort on ssl certificate transaction
Browse files Browse the repository at this point in the history
  • Loading branch information
hdurand0710 committed Nov 6, 2024
1 parent 983614e commit 43efe63
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
1 change: 1 addition & 0 deletions runtime/interface.go
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@ type Cert interface {
NewCertEntry(filename string) error
SetCertEntry(filename, payload string) error
CommitCertEntry(filename string) error
AbortCertEntry(filename string) error
AddCrtListEntry(crtList string, entry CrtListEntry) error
}

Expand Down
11 changes: 11 additions & 0 deletions runtime/runtime_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -1013,6 +1013,17 @@ func (c *client) CommitCertEntry(filename string) error {
return nil
}

func (c *client) AbortCertEntry(filename string) error {
if !c.runtime.IsValid() {
return errors.New("no valid runtime found")
}
if err := c.runtime.AbortCertEntry(filename); err != nil {
return fmt.Errorf("%s %w", c.runtime.socketPath, err)
}

return nil
}

func (c *client) AddCrtListEntry(crtList string, entry CrtListEntry) error {
if !c.runtime.IsValid() {
return errors.New("no valid runtime found")
Expand Down

0 comments on commit 43efe63

Please sign in to comment.