Better document PQinitSSL(0) behavior in regards to libcrypto.
authorBruce Momjian
Sat, 28 Mar 2009 01:36:11 +0000 (01:36 +0000)
committerBruce Momjian
Sat, 28 Mar 2009 01:36:11 +0000 (01:36 +0000)
doc/src/sgml/libpq.sgml
src/interfaces/libpq/fe-secure.c

index 14bc92362bc50e3857b7bbeee5f147f2e746295a..2c2b53911dee9216f4199eb3816bdcd2115bf971 100644 (file)
@@ -1,4 +1,4 @@
-
+
 
 
  <application>libpq</application> - C Library
@@ -6169,11 +6169,13 @@ myEventProc(PGEventId evtId, void *evtInfo, void *passThrough)
   
 
   
-   If you are using SSL inside your application (in addition
-   to inside libpq), you can call
-   PQinitSSL(int) with 0 to tell
-   libpq that the SSL library
-   has already been initialized by your application.
+   If your application initializes libssl or
+   libcrypto libraries and libpq
+   is built with SSL support, you should call
+   PQinitSSL(0) to tell libpq
+   that the libssl and libcrypto libraries
+   have been initialized by your application so
+   libpq will not initialize those libraries.
    
    See 
    url="http://h71000.www7.hp.com/doc/83final/BA554_90007/ch04.html">
index de3a71cca0c4c5b354572102f72ed8c68dc47c78..f325aa5ddbf511de48e6a50a46514f4e74f07375 100644 (file)
@@ -11,7 +11,7 @@
  *
  *
  * IDENTIFICATION
- *   $PostgreSQL: pgsql/src/interfaces/libpq/fe-secure.c,v 1.119 2009/01/28 15:06:47 mha Exp $
+ *   $PostgreSQL: pgsql/src/interfaces/libpq/fe-secure.c,v 1.120 2009/03/28 01:36:11 momjian Exp $
  *
  * NOTES
  *
@@ -870,6 +870,7 @@ init_ssl_system(PGconn *conn)
 
        if (ssl_open_connections++ == 0)
        {
+           /* This is actually libcrypto, not libssl. */
            /* These are only required for threaded SSL applications */
            CRYPTO_set_id_callback(pq_threadidcallback);
            CRYPTO_set_locking_callback(pq_lockingcallback);
@@ -934,6 +935,7 @@ destroy_ssl_system(void)
 
        if (ssl_open_connections == 0)
        {
+           /* This is actually libcrypto, not libssl. */
            /* No connections left, unregister all callbacks */
            CRYPTO_set_locking_callback(NULL);
            CRYPTO_set_id_callback(NULL);