Refactor signer code into command and package

This commit is contained in:
Jan Dittberner 2021-01-04 14:15:12 +01:00
parent 3a2578ae55
commit 38566f35ef
13 changed files with 476 additions and 276 deletions

View file

@ -4,11 +4,13 @@ import (
"bytes"
"errors"
"fmt"
"git.cacert.org/cacert-gosigner/shared"
)
type SignerResponse struct {
Version uint8
Action Action
Action shared.Action
Reserved1 uint8
Reserved2 uint8
Content1 string
@ -45,7 +47,7 @@ func SignerResponseFromData(lengthBytes []byte, blockData []byte, checkSum byte)
return &SignerResponse{
Version: headerBytes[0],
Action: Action(headerBytes[1]),
Action: shared.Action(headerBytes[1]),
Reserved1: headerBytes[2],
Reserved2: headerBytes[3],
Content1: content[0],