]> arthur.barton.de Git - ngircd-alex.git/blobdiff - src/ngircd/conn.c
Rename XXX_Fingerprint to XXX_CertFp
[ngircd-alex.git] / src / ngircd / conn.c
index 087f5fc86de5f12c7c80395062e92c8fd675bb9a..5967fd72535f4154d11bb92018c23e124b192e4d 100644 (file)
@@ -2611,6 +2611,45 @@ Conn_UsesSSL(CONN_ID Idx)
        return Conn_OPTION_ISSET(&My_Connections[Idx], CONN_SSL);
 }
 
+
+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