From 7dcf0f10b99f592d7cdeb39598d038bddf481e47 Mon Sep 17 00:00:00 2001 From: "Greg T. Wallace" Date: Tue, 4 Jun 2024 19:00:56 -0400 Subject: [PATCH] create: fix header debug file --- pkg/app/cmd_create.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/app/cmd_create.go b/pkg/app/cmd_create.go index ad31003..c5d700c 100644 --- a/pkg/app/cmd_create.go +++ b/pkg/app/cmd_create.go @@ -65,7 +65,7 @@ func (app *app) cmdCreate(_ context.Context, args []string) error { app.debugLogger.Printf("create: apc p15 key+cert file %s written to disk", keyCertFileNameDebug) keyCertFileNameHeaderDebug := keyCertFileName + ".header.b64" - err = os.WriteFile(keyCertFileNameHeaderDebug, []byte(base64.StdEncoding.EncodeToString(apcKeyCertFile[apcHeaderLen:])), 0600) + err = os.WriteFile(keyCertFileNameHeaderDebug, []byte(base64.StdEncoding.EncodeToString(apcKeyCertFile[:apcHeaderLen])), 0600) if err != nil { return fmt.Errorf("create: failed to write apc p15 key+cert file (%s)", err) }