diff --git a/cmd/testing/tls_server.go b/cmd/testing/tls_server.go
index <HASH>..<HASH> 100644
--- a/cmd/testing/tls_server.go
+++ b/cmd/testing/tls_server.go
@@ -4,16 +4,25 @@ import (
 	"bytes"
 	"encoding/pem"
 	"net/http/httptest"
+	"crypto/x509"
 )
 
-func ExtractRootCa(server *httptest.Server) (string, error) {
+func ExtractRootCa(server *httptest.Server) (rootCaStr string, err error) {
 	rootCa := new(bytes.Buffer)
+
+	cert, err := x509.ParseCertificate(server.TLS.Certificates[0].Certificate[0])
+	if err != nil {
+		panic(err.Error())
+	}
+	// TODO: Replace above with following on Go 1.9
+	//cert := server.Certificate()
+
 	block := &pem.Block{
 		Type:  "CERTIFICATE",
-		Bytes: server.Certificate().Raw,
+		Bytes: cert.Raw,
 	}
 
-	err := pem.Encode(rootCa, block)
+	err = pem.Encode(rootCa, block)
 	if err != nil {
 		return "", err
 	}
Parse httptest server certificate manually to support go <I>