Skip to content

Commit

Permalink
Merge pull request #5 from OpenCHAMI/synackd/ignore-cert-if-empty
Browse files Browse the repository at this point in the history
fix(coresmd): trim quotes on cert path to actually ignore if empty
  • Loading branch information
alexlovelltroy authored Nov 13, 2024
2 parents dd0dd07 + d53069c commit 3bdf93c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion coresmd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import (
"fmt"
"net"
"net/url"
"strings"
"time"

"github.com/OpenCHAMI/coresmd/internal/debug"
Expand Down Expand Up @@ -69,7 +70,8 @@ func setup4(args ...string) (handler.Handler4, error) {
}

// If nonempty, test that CA cert path exists (third argument)
caCertPath := args[2]
caCertPath := strings.Trim(args[2], `"'`)
log.Infof("cacertPath: %s", caCertPath)
if caCertPath != "" {
if err := smdClient.UseCACert(caCertPath); err != nil {
return nil, fmt.Errorf("failed to set CA certificate: %w", err)
Expand Down

0 comments on commit 3bdf93c

Please sign in to comment.