Skip to content

Commit ed70cd5

Browse files
committed
add withCertificates function
1 parent ade7b96 commit ed70cd5

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

lib/config.go

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -440,3 +440,15 @@ func WithCatalog(cat catalog.Catalog) NucleiSDKOptions {
440440
return nil
441441
}
442442
}
443+
444+
// WithCertificates allows to use custom auth certificates, all 3 must be set if any
445+
func WithCertificates(ClientCAFile string, ClientCertFile string, ClientKeyFile string) NucleiSDKOptions {
446+
return func(e *NucleiEngine) error {
447+
if ClientCAFile != "" && ClientCertFile != "" && ClientKeyFile != "" {
448+
e.opts.ClientCAFile = ClientCAFile
449+
e.opts.ClientCertFile = ClientCertFile
450+
e.opts.ClientKeyFile = ClientKeyFile
451+
}
452+
return nil
453+
}
454+
}

0 commit comments

Comments
 (0)