{-# LINE 1 "OpenSSL/SSL/Option.hsc" #-}
{-# LANGUAGE DeriveDataTypeable #-}
module OpenSSL.SSL.Option
( SSLOption(..)
, optionToIntegral
)
where
import Data.Typeable
data SSLOption
=
SSL_OP_MICROSOFT_SESS_ID_BUG
| SSL_OP_NETSCAPE_CHALLENGE_BUG
| SSL_OP_NETSCAPE_REUSE_CIPHER_CHANGE_BUG
| SSL_OP_SSLREF2_REUSE_CERT_TYPE_BUG
| SSL_OP_MICROSOFT_BIG_SSLV3_BUFFER
{-# LINE 29 "OpenSSL/SSL/Option.hsc" #-}
| SSL_OP_SAFARI_ECDHE_ECDSA_BUG
{-# LINE 34 "OpenSSL/SSL/Option.hsc" #-}
| SSL_OP_SSLEAY_080_CLIENT_DH_BUG
| SSL_OP_TLS_D5_BUG
| SSL_OP_TLS_BLOCK_PADDING_BUG
{-# LINE 38 "OpenSSL/SSL/Option.hsc" #-}
| SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS
{-# LINE 44 "OpenSSL/SSL/Option.hsc" #-}
{-# LINE 50 "OpenSSL/SSL/Option.hsc" #-}
| SSL_OP_ALL
{-# LINE 53 "OpenSSL/SSL/Option.hsc" #-}
| SSL_OP_TLS_ROLLBACK_BUG
{-# LINE 66 "OpenSSL/SSL/Option.hsc" #-}
| SSL_OP_SINGLE_DH_USE
| SSL_OP_EPHEMERAL_RSA
{-# LINE 87 "OpenSSL/SSL/Option.hsc" #-}
| SSL_OP_CIPHER_SERVER_PREFERENCE
{-# LINE 96 "OpenSSL/SSL/Option.hsc" #-}
| SSL_OP_PKCS1_CHECK_1
| SSL_OP_PKCS1_CHECK_2
| SSL_OP_NETSCAPE_CA_DN_BUG
| SSL_OP_NETSCAPE_DEMO_CIPHER_CHANGE_BUG
| SSL_OP_NO_SSLv2
| SSL_OP_NO_SSLv3
| SSL_OP_NO_TLSv1
{-# LINE 111 "OpenSSL/SSL/Option.hsc" #-}
| SSL_OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION
{-# LINE 117 "OpenSSL/SSL/Option.hsc" #-}
| SSL_OP_NO_TICKET
{-# LINE 126 "OpenSSL/SSL/Option.hsc" #-}
| SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION
{-# LINE 132 "OpenSSL/SSL/Option.hsc" #-}
{-# LINE 133 "OpenSSL/SSL/Option.hsc" #-}
| SSL_OP_LEGACY_SERVER_CONNECT
{-# LINE 139 "OpenSSL/SSL/Option.hsc" #-}
deriving (Eq, Ord, Show, Typeable)
optionToIntegral :: Integral a => SSLOption -> a
optionToIntegral SSL_OP_MICROSOFT_SESS_ID_BUG = 1
{-# LINE 143 "OpenSSL/SSL/Option.hsc" #-}
optionToIntegral SSL_OP_NETSCAPE_CHALLENGE_BUG = 2
{-# LINE 144 "OpenSSL/SSL/Option.hsc" #-}
optionToIntegral SSL_OP_NETSCAPE_REUSE_CIPHER_CHANGE_BUG = 8
{-# LINE 145 "OpenSSL/SSL/Option.hsc" #-}
optionToIntegral SSL_OP_SSLREF2_REUSE_CERT_TYPE_BUG = 16
{-# LINE 146 "OpenSSL/SSL/Option.hsc" #-}
optionToIntegral SSL_OP_MICROSOFT_BIG_SSLV3_BUFFER = 32
{-# LINE 147 "OpenSSL/SSL/Option.hsc" #-}
{-# LINE 148 "OpenSSL/SSL/Option.hsc" #-}
optionToIntegral SSL_OP_SAFARI_ECDHE_ECDSA_BUG = 64
{-# LINE 149 "OpenSSL/SSL/Option.hsc" #-}
{-# LINE 150 "OpenSSL/SSL/Option.hsc" #-}
optionToIntegral SSL_OP_SSLEAY_080_CLIENT_DH_BUG = 128
{-# LINE 151 "OpenSSL/SSL/Option.hsc" #-}
optionToIntegral SSL_OP_TLS_D5_BUG = 256
{-# LINE 152 "OpenSSL/SSL/Option.hsc" #-}
optionToIntegral SSL_OP_TLS_BLOCK_PADDING_BUG = 512
{-# LINE 153 "OpenSSL/SSL/Option.hsc" #-}
{-# LINE 154 "OpenSSL/SSL/Option.hsc" #-}
optionToIntegral SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS = 2048
{-# LINE 155 "OpenSSL/SSL/Option.hsc" #-}
{-# LINE 156 "OpenSSL/SSL/Option.hsc" #-}
{-# LINE 159 "OpenSSL/SSL/Option.hsc" #-}
optionToIntegral SSL_OP_ALL = 2147486719
{-# LINE 160 "OpenSSL/SSL/Option.hsc" #-}
{-# LINE 161 "OpenSSL/SSL/Option.hsc" #-}
optionToIntegral SSL_OP_TLS_ROLLBACK_BUG = 8388608
{-# LINE 162 "OpenSSL/SSL/Option.hsc" #-}
{-# LINE 163 "OpenSSL/SSL/Option.hsc" #-}
optionToIntegral SSL_OP_SINGLE_DH_USE = 1048576
{-# LINE 164 "OpenSSL/SSL/Option.hsc" #-}
optionToIntegral SSL_OP_EPHEMERAL_RSA = 0
{-# LINE 165 "OpenSSL/SSL/Option.hsc" #-}
{-# LINE 166 "OpenSSL/SSL/Option.hsc" #-}
optionToIntegral SSL_OP_CIPHER_SERVER_PREFERENCE = 4194304
{-# LINE 167 "OpenSSL/SSL/Option.hsc" #-}
{-# LINE 168 "OpenSSL/SSL/Option.hsc" #-}
optionToIntegral SSL_OP_PKCS1_CHECK_1 = 0
{-# LINE 169 "OpenSSL/SSL/Option.hsc" #-}
optionToIntegral SSL_OP_PKCS1_CHECK_2 = 0
{-# LINE 170 "OpenSSL/SSL/Option.hsc" #-}
optionToIntegral SSL_OP_NETSCAPE_CA_DN_BUG = 536870912
{-# LINE 171 "OpenSSL/SSL/Option.hsc" #-}
optionToIntegral SSL_OP_NETSCAPE_DEMO_CIPHER_CHANGE_BUG = 1073741824
{-# LINE 172 "OpenSSL/SSL/Option.hsc" #-}
optionToIntegral SSL_OP_NO_SSLv2 = 16777216
{-# LINE 173 "OpenSSL/SSL/Option.hsc" #-}
optionToIntegral SSL_OP_NO_SSLv3 = 33554432
{-# LINE 174 "OpenSSL/SSL/Option.hsc" #-}
optionToIntegral SSL_OP_NO_TLSv1 = 67108864
{-# LINE 175 "OpenSSL/SSL/Option.hsc" #-}
{-# LINE 176 "OpenSSL/SSL/Option.hsc" #-}
optionToIntegral SSL_OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION = 65536
{-# LINE 177 "OpenSSL/SSL/Option.hsc" #-}
{-# LINE 178 "OpenSSL/SSL/Option.hsc" #-}
optionToIntegral SSL_OP_NO_TICKET = 16384
{-# LINE 179 "OpenSSL/SSL/Option.hsc" #-}
{-# LINE 180 "OpenSSL/SSL/Option.hsc" #-}
optionToIntegral SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION = 262144
{-# LINE 181 "OpenSSL/SSL/Option.hsc" #-}
{-# LINE 182 "OpenSSL/SSL/Option.hsc" #-}
{-# LINE 183 "OpenSSL/SSL/Option.hsc" #-}
optionToIntegral SSL_OP_LEGACY_SERVER_CONNECT = 4
{-# LINE 184 "OpenSSL/SSL/Option.hsc" #-}
{-# LINE 185 "OpenSSL/SSL/Option.hsc" #-}