~rick-fdd/pyopenssl/rand_bytes

« back to all changes in this revision

Viewing changes to src/ssl/ssl.c

  • Committer: Jean-Paul Calderone
  • Date: 2008-12-29 02:55:56 UTC
  • Revision ID: exarkun@boson-20081229025556-nxsatf2xq93m7lma
Expose some new DTLS-related constants in OpenSSL.SSL - OP_NO_QUERY_MTU, OP_COOKIE_EXCHANGE, and OP_NO_TICKET.

Show diffs side-by-side

added added

removed removed

Lines of Context:
193
193
    PyModule_AddIntConstant(module, "OP_NETSCAPE_CA_DN_BUG", SSL_OP_NETSCAPE_CA_DN_BUG);
194
194
    PyModule_AddIntConstant(module, "OP_NETSCAPE_DEMO_CIPHER_CHANGE_BUG", SSL_OP_NETSCAPE_DEMO_CIPHER_CHANGE_BUG);
195
195
 
196
 
        /* For SSL_set_shutdown */
 
196
    /* DTLS related options */
 
197
    PyModule_AddIntConstant(module, "OP_NO_QUERY_MTU", SSL_OP_NO_QUERY_MTU);
 
198
    PyModule_AddIntConstant(module, "OP_COOKIE_EXCHANGE", SSL_OP_COOKIE_EXCHANGE);
 
199
 
 
200
 
 
201
    /* SSL_OP_NO_TICKET was only added in August 2007.  On the outside
 
202
     * chance anyone still cares about using pyOpenSSL with a version of
 
203
     * OpenSSL as old as that (and that the rest of the codebase is free of
 
204
     * impediments towards that goal), make this optional. */
 
205
#ifdef SSL_OP_NO_TICKET
 
206
    PyModule_AddIntConstant(module, "OP_NO_TICKET", SSL_OP_NO_TICKET);
 
207
#endif
 
208
 
 
209
    /* For SSL_set_shutdown */
197
210
    PyModule_AddIntConstant(module, "SENT_SHUTDOWN", SSL_SENT_SHUTDOWN);
198
211
    PyModule_AddIntConstant(module, "RECEIVED_SHUTDOWN", SSL_RECEIVED_SHUTDOWN);
199
212