~myers-1/pyopenssl/npn

« back to all changes in this revision

Viewing changes to OpenSSL/ssl/ssl.c

  • Committer: Jean-Paul Calderone
  • Date: 2011-09-08 22:44:31 UTC
  • mfrom: (156.2.7 ctx_set_mode)
  • Revision ID: exarkun@divmod.com-20110908224431-9hxcmjzfhzqyglxh
Add Context.set_mode, MODE_RELEASE_BUFFERS, and OP_NO_COMPRESSION

Show diffs side-by-side

added added

removed removed

Lines of Context:
224
224
    PyModule_AddIntConstant(module, "OP_NETSCAPE_CA_DN_BUG", SSL_OP_NETSCAPE_CA_DN_BUG);
225
225
    PyModule_AddIntConstant(module, "OP_NETSCAPE_DEMO_CIPHER_CHANGE_BUG", SSL_OP_NETSCAPE_DEMO_CIPHER_CHANGE_BUG);
226
226
 
 
227
#ifdef SSL_OP_NO_COMPRESSION
 
228
    PyModule_AddIntConstant(module, "OP_NO_COMPRESSION", SSL_OP_NO_COMPRESSION);
 
229
#endif
 
230
 
227
231
    /* DTLS related options.  The first two of these were introduced in
228
232
     * 2005, the third in 2007.  To accomodate systems which are still using
229
233
     * older versions, make them optional. */
273
277
    /* Straight up version number */
274
278
    PyModule_AddIntConstant(module, "OPENSSL_VERSION_NUMBER", OPENSSL_VERSION_NUMBER);
275
279
 
 
280
    /* SSL modes constants */
 
281
#ifdef SSL_MODE_RELEASE_BUFFERS
 
282
    PyModule_AddIntConstant(module, "MODE_RELEASE_BUFFERS", SSL_MODE_RELEASE_BUFFERS);
 
283
#endif
 
284
 
276
285
    if (!init_ssl_context(module))
277
286
        goto error;
278
287
    if (!init_ssl_connection(module))