Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions pkg/haproxy/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -381,11 +381,13 @@ func (c *Client) GetCertificateInfoByPath(filePath, displayName string) (*CertIn

// GetCertificateInfoByRef retrieves detailed information using a CertificateRef
func (c *Client) GetCertificateInfoByRef(ref CertificateRef) (*CertInfo, error) {
filePath := ref.FilePath
if filePath == "" {
filePath = ref.DisplayName
// Use DisplayName (storage_name) for API lookup, as the HAProxy Data Plane API
// storage endpoint expects the storage name, not the full filesystem path
lookupPath := ref.DisplayName
if lookupPath == "" {
lookupPath = ref.FilePath
}
return c.GetCertificateInfoByPath(filePath, ref.DisplayName)
return c.GetCertificateInfoByPath(lookupPath, ref.DisplayName)
}

// parsePEMCertificate parses a PEM certificate and extracts certificate info
Expand Down
Loading