Skip to content

Commit 709d23d

Browse files
Update delegating_key_service.go
1 parent 362c360 commit 709d23d

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

service/trust/delegating_key_service.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -134,10 +134,11 @@ func (d *DelegatingKeyService) DeriveKey(ctx context.Context, keyID KeyIdentifie
134134
}
135135

136136
pcfg := keyDetails.ProviderConfig()
137-
if pcfg == nil {
138-
return nil, fmt.Errorf("derive: key details for key ID '%s' returned nil ProviderConfig", keyID)
139-
}
140137
manager, err := d.getKeyManager(ctx, pcfg)
138+
if err != nil {
139+
return nil, fmt.Errorf("derive: unable to get key manager [%s#%s]: %w", pcfg.GetManager(), pcfg.GetName(), err)
140+
}
141+
141142
return manager.DeriveKey(ctx, keyDetails, ephemeralPublicKeyBytes, curve)
142143
}
143144

0 commit comments

Comments
 (0)