| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
Updated types, improved units tests, isolated most test data to have
it in one place, renamed and created new files to improve readability,
and fixed a bunch of minor TODOs.
|
|
|
|
|
|
|
|
|
|
|
|
| |
After tls.Unmarshal() an empty slice is not assigned the nil value, but rather
a slice of zero length. It is in contrast to NewTreeHeadV1(), which assigns a
nil value. Therefore, reflect.DeepEqual() considers them to be different.
Fixed by assigning an empty tree head extension as `make([]byte, 0)`,
and not looking for nil values but rather zero-length values with len().
Further read: "Note that a non-nil empty slice and a nil slice [...] are
not deeply equal." (https://golang.org/pkg/reflect/#DeepEqual).
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
As a result these changes were made:
- Simplified a few New* functions
- Allowed empty inclusion and consistency proofs, which is in contrast
to not being able to marshal them due to `tls:"minlen:1"`. For example,
an inclusion proof will be empty for a Merkle tree of size 1.
- Disallowed empty signatures and chains in a leaf's Appendix
- Removed unnecessary examples
|
| |
|
| |
|
| |
|
|
|
|
|
| |
Go's "encoding/json" already takes care of encoding and decoding byte
slices as base64. As such, it need not be done explicitly by us.
|
| |
|
|
|
|
|
|
| |
Structured files a bit better, added more documentation, switched to
pointers as default (unless specifically motivated not to do so), and
encapsulated TLS (un)marshaling for the respective types that use it.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
Makes things a bit more modular. As part of this process I also
replaced ct/x509 with crypto/x509, which already suits our needs.
|
| |
|
| |
|
|
|
|
|
| |
Moved structures for in/out HTTP data into reqres.go and added basic
doc comments. A few minor edits as well to make things consistent.
|
| |
|
| |
|
|
|
|
|
|
| |
If the provided tree size is (mostly) valid the Trillian back-end is
asked to provide an inclusion proof, which is then placed in an
InclusionProofV1 structure and returned as a JSON object.
|
|
|
|
|
| |
If the provided range is (mostly) valid the corresponding log entries
are fetched from the Trillian back-end and returned as a JSON object.
|
| |
|
|
|
|
|
| |
If the POSTed StItem can be parsed without errors it is handed over to
the Trillian back-end.
|
| |
|
|
An STFE server instance that dials the Trillian gRPC back-end, and which
listens on six different HTTP endpoints but without any actual processing.
|