Refactor signer code into command and package
This commit is contained in:
parent
3a2578ae55
commit
38566f35ef
13 changed files with 476 additions and 276 deletions
|
|
@ -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],
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue