Merge lp:~ohe/pyopenssl/ssl-const into lp:~exarkun/pyopenssl/trunk

Proposed by Olivier Hervieu
Status: Merged
Merged at revision: 142
Proposed branch: lp:~ohe/pyopenssl/ssl-const
Merge into: lp:~exarkun/pyopenssl/trunk
Diff against target: 32 lines (+22/-0)
1 file modified
OpenSSL/ssl/ssl.c (+22/-0)
To merge this branch: bzr merge lp:~ohe/pyopenssl/ssl-const
Reviewer Review Type Date Requested Status
Jean-Paul Calderone Approve
Review via email: mp+52023@code.launchpad.net

Description of the change

Fix a bug in the 0.12 roadmap

To post a comment you must log in.
Revision history for this message
Jean-Paul Calderone (exarkun) wrote :

Thanks! I added a simple unit test and merged this.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'OpenSSL/ssl/ssl.c'
2--- OpenSSL/ssl/ssl.c 2010-11-01 21:30:41 +0000
3+++ OpenSSL/ssl/ssl.c 2011-03-03 09:48:09 +0000
4@@ -209,6 +209,28 @@
5 PyModule_AddIntConstant(module, "SENT_SHUTDOWN", SSL_SENT_SHUTDOWN);
6 PyModule_AddIntConstant(module, "RECEIVED_SHUTDOWN", SSL_RECEIVED_SHUTDOWN);
7
8+ /* For set_info_callback */
9+ PyModule_AddIntConstant(module, "SSL_ST_CONNECT", SSL_ST_CONNECT);
10+ PyModule_AddIntConstant(module, "SSL_ST_ACCEPT", SSL_ST_ACCEPT);
11+ PyModule_AddIntConstant(module, "SSL_ST_MASK", SSL_ST_MASK);
12+ PyModule_AddIntConstant(module, "SSL_ST_INIT", SSL_ST_INIT);
13+ PyModule_AddIntConstant(module, "SSL_ST_BEFORE", SSL_ST_BEFORE);
14+ PyModule_AddIntConstant(module, "SSL_ST_OK", SSL_ST_OK);
15+ PyModule_AddIntConstant(module, "SSL_ST_RENEGOTIATE", SSL_ST_RENEGOTIATE);
16+ PyModule_AddIntConstant(module, "SSL_CB_LOOP", SSL_CB_LOOP);
17+ PyModule_AddIntConstant(module, "SSL_CB_EXIT", SSL_CB_EXIT);
18+ PyModule_AddIntConstant(module, "SSL_CB_READ", SSL_CB_READ);
19+ PyModule_AddIntConstant(module, "SSL_CB_WRITE", SSL_CB_WRITE);
20+ PyModule_AddIntConstant(module, "SSL_CB_ALERT", SSL_CB_ALERT);
21+ PyModule_AddIntConstant(module, "SSL_CB_READ_ALERT", SSL_CB_READ_ALERT);
22+ PyModule_AddIntConstant(module, "SSL_CB_WRITE_ALERT", SSL_CB_WRITE_ALERT);
23+ PyModule_AddIntConstant(module, "SSL_CB_ACCEPT_LOOP", SSL_CB_ACCEPT_LOOP);
24+ PyModule_AddIntConstant(module, "SSL_CB_ACCEPT_EXIT", SSL_CB_ACCEPT_EXIT);
25+ PyModule_AddIntConstant(module, "SSL_CB_CONNECT_LOOP", SSL_CB_CONNECT_LOOP);
26+ PyModule_AddIntConstant(module, "SSL_CB_CONNECT_EXIT", SSL_CB_CONNECT_EXIT);
27+ PyModule_AddIntConstant(module, "SSL_CB_HANDSHAKE_START", SSL_CB_HANDSHAKE_START);
28+ PyModule_AddIntConstant(module, "SSL_CB_HANDSHAKE_DONE", SSL_CB_HANDSHAKE_DONE);
29+
30 if (!init_ssl_context(module))
31 goto error;
32 if (!init_ssl_connection(module))

Subscribers

People subscribed via source and target branches

to status/vote changes: