Skip to content

Commit c899aeb

Browse files
committed
Fix serial number comparison
The serial object was updated to be *big.Int instead of string.
1 parent b42b536 commit c899aeb

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

kms/capi/capi.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -408,7 +408,7 @@ func (k *CAPIKMS) getCertContext(u *uriAttributes) (*windows.CertContext, error)
408408
// lookup by KeyID fails (not found). This fix an issue when looking up device certificates, as in that case the KeyID is
409409
// derived from a randomly generate string each time agent runs, thus not being able to find certificates installed from
410410
// a previous run.
411-
canLookupByIssuer := u.issuerName != "" && (u.serialNumber != "" || u.subjectCN != "" || u.friendlyName != "" || u.description != "")
411+
canLookupByIssuer := u.issuerName != "" && (u.serialNumber != nil || u.subjectCN != "" || u.friendlyName != "" || u.description != "")
412412
var handle *windows.CertContext
413413

414414
switch {

0 commit comments

Comments
 (0)