name:                tcp-streams
version:             0.3.0.0
synopsis:            One stop solution for tcp client and server with tls support.
description:         One stop solution for tcp client and server with tls support.
license:             BSD3
license-file:        LICENSE
author:              winterland1989
maintainer:          winterland1989@gmail.com
-- copyright:           
category:            Network
build-type:          Simple
extra-source-files:     ChangeLog.md
                    ,   README.md
                    ,   test/cert/*.pem
                    ,   test/cert/*.crt
                    ,   test/cert/*.key

data-files:          mozillaCAStore.pem
cabal-version:       >=1.10

flag openssl
  description:  Enable openssl support via @HsOpenSSL@
  default:      True

source-repository head
  type:     git
  location: git://github.com/winterland1989/tcp-streams.git

library
  exposed-modules:      Data.TLSSetting
                    ,   System.IO.Streams.TCP
                    ,   System.IO.Streams.TLS

  if flag(openssl)
    exposed-modules:    Data.OpenSSLSetting
                    ,   System.IO.Streams.OpenSSL

  other-modules:    Paths_tcp_streams
  -- other-extensions:    
  build-depends:        base           >=4.7  && < 5.0
                    ,   network        >=2.3  && < 3.0
                    ,   bytestring     >= 0.10.2.0
                    ,   io-streams     >= 1.2 && < 2.0
                    ,   tls            >= 1.3 && < 2.0
                    ,   data-default-class
                    ,   x509           >= 1.5 && < 2.0
                    ,   x509-system    >= 1.5 && < 2.0
                    ,   x509-store     >= 1.5 && < 2.0
                    ,   pem           

  if flag(openssl)
    build-depends:      HsOpenSSL      >=0.10.3 && <0.12
                    ,   HsOpenSSL-x509-system == 0.1.*

  -- hs-source-dirs:      
  default-language:    Haskell2010
  ghc-options:    -Wall

test-suite testsuite
  type:              exitcode-stdio-1.0
  Hs-source-dirs:    src test
  main-is:           Main.hs
  default-language:  Haskell2010
  ghc-options:    -Wall -threaded
  build-depends:        base
                    ,   io-streams
                    ,   tcp-streams
                    ,   network
                    ,   bytestring
                    ,   HUnit                      >= 1.2      && <2
                    ,   QuickCheck                 >= 2.3.0.2  && <3
                    ,   test-framework             >= 0.6      && <0.9
                    ,   test-framework-hunit       >= 0.2.7    && <0.4
                    ,   test-framework-quickcheck2 >= 0.2.12.1 && <0.4