- Attribute">
+ attribute">
PQsslAttribute PQsslAttribute>>
-
-
PQsslAttributes PQsslAttributes>>
+ names">
+
PQsslAttributeNames PQsslAttributeNames>>
Return an array of SSL attribute names available. The array is terminated by a NULL pointer.
-const char **PQsslAttribut es(const PGconn *conn);
+const char * const * PQsslAttributeNam es(const PGconn *conn);
- Return a pointer to an SSL-implementation specific object describing
+ Return a pointer to an SSL-implementation- specific object describing
the connection.
void *PQsslStruct(const PGconn *conn, const char *struct_name);
- The structs available depends on the SSL implementation in use.
- For OpenSSL, there is one struct, under the name "OpenSSL",
+ The struct(s) available depend on the SSL implementation in use.
+ For OpenSSL, there is one struct, available under the name "OpenSSL",
and it returns a pointer to the OpenSSL SSL struct.
To use this function, code along the following lines could be used:
2015-02-03 [91fa7b4] Heikki..: Add API functions to libpq to interrogate SSL ..
-->
- Add
libpq> function
- linkend="libpq-pqsslAttribute">PQsslAttribute()>>
- that returns
SSL> information (Heikki Linnakangas)
-
-
- While PQgetssl()>>
- can still be used to call
OpenSSL>
- functions,
PQsslAttribute()> returns SSL>
- information in an
SSL>-implementation-independent way.
- (Future versions of libpq might support other
SSL>
- implementations.)
+ Add
libpq> functions to return SSL>
+ information in an implementation-independent way (Heikki Linnakangas)
+
+
+ While PQgetssl()>> can
+ still be used to call
OpenSSL> functions, it is now
+ considered deprecated because future versions
+ of
libpq> might support other SSL>
+ implementations. When possible, use the new
+ functions
+ linkend="libpq-pqsslattribute">
PQsslAttribute()>>,
+ linkend="libpq-pqsslattributenames">PQsslAttributeNames()>>,
+ and PQsslInUse()>>
+ to obtain
SSL> information in
+ an
SSL>-implementation-independent way.
PQconninfo 165
PQsslInUse 166
PQsslStruct 167
-PQsslAttributes 168
+PQsslAttributeNames 168
PQsslAttribute 169
return NULL;
}
-const char **
-PQsslAttributes(PGconn *conn)
+const char *const *
+PQsslAttributeName s(PGconn *conn)
{
- static const char *result[] = {
+ static const char *const result[] = {
"library",
"key_bits",
"cipher",
return NULL;
}
-const char **
-PQsslAttributes(PGconn *conn)
+const char *const *
+PQsslAttributeName s(PGconn *conn)
{
- static const char *result[] = {NULL};
+ static const char *const result[] = {NULL};
return result;
}
extern int PQsslInUse(PGconn *conn);
extern void *PQsslStruct(PGconn *conn, const char *struct_name);
extern const char *PQsslAttribute(PGconn *conn, const char *attribute_name);
-extern const char **PQsslAttribut es(PGconn *conn);
+extern const char *const * PQsslAttributeNam es(PGconn *conn);
/* Get the OpenSSL structure associated with a connection. Returns NULL for
* unencrypted connections or if any other TLS library is in use. */