Skip to content

Commit 43efe63

Browse files
committed
MEDIUM: add abort on ssl certificate transaction
1 parent 983614e commit 43efe63

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

runtime/interface.go

+1
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,7 @@ type Cert interface {
140140
NewCertEntry(filename string) error
141141
SetCertEntry(filename, payload string) error
142142
CommitCertEntry(filename string) error
143+
AbortCertEntry(filename string) error
143144
AddCrtListEntry(crtList string, entry CrtListEntry) error
144145
}
145146

runtime/runtime_client.go

+11
Original file line numberDiff line numberDiff line change
@@ -1013,6 +1013,17 @@ func (c *client) CommitCertEntry(filename string) error {
10131013
return nil
10141014
}
10151015

1016+
func (c *client) AbortCertEntry(filename string) error {
1017+
if !c.runtime.IsValid() {
1018+
return errors.New("no valid runtime found")
1019+
}
1020+
if err := c.runtime.AbortCertEntry(filename); err != nil {
1021+
return fmt.Errorf("%s %w", c.runtime.socketPath, err)
1022+
}
1023+
1024+
return nil
1025+
}
1026+
10161027
func (c *client) AddCrtListEntry(crtList string, entry CrtListEntry) error {
10171028
if !c.runtime.IsValid() {
10181029
return errors.New("no valid runtime found")

0 commit comments

Comments
 (0)