Commit Graph

61 Commits

Author SHA1 Message Date
mpl 257fd29afa camget: allow insecure TLS with shared URLs
Change-Id: I22f610009edfecea932019c35310ae62b0613cb8
2013-07-16 15:56:32 +02:00
Brad Fitzpatrick 02d38b07ca camput, client: move lot of camput's code into pkg/client
so cammount can use it.

Change-Id: I1bd513e6dfe6faab785c856abbd0d1337e978dd9
2013-07-11 16:46:23 +10:00
Brad Fitzpatrick 4a404a3c60 search: clean up describe handler and DescribeRequest
Change-Id: I4e6184765b6139de3bdc153d27a12d3cb205a55e
2013-07-11 10:35:06 +10:00
Andrew Gerrand 64153d9f02 client,search: add withattr and describe to client
Change-Id: I9d55a7283bc7c99560e61aea80024c8f80dacc05
2013-07-10 21:10:18 +10:00
Andrew Gerrand ba3d7f7e34 fix comment
Change-Id: Ibf210640039cfbe1a7e33f0013d7c59734f59cef
2013-07-10 19:58:55 +10:00
Brad Fitzpatrick cf0d9aca6e More docs
Change-Id: I5c21f240c85bcf91fb67487cc172bf3faeb49fff
2013-07-07 18:52:14 -07:00
mpl b24ac50965 client: factorize the transport setup, and use it in camget
Fixes http://camlistore.org/issue/153

Change-Id: If393b34bbfcf4a6282357c9c57ebb85bae8741a3
2013-06-25 23:37:41 +02:00
mpl 0de2881a16 client: help (wrt to the gpg key) initialize the config
Change-Id: I983e4396abacbc4d8fc354863cffeece65dd5b90
2013-06-22 01:16:11 +02:00
Brad Fitzpatrick ca58d8e2e0 Remove noisy var _ = log.Printf lines.
Change-Id: Ia58b8ef5f271f542ae4fe61c7fb1497322770322
2013-06-14 12:55:55 -07:00
Brad Fitzpatrick 36c1ecebd9 Let camtool sync's --dest and --thirdleg flags take local disk paths, instead of servers.
Change-Id: I8daddf06a7201384edff2cb22ecfd5872fc84928
2013-06-09 11:36:26 +02:00
mpl c9905c246a discovery: use c.newRequest
Change-Id: I69f5fa86f70872a43326f9815b500eac0c122db4
2013-06-05 01:13:53 +02:00
mpl 448b456234 android: log when ping fails to resolve
Change-Id: I990d9dfe24e526474601b4a18ec194be7af21331
2013-05-27 22:28:46 +02:00
Brad Fitzpatrick 2ebd1aa8e4 Merge "camput: reenable -secret-keyring, use flag.StringVar" 2013-05-01 14:34:12 +00:00
mpl db9fdb7e6e camput: reenable -secret-keyring, use flag.StringVar
http://camlistore.org/issue/76

Change-Id: I37229a1082e5d955cadcc63521ea1b13dd63a33c
2013-05-01 16:48:19 +02:00
mpl af542f5cae client: fix "method not an expression" error for Go1
Change-Id: Id46cfafb6585fb074415d10affbb835373d27112
2013-05-01 15:08:58 +02:00
Brad Fitzpatrick 6be77f09e4 Merge "Allow HTTPS with a self-signed certificate." 2013-05-01 02:30:23 +00:00
mpl ac431439f3 Allow HTTPS with a self-signed certificate.
A new client configuration parameter, "trustedCerts" (list of strings)
is introduced. A certificate fingerprint is defined as the 10 digits
prefix of the sha1 of the whole certificate (in ASN1. DER form).
trustedCerts should contain the list of fingerprints of the
certificates we trust. If not empty, the server's certificate
is checked against that list, instead of using the full x509 validation
on it.

-added a dial function and tls configuration, which check if we're using
SSL, and if we're in "trustedCerts" mode.
pkg/client/client.go
pkg/client/config.go

-moved android specific hacks from camput to the client layer, so that
the dial and tls config could reuse/access them. Also allows future
reuse for other commands, such as camget.
pkg/client/android.go

-adapted camput to the above changes:
cmd/camput/android.go
cmd/camput/camput.go
cmd/camput/files.go

-server prints a hint when it generates the self-signed:
pkg/misc/misc.go
server/camlistored/camlistored.go

-camliactivity:
clients/android/res/xml/preferences.xml
clients/android/src/org/camlistore/Preferences.java
clients/android/src/org/camlistore/SettingsActivity.java
clients/android/src/org/camlistore/UploadService.java
clients/android/src/org/camlistore/UploadThread.java

http://camlistore.org/issue/131

Change-Id: I6be20161549a69aafc8eb7b9e96e9351dc1c5b09
2013-04-23 17:10:37 +02:00
mpl 0830902ffb schema: add Share type
This changes allows to get rid of the use of map[string]interface{} in
pkg/server/share.go

Change-Id: Ifeae6b194ff4db679be63d0087cb6d1c5df2f3ca
2013-03-11 21:53:56 +01:00
mpl f21cea5131 share: refactored
-pkg/server/share.go handles share(d) blobs.
-pkg/blobserver/gethandler no longer deals with share blobs
and has been rewritten like the other handlers (no more auth
in there).
-client and signhandler changed accordingly.
-serverconfig: auth moved up in makeCamliHandler
-share parameter added to the user level and low level config.
-share URL is now http(s)://host[:port]/[prefix/]share/sha1-xxxx.

Addresses http://camlistore.org/issue/107

Change-Id: I0a2c07ac1a1e435b141702e0ff06dc8182721d65
2013-03-06 19:11:00 +01:00
Brad Fitzpatrick e867ea7dc0 client, search, fs: cammount now getting search queries back
Change-Id: I68541e9f9d54fa4240872d440972ad39f6bad33f
2013-02-07 21:55:17 -08:00
Brad Fitzpatrick bdfc5b0c6c client: remove debug logs
Change-Id: Iba67ff3daceb17766d17337d8b84e58ed3e96ab7
2013-02-02 22:27:54 -08:00
Brad Fitzpatrick 9e34a07b91 client: batch and split stat requests
Change-Id: I40e64cc2de58040bb67c6560a64ba108c421b18d
2013-02-02 21:51:08 -08:00
mpl 464a138a7d upload: ignore the haveCache(s) when uploading a file blob with -vivify
Change-Id: Ic365c803322f01bcf1045456d4cebe74e870a7d2
2013-01-30 16:06:03 +01:00
Brad Fitzpatrick 0490df5b2a client: remove TODO
Change-Id: Ie2ae66a44cb87e8f48d94da29fcfc607a8c0dd70
2013-01-28 07:32:51 -08:00
Brad Fitzpatrick 16a7ecf55a client: tolerate missing config file
Change-Id: I43fd2439b3eddb3d883d0db6cc6f23fe535aeb28
2013-01-26 16:46:19 -08:00
Brad Fitzpatrick 7c4380eebe auth: add ErrNoAuth, use it pkg/client log warning.
Change-Id: If657da28bc9888941400c263be61809ead5cef12
2013-01-26 11:23:39 -08:00
Brad Fitzpatrick c7bbccf435 config: Rename blobServer config key and flag to just server. use auth from environment when an explicit server is given
Change-Id: I07cfe3df3b644e143fcb92456e56d238bbbdd52e
2013-01-25 16:23:31 -08:00
Brad Fitzpatrick f9ac0ab109 pkg/client: stop using Superset for sharing
Change-Id: I4f034b73584413d3d37f399680c67330783951b2
2013-01-22 09:52:01 -08:00
Brad Fitzpatrick 1bf01d7315 schema: lot of Blob/Builder work, and kill schema.Map.
Next up: unexport schema.Superset.

Change-Id: Ia4bb34790abba75bdb4d4101df7a4f15875f4237
2013-01-21 20:56:12 -08:00
mpl 8268b2a298 camsync: set logger for all clients
Change-Id: I9d3e9eeeadbceebbd7ef371e4e405a2cea202282
2013-01-17 01:24:42 +01:00
mpl bb665b9584 camsync: added --all flag
and some guessing/discovery for --src.

This option enables camsync to discover the sync handlers on the
source server, and use that information to run all possible syncs.

Change-Id: Ie1f3c309780a168372a674c6c3a18f679a67d804
2013-01-17 00:37:40 +01:00
Brad Fitzpatrick 8e44c62047 camget: finish --shared fetching support
Change-Id: I32edf63e01068a0e96f3255ba4d1313682cf03c4
2013-01-02 14:50:52 -08:00
Brad Fitzpatrick 827feaa3ac camget, client, schema: start of camget --shared support. see flag docs.
Change-Id: I5dd43129cb0032821a5913a8f20da0ddb38c63da
2013-01-02 12:55:12 -08:00
Brad Fitzpatrick 3d748363f7 pkg/client: don't use config file auth when using an explicit server
Change-Id: I07e3080adf4fed13deb3ec5a2ee900f4fc3a77fe
2013-01-02 11:42:39 -08:00
Brad Fitzpatrick 6b466d0faa camput, client: push havecache down deeper, make it track blob sizes.
also, clean up some camput HTTP stuff.

Change-Id: I2762e5a1b83139132b5f660d306ed45584a7799a
2013-01-01 20:23:44 -08:00
Brad Fitzpatrick 9bee164972 camput: enabling client caching by default
make havecache/statcache named on disk by remote server's generation,
hide debug options in camput unless CAMLI_DEBUG=1 is set,
push havecache down into pkg/client.

Change-Id: Ic152397abc11b4ff3931468ffe93cf1eba62b438
2012-12-31 13:45:13 -08:00
Brad Fitzpatrick 9605d3e950 client: add StorageGeneration accessor
Change-Id: Ie61a5386f433659421cdf5cc89d216b654f5b0fb
2012-12-31 11:36:58 -08:00
Brad Fitzpatrick cefe9b42ee client: cap the number of in-flight requests to 5, for now
keeps camput and the server from running out of file descriptors. will do something
smarter in a subsequent patch.

Change-Id: Icca5027388eb838d45b443b7f2c331ba0f2c6585
2012-12-28 09:24:26 -08:00
Brad Fitzpatrick 764e41a50c Work around golang.org/issue/4590
Change-Id: Ibde7a93db7dcb8c51eb828b6c4e50505904fce6a
2012-12-26 13:36:45 -08:00
Brad Fitzpatrick a2df86d08e More workarounds for http://golang.org/issue/4589.
These ones don't matter as much, though (just debug output)

Change-Id: Ief8c49e0243e21feacf035e63dbe925bb417f716
2012-12-26 13:17:36 -08:00
Brad Fitzpatrick 3d64c9fd7f client: add temporary CAMLI_DEBUG_UPLOADS env option
Change-Id: Ibd6543789e944f66d0f2feaa25c295ca14f3b530
2012-12-24 12:16:03 -08:00
Brad Fitzpatrick 642f5d5679 client: minor cleanup
Change-Id: Ic61b7db69b993ed88ceda946cdcb6bf26f251538
2012-12-24 11:04:39 -08:00
Brad Fitzpatrick a40078e3b6 client: fix test failure
Change-Id: I811b572c79e7e3797a23376bf01b90c49382d7fd
2012-12-23 14:20:15 -08:00
Brad Fitzpatrick 896dba2cc8 camsync, client: check size consistency in sync pass too.
Change-Id: I4509f1799bbe578d76b94285309c5ad364311a42
2012-12-23 09:22:25 -08:00
Brad Fitzpatrick 0b022b433a camput, schema, client: query server for dups before uploading, like the JavaScript UI.
Change-Id: Id12f78cf2a095adcfad90ca4c6416bb80b6e9b14
2012-12-22 22:48:21 -08:00
Brad Fitzpatrick b32008ed34 camput, client: start of making camput file check searchRoot for wholedigest dups
Change-Id: Ic014ef54705b14482c42936bf6957dc87efa1cf7
2012-12-22 18:42:35 -08:00
mpl a536e2a6d3 Merge "camput: Preparation for vivify." 2012-12-23 00:11:08 +00:00
mpl 6cb7ecd644 camput: Preparation for vivify.
Refactor writeFileMapRolling so we can write the chunks,
then the top level contents, separately.

Change-Id: Ib56cd4b2aa295516fafbe7072ad5b352d1aaaa89
2012-12-23 01:15:29 +01:00
Brad Fitzpatrick a03c25c74c client: qualify channel directions
Change-Id: I49d7c9d18b256beb1fbc7af2a33da94511cf97a2
2012-12-22 14:23:26 -08:00
Brad Fitzpatrick cc353f5748 client: case style
Change-Id: Ie72ebd19c09a863ba1be00fb35904daf867daa14
2012-12-21 17:00:24 -08:00