Skip to content

Commit 322266f

Browse files
authored
Use the correct cert identifier (#19)
1 parent 04491b9 commit 322266f

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

pkg/haproxy/client.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -249,11 +249,11 @@ func (c *Client) GetCertificateInfoByPath(filePath, displayName string) (*CertIn
249249

250250
// GetCertificateInfoByRef retrieves detailed information using a CertificateRef
251251
func (c *Client) GetCertificateInfoByRef(ref CertificateRef) (*CertInfo, error) {
252-
// Use DisplayName (storage_name) for API lookup, as the HAProxy Data Plane API
253-
// storage endpoint expects the storage name, not the full filesystem path
254-
lookupPath := ref.DisplayName
252+
// Use FilePath for API lookup, as the HAProxy Data Plane API v2 storage endpoint
253+
// expects the full file path, not the storage name
254+
lookupPath := ref.FilePath
255255
if lookupPath == "" {
256-
lookupPath = ref.FilePath
256+
lookupPath = ref.DisplayName
257257
}
258258
return c.GetCertificateInfoByPath(lookupPath, ref.DisplayName)
259259
}

0 commit comments

Comments
 (0)