Expose some new DTLS-related constants in OpenSSL.SSL - OP_NO_QUERY_MTU, OP_COOKIE_EXCHANGE, and OP_NO_TICKET.
diff --git a/src/ssl/ssl.c b/src/ssl/ssl.c
index 1f8cbcc..5ce5689 100644
--- a/src/ssl/ssl.c
+++ b/src/ssl/ssl.c
@@ -193,7 +193,20 @@
PyModule_AddIntConstant(module, "OP_NETSCAPE_CA_DN_BUG", SSL_OP_NETSCAPE_CA_DN_BUG);
PyModule_AddIntConstant(module, "OP_NETSCAPE_DEMO_CIPHER_CHANGE_BUG", SSL_OP_NETSCAPE_DEMO_CIPHER_CHANGE_BUG);
- /* For SSL_set_shutdown */
+ /* DTLS related options */
+ PyModule_AddIntConstant(module, "OP_NO_QUERY_MTU", SSL_OP_NO_QUERY_MTU);
+ PyModule_AddIntConstant(module, "OP_COOKIE_EXCHANGE", SSL_OP_COOKIE_EXCHANGE);
+
+
+ /* SSL_OP_NO_TICKET was only added in August 2007. On the outside
+ * chance anyone still cares about using pyOpenSSL with a version of
+ * OpenSSL as old as that (and that the rest of the codebase is free of
+ * impediments towards that goal), make this optional. */
+#ifdef SSL_OP_NO_TICKET
+ PyModule_AddIntConstant(module, "OP_NO_TICKET", SSL_OP_NO_TICKET);
+#endif
+
+ /* For SSL_set_shutdown */
PyModule_AddIntConstant(module, "SENT_SHUTDOWN", SSL_SENT_SHUTDOWN);
PyModule_AddIntConstant(module, "RECEIVED_SHUTDOWN", SSL_RECEIVED_SHUTDOWN);