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))
	}
}
