File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed
Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -3,16 +3,18 @@ package graph
33import (
44 "fmt"
55 "strings"
6+ "sync"
67
78 "github.com/lanrat/certgraph/dns"
89 "github.com/lanrat/certgraph/fingerprint"
910)
1011
1112// CertNode graph node to store certificate information
1213type CertNode struct {
13- Fingerprint fingerprint.Fingerprint
14- Domains []string
15- foundMap map [string ]bool
14+ Fingerprint fingerprint.Fingerprint
15+ Domains []string
16+ foundMap map [string ]bool
17+ foundMapLock sync.Mutex
1618}
1719
1820func (c * CertNode ) String () string {
@@ -30,6 +32,8 @@ func (c *CertNode) Found() []string {
3032
3133// AddFound adds a driver name to the source of the certificate
3234func (c * CertNode ) AddFound (driver string ) {
35+ c .foundMapLock .Lock ()
36+ defer c .foundMapLock .Unlock ()
3337 if c .foundMap == nil {
3438 c .foundMap = make (map [string ]bool )
3539 }
You can’t perform that action at this time.
0 commit comments