Skip to content

Commit

Permalink
Add InternalTLSEnabled
Browse files Browse the repository at this point in the history
  • Loading branch information
nak3 committed Aug 28, 2023
1 parent 3eaadea commit d0624a4
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions pkg/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -445,16 +445,12 @@ func NewConfigFromMap(data map[string]string) (*Config, error) {
return nc, nil
}

// DataplaneTLSEnabled returns whether or not dataplane-trust is enabled.
func (c *Config) DataplaneTLSEnabled() bool {
// InternalTLSEnabled returns whether or not InternalEncyrption is enabled.
// Currently only DataplaneTrust is considered.
func (c *Config) InternalTLSEnabled() bool {
return tlsEnabled(c.DataplaneTrust)
}

// ControlplaneTLSEnabled returns whether or not controlane-trust is enabled.
func (c *Config) ControlplaneTLSEnabled() bool {
return tlsEnabled(c.ControlplaneTrust)
}

func tlsEnabled(trust Trust) bool {
return trust == TrustMinimal ||
trust == TrustEnabled ||
Expand Down

0 comments on commit d0624a4

Please sign in to comment.