mirror of
https://github.com/netbirdio/netbird.git
synced 2026-09-12 17:59:06 +02:00
17 lines
385 B
Go
17 lines
385 B
Go
package nmdata
|
|
|
|
import (
|
|
"time"
|
|
|
|
"github.com/netbirdio/netbird/shared/management/certposture"
|
|
)
|
|
|
|
// CertificateCheck is the slim twin of posture.CertificateCheck.
|
|
type CertificateCheck struct {
|
|
CACertificates []string
|
|
}
|
|
|
|
func (c *CertificateCheck) check(peer *Peer) (bool, error) {
|
|
return certposture.AnyChainMatchesCAs(peer.Meta.Certificates, c.CACertificates, time.Now()), nil
|
|
}
|