[vlc-commits] securetransport: add missing error checking

David Fuhrmann git at videolan.org
Sun Jan 5 19:22:43 CET 2014


vlc | branch: master | David Fuhrmann <david.fuhrmann at googlemail.com> | Sun Jan  5 19:21:11 2014 +0100| [18b224c98b282e20904a56f1ecdde3b9e9556bf4] | committer: David Fuhrmann

securetransport: add missing error checking

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

 modules/misc/securetransport.c |   12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/modules/misc/securetransport.c b/modules/misc/securetransport.c
index f0b12c8..818ff3a 100644
--- a/modules/misc/securetransport.c
+++ b/modules/misc/securetransport.c
@@ -550,10 +550,18 @@ static int st_ClientSessionOpen (vlc_tls_creds_t *crd, vlc_tls_t *session,
        certificates */
 
     /* this has effect only on iOS 5 and OSX 10.8 or later ... */
-    SSLSetSessionOption (sys->p_context, kSSLSessionOptionBreakOnServerAuth, true);
+    ret = SSLSetSessionOption (sys->p_context, kSSLSessionOptionBreakOnServerAuth, true);
+    if(ret != noErr) {
+        msg_Err (session, "cannot set session option");
+        goto error;
+    }
 #if !TARGET_OS_IPHONE
     /* ... thus calling this for earlier osx versions, which is not available on iOS in turn */
-    SSLSetEnableCertVerify (sys->p_context, false);
+    ret = SSLSetEnableCertVerify (sys->p_context, false);
+    if(ret != noErr) {
+        msg_Err (session, "error setting enable cert verify");
+        goto error;
+    }
 #endif
 
     return VLC_SUCCESS;



More information about the vlc-commits mailing list