18 Commits (e4c4d0b9eb301a8e12e6d4ab22f79f52d40af164)

Author SHA1 Message Date
Jan Dittberner f92bba5496 Define command and response for SignOpenPGP 2 years ago
Jan Dittberner c452453c31 Define command and response for RevokeCertificate 2 years ago
Jan Dittberner ad6b987c91 Implement sign certificate command
- decouple config and messages
- cainfo maps from config.Profile to messages.CAProfile
- config parses profile usage
- validity can be configured per certificate profile, defaults are defined in
  a defaultValidity method of the profile usage
- the client simulator emits certificate signing requests at random intervals
- add implementation of SingCertificateCommand to MsgPackHandler
- remove indirection signing.RequestSignature
2 years ago
Jan Dittberner 9c17a6730f Fix storing of zero value revocation timestamp 2 years ago
Jan Dittberner 7852c4d3df Add explicit channel direction information
This commit adds explicit input and output channel type information to
make the channel's intent visible to developers.
2 years ago
Jan Dittberner cd01f07007 Fix grammar 2 years ago
Jan Dittberner afe7d23c9b Implement CA information command
This commit defines command codes for planned commands and response codes for
their corresponding responses.

The health response from the HSM access component has been reduced to avoid
unnecessary data transmissions.

A new CA information command has been implemented. This command can be used
to retrieve the CA certificate and profile information for a given CA name.

The client simulator has been updated to retrieve CA information for all
CAs when the list of CAs changes.
2 years ago
Jan Dittberner 1374fe58e8 Implement graceful shutdown on interrupt or SIGTERM 2 years ago
Jan Dittberner 37d3b1e021 Update dependencies
This commit updates all external dependencies. The cobs module has a
changed API and code using cobs has been adapted to this new API.
2 years ago
Jan Dittberner 19436c06c2 Implement unit tests for public packages
This commit adds a comprehensive unit test suite for all public packages.
2 years ago
Jan Dittberner 51afebf2c1 Test and refactor messages
- add unit tests for all handwritten code in messages package
- use uuid.NewString() instead of uuid.NewUUID() to avoid unnecessary error
  handling
- sort code in messages.go to put type related code close to each other
- move checkFailed from hsm.Access.Healthy method to messages.CertificateInfoFailed
- add typing for Status field of messages.CertificateInfo
2 years ago
Jan Dittberner de7e716a82 Improve signer setup code
- allow multiple attempts to setup certificates
- use CAB forum BR compliant CRLDistributionPoint for Subordinate CA
  certificates by referencing their own CRL instead of their parent CA's CRL
- store certificates in DER encoded form
2 years ago
Jan Dittberner 65c5bac2d9 Implement delta CRL support
This commit provides real CRL support with persistent storage of CRLs as well
as support for delta CRLs using github.com/balacode/go-delta
2 years ago
Jan Dittberner 1031ee3118 Implement configuration support for CA profiles 2 years ago
Jan Dittberner af40662c7d Refactor client protocol
- define protocols.ClientHandler interface as base for client implementations
- implement protocols.ClientHandler in clientsim's ClientHandler type
- move protocol state handling into protocols.ServerProtocol and
  protocols.ClientProtocol
- move protocolState type into protocols.go
- reduce clientsim's TestCommandGenerator responsibility to test command
  generation
2 years ago
Jan Dittberner f429d3da45 Refactor server handler
- rename protocols.Handler to ServerHandler
- rename ServerHandler methods to better express their purpose
- pass command and response as parameters
- simplify state machine and handle errors in serial/seriallink.go
- implement command read timeout
- remove currentCommand and currentResponse fields from MsgPackHandler
2 years ago
Jan Dittberner e5dcf7afa9 Refactor COBS wire protocol
Wire protocol handling has been moved to protocol.Framer and its
implementation protocol.COBSFramer
2 years ago
Jan Dittberner faaadbe5aa Move internal code to internal packages 2 years ago