Mike,<br><br>To use SSL mode with OGR, your pqlib should be built with SSL support.<br><br><div class="gmail_quote">On Fri, Jan 28, 2011 at 2:09 AM, Mike Axelrod <span dir="ltr">&lt;<a href="mailto:mike.axelrod@pictometry.com">mike.axelrod@pictometry.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">

















<div link="blue" vlink="blue" lang="EN-US">

<div>

<p class="MsoNormal"><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;">So it seems the build I’m using may not support ssl, I run ogrinfo with sslmode=prefer I
connect ok, but when I set sslmode=require I get this error:</span></font></p>

<p class="MsoNormal"><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;"> </span></font></p>

<p class="MsoNormal"><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;">---------------------------</span></font></p>

<p class="MsoNormal"><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;">Details...</span></font></p>

<p class="MsoNormal"><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;">---------------------------</span></font></p>

<p class="MsoNormal"><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;">call to ogrinfo failed: ERROR 1:
PQconnectdb failed.</span></font></p>

<p class="MsoNormal"><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;"></span></font></p>

<p class="MsoNormal"><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;">sslmode value &quot;require&quot; invalid
when SSL support is not compiled in</span></font></p>

<p class="MsoNormal"><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;"></span></font></p>

<p class="MsoNormal"><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;"> </span></font></p>

<div>

<div class="MsoNormal" style="text-align: center;" align="center"><font face="Times New Roman" size="3"><span style="font-size: 12pt;">

<hr size="2" width="100%" align="center">

</span></font></div>

<p class="MsoNormal"><b><font face="Tahoma" size="2"><span style="font-size: 10pt; font-family: Tahoma; font-weight: bold;">From:</span></font></b><font face="Tahoma" size="2"><span style="font-size: 10pt; font-family: Tahoma;">
<a href="mailto:gdal-dev-bounces@lists.osgeo.org" target="_blank">gdal-dev-bounces@lists.osgeo.org</a> [mailto:<a href="mailto:gdal-dev-bounces@lists.osgeo.org" target="_blank">gdal-dev-bounces@lists.osgeo.org</a>] <b><span style="font-weight: bold;">On Behalf Of </span></b>Mike Axelrod<br>

<b><span style="font-weight: bold;">Sent:</span></b> Thursday, January 27, 2011
3:21 PM<br>
<b><span style="font-weight: bold;">To:</span></b> Chaitanya kumar CH<div class="im"><br>
<b><span style="font-weight: bold;">Cc:</span></b> <a href="mailto:gdal-dev@lists.osgeo.org" target="_blank">gdal-dev@lists.osgeo.org</a><br>
</div><b><span style="font-weight: bold;">Subject:</span></b> RE: [gdal-dev] Can I use
ogr2ogr to postgresql with security?</span></font></p>

</div><div><div></div><div class="h5">

<p class="MsoNormal"><font face="Times New Roman" size="3"><span style="font-size: 12pt;"> </span></font></p>

<p class="MsoNormal"><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;">Thank you, I’ll be trying that out as soon
as I get our postgresql server configured with ssl.  Do you know if the postgresql
public key is required on the client side?  I see references to a </span></font><span><font color="black" face="Courier New" size="1"><span style="font-size: 9pt; font-family: &quot;Courier New&quot;; color: black;">~/.postgresql/postgresql.key</span></font></span><span><font color="black" face="Courier New" size="1"><span style="font-size: 7.5pt; font-family: &quot;Courier New&quot;; color: black;"> being available
to the client. But I’m not clear if this is required or an option.</span></font></span><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;"></span></font></p>

<p class="MsoNormal"><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;"> </span></font></p>

<p class="MsoNormal"><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;">BTW I’m currently using the win32 SDK
version of ogr2ogr that is distributed here =&gt; </span></font><a href="http://vbkto.dyndns.org/sdk/" target="_blank">http://vbkto.dyndns.org/sdk/</a><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;">, I’m hoping these builds support
SSL.  Can anybody confirm?  </span></font></p>

<p class="MsoNormal"><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;"> </span></font></p>

<p class="MsoNormal"><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;">Mike</span></font></p>

<p class="MsoNormal"><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;"> </span></font></p>

<div>

<div class="MsoNormal" style="text-align: center;" align="center"><font face="Times New Roman" size="3"><span style="font-size: 12pt;">

<hr size="2" width="100%" align="center">

</span></font></div>

<p class="MsoNormal"><b><font face="Tahoma" size="2"><span style="font-size: 10pt; font-family: Tahoma; font-weight: bold;">From:</span></font></b><font face="Tahoma" size="2"><span style="font-size: 10pt; font-family: Tahoma;"> Chaitanya kumar
CH [mailto:<a href="mailto:chaitanya.ch@gmail.com" target="_blank">chaitanya.ch@gmail.com</a>] <br>
<b><span style="font-weight: bold;">Sent:</span></b> Thursday, January 27, 2011
2:56 PM<br>
<b><span style="font-weight: bold;">To:</span></b> Mike Axelrod<br>
<b><span style="font-weight: bold;">Cc:</span></b> <a href="mailto:gdal-dev@lists.osgeo.org" target="_blank">gdal-dev@lists.osgeo.org</a><br>
<b><span style="font-weight: bold;">Subject:</span></b> Re: [gdal-dev] Can I use
ogr2ogr to postgresql with security?</span></font></p>

</div>

<p class="MsoNormal"><font face="Times New Roman" size="3"><span style="font-size: 12pt;"> </span></font></p>

<p class="MsoNormal" style="margin-bottom: 12pt;"><font face="Times New Roman" size="3"><span style="font-size: 12pt;">Mike,<br>
<br>
OGR&#39;s postgresql/postgis driver makes the connection using PQconnectdb() method
from the libpq library.<br>
You can set the option &#39;sslmode&#39; to &#39;require&#39;, &#39;verify-ca&#39; or &#39;verify-full&#39; for
a secure connection. Look for the documentation of PQconnectdb() for further
details.</span></font></p>

<div>

<p class="MsoNormal"><font face="Times New Roman" size="3"><span style="font-size: 12pt;">On Fri, Jan 28, 2011 at 12:13 AM, Mike Axelrod &lt;<a href="mailto:mike.axelrod@pictometry.com" target="_blank">mike.axelrod@pictometry.com</a>&gt;
wrote:</span></font></p>

<div link="blue" vlink="purple">

<div>

<p class="MsoNormal"><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;">Does ogr2ogr
(and ogrinfo) natively support
secure connections to postgresql?    </span></font></p>

<p class="MsoNormal"><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;"> </span></font></p>

<p class="MsoNormal"><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;">I need to
run ogrinfo and ogr2ogr where the target is a postgresql server elsewhere on
the network (in a different domain) and secure the communication.</span></font></p>

<p class="MsoNormal"><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;"> </span></font></p>

<p class="MsoNormal"><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;">Mike</span></font></p>

<p><font face="Times New Roman" size="3"><span style="font-size: 12pt;" lang="EN">Mike
Axelrod, Software Engineer<br>
Pictometry International Corp.<br>
Suite A, 100 Town Centre Drive,
 Rochester, NY 14623<br>
Phone: 585-775-7711<br>
E-mail: <a href="mailto:mike.axelrod@pictometry.com" target="_blank">mike.axelrod@pictometry.com</a>
Web: </span><a href="http://www.pictometry.com/" target="_blank"><font size="2"><span style="font-size: 10pt;" lang="EN">http://www.Pictometry.com/</span></font></a></font></p>

<p class="MsoNormal"><font face="Times New Roman" size="3"><span style="font-size: 12pt;"> </span></font></p>

</div>

<p class="MsoNormal"><font face="Times New Roman" size="3"><span style="font-size: 12pt;">NOTICE: This message is covered by the Electronic Communications
Privacy Act, Title 18, United States Code, Sections 2510-2521. This e-mail and any
attached files are the exclusive property of Pictometry International Corp.,
are deemed privileged and confidential, and are intended solely for the use of
the individual(s) or entity to whom this e-mail is addressed. If you are not
one of the named recipient(s) or believe that you have received this message in
error, please delete this e-mail and any attachments and notify the sender
immediately. Any other use, re-creation, dissemination, forwarding or copying
of this e-mail is strictly prohibited and may be unlawful. </span></font></p>

</div>

<p class="MsoNormal"><font face="Times New Roman" size="3"><span style="font-size: 12pt;"><br>
_______________________________________________<br>
gdal-dev mailing list<br>
<a href="mailto:gdal-dev@lists.osgeo.org" target="_blank">gdal-dev@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/gdal-dev" target="_blank">http://lists.osgeo.org/mailman/listinfo/gdal-dev</a></span></font></p>

</div>

<p class="MsoNormal"><font face="Times New Roman" size="3"><span style="font-size: 12pt;"><br>
<br clear="all">
<br>
-- <br>
Best regards,<br>
Chaitanya kumar CH.<br>
/t</span></font><font face="MS Mincho"><span style="font-family: &quot;MS Mincho&quot;;">ʃ</span></font>a<font face="MS Mincho"><span style="font-family: &quot;MS Mincho&quot;;">ɪ</span></font>θənjə/ /k<font face="MS Mincho"><span style="font-family: &quot;MS Mincho&quot;;">ʊ</span></font>m<font face="MS Mincho"><span style="font-family: &quot;MS Mincho&quot;;">ɑ</span></font>r/ <br>

+91-9494447584<br>
17.2416N 80.1426E</p>

<p class="MsoNormal"><font face="Times New Roman" size="3"><span style="font-size: 12pt;">NOTICE: This message is covered by the Electronic Communications
Privacy Act, Title 18, United States Code, Sections 2510-2521. This e-mail and
any attached files are the exclusive property of Pictometry International
Corp., are deemed privileged and confidential, and are intended solely for the
use of the individual(s) or entity to whom this e-mail is addressed. If you are
not one of the named recipient(s) or believe that you have received this
message in error, please delete this e-mail and any attachments and notify the
sender immediately. Any other use, re-creation, dissemination, forwarding or
copying of this e-mail is strictly prohibited and may be unlawful. </span></font></p>

</div></div></div><div><div></div><div class="h5">

NOTICE: This message is covered by the Electronic Communications Privacy Act, Title 18, United States Code, Sections 2510-2521. This e-mail and any attached files are the exclusive property of Pictometry International Corp., are deemed privileged and confidential, and are intended solely for the use of the individual(s) or entity to whom this e-mail is addressed. If you are not one of the named recipient(s) or believe that you have received this message in error, please delete this e-mail and any attachments and notify the sender immediately. Any other use, re-creation, dissemination, forwarding or copying of this e-mail is strictly prohibited and may be unlawful.
</div></div></div>


</blockquote></div><br><br clear="all"><br>-- <br>Best regards,<br>Chaitanya kumar CH.<br>/tʃaɪθənjə/ /kʊmɑr/ <br>+91-9494447584<br>17.2416N 80.1426E<br>