Skip to content

Commit

Permalink
Fixed AttributeError when calling get_app_data()
Browse files Browse the repository at this point in the history
  • Loading branch information
chakatodd authored and Todd Chapman committed Aug 27, 2015
1 parent 09b7395 commit 3226e33
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions OpenSSL/SSL.py
Original file line number Diff line number Diff line change
Expand Up @@ -1104,6 +1104,7 @@ def __init__(self, context, socket=None):
ssl = _lib.SSL_new(context._context)
self._ssl = _ffi.gc(ssl, _lib.SSL_free)
self._context = context
self._app_data = None

# References to strings used for Next Protocol Negotiation. OpenSSL's
# header files suggest that these might get copied at some point, but
Expand Down
1 change: 1 addition & 0 deletions OpenSSL/test/test_ssl.py
Original file line number Diff line number Diff line change
Expand Up @@ -2376,6 +2376,7 @@ def test_app_data(self):
:py:obj:`Connection.get_app_data`.
"""
conn = Connection(Context(TLSv1_METHOD), None)
self.assertIsNone(conn.get_app_data())
app_data = object()
conn.set_app_data(app_data)
self.assertIdentical(conn.get_app_data(), app_data)
Expand Down

0 comments on commit 3226e33

Please sign in to comment.