mirror of
https://github.com/gocsaf/csaf.git
synced 2025-12-22 11:55:40 +01:00
Made the issuer optional if using client sides certs for auth.
This commit is contained in:
parent
1c59b671d5
commit
737fc89cd5
2 changed files with 2 additions and 2 deletions
|
|
@ -44,7 +44,7 @@ type config struct {
|
|||
DynamicProviderMetaData bool `toml:"dynamic_provider_metadata"`
|
||||
Publisher *csaf.Publisher `toml:"publisher"`
|
||||
UploadLimit *int64 `toml:"upload_limit"`
|
||||
Issuer string `toml:"issuer"`
|
||||
Issuer *string `toml:"issuer"`
|
||||
}
|
||||
|
||||
type tlp string
|
||||
|
|
|
|||
|
|
@ -76,7 +76,7 @@ func (c *controller) auth(
|
|||
log.Printf("SSL_CLIENT_VERIFY: %s\n", verify)
|
||||
|
||||
switch {
|
||||
case verify == "SUCCESS" && os.Getenv("SSL_CLIENT_I_DN") == c.cfg.Issuer:
|
||||
case verify == "SUCCESS" && (c.cfg.Issuer == nil || *c.cfg.Issuer == os.Getenv("SSL_CLIENT_I_DN")):
|
||||
log.Printf("user: %s\n", os.Getenv("SSL_CLIENT_S_DN"))
|
||||
log.Printf("ca: %s\n", os.Getenv("SSL_CLIENT_I_DN"))
|
||||
case c.cfg.Password == nil:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue