mirror of
https://github.com/TeaOSLab/EdgeCommon.git
synced 2025-12-31 07:26:36 +08:00
19 lines
382 B
Go
19 lines
382 B
Go
// Copyright 2021 Liuxiangchao iwind.liu@gmail.com. All rights reserved.
|
|
|
|
package sslconfigs
|
|
|
|
import (
|
|
"github.com/iwind/TeaGo/assert"
|
|
"testing"
|
|
)
|
|
|
|
func TestSSLCertConfig_MatchDomain(t *testing.T) {
|
|
var a = assert.NewAssertion(t)
|
|
|
|
var cert = &SSLCertConfig{
|
|
DNSNames: []string{"a.com", "b.com"},
|
|
}
|
|
a.IsTrue(cert.MatchDomain("a.com"))
|
|
a.IsFalse(cert.MatchDomain("z.com"))
|
|
}
|