26 lines
421 B
Go
26 lines
421 B
Go
//go:build originate_test
|
|
|
|
package x509crt
|
|
|
|
import (
|
|
"fmt"
|
|
"testing"
|
|
|
|
"github.com/stretchr/testify/require"
|
|
)
|
|
|
|
func TestCert(t *testing.T) {
|
|
{
|
|
caCert, caKey, err := CreateCertKey("test1")
|
|
require.NoError(t, err)
|
|
fmt.Println(string(caCert))
|
|
fmt.Println(string(caKey))
|
|
}
|
|
{
|
|
caCert, caKey, err := CreateCACert("test1")
|
|
require.NoError(t, err)
|
|
fmt.Println(string(caCert))
|
|
fmt.Println(string(caKey))
|
|
}
|
|
}
|