webhookd/pkg/truststore/test/p12_truststore_test.go

22 lines
419 B
Go

package test
import (
"crypto/rsa"
"testing"
"github.com/ncarlier/webhookd/pkg/assert"
"github.com/ncarlier/webhookd/pkg/truststore"
)
func TestTrustStoreWithP12(t *testing.T) {
t.Skip()
ts, err := truststore.New("test.p12")
assert.Nil(t, err, "")
assert.NotNil(t, ts, "")
pubkey := ts.GetPublicKey("test.localnet")
assert.NotNil(t, pubkey, "")
_, ok := pubkey.(*rsa.PublicKey)
assert.True(t, ok, "")
}