|
@@ -280,7 +280,7 @@ func (f *Interface) decryptToTun(hostinfo *HostInfo, messageCounter uint64, out
|
|
|
return
|
|
|
}
|
|
|
|
|
|
- dropReason := f.firewall.Drop(out, *fwPacket, true, hostinfo, trustedCAs, localCache)
|
|
|
+ dropReason := f.firewall.Drop(out, *fwPacket, true, hostinfo, f.caPool, localCache)
|
|
|
if dropReason != nil {
|
|
|
if f.l.Level >= logrus.DebugLevel {
|
|
|
hostinfo.logger(f.l).WithField("fwPacket", fwPacket).
|
|
@@ -368,7 +368,7 @@ func (f *Interface) sendMeta(ci *ConnectionState, endpoint *net.UDPAddr, meta *N
|
|
|
}
|
|
|
*/
|
|
|
|
|
|
-func RecombineCertAndValidate(h *noise.HandshakeState, rawCertBytes []byte) (*cert.NebulaCertificate, error) {
|
|
|
+func RecombineCertAndValidate(h *noise.HandshakeState, rawCertBytes []byte, caPool *cert.NebulaCAPool) (*cert.NebulaCertificate, error) {
|
|
|
pk := h.PeerStatic()
|
|
|
|
|
|
if pk == nil {
|
|
@@ -397,7 +397,7 @@ func RecombineCertAndValidate(h *noise.HandshakeState, rawCertBytes []byte) (*ce
|
|
|
}
|
|
|
|
|
|
c, _ := cert.UnmarshalNebulaCertificate(recombined)
|
|
|
- isValid, err := c.Verify(time.Now(), trustedCAs)
|
|
|
+ isValid, err := c.Verify(time.Now(), caPool)
|
|
|
if err != nil {
|
|
|
return c, fmt.Errorf("certificate validation failed: %s", err)
|
|
|
} else if !isValid {
|