about summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
authorSteffen Jaeckel <jaeckel-floss@eyet-services.de>2022-03-22 10:44:02 +0100
committerSteffen Jaeckel <jaeckel-floss@eyet-services.de>2022-03-22 11:44:00 +0100
commitb28ac093688d0d3dbda8aa9755e1b9b54ed01e05 (patch)
tree7e03a0175b8de17e0facdd027353d256b200f2b6 /src
parent7c56eac154927e344c4720cad059e9a9752e16d5 (diff)
downloadprofani-tty-b28ac093688d0d3dbda8aa9755e1b9b54ed01e05.tar.gz
a tad more `const`-correctness
Signed-off-by: Steffen Jaeckel <jaeckel-floss@eyet-services.de>
Diffstat (limited to 'src')
-rw-r--r--src/config/tlscerts.c2
-rw-r--r--src/config/tlscerts.h2
-rw-r--r--src/event/server_events.c2
-rw-r--r--src/event/server_events.h2
-rw-r--r--src/ui/console.c4
-rw-r--r--src/ui/ui.h4
6 files changed, 8 insertions, 8 deletions
diff --git a/src/config/tlscerts.c b/src/config/tlscerts.c
index 8a4ed553..008d28f6 100644
--- a/src/config/tlscerts.c
+++ b/src/config/tlscerts.c
@@ -257,7 +257,7 @@ tlscerts_new(const char* const fingerprint, int version, const char* const seria
 }
 
 void
-tlscerts_add(TLSCertificate* cert)
+tlscerts_add(const TLSCertificate* cert)
 {
     if (!cert) {
         return;
diff --git a/src/config/tlscerts.h b/src/config/tlscerts.h
index c03d3b09..ab3d00e2 100644
--- a/src/config/tlscerts.h
+++ b/src/config/tlscerts.h
@@ -82,7 +82,7 @@ void tlscerts_clear_current(void);
 
 gboolean tlscerts_exists(const char* const fingerprint);
 
-void tlscerts_add(TLSCertificate* cert);
+void tlscerts_add(const TLSCertificate* cert);
 
 gboolean tlscerts_revoke(const char* const fingerprint);
 
diff --git a/src/event/server_events.c b/src/event/server_events.c
index 8a308207..5963c96b 100644
--- a/src/event/server_events.c
+++ b/src/event/server_events.c
@@ -1134,7 +1134,7 @@ sv_ev_muc_occupant_online(const char* const room, const char* const nick, const
 }
 
 int
-sv_ev_certfail(const char* const errormsg, TLSCertificate* cert)
+sv_ev_certfail(const char* const errormsg, const TLSCertificate* cert)
 {
     // check profanity trusted certs
     if (tlscerts_exists(cert->fingerprint)) {
diff --git a/src/event/server_events.h b/src/event/server_events.h
index b377e2af..55818642 100644
--- a/src/event/server_events.h
+++ b/src/event/server_events.h
@@ -86,7 +86,7 @@ void sv_ev_roster_update(const char* const barejid, const char* const name,
                          GSList* groups, const char* const subscription, gboolean pending_out);
 void sv_ev_roster_received(void);
 void sv_ev_connection_features_received(void);
-int sv_ev_certfail(const char* const errormsg, TLSCertificate* cert);
+int sv_ev_certfail(const char* const errormsg, const TLSCertificate* cert);
 void sv_ev_lastactivity_response(const char* const from, const int seconds, const char* const msg);
 void sv_ev_bookmark_autojoin(Bookmark* bookmark);
 
diff --git a/src/ui/console.c b/src/ui/console.c
index 8d3e13a3..170def7c 100644
--- a/src/ui/console.c
+++ b/src/ui/console.c
@@ -181,7 +181,7 @@ cons_show_error(const char* const msg, ...)
 }
 
 void
-cons_show_tlscert_summary(TLSCertificate* cert)
+cons_show_tlscert_summary(const TLSCertificate* cert)
 {
     if (!cert) {
         return;
@@ -193,7 +193,7 @@ cons_show_tlscert_summary(TLSCertificate* cert)
 }
 
 void
-cons_show_tlscert(TLSCertificate* cert)
+cons_show_tlscert(const TLSCertificate* cert)
 {
     if (!cert) {
         return;
diff --git a/src/ui/ui.h b/src/ui/ui.h
index 5257df60..6805b362 100644
--- a/src/ui/ui.h
+++ b/src/ui/ui.h
@@ -333,8 +333,8 @@ void cons_show_contact_online(PContact contact, Resource* resource, GDateTime* l
 void cons_show_contact_offline(PContact contact, char* resource, char* status);
 void cons_theme_properties(void);
 void cons_theme_colours(void);
-void cons_show_tlscert(TLSCertificate* cert);
-void cons_show_tlscert_summary(TLSCertificate* cert);
+void cons_show_tlscert(const TLSCertificate* cert);
+void cons_show_tlscert_summary(const TLSCertificate* cert);
 
 void cons_alert(ProfWin* alert_origin_window);
 void cons_remove_alert(ProfWin* window);