And remove all mentions of CAMLI_CLIENT_IDENTITY because there isn't any
need for the both of them.
http://camlistore.org/issue/412
Change-Id: I0d6b8cff0f23738231de98171a23550d82f05fe9
1) Removed exec call to gpg, because it automatically looks in .gnupg/,
which we don't use anymore as a default.
2) Now taking into account global --secret-keyring flag.
This flag is now in osutil.
3) New or modified funcs in osutil
4) Made sure --gpgkey works too.
5) Cleaned up error messages and hints.
Context: http://camlistore.org/issue/364http://camlistore.org/issue/368
Change-Id: I2e51032ed0597da656db100d72f5588b37308e1a
Because of Go's rules regaring closures (function literals) and bound
variables, in the case in which there were multiple patterns in the
ignoredFiles configuration variable, the entire slice (vector) of
registered matching functions was being called with the
last-configured ignoredFiles pattern as the first variable. This meant
that ignoredFiles did not work if it contained more than one pattern
and in certain circumstances, such a configuration would lead to a
crash.
Change-Id: I0b991aa74d079d4ce27fc0ba373e2ee2cf9eb772
Testing clients should now use CAMLI_CLIENT_IDENTITY,
CAMLI_DISABLE_CLIENT_CONFIG_FILE (both new) and existing
CAMLI_SECRET_RING, set using the new test.World accessors.
Change-Id: I9fc0571b008f033674466bbc98129ae1919a0640
For demos, when we want to show using camput/camget but select the devcam server
instead of our production servers.
Change-Id: Ie2adfd4f80df3119a705b51bb9736c3b66612d1c
1) disallow auth from env when not in dev mode or on android
2) allow insecureTLS with flag in debug mode
3) set transport so that insecureTLS or trustedCert modes work
http://camlistore.org/issue/325
Change-Id: I6d8056bb75ffff5f002dfe9bd631ae996dc4e5ef
also changed osutil.HomeDir for windows so it looks like an abs path for
filepath.IsAbs
http://camlistore.org/issue/290
Change-Id: I1b32c1c13e7d23a421a6da2c0f9d6b8b07f48b8d
The client configuration requires this if it's not passed in through the
environment. Since this is for a storage service, it makes sense to
place it with the specific remote.
Since SetupAuthFromConfig was a bit awkward and not used elsewhere, it's
replaced with a more simple and explicit SetupAuthFromString to which
the exact auth details you wish to use are provided.
Change-Id: Id39ff314738794e299d48cbe634be2aa5d5c3bd1
Changed some keys to be consistent with the server config, and removed
some others.
We're now using jsonconfig to get the keys and validate the config.
Removed some unused funcs/methods, moved some global vars as members of a client.
Also, having two possible defaults for the secret keyring
(.config/camlistore/identity-secring.gpg and .gnupg/secring.gpg)
was annoying and confusing imho, so I removed the latter.
http://camlistore.org/issue/259
Change-Id: Icf79fa8822b62b5d91843698861dd19cb553607a
Running 'go run dev/envvardoc/envvardoc.go' now shows:
'All environment variables are documented'
I also took the liberty of cleaning-up our mishmash of logic for handling
boolean environment variables, and cleaned up a couple other spots that didn't
seem right.
This change adds docmentation for all variables starting with (CAM|DEV|AWS).
This leaves some variables still undocumented. If there are variables worth
documenting in the following list, maybe we should rename them to have a
CAM{LI} prefix for consistency's sake:
APPDATA pkg/osutil/paths.go:86
APPDATA pkg/osutil/paths.go:102
DISPLAY pkg/misc/gpgagent/gpgagent.go:126
GOPATH pkg/fileembed/genfileembed/genfileembed.go:321
GOPATH pkg/osutil/paths.go:168
GOPATH pkg/test/world.go:54
GOPATH server/appengine/build_test.go:77
GPGKEY cmd/camput/init.go:77
GPG_AGENT_INFO cmd/camput/init.go:153
GPG_AGENT_INFO pkg/misc/gpgagent/gpgagent.go:50
HOME pkg/jsonsign/keys.go:79
HOME pkg/jsonsign/signhandler/sig.go:64
HOME pkg/osutil/paths.go:36
HOMEPATH pkg/osutil/paths.go:34
PKG_CONFIG_PATH pkg/index/sqlite/dbschema.go:59
RUN_BROKEN_TESTS pkg/fs/fs_test.go:67
SKIP_DEP_TESTS pkg/test/testdep.go:29
TERM pkg/misc/gpgagent/gpgagent.go:133
TERM pkg/misc/pinentry/pinentry.go:99
TESTING_PORT_WRITE_FD pkg/webserver/webserver.go:135
TEST_GPGAGENT_LIB pkg/misc/gpgagent/gpgagent_test.go:27
USER pkg/netutil/ident.go:135
USER pkg/osutil/paths.go:45
USERNAME pkg/jsonconfig/eval.go:228
USERNAME pkg/osutil/paths.go:43
VERBOSE_FUSE pkg/fs/fs_test.go:133
VERBOSE_FUSE_STDERR pkg/fs/fs_test.go:137
XDG_CONFIG_HOME pkg/osutil/paths.go:104
Change-Id: Ief28710d3deefd1e65247cb5d3b1d8dde73e1f2d
Also made initTrustedCertsOnce a field of the Client
object, as it is a similar change.
http://camlistore.org/issue/104
Change-Id: Iabbd7f06e06d31265f390a23c4bdaac956f856f7
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
-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