acme: take a user provided key in TLSSNIxChallengeCert

Some systems can only operate with a certain key type, for instance RSA,
which makes it impossible for them to use Client provided certificates
to fulfill tls-sni-x challenges since TLSSNIxChallengeCert methods
of the Client always generate ECDSA-based certificates.

At the same time we want to keep using ECDSA-based certificates
in autocert.Manager.

This change allows for a user supplied key when generating tls-sni-x
challenge certficates.

Change-Id: I04f617ff99794a71ef23ad259cb333839f13ae1c
Reviewed-on: https://go-review.googlesource.com/27750
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2 files changed