create: fix header debug file

This commit is contained in:
Greg T. Wallace 2024-06-04 19:00:56 -04:00
parent b44b49cd19
commit 7dcf0f10b9

View file

@ -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)
}