cacert-gosigner/shared/shared.go

45 lines
644 B
Go
Raw Normal View History

2018-10-31 11:17:51 +01:00
package shared
const (
ProtocolVersion = 1
HandshakeByte = 0x02
AckByte = 0x10
ResendByte = 0x11
MagicTrailer = "rie4Ech7"
LengthFieldSize = 3
CheckSumFieldSize = 1
TrailerFieldSize = len(MagicTrailer)
)
2021-01-04 20:39:35 +01:00
type Action byte
const (
ActionNul = Action(0)
ActionSign = Action(1)
ActionRevoke = Action(2)
)
func (a Action) String() string {
switch a {
case ActionNul:
return "NUL"
case ActionSign:
return "SIGN"
case ActionRevoke:
return "REVOKE"
default:
return "unknown"
}
}
2021-01-04 20:39:35 +01:00
type CryptoSystemRootId byte
type CertificateProfileId byte
type MessageDigestAlgorithmId byte
type CryptoSystemId byte