Commit Graph

528 Commits

Author SHA1 Message Date
David Lawrence c9732dd9cb stop targets dir being created, we don't use it
Signed-off-by: David Lawrence <david.lawrence@docker.com> (github: endophage)
2015-07-18 22:46:04 -07:00
David Lawrence 54d40f2ae3 updating error messages
Signed-off-by: David Lawrence <david.lawrence@docker.com> (github: endophage)
2015-07-18 22:25:19 -07:00
Diogo Monica 2eb77d3334 Removed organization from certificates and added tests for x509utils
Signed-off-by: Diogo Monica <diogo@docker.com>
2015-07-18 21:48:53 -07:00
Diogo Monica 31e1ec122f Adding leaf cert expiry filtering and best-effort rotation
Signed-off-by: Diogo Monica <diogo@docker.com>
2015-07-18 20:31:19 -07:00
Diogo Mónica fbaf7fa5cb Merge pull request #84 from endophage/bugfixes
fixing timestamps, clearing changelists, and the Adding target byte log
2015-07-18 18:28:49 -07:00
David Lawrence 5015b1f47d fixing timestamps, clearing changelists, and the Adding target byte log
Signed-off-by: David Lawrence <david.lawrence@docker.com> (github: endophage)
2015-07-18 17:55:13 -07:00
Diogo Monica c3bc4dbccc New root now verified when there are existing certs
Signed-off-by: Diogo Monica <diogo@docker.com>
2015-07-18 17:52:08 -07:00
Diogo Monica 074f52d559 Removing uneeded ca.crt file
Signed-off-by: Diogo Monica <diogo@docker.com>
2015-07-18 16:01:16 -07:00
Diogo Monica 7de1acfc04 Bump gotuf
Signed-off-by: Diogo Monica <diogo@docker.com>
2015-07-18 01:48:06 -07:00
Diogo Monica 0abc2ad111 Refactored ValidateRoot Logic
Signed-off-by: Diogo Monica <diogo@docker.com>
2015-07-18 01:44:01 -07:00
Diogo Monica 117a25758d Fixing return errors
Signed-off-by: Diogo Monica <diogo@docker.com>
2015-07-18 01:42:57 -07:00
Diogo Monica 97a2d30d99 Fixed bug with RemoveCert
Signed-off-by: Diogo Monica <diogo@docker.com>
2015-07-18 01:42:19 -07:00
Diogo Monica e3591c0b10 Added new helper functions
Signed-off-by: Diogo Monica <diogo@docker.com>
2015-07-18 01:40:32 -07:00
Diogo Mónica 2b7682c323 Merge pull request #82 from docker/new-unit-tests
New unit tests
2015-07-17 18:24:35 -07:00
David Lawrence e03458c1c3 Merge pull request #68 from endophage/errors
updating errors to use distribution's errcode package
2015-07-17 18:10:51 -07:00
David Lawrence b561f347ed updating errors to use distribution's errcode package
Signed-off-by: David Lawrence <david.lawrence@docker.com> (github: endophage)
2015-07-17 18:02:56 -07:00
David Lawrence b71547ed3f Merge pull request #57 from endophage/client_atomic_update
client side of multi TUF file atomic update
2015-07-17 17:56:00 -07:00
David Lawrence c39a218a40 Merge pull request #51 from dmcgowan/add-ping-endpoint
Add ping endpoint
2015-07-17 17:55:22 -07:00
David Lawrence d453c6548d client side of multi TUF file atomic update
Signed-off-by: David Lawrence <david.lawrence@docker.com> (github: endophage)
2015-07-17 17:48:06 -07:00
Aaron Lehmann 48f3be4722 Increase test coverage for CryptoService
Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
2015-07-17 17:32:32 -07:00
Aaron Lehmann 16f57a6f4f Add test for UnlockedCryptoService
Brings the test coverage for the cryptoservice package from 54.5% to
72.3% (based only on tests inside the package).

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
2015-07-17 17:23:56 -07:00
Diogo Mónica 56e4cdff6f Merge pull request #81 from docker/cover-makefile-target
Fix cover target in Makefile
2015-07-17 16:54:06 -07:00
Diogo Mónica 552ccf411a Merge pull request #80 from docker/test-publish
Add a unit test for publish
2015-07-17 16:53:45 -07:00
Aaron Lehmann f5d1a1fbf5 Add test coverage for KeyMemoryStore (and by extension, MemoryFileStore)
Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
2015-07-17 16:45:36 -07:00
Aaron Lehmann 1d6aa22963 Fix cover target in Makefile
It shouldn't depend on .cover, because the makefile doesn't say how to
builld .cover.

It also needs to be included in .PHONY so "make cover" forces coverage
to be run.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
2015-07-17 16:27:54 -07:00
Aaron Lehmann afc331b930 Add a unit test for publish
This instantiates a temporary server, publishes some targets to it, and
makes sure we can pull back the correct targets from the server.

Also fixes a few problems with the client unit tests, error reporting in
the client, and logging in the server.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
2015-07-17 16:27:31 -07:00
Nathan McCauley a90a8b27b3 Merge pull request #65 from docker/adding-the-not-yummy-kind-of-tofu
Adding the not yummy kind of tofu
2015-07-17 15:59:30 -07:00
Diogo Monica f532550742 Rebase works
Signed-off-by: Diogo Monica <diogo@docker.com>
2015-07-17 14:44:51 -07:00
Diogo Monica 00f8f56942 Cosmetic code changes
Signed-off-by: Diogo Monica <diogo@docker.com>
2015-07-17 14:33:06 -07:00
Diogo Monica 4c805611d0 Adding more error types and being extra careful with checks
Signed-off-by: Diogo Monica <diogo@docker.com>
2015-07-17 14:33:06 -07:00
Diogo Monica c817ba3606 Fixed bug in Root Validation and added more test
Signed-off-by: Diogo Monica <diogo@docker.com>
2015-07-17 14:33:05 -07:00
Diogo Monica 945691912a Added error type to X509FileStore
Signed-off-by: Diogo Monica <diogo@docker.com>
2015-07-17 14:33:05 -07:00
Diogo Monica 17c9fcd911 Added basic tests for ValidateRoot
Signed-off-by: Diogo Monica <diogo@docker.com>
2015-07-17 14:33:05 -07:00
Diogo Monica 1c10f2233d Add better comments, debug code and errors to ValidateRoot
Signed-off-by: Diogo Monica <diogo@docker.com>
2015-07-17 14:33:05 -07:00
Diogo Monica 2c9a0d6331 Adding tests to RemoveAll in X509Stores
Signed-off-by: Diogo Monica <diogo@docker.com>
2015-07-17 14:31:43 -07:00
Diogo Monica 3ec4f1d7f4 Adding RemoveKey and Test
Signed-off-by: Diogo Monica <diogo@docker.com>
2015-07-17 14:31:43 -07:00
Diogo Monica f5873eef8c Adding RemoveAll to X509FileStore and correcting functions caller
Signed-off-by: Diogo Monica <diogo@docker.com>
2015-07-17 14:31:43 -07:00
Diogo Monica e72141f38a Simplifying the root rotation logic
Signed-off-by: Diogo Monica <diogo@docker.com>
2015-07-17 14:31:43 -07:00
Diogo Monica 5354c3b191 Added logic for root certificate rotation
Signed-off-by: Diogo Monica <diogo@docker.com>
2015-07-17 14:31:43 -07:00
Diogo Monica 5a77976901 Rebasing from master
Signed-off-by: Diogo Monica <diogo@docker.com>
2015-07-17 14:31:43 -07:00
Diogo Monica 8d9d2f1dde Add TOFU logic
Signed-off-by: Diogo Monica <diogo@docker.com>
2015-07-17 14:31:43 -07:00
Diogo Monica a7d8cb0a19 Adding chain support for roots.json and scaning for leaf instead of hardcoding
Signed-off-by: Diogo Monica <diogo@docker.com>
2015-07-17 14:31:03 -07:00
Diogo Monica 58e6544d0a Adding Cert retrieval by common name, and renaming KeyID to CertID
Signed-off-by: Diogo Monica <diogo@docker.com>
2015-07-17 14:28:30 -07:00
Diogo Monica 0313aa5958 Adding parsing of multiple certificates, and leaf cert filtering methods
Signed-off-by: Diogo Monica <diogo@docker.com>
2015-07-17 14:28:30 -07:00
Diogo Mónica b91777d51a Merge pull request #78 from jfrazelle/move-coverage-script-to-makefile
Move coverage script to makefile
2015-07-17 12:38:43 -07:00
Jessica Frazelle 23a2d8a3ec move coverage script to makefile function
Signed-off-by: Jessica Frazelle <princess@docker.com>
2015-07-17 12:17:38 -07:00
Diogo Mónica 5bfd490be1 Merge pull request #77 from jfrazelle/74-cross-compile-binaries
cross compile binaries / dockerfile fixes
2015-07-17 12:11:09 -07:00
Diogo Mónica c749917b37 Merge pull request #79 from docker/separate-public-private-keys
Updates to notary for gotuf's split of PublicKey and PrivateKey interfaces
2015-07-17 12:02:06 -07:00
Jessica Frazelle 7a588ab223 Add makefile target for cross
Can be run with:

```
docker build --rm --force-rm -t notary .

docker run --rm -it \
    -v $(pwd)/cross:/go/src/github.com/docker/notary/cross \
    notary \
    make cross
```

Signed-off-by: Jessica Frazelle <princess@docker.com>
2015-07-17 11:36:38 -07:00
Aaron Lehmann d2ea9cc0d5 Updates to notary for gotuf's split of PublicKey and PrivateKey interfaces
Functions should now take data.PublicKey or data.PrivateKey instead of
data.Key.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
2015-07-17 11:35:22 -07:00