@@ -335,12 +335,12 @@ func (c *client) requestCertificate(t *testing.T, commonName string, sans []stri
335
335
}
336
336
337
337
var (
338
- oidExtensionAuthorityKeyId = asn1.ObjectIdentifier {2 , 5 , 29 , 35 }
339
- oidExtensionSubjectKeyId = asn1.ObjectIdentifier {2 , 5 , 29 , 14 }
338
+ oidExtensionAuthorityKeyID = asn1.ObjectIdentifier {2 , 5 , 29 , 35 }
339
+ oidExtensionSubjectKeyID = asn1.ObjectIdentifier {2 , 5 , 29 , 14 }
340
340
)
341
341
342
- type authorityKeyId struct {
343
- Id []byte `asn1:"optional,tag:0"`
342
+ type authorityKeyID struct {
343
+ ID []byte `asn1:"optional,tag:0"`
344
344
}
345
345
346
346
type pkcs1PublicKey struct {
@@ -367,12 +367,12 @@ func (c *client) requestCertificateEmulatingWindowsClient(t *testing.T, commonNa
367
367
368
368
// on Windows the self-signed certificate contains an authority key identifier
369
369
// extension that is marked critical
370
- value , err := asn1 .Marshal (authorityKeyId {[]byte ("bla" )}) // fake value
370
+ value , err := asn1 .Marshal (authorityKeyID {[]byte ("bla" )}) // fake value
371
371
if err != nil {
372
372
return nil , fmt .Errorf ("failed marshaling authority key ID" )
373
373
}
374
374
authorityKeyIDExtension := pkix.Extension {
375
- Id : oidExtensionAuthorityKeyId ,
375
+ Id : oidExtensionAuthorityKeyID ,
376
376
Critical : true ,
377
377
Value : value ,
378
378
}
@@ -387,15 +387,15 @@ func (c *client) requestCertificateEmulatingWindowsClient(t *testing.T, commonNa
387
387
}
388
388
389
389
h := sha1 .Sum (publicKeyBytes )
390
- subjectKeyId := h [:]
390
+ subjectKeyID := h [:]
391
391
392
392
// create subject key ID extension
393
- value , err = asn1 .Marshal (subjectKeyId )
393
+ value , err = asn1 .Marshal (subjectKeyID )
394
394
if err != nil {
395
395
return nil , fmt .Errorf ("failed marshaling subject key ID: %w" , err )
396
396
}
397
397
subjectKeyIDExtension := pkix.Extension {
398
- Id : oidExtensionSubjectKeyId ,
398
+ Id : oidExtensionSubjectKeyID ,
399
399
Value : value ,
400
400
}
401
401
0 commit comments