mirror of
https://github.com/gogrlx/nats-server.git
synced 2026-04-02 03:38:42 -07:00
[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:
@@ -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
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user