in sks_windows.go [93:105]
func findPubKey(label, tag string, hash []byte) ([]byte, error) {
key, err := findPrivateKey(label)
if err != nil {
return nil, fmt.Errorf(ErrFindPubKey, label, tag, err)
}
// The lib API expects that we return a nil error here with a nil key
// to signify that the key was not found.
if key == nil {
return nil, nil
}
pubKey := key.Public().(*ecdsa.PublicKey)
return elliptic.Marshal(pubKey.Curve, pubKey.X, pubKey.Y), nil
}