Skip to content

Commit

Permalink
Fix missing ECDSA curve when signing on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
hslatman authored and mjg59 committed May 24, 2023
1 parent 6f99d74 commit 23380a3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions attest/key_windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -268,9 +268,9 @@ func (k *windowsAK20) sign(tb tpmBase, digest []byte, pub crypto.PublicKey, opts
return nil, fmt.Errorf("TPMKeyHandle() failed: %v", err)
}

switch pub.(type) {
switch p := pub.(type) {
case *ecdsa.PublicKey:
return signECDSA(rw, hnd, digest)
return signECDSA(rw, hnd, digest, p.Curve)
case *rsa.PublicKey:
return signRSA(rw, hnd, digest, opts)
}
Expand Down

0 comments on commit 23380a3

Please sign in to comment.