From 1836352857933f429c45e7604016183eabdf7269 Mon Sep 17 00:00:00 2001 From: Roettges Florian Date: Fri, 1 Dec 2023 13:26:20 +0100 Subject: [PATCH] added temporary logging --- core/pemreader/pemreader.go | 4 ++++ crl/crlreader/crlreader.go | 1 - 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/core/pemreader/pemreader.go b/core/pemreader/pemreader.go index 4a32d84..9d95f2f 100644 --- a/core/pemreader/pemreader.go +++ b/core/pemreader/pemreader.go @@ -2,10 +2,12 @@ package pemreader import ( "bufio" + "encoding/hex" "errors" "fmt" "os" "regexp" + "strconv" ) const pemMaxLineLength = 64 + 2 @@ -35,7 +37,9 @@ func (p *PemReader) readNextBase64Line(byteData []byte) (int, error) { if len(readString) > pemMaxLineLength { return 0, fmt.Errorf("line was longer than 64 characters %s", readString) } else { + fmt.Println("Base64 String read: " + readString) i := copy(byteData, readString) + fmt.Println("Base64 String as bytes(length:" + strconv.Itoa(i) + "): " + hex.EncodeToString(byteData)) return i, nil } } diff --git a/crl/crlreader/crlreader.go b/crl/crlreader/crlreader.go index 8993391..adfce72 100644 --- a/crl/crlreader/crlreader.go +++ b/crl/crlreader/crlreader.go @@ -57,7 +57,6 @@ type StreamingCRLFileReader struct { } func (StreamingCRLFileReader) ReadCRL(crlProcessor CRLProcessor, crlFilePath string) (*CRLReadResult, error) { - crlFile, err := os.Open(crlFilePath) if err != nil { return nil, err