Thread: Re: [BUGS] More SSL questions..

Re: [BUGS] More SSL questions..

From
"Magnus Hagander"
Date:
Builds with the attached patch. Tested the following:

>>>>> Given that decision it seems like the best names are
>>>>>
>>>>> APPDATA/postgresql/pgpass.txt
Works.

>>>>> APPDATA/postgresql/psqlrc.txt
Works.

>>>>> APPDATA/postgresql/psql_history
Does not appear to work. Do I need to do anything to make psql create
this file?
A quick look at input.c makes it seem like this is only used when
READLINE is enabled. And READLINE is disabled on win32 because it
breaks.

>>>>> APPDATA/postgresql/postgresql.crt
>>>>> APPDATA/postgresql/postgresql.key
Not sure exactly how to test these :-(

>>>>> APPDATA/postgresql/root.crt
Works insofar that it prevents me to connect if I put an invalid
certificate in that file, and permits me to connect if I put the correct
cert there. AFAIK, that should be all there is to it :-)


Also verified that it still passes installcheck-parallel.

//Magnus

Attachment

Re: [BUGS] More SSL questions..

From
Tom Lane
Date:
"Magnus Hagander" <mha@sollentuna.net> writes:
> Builds with the attached patch.

Applied.

> APPDATA/postgresql/psql_history
> Does not appear to work. Do I need to do anything to make psql create
> this file?

Enable READLINE/HISTORY.

> A quick look at input.c makes it seem like this is only used when
> READLINE is enabled. And READLINE is disabled on win32 because it
> breaks.

Hmm.  I wonder if that breakage had anything to do with the lack of
proper support for home-directory stuff?  Might be entertaining to
un-disable it and see what happens now.

> APPDATA/postgresql/root.crt
> Works insofar that it prevents me to connect if I put an invalid
> certificate in that file, and permits me to connect if I put the correct
> cert there. AFAIK, that should be all there is to it :-)

Good enough check for me.

I'm out of here for the next several hours --- if you have any
last-minute RC4 patches, try to get Bruce's attention ...

            regards, tom lane

Re: [BUGS] More SSL questions..

From
Bruce Momjian
Date:
Tom Lane wrote:
> "Magnus Hagander" <mha@sollentuna.net> writes:
> > Builds with the attached patch.
>
> Applied.
>
> > APPDATA/postgresql/psql_history
> > Does not appear to work. Do I need to do anything to make psql create
> > this file?
>
> Enable READLINE/HISTORY.
>
> > A quick look at input.c makes it seem like this is only used when
> > READLINE is enabled. And READLINE is disabled on win32 because it
> > breaks.
>
> Hmm.  I wonder if that breakage had anything to do with the lack of
> proper support for home-directory stuff?  Might be entertaining to
> un-disable it and see what happens now.
>
> > APPDATA/postgresql/root.crt
> > Works insofar that it prevents me to connect if I put an invalid
> > certificate in that file, and permits me to connect if I put the correct
> > cert there. AFAIK, that should be all there is to it :-)
>
> Good enough check for me.
>
> I'm out of here for the next several hours --- if you have any
> last-minute RC4 patches, try to get Bruce's attention ...

What about the *.txt extension?  Do we want that or remove it?  I would
prefer its removal.

--
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073

Re: [BUGS] More SSL questions..

From
Tom Lane
Date:
Bruce Momjian <pgman@candle.pha.pa.us> writes:
> What about the *.txt extension?  Do we want that or remove it?  I would
> prefer its removal.

I agreed with the point about making those files easily editable.
I'm not dead set on it, but I don't see what we gain by not having
the .txt there --- we still have to document a different file name
and different location than is the case on Unix.

            regards, tom lane

Re: [BUGS] More SSL questions..

From
Bruce Momjian
Date:
Tom Lane wrote:
> Bruce Momjian <pgman@candle.pha.pa.us> writes:
> > What about the *.txt extension?  Do we want that or remove it?  I would
> > prefer its removal.
>
> I agreed with the point about making those files easily editable.
> I'm not dead set on it, but I don't see what we gain by not having
> the .txt there --- we still have to document a different file name
> and different location than is the case on Unix.

My feeling is that the *.txt is actually misleading because people will
think of it as a file full of freeform text (paragraphs) and not a
configuration file.

Does anyone know of a configuration file that uses *.txt?  I don't.

Perhaps there is another extension that is good for Win32 but i don't
think *.txt is it.

--
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073

Re: [BUGS] More SSL questions..

From
Tom Lane
Date:
Bruce Momjian <pgman@candle.pha.pa.us> writes:
> My feeling is that the *.txt is actually misleading because people will
> think of it as a file full of freeform text (paragraphs) and not a
> configuration file.

Why would they think that?  If notepad tends to auto-wrap files then
this argument has some force; I'm not very familar with it though.

            regards, tom lane

Re: [BUGS] More SSL questions..

From
Gary Doades
Date:
Bruce Momjian wrote:
> Tom Lane wrote:
>
  > Perhaps there is another extension that is good for Win32 but i don't
> think *.txt is it.
>

If there needs to be an extension, the new MS thinking in .NET seems to
favour .config files. Both ASP.NET web applications and windows .NET
executables are automatically given associated .config files by visual
studio.net

Cheers,
Gary.