[vlc-commits] tls: remove unused server.handshake parameters

Rémi Denis-Courmont git at videolan.org
Sun Nov 18 16:57:28 CET 2018


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sun Nov 18 15:06:18 2018 +0200| [9b28f403cb7ff346ae18c32472ec4e379a5231f7] | committer: Rémi Denis-Courmont

tls: remove unused server.handshake parameters

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=9b28f403cb7ff346ae18c32472ec4e379a5231f7
---

 include/vlc_tls.h              | 6 ++----
 modules/misc/gnutls.c          | 5 +----
 modules/misc/securetransport.c | 7 ++++++-
 3 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/include/vlc_tls.h b/include/vlc_tls.h
index f6af4c4f55..48e4a77f25 100644
--- a/include/vlc_tls.h
+++ b/include/vlc_tls.h
@@ -219,9 +219,7 @@ typedef struct vlc_tls_server
 
     vlc_tls_t *(*open)(struct vlc_tls_server *, vlc_tls_t *sock,
                        const char *const *alpn);
-    int  (*handshake)(vlc_tls_t *session,
-                      const char *hostname, const char *service,
-                      char ** /*restrict*/ alp);
+    int  (*handshake)(vlc_tls_t *session, char ** /*restrict*/ alp);
     void (*destroy)(struct vlc_tls_server *);
 } vlc_tls_server_t;
 
@@ -241,7 +239,7 @@ VLC_API vlc_tls_server_t *vlc_tls_ServerCreate(vlc_object_t *,
 static inline int vlc_tls_SessionHandshake(vlc_tls_server_t *crd,
                                            vlc_tls_t *tls)
 {
-    return crd->handshake(tls, NULL, NULL, NULL);
+    return crd->handshake(tls, NULL);
 }
 
 /**
diff --git a/modules/misc/gnutls.c b/modules/misc/gnutls.c
index 98aaad5349..512db14233 100644
--- a/modules/misc/gnutls.c
+++ b/modules/misc/gnutls.c
@@ -623,13 +623,10 @@ static vlc_tls_t *gnutls_ServerSessionOpen(vlc_tls_server_t *crd,
     return (priv != NULL) ? &priv->tls : NULL;
 }
 
-static int gnutls_ServerHandshake(vlc_tls_t *tls,
-                                  const char *host, const char *service,
-                                  char **restrict alp)
+static int gnutls_ServerHandshake(vlc_tls_t *tls, char **restrict alp)
 {
     vlc_tls_gnutls_t *priv = (vlc_tls_gnutls_t *)tls;
 
-    (void) host; (void) service;
     return gnutls_ContinueHandshake(priv, alp);
 }
 
diff --git a/modules/misc/securetransport.c b/modules/misc/securetransport.c
index ea6ef4e8e2..76d1f10772 100644
--- a/modules/misc/securetransport.c
+++ b/modules/misc/securetransport.c
@@ -874,6 +874,11 @@ error:
     return NULL;
 }
 
+static int st_ServerHandshake (vlc_tls_t *session, char **restrict alp) {
+
+    return st_Handshake(session, NULL, NULL, alp);
+}
+
 static void st_ServerDestroy (vlc_tls_server_t *crd) {
     msg_Dbg(crd, "close secure transport server");
 
@@ -991,7 +996,7 @@ static int OpenServer (vlc_tls_server_t *crd, const char *cert, const char *key)
 
     crd->sys = sys;
     crd->open = st_ServerSessionOpen;
-    crd->handshake = st_Handshake;
+    crd->handshake = st_ServerHandshake;
     crd->destroy = st_ServerDestroy;
 
 out:



More information about the vlc-commits mailing list