Skip to content

Commit

Permalink
fix: Handle nil pointer for ssl policy (#854)
Browse files Browse the repository at this point in the history
  • Loading branch information
liamg authored Aug 16, 2022
1 parent 30e5cc2 commit 81ba3c2
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion internal/adapters/cloud/aws/elb/adapt.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,10 +105,15 @@ func (a *adapter) adaptLoadBalancer(apiLoadBalancer types.LoadBalancer) (*elb.Lo
})
}

sslPolicy := defsecTypes.StringDefault("", metadata)
if listener.SslPolicy != nil {
sslPolicy = defsecTypes.String(*listener.SslPolicy, metadata)
}

listeners = append(listeners, elb.Listener{
Metadata: metadata,
Protocol: defsecTypes.String(string(listener.Protocol), metadata),
TLSPolicy: defsecTypes.String(*listener.SslPolicy, metadata),
TLSPolicy: sslPolicy,
DefaultActions: actions,
})
}
Expand Down

0 comments on commit 81ba3c2

Please sign in to comment.