code: func parsePrivateKey(der []byte) (crypto.PrivateKey, error) {
  	if key, err := x509.ParsePKCS1PrivateKey(der); err == nil {
  		return key, nil
  	}
  	if key, err := x509.ParsePKCS8PrivateKey(der); err == nil {
  		switch key := key.(type) {
  		case *rsa.PrivateKey, *ecdsa.PrivateKey:
  			return key, nil
  		default:
  			return nil, errors.New("crypto/tls: found unknown private key type in PKCS#8 wrapping")
  		}
  	}
  	if key, err := x509.ParseECPrivateKey(der); err == nil {
  		return key, nil
  	}
  
  	return nil, errors.New("crypto/tls: failed to parse private key")
  }
docs: // Attempt to parse the given private key DER block. OpenSSL 0.9.8 generates
  // PKCS#1 private keys by default, while OpenSSL 1.0.0 generates PKCS#8 keys.
  // OpenSSL ecparam generates SEC1 EC private keys for ECDSA. We try all three.