Rename XXX_Fingerprint to XXX_CertFp
authorFederico G. Schwindt <fgsch@lodoss.net>
Sun, 4 Aug 2013 02:14:27 +0000 (03:14 +0100)
committerFederico G. Schwindt <fgsch@lodoss.net>
Sun, 4 Aug 2013 02:14:27 +0000 (03:14 +0100)
src/ngircd/client.c
src/ngircd/conn-ssl.c
src/ngircd/conn-ssl.h
src/ngircd/conn.c
src/ngircd/conn.h
src/ngircd/irc-info.c
src/ngircd/irc-metadata.c

index 73dcfcad107e3ab9be51daef2faf613a334a0151..9358dbb5fb281db125dd448c8e50c4098b6e34b5 100644 (file)
@@ -1596,11 +1596,11 @@ Client_Announce(CLIENT * Client, CLIENT * Prefix, CLIENT * User)
                                return DISCONNECTED;
                }
 
-               if (Conn_GetFingerprint(Client_Conn(User))) {
+               if (Conn_GetCertFp(Client_Conn(User))) {
                        if (!IRC_WriteStrClientPrefix(Client, Prefix,
                                        "METADATA %s certfp :%s",
                                        Client_ID(User),
-                                       Conn_GetFingerprint(Client_Conn(User))))
+                                       Conn_GetCertFp(Client_Conn(User))))
                                return DISCONNECTED;
                }
        }
index 7141eaca6ebb4bf523459e7465075bb0a01ae207..0bca9335ef0b7e65fb9bf2863e4ea1949ae0b10b 100644 (file)
@@ -633,7 +633,7 @@ ConnSSL_Connect( CONNECTION *c )
 }
 
 static int
-ConnSSL_InitFingerprint( CONNECTION *c )
+ConnSSL_InitCertFp( CONNECTION *c )
 {
        const char hex[] = "0123456789abcdef";
        int i;
@@ -723,7 +723,7 @@ ConnectAccept( CONNECTION *c, bool connect)
        if (ret)
                return ConnSSL_HandleError(c, ret, "gnutls_handshake");
 #endif /* _GNUTLS */
-       (void)ConnSSL_InitFingerprint(c);
+       (void)ConnSSL_InitCertFp(c);
 
        Conn_OPTION_DEL(c, (CONN_SSL_WANT_WRITE|CONN_SSL_WANT_READ|CONN_SSL_CONNECT));
        ConnSSL_LogCertInfo(c);
@@ -817,13 +817,13 @@ ConnSSL_GetCipherInfo(CONNECTION *c, char *buf, size_t len)
 }
 
 char *
-ConnSSL_GetFingerprint(CONNECTION *c)
+ConnSSL_GetCertFp(CONNECTION *c)
 {
        return c->ssl_state.fingerprint;
 }
 
 bool
-ConnSSL_SetFingerprint(CONNECTION *c, const char *fingerprint)
+ConnSSL_SetCertFp(CONNECTION *c, const char *fingerprint)
 {
        assert (c != NULL);
        c->ssl_state.fingerprint = strdup(fingerprint);
index fc705f13b9e3b2c91a0a90c485decf04c06b5a5c..1e995fd73fc72000aaea10a0cea62456e7233ac3 100644 (file)
@@ -26,8 +26,8 @@ GLOBAL ssize_t ConnSSL_Write PARAMS(( CONNECTION *c, const void *buf, size_t cou
 GLOBAL ssize_t ConnSSL_Read PARAMS(( CONNECTION *c, void *buf, size_t count));
 
 GLOBAL bool ConnSSL_GetCipherInfo PARAMS(( CONNECTION *c, char *buf, size_t len ));
-GLOBAL char *ConnSSL_GetFingerprint PARAMS(( CONNECTION *c ));
-GLOBAL bool ConnSSL_SetFingerprint PARAMS(( CONNECTION *c, const char *fingerprint ));
+GLOBAL char *ConnSSL_GetCertFp PARAMS(( CONNECTION *c ));
+GLOBAL bool ConnSSL_SetCertFp PARAMS(( CONNECTION *c, const char *fingerprint ));
 
 #endif /* SSL_SUPPORT */
 #endif /* conn_ssl_h */
index 9c6baef2676dd35aab47eaca13b8bf3ef39946f5..5967fd72535f4154d11bb92018c23e124b192e4d 100644 (file)
@@ -2613,22 +2613,22 @@ Conn_UsesSSL(CONN_ID Idx)
 
 
 GLOBAL char *
-Conn_GetFingerprint(CONN_ID Idx)
+Conn_GetCertFp(CONN_ID Idx)
 {
        if (Idx < 0)
                return NULL;
        assert(Idx < (int) array_length(&My_ConnArray, sizeof(CONNECTION)));
-       return ConnSSL_GetFingerprint(&My_Connections[Idx]);
+       return ConnSSL_GetCertFp(&My_Connections[Idx]);
 }
 
 
 GLOBAL bool
-Conn_SetFingerprint(CONN_ID Idx, const char *fingerprint)
+Conn_SetCertFp(CONN_ID Idx, const char *fingerprint)
 {
        if (Idx < 0)
                return false;
        assert(Idx < (int) array_length(&My_ConnArray, sizeof(CONNECTION)));
-       return ConnSSL_SetFingerprint(&My_Connections[Idx], fingerprint);
+       return ConnSSL_SetCertFp(&My_Connections[Idx], fingerprint);
 }
 #else
 GLOBAL bool
@@ -2639,14 +2639,14 @@ Conn_UsesSSL(UNUSED CONN_ID Idx)
 
 
 GLOBAL char *
-Conn_GetFingerprint(UNUSED CONN_ID Idx)
+Conn_GetCertFp(UNUSED CONN_ID Idx)
 {
        return NULL;
 }
 
 
 GLOBAL bool
-Conn_SetFingerprint(UNUSED CONN_ID Idx, UNUSED const char *fingerprint)
+Conn_SetCertFp(UNUSED CONN_ID Idx, UNUSED const char *fingerprint)
 {
        return true;
 }
index a6cf53a47be4f3695e66f9fd74c76fcf56480a31..c642541f07ce486b712f5a3b0e719a438d9ea8da 100644 (file)
@@ -139,8 +139,8 @@ GLOBAL CONN_ID Conn_GetFromProc PARAMS((int fd));
 GLOBAL CLIENT* Conn_GetClient PARAMS((CONN_ID i));
 GLOBAL PROC_STAT* Conn_GetProcStat PARAMS((CONN_ID i));
 
-GLOBAL char *Conn_GetFingerprint PARAMS((CONN_ID Idx));
-GLOBAL bool Conn_SetFingerprint PARAMS((CONN_ID Idx, const char *fingerprint));
+GLOBAL char *Conn_GetCertFp PARAMS((CONN_ID Idx));
+GLOBAL bool Conn_SetCertFp PARAMS((CONN_ID Idx, const char *fingerprint));
 GLOBAL bool Conn_UsesSSL PARAMS((CONN_ID Idx));
 
 #ifdef SSL_SUPPORT
index 22284cb328c87b0e76a15cbd00c15cd8889bbec2..3769beff78124b2f65ac28ffbf09b1ca27dc246f 100644 (file)
@@ -387,11 +387,11 @@ IRC_WHOIS_SendReply(CLIENT *Client, CLIENT *from, CLIENT *c)
                        return DISCONNECTED;
 
                /* Certificate fingerprint? */
-               if (Conn_GetFingerprint(Client_Conn(c)) &&
+               if (Conn_GetCertFp(Client_Conn(c)) &&
                    from == c &&
                    !IRC_WriteStrClient(from, RPL_WHOISCERTFP_MSG,
                                        Client_ID(from), Client_ID(c),
-                                       Conn_GetFingerprint(Client_Conn(c))))
+                                       Conn_GetCertFp(Client_Conn(c))))
                        return DISCONNECTED;
        }
 
@@ -462,10 +462,10 @@ Show_MOTD_SSLInfo(CLIENT *Client)
                        return false;
        }
 
-       if (Conn_GetFingerprint(Client_Conn(Client))) {
+       if (Conn_GetCertFp(Client_Conn(Client))) {
                snprintf(buf, sizeof(buf),
                         "Your client certificate fingerprint is: %s",
-                        Conn_GetFingerprint(Client_Conn(Client)));
+                        Conn_GetCertFp(Client_Conn(Client)));
                if (!IRC_WriteStrClient(Client, RPL_MOTD_MSG,
                                        Client_ID(Client), buf))
                        return false;
index d64ffb2178c8fff634e377a1c82964135cde9956..d185488b500789af68a4a8253adc313a918d16f9 100644 (file)
@@ -97,7 +97,7 @@ IRC_METADATA(CLIENT *Client, REQUEST *Req)
        else if (*Req->argv[2] && strcasecmp(Req->argv[1], "user") == 0)
                Client_SetUser(target, Req->argv[2], true);
        else if (*Req->argv[2] && strcasecmp(Req->argv[1], "certfp") == 0)
-               Conn_SetFingerprint(Client_Conn(target), Req->argv[2]);
+               Conn_SetCertFp(Client_Conn(target), Req->argv[2]);
        else
                Log(LOG_WARNING,
                    "Ignored metadata update from \"%s\" for client \"%s\": \"%s=%s\" - unknown key!",