From 4c9c17d751228d821e0a53ac6882ee9a2562a5a0 Mon Sep 17 00:00:00 2001 From: mphanias <121247041+mphanias@users.noreply.github.com> Date: Fri, 23 Aug 2024 23:34:22 +0530 Subject: [PATCH] OM-206 - support pem, certificate, key files with LR or CRLF (#129) nullified all \r in read pem , cert, key files --- internal/pkg/commons/utils.go | 1 + 1 file changed, 1 insertion(+) diff --git a/internal/pkg/commons/utils.go b/internal/pkg/commons/utils.go index 8f09a56..4e67924 100644 --- a/internal/pkg/commons/utils.go +++ b/internal/pkg/commons/utils.go @@ -281,6 +281,7 @@ func readFromFile(filePath string) ([]byte, error) { } data := bytes.TrimSuffix(dataBytes, []byte("\n")) + data = bytes.ReplaceAll(data, []byte("\r"), []byte("")) return data, nil }