@@ -47,7 +47,7 @@ type SCEP struct {
47
47
DecrypterCertificate []byte `json:"decrypterCertificate,omitempty"`
48
48
DecrypterKeyPEM []byte `json:"decrypterKeyPEM,omitempty"`
49
49
DecrypterKeyURI string `json:"decrypterKey,omitempty"`
50
- DecrypterKeyPassword [] byte `json:"decrypterKeyPassword,omitempty"`
50
+ DecrypterKeyPassword string `json:"decrypterKeyPassword,omitempty"`
51
51
52
52
// Numerical identifier for the ContentEncryptionAlgorithm as defined in github.com/mozilla-services/pkcs7
53
53
// at https://github.com/mozilla-services/pkcs7/blob/33d05740a3526e382af6395d3513e73d4e66d1cb/encrypt.go#L63
@@ -289,14 +289,14 @@ func (s *SCEP) Init(config Config) (err error) {
289
289
}
290
290
if s .decrypter , err = kmsDecrypter .CreateDecrypter (& kmsapi.CreateDecrypterRequest {
291
291
DecryptionKeyPEM : decryptionKeyPEM ,
292
- Password : s .DecrypterKeyPassword ,
292
+ Password : [] byte ( s .DecrypterKeyPassword ) ,
293
293
PasswordPrompter : kmsapi .NonInteractivePasswordPrompter ,
294
294
}); err != nil {
295
295
return fmt .Errorf ("failed creating decrypter: %w" , err )
296
296
}
297
297
if s .signer , err = s .keyManager .CreateSigner (& kmsapi.CreateSignerRequest {
298
298
SigningKeyPEM : decryptionKeyPEM , // TODO(hs): support distinct signer key in the future?
299
- Password : s .DecrypterKeyPassword ,
299
+ Password : [] byte ( s .DecrypterKeyPassword ) ,
300
300
PasswordPrompter : kmsapi .NonInteractivePasswordPrompter ,
301
301
}); err != nil {
302
302
return fmt .Errorf ("failed creating signer: %w" , err )
@@ -331,14 +331,14 @@ func (s *SCEP) Init(config Config) (err error) {
331
331
}
332
332
if s .decrypter , err = kmsDecrypter .CreateDecrypter (& kmsapi.CreateDecrypterRequest {
333
333
DecryptionKey : decryptionKeyURI ,
334
- Password : s .DecrypterKeyPassword ,
334
+ Password : [] byte ( s .DecrypterKeyPassword ) ,
335
335
PasswordPrompter : kmsapi .NonInteractivePasswordPrompter ,
336
336
}); err != nil {
337
337
return fmt .Errorf ("failed creating decrypter: %w" , err )
338
338
}
339
339
if s .signer , err = s .keyManager .CreateSigner (& kmsapi.CreateSignerRequest {
340
340
SigningKey : decryptionKeyURI , // TODO(hs): support distinct signer key in the future?
341
- Password : s .DecrypterKeyPassword ,
341
+ Password : [] byte ( s .DecrypterKeyPassword ) ,
342
342
PasswordPrompter : kmsapi .NonInteractivePasswordPrompter ,
343
343
}); err != nil {
344
344
return fmt .Errorf ("failed creating signer: %w" , err )
0 commit comments