chromiumos/third_party/tlsdate.git
19 months agoBACKPORT: tlsdate-dbus-announce: use name and flush connection 34/44534/3 factory-4128.B factory-4290.B factory-4455.B factory-pit-4280.B factory-pit-4390.B factory-pit-4471.B factory-spring-3842.B factory-spring-4131.B factory-spring-4262.B firmware-falco_peppy-4389.B firmware-leon-4389.26.B firmware-pit-4482.B firmware-spring-3824.4.B firmware-spring-3824.55.B firmware-spring-3824.84.B firmware-spring-3824.B firmware-wolf-4389.24.B master release-R27-3912.B release-R28-4100.B release-R29-4319.B release-R30-4537.B stabilize-3881.0.B stabilize-3912.79.B stabilize-4008.0.B stabilize-4035.0.B stabilize-4068.0.B stabilize-4100.38.B stabilize-4255.B stabilize-4287.B stabilize-4443.B stabilize-4512.B stabilize-spring-4100.53.B toolchainA toolchainB
elly [Fri, 1 Mar 2013 13:53:54 +0000 (08:53 -0500)]
BACKPORT: tlsdate-dbus-announce: use name and flush connection

Have tlsdate-dbus-announce grab a well-known bus name before it sends its
signal, and have it wait for the signal to actually be sent over the bus before
exiting.

Signed-off-by: Elly Fong-Jones <ellyjones@chromium.org>
(cherry picked from commit f258f78782e362bf26c6cf606f11293d68632780)

Change-Id: Ica80f47d7f2317c9c31e0d34ccbc23873f087c50
Reviewed-on: https://gerrit.chromium.org/gerrit/44534
Reviewed-by: Kees Cook <keescook@chromium.org>
Commit-Queue: Elly Jones <ellyjones@chromium.org>
Tested-by: Elly Jones <ellyjones@chromium.org>
19 months agoBACKPORT: tlsdate-helper: fix SAN checking 77/44277/3
elly [Wed, 27 Feb 2013 15:50:25 +0000 (10:50 -0500)]
BACKPORT: tlsdate-helper: fix SAN checking

Right now, SAN checking checks against the host we're opening a socket to
instead of the host we're actually trying to talk to, which is fine... as long
as we don't have a proxy. Note that this problem only manifests for hosts whose
CN is not equal to their hostname (so the default host of www.ptb.de is fine).

To observe the problem:
$ ssh -D 127.0.0.1:30000 somehost
$ tlsdate -H clients3.google.com -x socks5://127.0.0.1:30000
hostname verification failed for host 127.0.0.1!
child process failed in SSL handshake

With this fix, you instead see no output.

BUG=chromium-os:38801
TEST=adhoc
Test steps given above.

Signed-off-by: Elly Fong-Jones <ellyjones@chromium.org>
(cherry picked from commit ceb1fe26c3136fc206101b757bdae298e729acf9)

Change-Id: If57d7cc6a8c12bbbcefa95bb8414a37445434eb4
Reviewed-on: https://gerrit.chromium.org/gerrit/44277
Reviewed-by: Elly Jones <ellyjones@chromium.org>
Tested-by: Elly Jones <ellyjones@chromium.org>
Commit-Queue: Elly Jones <ellyjones@chromium.org>

19 months agoBACKPORT: tlsdated: support command-line proxy override 75/44075/4
elly [Fri, 22 Feb 2013 19:45:17 +0000 (14:45 -0500)]
BACKPORT: tlsdated: support command-line proxy override

This makes a proxy passed on the command line with -x supplant proxies for
configured sources, and makes the 'proxy' stanza in sources optional (in which
case we supply no proxy argument for them).

BUG=chromium-os:38801
TEST=unit

Signed-off-by: Elly Fong-Jones <ellyjones@chromium.org>
(cherry picked from commit 254dc20bbaa68f955b1de8c7da6a02d52c786fd0)

Change-Id: I537037bd15d7c873f87e820a5291fc7a7e0ffca1
Reviewed-on: https://gerrit.chromium.org/gerrit/44075
Reviewed-by: Will Drewry <wad@chromium.org>
Commit-Queue: Elly Jones <ellyjones@chromium.org>
Tested-by: Elly Jones <ellyjones@chromium.org>
Reviewed-by: Kees Cook <keescook@chromium.org>
21 months agofixup CHANGELOG for 0.0.5 release stabilize-3658.0.0 stabilize-3701.30.0 stabilize-3701.30.0b stabilize-bluetooth-smart
Jacob Appelbaum [Tue, 22 Jan 2013 23:12:46 +0000 (00:12 +0100)]
fixup CHANGELOG for 0.0.5 release

21 months agoupdate apparmor-profile
Jacob Appelbaum [Tue, 22 Jan 2013 22:52:20 +0000 (23:52 +0100)]
update apparmor-profile

21 months agoadd tlsdate-dbus-announce.1 to Makefile.am
Jacob Appelbaum [Tue, 22 Jan 2013 22:25:57 +0000 (23:25 +0100)]
add tlsdate-dbus-announce.1 to Makefile.am

21 months agoAdd tlsdate-dbus-announce(1) manpage
Jacob Appelbaum [Tue, 22 Jan 2013 21:44:31 +0000 (22:44 +0100)]
Add tlsdate-dbus-announce(1) manpage

21 months agofirst tlsdate-dbus-announce apparmor profile and modifications
Jacob Appelbaum [Tue, 22 Jan 2013 20:45:20 +0000 (21:45 +0100)]
first tlsdate-dbus-announce apparmor profile and modifications

21 months agoMerge pull request #70 from elly/distcheck-fix
Jacob Appelbaum [Sat, 19 Jan 2013 01:05:58 +0000 (17:05 -0800)]
Merge pull request #70 from elly/distcheck-fix

Fix 'make distcheck'.

21 months agoFix 'make distcheck'.
elly [Fri, 18 Jan 2013 17:30:35 +0000 (12:30 -0500)]
Fix 'make distcheck'.

Replace the silly test shell scripts with C programs, change the tlsdated
unittest to use the binaries instead, and have the Makefile install them as
needed.

Signed-off-by: Elly Fong-Jones <ellyjones@chromium.org>
21 months agofix suggested by elly to help with debian branch
Jacob Appelbaum [Fri, 18 Jan 2013 16:11:19 +0000 (17:11 +0100)]
fix suggested by elly to help with debian branch

21 months agoUpdate includes to properly reference .h files from the root.
Jacob Appelbaum [Fri, 18 Jan 2013 14:47:47 +0000 (15:47 +0100)]
Update includes to properly reference .h files from the root.

21 months agobump to version 0.0.5
Jacob Appelbaum [Fri, 18 Jan 2013 14:23:19 +0000 (15:23 +0100)]
bump to version 0.0.5

21 months agoprepare for 0.0.5 release today
Jacob Appelbaum [Fri, 18 Jan 2013 14:19:06 +0000 (15:19 +0100)]
prepare for 0.0.5 release today

21 months agoMerge pull request #69 from elly/multi-host
Jacob Appelbaum [Fri, 18 Jan 2013 00:17:02 +0000 (16:17 -0800)]
Merge pull request #69 from elly/multi-host

tlsdated: support multiple failover hosts; epic, you rock!

21 months agotlsdated: support multiple failover hosts
elly [Wed, 16 Jan 2013 22:34:12 +0000 (17:34 -0500)]
tlsdated: support multiple failover hosts

Swap over to using 'source' stanzas in the config file (see tlsdated.conf for an
example), and cycle through them as we make tlsdate attempts.

TODO: changelog, man page, etc updates

Signed-off-by: Elly Fong-Jones <ellyjones@chromium.org>
21 months agoMerge pull request #67 from Javantea/master
Jacob Appelbaum [Wed, 16 Jan 2013 19:33:08 +0000 (11:33 -0800)]
Merge pull request #67 from Javantea/master

rwx permissions in save_disk_timestamp and write_time; looks good, thanks for the catch!

21 months agoMerge pull request #68 from elly/conf-try1
Jacob Appelbaum [Wed, 16 Jan 2013 19:32:06 +0000 (11:32 -0800)]
Merge pull request #68 from elly/conf-try1

tlsdated: support config files; this rev is good, thanks for hacking on tlsdate!

21 months agotlsdated: support config files
elly [Tue, 15 Jan 2013 15:58:50 +0000 (10:58 -0500)]
tlsdated: support config files

The config file is a list of key/value pairs, separated by whitespace.

Signed-off-by: Elly Fong-Jones <ellyjones@chromium.org>
21 months agorwx permissions in save_disk_timestamp and write_time
Javantea [Sat, 12 Jan 2013 09:39:42 +0000 (01:39 -0800)]
rwx permissions in save_disk_timestamp and write_time
https://github.com/ioerror/tlsdate/issues/66

The function save_disk_timestamp creates a file with user read, write and execute permissions. The execute permission is unnecessary because it is guaranteed to be a file with the time_t in it.

The proper permission is S_IRUSR | S_IWUSR.

Similarly the function write_time in src/tlsdated-unittest.c creates a file with user read, write and execute permissions.

21 months agoMerge pull request #64 from elly/backoff
Jacob Appelbaum [Fri, 11 Jan 2013 21:32:24 +0000 (13:32 -0800)]
Merge pull request #64 from elly/backoff

tlsdated: exponential backoff in error cases.

21 months agotlsdated: exponential backoff in error cases.
elly [Fri, 11 Jan 2013 20:13:25 +0000 (15:13 -0500)]
tlsdated: exponential backoff in error cases.

If we're failing to get a tls connection, it may be because the remote host is
down or overloaded, in which case our current aggressive retry behavior is
counterproductive; instead, do exponential backoff each time a tlsdate request
fails.

Signed-off-by: Elly Fong-Jones <ellyjones@chromium.org>
21 months agoMerge pull request #63 from elly/jitter
Jacob Appelbaum [Fri, 11 Jan 2013 20:02:50 +0000 (12:02 -0800)]
Merge pull request #63 from elly/jitter

tlsdated: add jitter (-j).

21 months agotlsdated: add jitter (-j).
elly [Fri, 11 Jan 2013 19:44:17 +0000 (14:44 -0500)]
tlsdated: add jitter (-j).

We check for steady-state updates randomly at any time between
(base-jitter,base+jitter). The jitter is generated using libc rand(), seeded
with either some bytes from /dev/urandom (if available) or the time (if not). We
don't particularly need strong randomness here.

Signed-off-by: Elly Fong-Jones <ellyjones@chromium.org>
(cherry picked from commit a8545b2af134f53247bd76507676bc0e3f1e6112)

21 months agodocument default location of tlsdate-ca-roots.conf
Jacob Appelbaum [Fri, 11 Jan 2013 00:48:12 +0000 (16:48 -0800)]
document default location of tlsdate-ca-roots.conf

21 months agodo not hard fail if we are unable to open hwclock fd
Jacob Appelbaum [Fri, 11 Jan 2013 00:33:35 +0000 (16:33 -0800)]
do not hard fail if we are unable to open hwclock fd

21 months agoMerge branch 'master' of github.com:ioerror/tlsdate
Jacob Appelbaum [Fri, 11 Jan 2013 00:25:34 +0000 (16:25 -0800)]
Merge branch 'master' of github.com:ioerror/tlsdate

21 months agoMerge pull request #62 from elly/warnings
Jacob Appelbaum [Fri, 11 Jan 2013 00:22:09 +0000 (16:22 -0800)]
Merge pull request #62 from elly/warnings

Fix warnings; awesome - thanks for helping keep tlsdate builds clean!

21 months agoFix warnings.
elly [Fri, 11 Jan 2013 00:18:19 +0000 (19:18 -0500)]
Fix warnings.

Two sets of warnings: one about setresgid/setresuid prototypes in util.c, the
other about use of alloca() disabling stack protection in the unit tests.

Signed-off-by: Elly Fong-Jones <ellyjones@chromium.org>
(cherry picked from commit 39c89473304efea4f4e25a08bcf21a301e0d2213)

21 months agoActually define DEFAULT_RTC_DEVICE
Jacob Appelbaum [Fri, 11 Jan 2013 00:08:51 +0000 (16:08 -0800)]
Actually define DEFAULT_RTC_DEVICE

21 months agoMerge branch 'master' of github.com:ioerror/tlsdate
Jacob Appelbaum [Fri, 11 Jan 2013 00:06:35 +0000 (16:06 -0800)]
Merge branch 'master' of github.com:ioerror/tlsdate

21 months agoMerge pull request #61 from elly/todo-update
Jacob Appelbaum [Thu, 10 Jan 2013 23:32:40 +0000 (15:32 -0800)]
Merge pull request #61 from elly/todo-update

Add some TODO items

21 months agoAdd some TODO items
elly [Thu, 10 Jan 2013 23:23:07 +0000 (18:23 -0500)]
Add some TODO items

Signed-off-by: Elly Fong-Jones <ellyjones@chromium.org>
21 months agoDefine a default DEFAULT_RTC_DEVICE and use it
Jacob Appelbaum [Thu, 10 Jan 2013 23:21:11 +0000 (15:21 -0800)]
Define a default DEFAULT_RTC_DEVICE and use it

21 months agoupdate CHANGELOG to include lcov/gcov
Jacob Appelbaum [Thu, 10 Jan 2013 20:20:09 +0000 (12:20 -0800)]
update CHANGELOG to include lcov/gcov

21 months agoMerge pull request #60 from elly/dbus-announce
Jacob Appelbaum [Thu, 10 Jan 2013 20:15:32 +0000 (12:15 -0800)]
Merge pull request #60 from elly/dbus-announce

tlsdated: add dbus announcement support

21 months agotlsdated: add dbus announcement support
Elly Fong-Jones [Tue, 8 Jan 2013 19:08:33 +0000 (14:08 -0500)]
tlsdated: add dbus announcement support

Announce over DBus whenever we change the system time.

Change-Id: Ic6cbab5f703bebe489f513025336c53240ccce35
Signed-off-by: Elly Fong-Jones <ellyjones@chromium.org>
21 months agoAdd basic gcov/lcov build support/analysis output - thanks to Matt Hargett for the...
Jacob Appelbaum [Thu, 10 Jan 2013 19:36:38 +0000 (11:36 -0800)]
Add basic gcov/lcov build support/analysis output - thanks to Matt Hargett for the suggestion

21 months agoUpdate CHANGELOG
Jacob Appelbaum [Mon, 7 Jan 2013 19:25:09 +0000 (11:25 -0800)]
Update CHANGELOG

21 months agoremove T√úRKTRUST from CA list post sub-ca mistakes
Jacob Appelbaum [Mon, 7 Jan 2013 19:23:05 +0000 (11:23 -0800)]
remove T√úRKTRUST from CA list post sub-ca mistakes

21 months agoUse /etc/tlsdate/ca-roots/tlsdate-ca-roots.conf for certs by default; allow setting...
Jacob Appelbaum [Mon, 7 Jan 2013 19:17:32 +0000 (11:17 -0800)]
Use /etc/tlsdate/ca-roots/tlsdate-ca-roots.conf for certs by default; allow setting file or dir

21 months agoAdd TODO items
Jacob Appelbaum [Sun, 6 Jan 2013 22:01:52 +0000 (14:01 -0800)]
Add TODO items

21 months agoAdd changes by Jorge Lucangeli Obes to CHANGELOG
Jacob Appelbaum [Sun, 6 Jan 2013 21:59:42 +0000 (13:59 -0800)]
Add changes by Jorge Lucangeli Obes to CHANGELOG

21 months agoMerge pull request #59 from jlucangelio/add-seccomp-bpf-policies-v2
Jacob Appelbaum [Sun, 6 Jan 2013 21:54:58 +0000 (13:54 -0800)]
Merge pull request #59 from jlucangelio/add-seccomp-bpf-policies-v2

Add Seccomp-BPF policies to the repo. This needs documentation for use and so on.

21 months agoAdd Seccomp-BPF policies to the repo.
Jorge Lucangeli Obes [Wed, 12 Dec 2012 18:21:01 +0000 (10:21 -0800)]
Add Seccomp-BPF policies to the repo.

These policies can be used with the Minijail tool
(http://git.chromium.org/gitweb/?p=chromiumos/platform/minijail.git)
to achieve kernel attack surface reduction.

(Also fix some trailing whitespace.)

BUG=chromium-os:36653
TEST=None

Change-Id: I35dd74702f7dfd701c86e1b25b0831d3925fbf96
Signed-off-by: Jorge Lucangeli Obes <jorgelo@chromium.org>
22 months agoMerge pull request #58 from vapier/master
Jacob Appelbaum [Wed, 19 Dec 2012 21:42:18 +0000 (13:42 -0800)]
Merge pull request #58 from vapier/master

add configure flags for setting droppriv user/group

22 months agoadd configure flags for setting droppriv user/group
Mike Frysinger [Wed, 19 Dec 2012 20:48:22 +0000 (15:48 -0500)]
add configure flags for setting droppriv user/group

In order to override the default user/group, you have to append your
CPPFLAGS before compiling.  Since you also have to pass along double
quotes, it can get ugly/messy fast in shell (due to the escaping).
Plus, the existing code always defines UNPRIV_USER to "nobody" which
leads to compile time warnings.

Add dedicated configure flags to make the interface simple for people
to control.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
22 months agoMerge pull request #57 from vapier/master
Jacob Appelbaum [Wed, 19 Dec 2012 18:54:42 +0000 (10:54 -0800)]
Merge pull request #57 from vapier/master

build clean ups (try 2)

22 months agomake hardened compiler flags optional
Mike Frysinger [Tue, 18 Dec 2012 20:38:51 +0000 (15:38 -0500)]
make hardened compiler flags optional

First note: the default behavior is unchanged.

For people building tlsdate themselves with a known toolchain env, the
checked flags can be redundant, or even harmful.  A compile/link check
for PIE behavior for example might not catch the full supported status
for some architectures/C libraries.

Further, the current code starts by throwing away the user's compiler
settings which can also be harmful.  Those often times include settings
related to ABI or target cpu selection and ignoring them can produce an
unusable binary.

So add a flag that people (including distros) can leverage to bypass
all of the checks.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
22 months agofix openssl const warning
Mike Frysinger [Tue, 18 Dec 2012 20:29:29 +0000 (15:29 -0500)]
fix openssl const warning

Building against dev-libs/openssl-1.0.1c results in:

src/tlsdate-helper.c: In function 'check_san':
src/tlsdate-helper.c:523:22: warning: assignment discards 'const'
qualifier from pointer target type [enabled by default]

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
22 months agoresolve merge issue
Jacob Appelbaum [Wed, 19 Dec 2012 02:37:32 +0000 (10:37 +0800)]
resolve merge issue

22 months agoMerge pull request #56 from elly/netlink-drain
Jacob Appelbaum [Wed, 19 Dec 2012 02:30:25 +0000 (18:30 -0800)]
Merge pull request #56 from elly/netlink-drain

Clear netlink receive queue after reading to avoid an overflow

22 months agoClear netlink receive queue after reading to avoid an overflow factory-3536.B master-20130123 master-test-20121218 release-R25-3428.B stabilize-3428.110.0 stabilize-3428.149 stabilize-3428.149.B stabilize-3428.193 toolchain-3428.65.B
Julius Werner [Fri, 16 Nov 2012 01:52:39 +0000 (17:52 -0800)]
Clear netlink receive queue after reading to avoid an overflow

tlsdated only reads its NETLINK_ROUTE socket until finding the first
RTM_NEWROUTE message. After that, it will sleep at least
wait_between_tries seconds before reading the socket again.

On subnets with many hosts (such as a large public WiFi), the kernel
can generate a _lot_ of route updates for IPv6 solicited-node multicast
addresses. If tlsdated does not read them fast enough, they will queue
up and eventually overflow the socket receive buffer. This results in an
ENOBUFS error which will cause the process to terminate itself.

This patch ensures that tlsdated always reads all available packets in
its netlink receive queue before proceeding. As we only care if there
have been any route updates at all during one read, the additional
packets can simply be discarded. This also makes sure that they will not
be read at a later date (and misinterpreted as current packets at a time
when there are no more route updates).

BUG=chromium-os:36426
TEST=Join GoogleGuest or a similar large network. strace tlsdated and
observe how it will not die despite occasional large bursts of netlink
packets.

Change-Id: Idbaf4be6d888c45256220055242b6f9b4d77bc93
Signed-off-by: Julius Werner <jwerner@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/38173
Reviewed-by: Elly Jones <ellyjones@chromium.org>
Conflicts:
src/routeup.c

22 months agoclean up clock_gettime check
Mike Frysinger [Tue, 18 Dec 2012 20:25:25 +0000 (15:25 -0500)]
clean up clock_gettime check

Some C libraries (like uClibc or >=glibc-2.17) put clock_gettime into
-lc, so we don't want to force linking of -lrt when it is not needed.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
22 months agoignore more files
Mike Frysinger [Tue, 18 Dec 2012 20:12:21 +0000 (15:12 -0500)]
ignore more files

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
22 months agoconfigure.ac: use dnl for comments
Mike Frysinger [Tue, 18 Dec 2012 20:10:55 +0000 (15:10 -0500)]
configure.ac: use dnl for comments

"#" are shell comments while "dnl" are m4 comments.  This way
they don't get written to the generated configure file.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
22 months agoMerge pull request #53 from elly/cert-time
Jacob Appelbaum [Tue, 18 Dec 2012 16:14:41 +0000 (08:14 -0800)]
Merge pull request #53 from elly/cert-time

[tlsdate] fix certificate time compensation; in theory - we want this ordering.

22 months agoMerge pull request #52 from elly/min-delay
Jacob Appelbaum [Tue, 18 Dec 2012 01:46:05 +0000 (17:46 -0800)]
Merge pull request #52 from elly/min-delay

[tlsdate] support minimum check interval.

22 months ago[tlsdate] fix certificate time compensation
Elly Fong-Jones [Thu, 13 Dec 2012 21:17:21 +0000 (16:17 -0500)]
[tlsdate] fix certificate time compensation

Fix the code that compensates for certificates whose time is in the future, to
prevent a situation where it's impossible to fetch a new time because our
current time is too old. There are two bugs:

1. We try to use the server's time too late, after we've already done cert
validation; we need to do it earlier (during the server hello).

2. We set the time on the wrong context - we need to set the time on the cert
store instead of just the context object, since when OpenSSL is setting up to
verify the cert, it copies the cert store's params instead of the SSL context's
params.

BUG=chromium-os:36738
TEST=adhoc
date -s '2012-01-01 00:00:00' && tlsdate -l -v -H clients3.google.com -p 443

Change-Id: Ie1b11a2e0ecdc2196b729f6d5483b53c54a1933d
Signed-off-by: Elly Fong-Jones <ellyjones@chromium.org>
(cherry picked from commit 87ee9c2c23eff1816adc069c3b41f84933779643)

22 months ago[tlsdate] support minimum check interval.
Elly Fong-Jones [Wed, 12 Dec 2012 22:06:33 +0000 (17:06 -0500)]
[tlsdate] support minimum check interval.

On systems where routes come up and down a lot, tlsdated can end up checking the
date too often and thus loading the check host; support limiting it to a minimum
frequency of successful checks. Failing checks can still happen arbitrarily
often.

BUG=chromium-os:37184
TEST=Adhoc

Change-Id: Ief413e91fcce98ed6bfc6c44d844a50b650438e0
Signed-off-by: Elly Fong-Jones <ellyjones@chromium.org>
(cherry picked from commit 6a7ded4a1848d8eb50a181f898fa9330f4e3ba34)

22 months agoClear netlink receive queue after reading to avoid an overflow
Julius Werner [Thu, 29 Nov 2012 14:22:39 +0000 (19:52 +0530)]
Clear netlink receive queue after reading to avoid an overflow

tlsdated only reads its NETLINK_ROUTE socket until finding the first
RTM_NEWROUTE message. After that, it will sleep at least
wait_between_tries seconds before reading the socket again.

On subnets with many hosts (such as a large public WiFi), the kernel
can generate a _lot_ of route updates for IPv6 solicited-node multicast
addresses. If tlsdated does not read them fast enough, they will queue
up and eventually overflow the socket receive buffer. This results in an
ENOBUFS error which will cause the process to terminate itself.

This patch ensures that tlsdated always reads all available packets in
its netlink receive queue before proceeding. As we only care if there
have been any route updates at all during one read, the additional
packets can simply be discarded. This also makes sure that they will not
be read at a later date (and misinterpreted as current packets at a time
when there are no more route updates).

Signed-off-by: Julius Werner <jwerner@chromium.org>
Reviewed-by: Elly Jones <ellyjones@chromium.org>
23 months agoUpdate CHANGELOG upstream
Jacob Appelbaum [Thu, 8 Nov 2012 08:38:47 +0000 (00:38 -0800)]
Update CHANGELOG

23 months agoUpdate man page to reflect deep loathing for hyphen-used-as-minus-sign
Jacob Appelbaum [Thu, 8 Nov 2012 08:35:51 +0000 (00:35 -0800)]
Update man page to reflect deep loathing for hyphen-used-as-minus-sign

23 months agoupdate CHANGELOG
Jacob Appelbaum [Thu, 8 Nov 2012 08:24:40 +0000 (00:24 -0800)]
update CHANGELOG

23 months agofix spelling error
Jacob Appelbaum [Thu, 8 Nov 2012 08:24:02 +0000 (00:24 -0800)]
fix spelling error

23 months agoUpdate CHANGELOG before 0.0.4 release
Jacob Appelbaum [Thu, 8 Nov 2012 05:46:40 +0000 (21:46 -0800)]
Update CHANGELOG before 0.0.4 release

23 months agoautoconf up the hard coded paths and exec with full path only
Jacob Appelbaum [Thu, 8 Nov 2012 05:17:52 +0000 (21:17 -0800)]
autoconf up the hard coded paths and exec with full path only

23 months agoUpdate ca-roots/tlsdate-ca-roots.conf file and update CHANGELOG
Jacob Appelbaum [Thu, 8 Nov 2012 04:46:21 +0000 (20:46 -0800)]
Update ca-roots/tlsdate-ca-roots.conf file and update CHANGELOG

23 months agobump version to 0.0.4
Jacob Appelbaum [Thu, 8 Nov 2012 04:35:00 +0000 (20:35 -0800)]
bump version to 0.0.4

23 months agoCHANGELOG fixup
Jacob Appelbaum [Thu, 8 Nov 2012 04:32:59 +0000 (20:32 -0800)]
CHANGELOG fixup

23 months agobump to version 0.0.3
Jacob Appelbaum [Tue, 6 Nov 2012 22:51:28 +0000 (14:51 -0800)]
bump to version 0.0.3

23 months agobump version to 0.0.3; update macros to make this a single line change
Jacob Appelbaum [Mon, 5 Nov 2012 22:52:50 +0000 (14:52 -0800)]
bump version to 0.0.3; update macros to make this a single line change

23 months agoUpdate HACKING to reflect desire for unsigned values over signed values
Jacob Appelbaum [Mon, 5 Nov 2012 22:40:31 +0000 (17:40 -0500)]
Update HACKING to reflect desire for unsigned values over signed values

23 months agoWe now have a local time cache and tlsdated reads it properly
Jacob Appelbaum [Mon, 5 Nov 2012 22:36:57 +0000 (17:36 -0500)]
We now have a local time cache and tlsdated reads it properly

23 months agoWe have a proxy mode now and it is Tor safe
Jacob Appelbaum [Mon, 5 Nov 2012 22:36:19 +0000 (17:36 -0500)]
We have a proxy mode now and it is Tor safe

23 months agoUpdate TODO to include wish for PolarSSL support
Jacob Appelbaum [Mon, 5 Nov 2012 22:35:44 +0000 (17:35 -0500)]
Update TODO to include wish for PolarSSL support

23 months agoUpdate README to include information about tlsdated
Jacob Appelbaum [Mon, 5 Nov 2012 22:35:08 +0000 (17:35 -0500)]
Update README to include information about tlsdated

23 months agoAdd TODO items that we hope make it into 0.0.4
Jacob Appelbaum [Mon, 5 Nov 2012 22:27:48 +0000 (17:27 -0500)]
Add TODO items that we hope make it into 0.0.4

23 months agoMerge pull request #30 from elly/proxy-fix
Jacob Appelbaum [Mon, 5 Nov 2012 22:15:01 +0000 (14:15 -0800)]
Merge pull request #30 from elly/proxy-fix

proxy-bio fixes

23 months agoproxy-bio: Fix up buffer length handling logic.
Elly Fong-Jones [Mon, 5 Nov 2012 21:50:13 +0000 (16:50 -0500)]
proxy-bio: Fix up buffer length handling logic.

The buffer length was being badly mishandled such that if the returned hostname
was 254 bytes long, we'd repeatedly read zero bytes and get stuck in an endless
loop. There were also a bunch of places that would accept short reads/writes
during protocol negotiation which have now been changed to only accept exact
lengths.

Signed-off-by: Elly Fong-Jones <ellyjones@chromium.org>
23 months agoproxy-bio fixes
Elly Fong-Jones [Fri, 2 Nov 2012 17:53:47 +0000 (13:53 -0400)]
proxy-bio fixes

1. Send the Host header with HTTP CONNECT, as it is required by RFC 2616,
section 14.23:

   A client MUST include a Host header field in all HTTP/1.1 request
   messages . If the requested URI does not include an Internet host
   name for the service being requested, then the Host header field MUST
   be given with an empty value. An HTTP/1.1 proxy MUST ensure that any
   request message it forwards does contain an appropriate Host header
   field that identifies the service being requested by the proxy. All
   Internet-based HTTP/1.1 servers MUST respond with a 400 (Bad Request)
   status code to any HTTP/1.1 request message which lacks a Host header
   field.

2. Drain the response buffer for SOCKS5 connections even if the hostname is too
long for us to store (i.e., is longer than NI_MAXHOST); this could happen if
NI_MAXHOST < 255, but I believe there are no systems on which this is true in
practice.

3. Use unsigned buffers in SOCKS4/SOCKS5 code to save on casts to/from unsigned.

4. Return an int from BIO_proxy_set_host() so we can signal malloc failures to
the caller.

Signed-off-by: Elly Fong-Jones <ellyjones@chromium.org>
23 months agoupdate verbose ints location
Jacob Appelbaum [Fri, 2 Nov 2012 01:52:48 +0000 (01:52 +0000)]
update verbose ints location

23 months agoMove common functions to util.c and add verb() to proxy code
Jacob Appelbaum [Fri, 2 Nov 2012 01:28:30 +0000 (01:28 +0000)]
Move common functions to util.c and add verb() to proxy code

23 months agoadd V to verb output as expected
Jacob Appelbaum [Fri, 2 Nov 2012 00:15:31 +0000 (00:15 +0000)]
add V to verb output as expected

23 months agofix cert verification when proxy is used
Jacob Appelbaum [Fri, 2 Nov 2012 00:10:18 +0000 (00:10 +0000)]
fix cert verification when proxy is used

23 months agoMerge branch 'master' of github.com:ioerror/tlsdate
Jacob Appelbaum [Wed, 31 Oct 2012 23:51:38 +0000 (23:51 +0000)]
Merge branch 'master' of github.com:ioerror/tlsdate

23 months agoadd headers to fix compile for make distcheck (Thanks Sebastian Hahn!)
Jacob Appelbaum [Wed, 31 Oct 2012 23:46:15 +0000 (23:46 +0000)]
add headers to fix compile for make distcheck (Thanks Sebastian Hahn!)

23 months agoadd headers to fix compile for make distcheck
Jacob Appelbaum [Wed, 31 Oct 2012 23:46:15 +0000 (23:46 +0000)]
add headers to fix compile for make distcheck

23 months agoUpdate documentation and CHANGELOG to reflect new proxy support
Jacob Appelbaum [Wed, 31 Oct 2012 21:42:34 +0000 (21:42 +0000)]
Update documentation and CHANGELOG to reflect new proxy support

23 months agoretab things
Jacob Appelbaum [Wed, 31 Oct 2012 21:42:09 +0000 (21:42 +0000)]
retab things

23 months agoMerge pull request #29 from elly/proxy
Jacob Appelbaum [Wed, 31 Oct 2012 21:13:17 +0000 (14:13 -0700)]
Merge pull request #29 from elly/proxy

Add proxy support (http, socks4a, socks5) - thanks again to Elly!

23 months agoFix warnings in proxy-bio-unittest
Elly Fong-Jones [Wed, 31 Oct 2012 19:43:49 +0000 (15:43 -0400)]
Fix warnings in proxy-bio-unittest

Also, move some magic numbers into tlsdate.h

Signed-off-by: Elly Fong-Jones <ellyjones@chromium.org>
23 months agoAdd proxy support
Elly Fong-Jones [Wed, 3 Oct 2012 21:34:48 +0000 (17:34 -0400)]
Add proxy support

Support SOCKS4a, SOCKS5, and HTTP proxies through -x / --proxy
<schema>://<host>:<port>. No auth supported yet.

BUG=chromium-os:31505
TEST=unit

Change-Id: Ifd430ca1ed026dcaa33a91dfa07cc7eb7e57eaee
Signed-off-by: Elly Fong-Jones <ellyjones@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/34566
(cherry picked from commit 9c3e49f2f4823c822fe29342e3eebbd38154d55a)

Conflicts:

src/Makefile.am
src/tlsdate-helper.c

23 months agoAdd XXX TODO for absolute path
Jacob Appelbaum [Wed, 31 Oct 2012 15:00:25 +0000 (15:00 +0000)]
Add XXX TODO for absolute path

23 months agoadd TODO item
Jacob Appelbaum [Wed, 31 Oct 2012 14:56:00 +0000 (14:56 +0000)]
add TODO item

23 months agoStay in loop forever to keep tlsdated running forever
Jacob Appelbaum [Wed, 31 Oct 2012 14:55:27 +0000 (14:55 +0000)]
Stay in loop forever to keep tlsdated running forever

23 months agoadd fix for AppArmor deny
Jacob Appelbaum [Wed, 31 Oct 2012 00:11:42 +0000 (01:11 +0100)]
add fix for AppArmor deny

23 months agobin not sbin
Jacob Appelbaum [Wed, 31 Oct 2012 00:00:52 +0000 (01:00 +0100)]
bin not sbin

23 months agoupdate AppArmor to allos tlsdated rw for /dev/rtc0
Jacob Appelbaum [Tue, 30 Oct 2012 23:40:50 +0000 (00:40 +0100)]
update AppArmor to allos tlsdated rw for /dev/rtc0

23 months agoadd tlsdate-routeup to Makefile.am
Jacob Appelbaum [Tue, 30 Oct 2012 21:39:20 +0000 (22:39 +0100)]
add tlsdate-routeup to Makefile.am