summaryrefslogtreecommitdiff
path: root/remote_test.go
diff options
context:
space:
mode:
authorCarlos Martín Nieto <[email protected]>2014-10-15 16:57:32 +0200
committerCarlos Martín Nieto <[email protected]>2014-10-15 16:57:32 +0200
commitd9dfc4bce89c711e9b0da865ab5e94f2db47b751 (patch)
tree527f5ef1168becb10d8ae140132f5422e1f3c033 /remote_test.go
parenta81abd10ca4786d5ad30aff8ac72f59896d12211 (diff)
Add support for hostkey certificates
While they're not exactly certificates, they belong in the same category.
Diffstat (limited to 'remote_test.go')
-rw-r--r--remote_test.go8
1 files changed, 2 insertions, 6 deletions
diff --git a/remote_test.go b/remote_test.go
index 8021f71..d1ad1e8 100644
--- a/remote_test.go
+++ b/remote_test.go
@@ -1,8 +1,6 @@
package git
import (
- "fmt"
- "crypto/x509"
"os"
"testing"
)
@@ -49,8 +47,7 @@ func TestListRemotes(t *testing.T) {
}
-func assertHostname(cert *x509.Certificate, valid bool, hostname string, t *testing.T) int {
- fmt.Println("hostname", hostname)
+func assertHostname(cert *Certificate, valid bool, hostname string, t *testing.T) int {
if hostname != "github.com" {
t.Fatal("Hostname does not match")
return ErrUser
@@ -68,7 +65,7 @@ func TestCertificateCheck(t *testing.T) {
checkFatal(t, err)
callbacks := RemoteCallbacks{
- CertificateCheckCallback: func (cert *x509.Certificate, valid bool, hostname string) int {
+ CertificateCheckCallback: func (cert *Certificate, valid bool, hostname string) int {
return assertHostname(cert, valid, hostname, t)
},
}
@@ -77,5 +74,4 @@ func TestCertificateCheck(t *testing.T) {
checkFatal(t, err)
err = remote.Fetch([]string{}, nil, "")
checkFatal(t, err)
- fmt.Println("after Fetch()")
}