crypto/x509: give type hint in error message in marshalPublicKey
crypto/x509: give type hint in error message in marshalPublicKey

Currently if type of public key is unsupported, error message is "only
RSA and ECDSA public keys supported". After adding Ed25519 this message
is no longer correct.

Moreover, it is superfluous because documentation for
MarshalPKIXPublicKey, CreateCertificateRequest and CreateCertificate
already lists supported public key types.

This CL removes unnecessary details from error message.
It also adds reporting the type of unsupported key, which helps
debugging cases when struct (instead of a pointer) to otherwise correct
public key is given.

Fixes #32640

Change-Id: I45e6e3d756b543688d850009b4da8a4023c05027
Reviewed-on: https://go-review.googlesource.com/c/go/+/196777
Reviewed-by: Filippo Valsorda <4f40cda291c5f9634e1affd3db44947af61f705c@golang.org>

cloudflare/go,nawawi/go,CAFxX/go,CAFxX/go,nawawi/go,CAFxX/go,akutz/go,nawawi/go,akutz/go,golang/go,CAFxX/go,nawawi/go,cloudflare/go,CAFxX/go,nawawi/go,akutz/go,cloudflare/go,akutz/go,akutz/go,cloudflare/go,golang/go,CAFxX/go,golang/go,akutz/go,akutz/go,cloudflare/go,akutz/go,nawawi/go,golang/go,cloudflare/go,golang/go,cloudflare/go,golang/go,CAFxX/go,nawawi/go,golang/go,nawawi/go,golang/go,CAFxX/go,cloudflare/go