Re: [Swan-dev] Add -std=c99 to the compiler flags?

2015-02-04 Thread D. Hugh Redelmeier
| From: Andrew Cagney | On 4 February 2015 at 15:33, D. Hugh Redelmeier wrote: | > | From: Andrew Cagney | > | for (int i = 0; i < 10; i++) { ... } | > | | > | without -std=c99 I get a warning :-) | > Why does gcc require a flag? Is using c99 so remarkable that it cannot be | > the defau

Re: [Swan-dev] Add -std=c99 to the compiler flags?

2015-02-04 Thread D. Hugh Redelmeier
| From: Lennart Sorensen | > - local declarations mixed in with statements. We've avoided this | > (mostly) but it is sometimes quite nice. Actually, this predates C99. | > This allows us to have fewer variables that are uninitialized. | | Certainly something that can have lots of argumen

Re: [Swan-dev] Add -std=c99 to the compiler flags?

2015-02-04 Thread Andrew Cagney
[inline] On 4 February 2015 at 15:33, D. Hugh Redelmeier wrote: > | From: Andrew Cagney > > | I've a simple motivation for this, I'd like to be able to use: > | > | for (int i = 0; i < 10; i++) { ... } > | > | without -std=c99 I get a warning :-) > > When the code was originally written, the

Re: [Swan-dev] Add -std=c99 to the compiler flags?

2015-02-04 Thread Lennart Sorensen
On Wed, Feb 04, 2015 at 03:33:50PM -0500, D. Hugh Redelmeier wrote: > When the code was originally written, there was no c99. I guess we > are long past those days and we should start taking advantage of the > new features. > > I think declaring the variable in the for-head is one of the nicer >

Re: [Swan-dev] Add -std=c99 to the compiler flags?

2015-02-04 Thread D. Hugh Redelmeier
| From: Andrew Cagney | I've a simple motivation for this, I'd like to be able to use: | | for (int i = 0; i < 10; i++) { ... } | | without -std=c99 I get a warning :-) When the code was originally written, there was no c99. I guess we are long past those days and we should start taking a

Re: [Swan-dev] test caes as documentation versus ipsec.conf.common ease of use

2015-02-04 Thread Matt Rogers
On 02/04, Paul Wouters wrote: > > Antony brought up a while ago that due to our use of ipsec.conf.common, > the test cases do not work very well as documentation. It would be much > better to write out the full configurations so people can read them and > understand them better. > > I did not lik

[Swan-dev] python [was Re: generating x509 certificates]

2015-02-04 Thread D. Hugh Redelmeier
| From: Antony Antony | I am proponent of python based script.. sh isn't great for large things. It is pretty universal. We've been bitten a few times by bashisms -- because bash is pervasive in our world and only the outliers suffer. python is fine but it has a few problems to dodge. For ex

Re: [Swan-dev] generating x509 certificates

2015-02-04 Thread D. Hugh Redelmeier
| From: Antony Antony | Hugh and Paul you guys may want to install pyOpenSSL | manually on your host before this change hits mainstream. Otherwise make | check will break for you. Thanks for the heads up. For some reason it was already installed. I see you added it to

[Swan-dev] set -ue [was Re: generating x509 certificates]

2015-02-04 Thread D. Hugh Redelmeier
| From: Matt Rogers | Yeah, the set -ue in the script points out these problems, but they were | really ignorable since it wasn't affecting the active tests. For now you | can just comment that out and run the script to get the certs you need. set -ue is good. I think every script should use it

[Swan-dev] test caes as documentation versus ipsec.conf.common ease of use

2015-02-04 Thread Paul Wouters
Antony brought up a while ago that due to our use of ipsec.conf.common, the test cases do not work very well as documentation. It would be much better to write out the full configurations so people can read them and understand them better. I did not like his idea at the time, because it means a

[Swan-dev] Logging changes proposal

2015-02-04 Thread Paul Wouters
Hi, As more people are looking at ways not to use journald to find their logs, more people want to tell pluto to log to a file. These people are surprised to find out that we log without timestamps per default and that we overwrite and not append to a logfile on restart. I wrote a patch to chan

Re: [Swan-dev] generating x509 certificates

2015-02-04 Thread Paul Wouters
On Wed, 4 Feb 2015, Antony Antony wrote: I agree, as a small step, I just added pyOpenSSL to .ks Dockerfile and the web page. Hugh and Paul you guys may want to install pyOpenSSL manually on your host before this change hits mainstream. Otherwise make check will break for you. Will do. No

Re: [Swan-dev] generating x509 certificates

2015-02-04 Thread Antony Antony
On Wed, Feb 04, 2015 at 11:02:53AM -0500, Matt Rogers wrote: > Using pyOpenSSL served to be a lot better for our need than the openssl > commands, of course, and will make it easier to cover more of the > certificate code than before. Plus I like writing python a lot more than > bash :) I agree, a

Re: [Swan-dev] generating x509 certificates

2015-02-04 Thread Matt Rogers
On 02/04, Andrew Cagney wrote: > Matt, > thanks for the reply, > > On 3 February 2015 at 17:27, Matt Rogers wrote: > > > Hey, sorry for the late reply here. Been away from email/irc for the > > day. In short the dist_certs.py is the WIP replacement for the > > shell script, however right now it

[Swan-dev] New top level directory mk/ for make include files

2015-02-04 Thread Andrew Cagney
Put simply, I'm giving in. I'm planning on moving the top-level make include file that I added: Makefile.dirs to the subdirectory mk/, and then renaming it: mk/dirs.mk each change has its own motivation: - I think the top-level directory is getting too cluttered, and is only going to get

[Swan-dev] lecture: ignorance is like a delicate flower

2015-02-04 Thread D. Hugh Redelmeier
"Ignorance is like a delicate flower: touch it and the bloom is lost." -- Oscar Wilde When new eyes hit the project, of course they are going to make mistakes or be confused because they don't already know everything. We can learn a lot from this. We should consciously learn from their learnin

Re: [Swan-dev] generating x509 certificates

2015-02-04 Thread Andrew Cagney
Matt, thanks for the reply, On 3 February 2015 at 17:27, Matt Rogers wrote: > Hey, sorry for the late reply here. Been away from email/irc for the > day. In short the dist_certs.py is the WIP replacement for the > shell script, however right now it is only tuned to x509 tests that > are not a pa