webhookd/pkg/truststore/test/p12_truststore_test.go
Nicolas Carlier f2054d2dc4 feat(signature): signature refactoring
- add ed5519 HTTP signature support
- refactor truststore package
- add P12 trust store support

close #72
2022-12-29 17:14:28 +00:00

24 lines
483 B
Go

package test
import (
"crypto/rsa"
"testing"
"github.com/ncarlier/webhookd/pkg/assert"
"github.com/ncarlier/webhookd/pkg/logger"
"github.com/ncarlier/webhookd/pkg/truststore"
)
func TestTrustStoreWithP12(t *testing.T) {
t.Skip()
logger.Init("warn")
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, "")
}