praekelt/vumi — pull request #740 by jerith (2014-03-17 11:48:17+00:00)
Title: SSL.SSLv23_METHOD is broken on Ubuntu

https://bugs.launchpad.net/ubuntu/+source/openssl/+bug/861137
As a result all HTTPS based calls from Vumi will most likely fail on this platform with the error:

```
'SSL routines', 'SSL23_GET_SERVER_HELLO',
'tlsv1 alert internal error'
```

this patch is a work around:

```diff
diff --git a/vumi/application/sandbox.py b/vumi/application/sandbox.py
index d845359..c76d8f5 100644
--- a/vumi/application/sandbox.py
+++ b/vumi/application/sandbox.py
@@ -20,7 +20,8 @@ from twisted.python.failure import Failure
from twisted.web.client import WebClientContextFactory

from OpenSSL.SSL import (
- VERIFY_PEER, VERIFY_FAIL_IF_NO_PEER_CERT, VERIFY_CLIENT_ONCE, VERIFY_NONE)
+ VERIFY_PEER, VERIFY_FAIL_IF_NO_PEER_CERT, VERIFY_CLIENT_ONCE, VERIFY_NONE,
+ SSLv3_METHOD)

from vumi.config import ConfigText, ConfigInt, ConfigList, ConfigDict
from vumi.application.base import ApplicationWorker
@@ -708,6 +709,8 @@ class LoggingResource(SandboxResource):

class HttpClientContextFactory(WebClientContextFactory):

+ method = SSLv3_METHOD
+
def __init__(self, verify_options=None):
self.verify_options = verify_options
```