func (chal Challenge) ProofOfPossession(accountKey, certKey interface{}) (Challenge, error) {
	return Challenge{}, errors.New("proof of possession not implemented")
}
Not yet implemented
package letsencrypt
import (
	"crypto"
	"crypto/rand"
	"crypto/rsa"
	"crypto/sha256"
	"crypto/tls"
	"crypto/x509"
	"encoding/hex"
	"encoding/pem"
	"errors"
	"fmt"
	"math/big"
	"net/http"
	"path"
	"strings"
	"time"
	"github.com/ericchiang/letsencrypt/internal/base64"
	"github.com/square/go-jose"
)
const (
	ChallengeDNS    = "dns-01"
	ChallengeHTTP   = "http-01"
	ChallengeTLSSNI = "tls-sni-01"
)
func (chal Challenge) HTTP(accountKey interface{}) (urlPath, resource string, err error) {
	if chal.Type != ChallengeHTTP {
		return "", "", fmt.Errorf("challenge type is %s not %s", chal.Type, ChallengeHTTP)
	}
	urlPath = path.Join("/.well-known/acme-challenge", chal.Token)
	resource, err = keyAuth(accountKey, chal.Token)
	return
}
func (chal Challenge) TLSSNI(accountKey interface{}) (map[string]*tls.Certificate, error) {
	if chal.Type != ChallengeTLSSNI {
		return nil, fmt.Errorf("challenge type is %s not %s", chal.Type, ChallengeTLSSNI)
	}
	auth, err := keyAuth(accountKey, chal.Token)
	if err != nil {
		return nil, err
	}
	tlsKey, err := rsa.GenerateKey(rand.Reader, 2048)
	if err != nil {
		return nil, err
	}
	compute := func(content string) string {
		hash := sha256.Sum256([]byte(content))
		return hex.EncodeToString(hash[:])
	}
	z := make([]string, chal.N+1)
	z[0] = compute(auth)
	for i := 0; i < chal.N; i++ {
		z[i+1] = compute(z[i])
	}
	certKeyPEM := pemEncode(x509.MarshalPKCS1PrivateKey(tlsKey), "RSA PRIVATE KEY")
	certs := make(map[string]*tls.Certificate)
	for _, zi := range z {
		name := zi[:32] + "." + zi[32:64] + ".acme.invalid"
		tmpl, err := certTmpl()
		if err != nil {
			return nil, err
		}
		tmpl.SignatureAlgorithm = x509.SHA256WithRSA
		tmpl.DNSNames = []string{name}
		derCert, err := x509.CreateCertificate(rand.Reader, tmpl, tmpl, &tlsKey.PublicKey, tlsKey)
		if err != nil {
			return nil, fmt.Errorf("create self-signed certificate: %v", err)
		}
		certPEM := pemEncode(derCert, "CERTIFICATE")
		cert, err := tls.X509KeyPair(certPEM, certKeyPEM)
		if err != nil {
			return nil, fmt.Errorf("loading x509 key pair: %v", err)
		}
		certs[name] = &cert
	}
	return certs, nil
}
func (chal Challenge) DNS(accountKey interface{}) (subdomain, txt string, err error) {
	if chal.Type != ChallengeDNS {
		return "", "", fmt.Errorf("challenge type is %s not %s", chal.Type, ChallengeDNS)
	}
	auth, err := keyAuth(accountKey, chal.Token)
	if err != nil {
		return "", "", err
	}
	hash := sha256.Sum256([]byte(auth))
	txt = base64.RawURLEncoding.EncodeToString(hash[:])
	subdomain = "_acme-challenge"
	return
}