Skip to content

Commit 22d746a

Browse files
liamjmbrandonweeks
authored andcommitted
Remove ECCParameters.Point initialization
Removed initialization of ECCParameters.Point for various key sizes.
1 parent 0b33a14 commit 22d746a

File tree

1 file changed

+0
-12
lines changed

1 file changed

+0
-12
lines changed

attest/wrapped_tpm20.go

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -485,26 +485,14 @@ func templateFromConfig(opts *KeyConfig) (tpm2.Public, error) {
485485
tmpl.NameAlg = tpm2.AlgSHA256
486486
tmpl.ECCParameters.Sign.Hash = tpm2.AlgSHA256
487487
tmpl.ECCParameters.CurveID = tpm2.CurveNISTP256
488-
tmpl.ECCParameters.Point = tpm2.ECPoint{
489-
XRaw: make([]byte, 32),
490-
YRaw: make([]byte, 32),
491-
}
492488
case 384:
493489
tmpl.NameAlg = tpm2.AlgSHA384
494490
tmpl.ECCParameters.Sign.Hash = tpm2.AlgSHA384
495491
tmpl.ECCParameters.CurveID = tpm2.CurveNISTP384
496-
tmpl.ECCParameters.Point = tpm2.ECPoint{
497-
XRaw: make([]byte, 48),
498-
YRaw: make([]byte, 48),
499-
}
500492
case 521:
501493
tmpl.NameAlg = tpm2.AlgSHA512
502494
tmpl.ECCParameters.Sign.Hash = tpm2.AlgSHA512
503495
tmpl.ECCParameters.CurveID = tpm2.CurveNISTP521
504-
tmpl.ECCParameters.Point = tpm2.ECPoint{
505-
XRaw: make([]byte, 65),
506-
YRaw: make([]byte, 65),
507-
}
508496
default:
509497
return tmpl, fmt.Errorf("unsupported key size: %v", opts.Size)
510498
}

0 commit comments

Comments
 (0)