diff options
| author | Jean-Paul Calderone <exarkun@boson> | 2008-12-28 22:30:56 -0500 |
|---|---|---|
| committer | Jean-Paul Calderone <exarkun@boson> | 2008-12-28 22:30:56 -0500 |
| commit | b43c391d69c6cb42fa55f191f3d6c4d2b3ba6b76 (patch) | |
| tree | 0386ad08a3e5deced4d8e31605eb19ea63358427 /src | |
| parent | 327d8f974d74ef764328cef800d98b1a10260cbc (diff) | |
| download | pyopenssl-b43c391d69c6cb42fa55f191f3d6c4d2b3ba6b76.tar.gz | |
Make all the DTLS constants optional, since one of the buildslaves has a really old version of openssl
Diffstat (limited to 'src')
| -rw-r--r-- | src/ssl/ssl.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/ssl/ssl.c b/src/ssl/ssl.c index 5ce5689..f1c51aa 100644 --- a/src/ssl/ssl.c +++ b/src/ssl/ssl.c @@ -193,15 +193,15 @@ do { \ 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); - /* DTLS related options */ + /* DTLS related options. The first two of these were introduced in + * 2005, the third in 2007. To accomodate systems which are still using + * older versions, make them optional. */ +#ifdef SSL_OP_NO_QUERY_MTU PyModule_AddIntConstant(module, "OP_NO_QUERY_MTU", SSL_OP_NO_QUERY_MTU); +#endif +#ifdef SSL_OP_COOKIE_EXCHANGE 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. */ +#endif #ifdef SSL_OP_NO_TICKET PyModule_AddIntConstant(module, "OP_NO_TICKET", SSL_OP_NO_TICKET); #endif |
