[added] pinned_cert option to tls block hex(sha256(spki)) (#2233)

* [added] pinned_cert option to tls block hex(sha256(spki))

When read form config, the values are automatically lower cased.
The check when seeing the values programmatically requires 
lower case to avoid having to alter the map at this point.

Signed-off-by: Matthias Hanel <mh@synadia.com>
This commit is contained in:
Matthias Hanel
2021-05-20 17:00:09 -04:00
committed by GitHub
parent 7936faf00e
commit 6f6f22e9a7
10 changed files with 276 additions and 9 deletions

View File

@@ -886,6 +886,9 @@ func validateWebsocketOptions(o *Options) error {
return fmt.Errorf("trusted operators or trusted keys configuration is required for JWT authentication via cookie %q", wo.JWTCookie)
}
}
if err := validatePinnedCerts(wo.TLSPinnedCerts); err != nil {
return fmt.Errorf("websocket: %v", err)
}
return nil
}