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

Commit3c4768d

Browse files
committed
Change libpq's PQgetssl() to return a void*, rather than SSL *, so that
applications don't need the SSL headers.Martijn van Oosterhout
1 parenta3c1a11 commit3c4768d

File tree

2 files changed

+6
-14
lines changed

2 files changed

+6
-14
lines changed

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

Lines changed: 3 additions & 3 deletions
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.76 2006/04/27 00:36:34 momjian Exp $
14+
* $PostgreSQL: pgsql/src/interfaces/libpq/fe-secure.c,v 1.77 2006/04/27 00:53:58 momjian Exp $
1515
*
1616
* NOTES
1717
* [ Most of these notes are wrong/obsolete, but perhaps not all ]
@@ -1014,9 +1014,9 @@ SSLerrfree(char *buf)
10141014
}
10151015

10161016
/*
1017-
*Return pointer toSSL object.
1017+
*Return pointer toOpenSSL object.
10181018
*/
1019-
SSL*
1019+
void*
10201020
PQgetssl(PGconn*conn)
10211021
{
10221022
if (!conn)

‎src/interfaces/libpq/libpq-fe.h

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* Portions Copyright (c) 1996-2006, PostgreSQL Global Development Group
88
* Portions Copyright (c) 1994, Regents of the University of California
99
*
10-
* $PostgreSQL: pgsql/src/interfaces/libpq/libpq-fe.h,v 1.126 2006/03/20 15:07:05 momjian Exp $
10+
* $PostgreSQL: pgsql/src/interfaces/libpq/libpq-fe.h,v 1.127 2006/04/27 00:53:58 momjian Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -28,11 +28,6 @@ extern"C"
2828
*/
2929
#include"postgres_ext.h"
3030

31-
/* SSL type is needed here only to declare PQgetssl() */
32-
#ifdefUSE_SSL
33-
#include<openssl/ssl.h>
34-
#endif
35-
3631
/* Application-visible enum types */
3732

3833
typedefenum
@@ -271,12 +266,9 @@ extern intPQbackendPID(const PGconn *conn);
271266
externintPQclientEncoding(constPGconn*conn);
272267
externintPQsetClientEncoding(PGconn*conn,constchar*encoding);
273268

274-
#ifdefUSE_SSL
275-
/* Get the SSL structure associated with a connection */
276-
externSSL*PQgetssl(PGconn*conn);
277-
#else
269+
/* Get the OpenSSL structure associated with a connection. Returns NULL for
270+
* unencrypted connections or if any other TLS library is in use. */
278271
externvoid*PQgetssl(PGconn*conn);
279-
#endif
280272

281273
/* Tell libpq whether it needs to initialize OpenSSL */
282274
externvoidPQinitSSL(intdo_init);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp