Files
certmanager/pkg/aux509/x509cert_test.go
Олег Бородин e9d4d1ef07 import sources
2024-07-30 09:49:53 +02:00

30 lines
557 B
Go

package aux509
import (
"fmt"
"testing"
"github.com/stretchr/testify/require"
)
func TestCert(t *testing.T) {
{
//caCert, caKey, err := CreateX509SelfSignedCert("test1")
//require.NoError(t, err)
//fmt.Println(string(caCert))
//fmt.Println(string(caKey))
}
{
caCert, caKey, err := CreateX509CACert("test1")
require.NoError(t, err)
fmt.Println(string(caCert))
fmt.Println(string(caKey))
caCert, caKey, err = CreateX509Cert("test1", caKey)
require.NoError(t, err)
fmt.Println(string(caCert))
fmt.Println(string(caKey))
}
}