Skip to content

Commit

Permalink
Fix redacted types in SCEP provisioner
Browse files Browse the repository at this point in the history
This commit uses the same types for the fields in the provisioner.SCEP
type and the "redacted" models.SCEP.
  • Loading branch information
maraino committed Sep 25, 2023
1 parent f505acb commit 4d5fbfa
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions api/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -245,10 +245,10 @@ func scepFromProvisioner(p *provisioner.SCEP) *models.SCEP {
IncludeRoot: p.IncludeRoot,
ExcludeIntermediate: p.ExcludeIntermediate,
MinimumPublicKeyLength: p.MinimumPublicKeyLength,
DecrypterCertificate: redacted,
DecrypterKeyPEM: redacted,
DecrypterCertificate: []byte(redacted),
DecrypterKeyPEM: []byte(redacted),
DecrypterKeyURI: redacted,
DecrypterKeyPassword: redacted,
DecrypterKeyPassword: []byte(redacted),
EncryptionAlgorithmIdentifier: p.EncryptionAlgorithmIdentifier,
Options: p.Options,
Claims: p.Claims,
Expand Down
6 changes: 3 additions & 3 deletions api/models/scep.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ type SCEP struct {
IncludeRoot bool `json:"includeRoot"`
ExcludeIntermediate bool `json:"excludeIntermediate"`
MinimumPublicKeyLength int `json:"minimumPublicKeyLength"`
DecrypterCertificate string `json:"decrypterCertificate"`
DecrypterKeyPEM string `json:"decrypterKeyPEM"`
DecrypterCertificate []byte `json:"decrypterCertificate"`
DecrypterKeyPEM []byte `json:"decrypterKeyPEM"`
DecrypterKeyURI string `json:"decrypterKey"`
DecrypterKeyPassword string `json:"decrypterKeyPassword"`
DecrypterKeyPassword []byte `json:"decrypterKeyPassword"`
EncryptionAlgorithmIdentifier int `json:"encryptionAlgorithmIdentifier"`
Options *provisioner.Options `json:"options,omitempty"`
Claims *provisioner.Claims `json:"claims,omitempty"`
Expand Down

0 comments on commit 4d5fbfa

Please sign in to comment.