Skip to content

Commit

Permalink
Upper case thumbprint to match tentacle
Browse files Browse the repository at this point in the history
  • Loading branch information
tleed5 committed May 9, 2024
1 parent 9a7864b commit 01ee36e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion octopusdeploy/resource_tentacle_certificate.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import (
"github.com/hashicorp/terraform-plugin-sdk/v2/diag"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
"software.sslmate.com/src/go-pkcs12"
"strings"
"time"
)

Expand Down Expand Up @@ -90,7 +91,7 @@ func generateCertificate(fullName string) (string, string, error) {
pkcs12Base64 := base64.StdEncoding.EncodeToString(pkcs12Bytes)

thumbprint := sha1.Sum(certBytes)
thumbprintStr := hex.EncodeToString(thumbprint[:])
thumbprintStr := strings.ToUpper(hex.EncodeToString(thumbprint[:]))

return pkcs12Base64, thumbprintStr, nil
}

0 comments on commit 01ee36e

Please sign in to comment.