Browse Source

[mod_openssl] wrap all options in #ifdef

personal/stbuehler/wip
Stefan Bühler 8 years ago
parent
commit
5e30919291
  1. 44
      src/modules/mod_openssl.c

44
src/modules/mod_openssl.c

@ -364,22 +364,42 @@ static gboolean openssl_options_set_string(long *options, GString *s) {
long value;
char positive; /* 0 means option is usually prefixed with "NO_"; otherwise use 1 */
} option_table[] = {
#ifdef SSL_OP_MICROSOFT_SESS_ID_BUG
{S("MICROSOFT_SESS_ID_BUG"), SSL_OP_MICROSOFT_SESS_ID_BUG, 1},
#endif
#ifdef SSL_OP_NETSCAPE_CHALLENGE_BUG
{S("NETSCAPE_CHALLENGE_BUG"), SSL_OP_NETSCAPE_CHALLENGE_BUG, 1},
#endif
#ifdef SSL_OP_LEGACY_SERVER_CONNECT
{S("LEGACY_SERVER_CONNECT"), SSL_OP_LEGACY_SERVER_CONNECT, 1},
#endif
#ifdef SSL_OP_NETSCAPE_REUSE_CIPHER_CHANGE_BUG
{S("NETSCAPE_REUSE_CIPHER_CHANGE_BUG"), SSL_OP_NETSCAPE_REUSE_CIPHER_CHANGE_BUG, 1},
#endif
#ifdef SSL_OP_SSLREF2_REUSE_CERT_TYPE_BUG
{S("SSLREF2_REUSE_CERT_TYPE_BUG"), SSL_OP_SSLREF2_REUSE_CERT_TYPE_BUG, 1},
#endif
#ifdef SSL_OP_MICROSOFT_BIG_SSLV3_BUFFER
{S("MICROSOFT_BIG_SSLV3_BUFFER"), SSL_OP_MICROSOFT_BIG_SSLV3_BUFFER, 1},
#endif
#ifdef SSL_OP_MSIE_SSLV2_RSA_PADDING
{S("MSIE_SSLV2_RSA_PADDING"), SSL_OP_MSIE_SSLV2_RSA_PADDING, 1},
#endif
#ifdef SSL_OP_SSLEAY_080_CLIENT_DH_BUG
{S("SSLEAY_080_CLIENT_DH_BUG"), SSL_OP_SSLEAY_080_CLIENT_DH_BUG, 1},
#endif
#ifdef SSL_OP_TLS_D5_BUG
{S("TLS_D5_BUG"), SSL_OP_TLS_D5_BUG, 1},
#endif
#ifdef SSL_OP_TLS_BLOCK_PADDING_BUG
{S("TLS_BLOCK_PADDING_BUG"), SSL_OP_TLS_BLOCK_PADDING_BUG, 1},
#endif
#ifdef SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS
{S("DONT_INSERT_EMPTY_FRAGMENTS"), SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS, 1},
#endif
#ifdef SSL_OP_ALL
{S("ALL"), SSL_OP_ALL, 1},
#endif
#ifdef SSL_OP_NO_QUERY_MTU
{S("QUERY_MTU"), SSL_OP_NO_QUERY_MTU, 0},
#endif
@ -404,24 +424,44 @@ static gboolean openssl_options_set_string(long *options, GString *s) {
#ifdef SSL_OP_SINGLE_ECDH_USE
{S("SINGLE_ECDH_USE"), SSL_OP_SINGLE_ECDH_USE, 1},
#endif
#ifdef SSL_OP_SINGLE_DH_USE
{S("SINGLE_DH_USE"), SSL_OP_SINGLE_DH_USE, 1},
#endif
#ifdef SSL_OP_EPHEMERAL_RSA
{S("EPHEMERAL_RSA"), SSL_OP_EPHEMERAL_RSA, 1},
#endif
#ifdef SSL_OP_CIPHER_SERVER_PREFERENCE
{S("CIPHER_SERVER_PREFERENCE"), SSL_OP_CIPHER_SERVER_PREFERENCE, 1},
#endif
#ifdef SSL_OP_TLS_ROLLBACK_BUG
{S("TLS_ROLLBACK_BUG"), SSL_OP_TLS_ROLLBACK_BUG, 1},
#endif
#ifdef SSL_OP_NO_SSLv2
{S("SSLv2"), SSL_OP_NO_SSLv2, 0},
#endif
#ifdef SSL_OP_NO_SSLv3
{S("SSLv3"), SSL_OP_NO_SSLv3, 0},
#endif
#ifdef SSL_OP_NO_TLSv1
{S("TLSv1"), SSL_OP_NO_TLSv1, 0},
#endif
#ifdef SSL_OP_PKCS1_CHECK_1
{S("PKCS1_CHECK_1"), SSL_OP_PKCS1_CHECK_1, 1},
#endif
#ifdef SSL_OP_PKCS1_CHECK_2
{S("PKCS1_CHECK_2"), SSL_OP_PKCS1_CHECK_2, 1},
#endif
#ifdef SSL_OP_NETSCAPE_CA_DN_BUG
{S("NETSCAPE_CA_DN_BUG"), SSL_OP_NETSCAPE_CA_DN_BUG, 1},
#endif
#ifdef SSL_OP_NETSCAPE_DEMO_CIPHER_CHANGE_BUG
{S("NETSCAPE_DEMO_CIPHER_CHANGE_BUG"), SSL_OP_NETSCAPE_DEMO_CIPHER_CHANGE_BUG, 1},
#endif
#ifdef SSL_OP_CRYPTOPRO_TLSEXT_BUG
{S("CRYPTOPRO_TLSEXT_BUG"), SSL_OP_CRYPTOPRO_TLSEXT_BUG, 1}
{S("CRYPTOPRO_TLSEXT_BUG"), SSL_OP_CRYPTOPRO_TLSEXT_BUG, 1},
#endif
};
#undef S
};
GString key = *s;
guint i;

Loading…
Cancel
Save