Commit Graph

7 Commits

Author SHA1 Message Date
Brad Fitzpatrick c3d05cdce9 Move more packages out of pkg/ and into internal/
Moved hashutil, httputil, osutil, netutil,
images, media, magic, video, and rollsum.
2018-01-02 21:03:30 -08:00
Brad Fitzpatrick d6a0b05df0 Rename import paths from camlistore.org to perkeep.org.
Part of the project renaming, issue #981.

After this, users will need to mv their $GOPATH/src/camlistore.org to
$GOPATH/src/perkeep.org. Sorry.

This doesn't yet rename the tools like camlistored, camput, camget,
camtool, etc.

Also, this only moves the lru package to internal. More will move to
internal later.

Also, this doesn't yet remove the "/pkg/" directory. That'll likely
happen later.

This updates some docs, but not all.

devcam test now passes again, even with Go 1.10 (which requires vet
checks are clean too). So a bunch of vet tests are fixed in this CL
too, and a bunch of other broken tests are now fixed (introduced from
the past week of merging the CL backlog).

Change-Id: If580db1691b5b99f8ed6195070789b1f44877dd4
2018-01-01 16:03:34 -08:00
Paul Lindner b09cd377d7 Switch to stdlib context from golang.org/x/net/context
This switches most usages of the pre-1.7 context library to use the
standard library.  Remaining usages are in:

  app/publisher/main.go
  pkg/fs/...

Change-Id: Ia74acc39499dcb39892342a2c9a2776537cf49f1
2017-11-26 01:12:26 -08:00
mpl 896c8cda74 pkg/gpgchallenge: expose the clients handler
The Client used to start its own listener and http server, so it could
receive the Server's challenge. However, that design does not work when
the Client must be used in an application that is already an http(s)
server.

Therefore, this change adds a Handler method to the Client, that returns
the Client's handler, as well as the pattern it should registered for
with an HTTPS server. This means, it is now the responsibility of the
caller to setup the listener for the Client before the Challenge can be
started.

Change-Id: I160e21c470322f7acad209ac28a15eaeed36c2c4
2016-12-17 20:40:03 +01:00
mpl 9dc6d6db7c pkg/gpgchallenge: more paranoia against clients
-check claimed IP is a global unicast one
-set timeout on requests, so they don't make us create long-lived
connections for nothing
-prevent redirects
-disable keepalive connections

Change-Id: Ibdbdd9916ddc93eb58505b04b4f21de60e37c745
2016-12-15 23:06:16 +01:00
mpl b3d21d7faa pkg/gpgchallenge: require public key of at least 2048 bits
Change-Id: Id1e3bb32b4fb6b89d09303f8121b95b1008bd65a
2016-12-14 20:48:43 +01:00
mpl f4ae855a49 pkg/gpgchallenge: to prove IP ownership with a gpg challenge
A demo client and server are included, to help with testing.

TODO(mpl): restrict IP space

Issue #722

Change-Id: I6952069e8885c06adcbb8fca103af9d83f2fa9a7
2016-12-10 01:09:43 +01:00