+
+GLOBAL char *
+Conn_GetCertFp(CONN_ID Idx)
+{
+ if (Idx < 0)
+ return NULL;
+ assert(Idx < (int) array_length(&My_ConnArray, sizeof(CONNECTION)));
+ return ConnSSL_GetCertFp(&My_Connections[Idx]);
+}
+
+
+GLOBAL bool
+Conn_SetCertFp(CONN_ID Idx, const char *fingerprint)
+{
+ if (Idx < 0)
+ return false;
+ assert(Idx < (int) array_length(&My_ConnArray, sizeof(CONNECTION)));
+ return ConnSSL_SetCertFp(&My_Connections[Idx], fingerprint);
+}
+#else
+GLOBAL bool
+Conn_UsesSSL(UNUSED CONN_ID Idx)
+{
+ return false;
+}
+
+
+GLOBAL char *
+Conn_GetCertFp(UNUSED CONN_ID Idx)
+{
+ return NULL;
+}
+
+
+GLOBAL bool
+Conn_SetCertFp(UNUSED CONN_ID Idx, UNUSED const char *fingerprint)
+{
+ return true;
+}
+#endif
+
+
+#ifdef DEBUG
+
+/**
+ * Dump internal state of the "connection module".
+ */
+GLOBAL void
+Conn_DebugDump(void)
+{
+ int i;
+
+ Log(LOG_DEBUG, "Connection status:");
+ for (i = 0; i < Pool_Size; i++) {
+ if (My_Connections[i].sock == NONE)
+ continue;
+ Log(LOG_DEBUG,
+ " - %d: host=%s, lastdata=%ld, lastping=%ld, delaytime=%ld, flag=%d, options=%d, bps=%d, client=%s",
+ My_Connections[i].sock, My_Connections[i].host,
+ My_Connections[i].lastdata, My_Connections[i].lastping,
+ My_Connections[i].delaytime, My_Connections[i].flag,
+ My_Connections[i].options, My_Connections[i].bps,
+ My_Connections[i].client ? Client_ID(My_Connections[i].client) : "-");
+ }
+} /* Conn_DumpClients */
+