32 lines
597 B
Go
32 lines
597 B
Go
//go:build originate_test
|
|
|
|
package x509crt
|
|
|
|
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))
|
|
}
|
|
}
|