~ubuntu-branches/ubuntu/raring/sflphone/raring

« back to all changes in this revision

Viewing changes to debian/patches/remove_sslv2.patch

  • Committer: Package Import Robot
  • Author(s): Francois Marier
  • Date: 2011-11-25 13:24:12 UTC
  • mfrom: (4.1.10 sid)
  • Revision ID: package-import@ubuntu.com-20111125132412-dc4qvhyosk74cd42
Tags: 1.0.1-4
Don't assume that arch:all packages will get built (closes: #649726)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
Origin: upstream, commit:14857ee864a3882bc3bb8168f6bf0db43bd25160
2
 
From: Tristan Matthews <tristan.matthews@savoirfairelinux.com>
3
 
Bug: https://projects.savoirfairelinux.com/issues/5515
4
 
Bug-Debian: http://bugs.debian.org/621395
5
 
Last-Update: 2011-05-30
6
 
Description: comment out SSLv2 calls in pjsip
7
 
 OpenSSL 1.0.0 has dropped SSLv2 support, so these functions are not
8
 
 defined, which causes linking errors.
9
 
 
10
 
--- a/sflphone-common/libs/pjproject/pjlib/src/pj/ssl_sock_ossl.c
11
 
+++ b/sflphone-common/libs/pjproject/pjlib/src/pj/ssl_sock_ossl.c
12
 
@@ -312,8 +312,8 @@ static pj_status_t init_openssl(void)
13
 
            meth = (SSL_METHOD*)TLSv1_server_method();
14
 
        if (!meth)
15
 
            meth = (SSL_METHOD*)SSLv3_server_method();
16
 
-       if (!meth)
17
 
-           meth = (SSL_METHOD*)SSLv2_server_method();
18
 
+       /*if (!meth)
19
 
+           meth = (SSL_METHOD*)SSLv2_server_method();*/
20
 
        pj_assert(meth);
21
 
 
22
 
        ctx=SSL_CTX_new(meth);
23
 
@@ -389,8 +389,10 @@ static pj_status_t create_ssl_ctx(pj_ssl_sock_t *ssock, SSL_CTX **p_ctx)
24
 
        ssl_method = (SSL_METHOD*)TLSv1_method();
25
 
        break;
26
 
     case PJ_SSL_SOCK_PROTO_SSL2:
27
 
+    /*
28
 
        ssl_method = (SSL_METHOD*)SSLv2_method();
29
 
-       break;
30
 
+    */
31
 
+       return PJ_EINVAL;
32
 
     case PJ_SSL_SOCK_PROTO_SSL3:
33
 
        ssl_method = (SSL_METHOD*)SSLv3_method();
34
 
        break;
35
 
--- a/sflphone-common/libs/pjproject/pjsip/src/pjsip/sip_transport_tls_ossl.c
36
 
+++ b/sflphone-common/libs/pjproject/pjsip/src/pjsip/sip_transport_tls_ossl.c
37
 
@@ -365,8 +365,10 @@ static pj_status_t create_ctx( struct tls_listener *lis, SSL_CTX **p_ctx)
38
 
        ssl_method = TLSv1_method();
39
 
        break;
40
 
     case PJSIP_SSLV2_METHOD:
41
 
-       ssl_method = SSLv2_method();
42
 
-       break;
43
 
+       /* ssl_method = SSLv2_method(); */
44
 
+       ssl_report_error(lis_name, 4, PJSIP_TLS_EINVMETHOD,
45
 
+                        "Error creating SSL context: SSLv2 not supported");
46
 
+       return PJSIP_TLS_EINVMETHOD;
47
 
     case PJSIP_SSLV3_METHOD:
48
 
        ssl_method = SSLv3_method();
49
 
        break;