I get a priv.pem like this:
-----BEGIN EC PRIVATE KEY-----
Proc-Type: 4,ENCRYPTED
DEK-Info: DES-EDE3-CBC,23F8D3C4F3E54362
M0FFdRyIQAnOJsMb0inutQS+Z1b1WdShEM8G2rsEQSRxSp+DSa8yiYJJQrEQ50gG
ZjAzcVxRF5OpXyWgE0RmoycYLf2svrBo3GBnj6aKcsHkCuqwqEwM7dWgxLAmcB47
Hah0pi3f3PQj/HiI1P6FuA==
-----END EC PRIVATE KEY-----
(What does yours look like? Does it have the same two headers in it? Please remember this is supposed to be a private key, if you want to send yours for us to look at, send a throw-away one.)
With that priv.key x509.DecryptPEMBlock will correctly read the key out of that file. (I had to take the implementation of tls.LoadX509KeyPair and hack it up to add in a call to x509.DecryptPEMBlock; perhaps you can show how you are doing that?)
When I go on to try to use that key and the sell-signed cert in "pub.pem", I get the following panic:
2013/11/05 17:06:32 http: panic serving [::1]:51547: interface conversion: interface is *ecdsa.PrivateKey, not *rsa.PrivateKey
goroutine 8 [running]:
net/http.func·007()
/Users/jeffall/go/src/pkg/net/http/server.go:1022 +0xac
crypto/tls.(*ecdheRSAKeyAgreement).generateServerKeyExchange(0xc2000a0480, 0xc2000a1750, 0xc20009bbe0, 0xc2000e63c0, 0xc200113f00, ...)
/Users/jeffall/go/src/pkg/crypto/tls/key_agreement.go:154 +0x4d7
So that's apparently what's waiting for you once you get your key loaded correctly... :)
-jeff
PS: go version go1.1.2 darwin/amd64