client: Add GetCertificate callback

This commit is contained in:
Adnan Maolood
2020-12-17 16:46:16 -05:00
parent 611a7d54c0
commit 846fa2ac41
2 changed files with 9 additions and 53 deletions

View File

@@ -4,7 +4,6 @@ package main
import (
"bufio"
"crypto/tls"
"crypto/x509"
"fmt"
"io/ioutil"
@@ -47,12 +46,6 @@ func init() {
return gemini.TrustNone
}
}
client.CreateCertificate = func(hostname, path string) (tls.Certificate, error) {
fmt.Println("Generating client certificate for", hostname, path)
return gemini.CreateCertificate(gemini.CertificateOptions{
Duration: time.Hour,
})
}
client.GetInput = func(prompt string, sensitive bool) (string, bool) {
fmt.Printf("%s: ", prompt)
scanner.Scan()