Skip to content

Commit c828aa5

Browse files
Update in_process_provider.go
1 parent fe08d4f commit c828aa5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

service/internal/security/in_process_provider.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ func (a *InProcessProvider) FindKeyByAlgorithm(_ context.Context, algorithm stri
157157
// FindKeyByID finds a key by ID
158158
func (a *InProcessProvider) FindKeyByID(_ context.Context, id trust.KeyIdentifier) (trust.KeyDetails, error) {
159159
if k, err := a.cryptoProvider.RSAPublicKey(string(id)); err == nil {
160-
e, err := ocrypto.NewAsymEncryption(k)
160+
e, err := ocrypto.FromPublicPEM(k)
161161
if err != nil {
162162
return nil, fmt.Errorf("failed to create asym encryption from rsa public key: %w", err)
163163
}
@@ -169,7 +169,7 @@ func (a *InProcessProvider) FindKeyByID(_ context.Context, id trust.KeyIdentifie
169169
}, nil
170170
}
171171
if k, err := a.cryptoProvider.ECPublicKey(string(id)); err == nil {
172-
e, err := ocrypto.NewAsymEncryption(k)
172+
e, err := ocrypto.FromPublicPEM(k)
173173
if err != nil {
174174
return nil, fmt.Errorf("failed to create asym encryption from ec public key: %w", err)
175175
}

0 commit comments

Comments
 (0)