Skip to content

Commit 5505db4

Browse files
darkfronzajoshdrake
authored andcommitted
turn canLookupByIssuer into variable
The function was a relic from past refactoring code, not necessary anymore.
1 parent db7f200 commit 5505db4

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

kms/capi/capi.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -392,12 +392,13 @@ func (k *CAPIKMS) getCertContext(u *uriAttributes) (*windows.CertContext, error)
392392
0,
393393
0,
394394
certStoreLocation,
395-
uintptr(unsafe.Pointer(wide(u.storeName))))
395+
uintptr(unsafe.Pointer(wide(u.storeName))),
396+
)
396397
if err != nil {
397398
return nil, fmt.Errorf("CertOpenStore for the %q store %q returned: %w", u.storeLocation, u.storeName, err)
398399
}
399400

400-
canLookupByIssuer := issuerName != "" && (serialNumber != "" || subjectCN != "" || friendlyName != "" || description != "")
401+
canLookupByIssuer := u.issuerName != "" && (u.serialNumber != "" || u.subjectCN != "" || u.friendlyName != "" || u.description != "")
401402
var handle *windows.CertContext
402403

403404
switch {

0 commit comments

Comments
 (0)