mirror of
https://github.com/gregtwallace/apc-p15-tool.git
synced 2025-06-07 20:36:51 +00:00
write the functioning p15 file
This commit is contained in:
parent
dd6c6bd442
commit
fc75922d18
2 changed files with 18 additions and 2 deletions
pkg/app
|
@ -2,7 +2,6 @@ package app
|
|||
|
||||
import (
|
||||
"apc-p15-tool/pkg/pkcs15"
|
||||
"encoding/base64"
|
||||
"os"
|
||||
|
||||
"go.uber.org/zap"
|
||||
|
@ -59,7 +58,21 @@ func Start() {
|
|||
}
|
||||
|
||||
// app.logger.Debug(hex.EncodeToString(p15File))
|
||||
app.logger.Debug(base64.RawStdEncoding.EncodeToString(p15File))
|
||||
// app.logger.Debug(base64.RawStdEncoding.EncodeToString(p15File))
|
||||
|
||||
apcHeader, err := makeFileHeader(p15File)
|
||||
if err != nil {
|
||||
app.logger.Fatalf("failed to make p15 file header (%s)", err)
|
||||
// FATAL
|
||||
}
|
||||
|
||||
apcFile := append(apcHeader, p15File...)
|
||||
|
||||
err = os.WriteFile("./apctool.p15", apcFile, 0777)
|
||||
if err != nil {
|
||||
app.logger.Fatalf("failed to write apc p15 file (%s)", err)
|
||||
// FATAL
|
||||
}
|
||||
|
||||
// TEMP TEMP TEMP
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue