Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit3ab95c2

Browse files
committed
Better document PQinitSSL(0) behavior in regards to libcrypto.
1 parent2938f8c commit3ab95c2

File tree

2 files changed

+11
-7
lines changed

2 files changed

+11
-7
lines changed

‎doc/src/sgml/libpq.sgml

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!-- $PostgreSQL: pgsql/doc/src/sgml/libpq.sgml,v 1.279 2009/03/23 01:45:29 momjian Exp $ -->
1+
<!-- $PostgreSQL: pgsql/doc/src/sgml/libpq.sgml,v 1.280 2009/03/28 01:36:11 momjian Exp $ -->
22

33
<chapter id="libpq">
44
<title><application>libpq</application> - C Library</title>
@@ -6169,11 +6169,13 @@ myEventProc(PGEventId evtId, void *evtInfo, void *passThrough)
61696169
</para>
61706170

61716171
<para>
6172-
If you are using <acronym>SSL</> inside your application (in addition
6173-
to inside <application>libpq</application>), you can call
6174-
<function>PQinitSSL(int)</> with <literal>0</> to tell
6175-
<application>libpq</application> that the <acronym>SSL</> library
6176-
has already been initialized by your application.
6172+
If your application initializes <literal>libssl</> or
6173+
<literal>libcrypto</> libraries and <application>libpq</application>
6174+
is built with <acronym>SSL</> support, you should call
6175+
<function>PQinitSSL(0)</> to tell <application>libpq</application>
6176+
that the <literal>libssl</> and <literal>libcrypto</> libraries
6177+
have been initialized by your application so
6178+
<application>libpq</application> will not initialize those libraries.
61776179
<!-- If this URL changes replace it with a URL to www.archive.org. -->
61786180
See <ulink
61796181
url="http://h71000.www7.hp.com/doc/83final/BA554_90007/ch04.html"></ulink>

‎src/interfaces/libpq/fe-secure.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
*
1212
*
1313
* IDENTIFICATION
14-
* $PostgreSQL: pgsql/src/interfaces/libpq/fe-secure.c,v 1.119 2009/01/2815:06:47 mha Exp $
14+
* $PostgreSQL: pgsql/src/interfaces/libpq/fe-secure.c,v 1.120 2009/03/2801:36:11 momjian Exp $
1515
*
1616
* NOTES
1717
*
@@ -870,6 +870,7 @@ init_ssl_system(PGconn *conn)
870870

871871
if (ssl_open_connections++==0)
872872
{
873+
/* This is actually libcrypto, not libssl. */
873874
/* These are only required for threaded SSL applications */
874875
CRYPTO_set_id_callback(pq_threadidcallback);
875876
CRYPTO_set_locking_callback(pq_lockingcallback);
@@ -934,6 +935,7 @@ destroy_ssl_system(void)
934935

935936
if (ssl_open_connections==0)
936937
{
938+
/* This is actually libcrypto, not libssl. */
937939
/* No connections left, unregister all callbacks */
938940
CRYPTO_set_locking_callback(NULL);
939941
CRYPTO_set_id_callback(NULL);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp