From 69440058bbf4a4f51aaa5c145920671c2adf0eb0 Mon Sep 17 00:00:00 2001 From: Kristoffer Dalby Date: Thu, 10 Nov 2022 08:02:40 +0000 Subject: [PATCH] Clean up cert function Signed-off-by: Kristoffer Dalby --- integration/hsic/hsic.go | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/integration/hsic/hsic.go b/integration/hsic/hsic.go index e8e8cfbf..f67805b1 100644 --- a/integration/hsic/hsic.go +++ b/integration/hsic/hsic.go @@ -362,6 +362,7 @@ func (t *HeadscaleInContainer) WriteFile(path string, data []byte) error { return integrationutil.WriteFileToContainer(t.pool, t.container, path, data) } +//nolint func createCertificate() ([]byte, []byte, error) { // From: // https://shaneutt.com/blog/golang-ca-and-signed-cert-go/ @@ -389,11 +390,6 @@ func createCertificate() ([]byte, []byte, error) { return nil, nil, err } - // caBytes, err := x509.CreateCertificate(rand.Reader, ca, ca, &caPrivKey.PublicKey, caPrivKey) - // if err != nil { - // return nil, err - // } - cert := &x509.Certificate{ SerialNumber: big.NewInt(1658), Subject: pkix.Name{ @@ -445,10 +441,5 @@ func createCertificate() ([]byte, []byte, error) { return nil, nil, err } - // serverCert, err := tls.X509KeyPair(certPEM.Bytes(), certPrivKeyPEM.Bytes()) - // if err != nil { - // return nil, err - // } - return certPEM.Bytes(), certPrivKeyPEM.Bytes(), nil }