packages feed

jose-0.8.4: jose.cabal

cabal-version:       2.2
name:                jose
version:             0.8.4
synopsis:
  Javascript Object Signing and Encryption and JSON Web Token library
description:
  .
  An implementation of the Javascript Object Signing and Encryption
  (JOSE) and JSON Web Token (JWT; RFC 7519) formats.
  .
  The JSON Web Signature (JWS; RFC 7515) implementation is complete.
  .
  EdDSA signatures (RFC 8037) are supported (Ed25519 only).
  .
  JWK Thumbprint (RFC 7638) is supported (requires /aeson/ >= 0.10).
  .
  JSON Web Encryption (JWE; RFC 7516) is not yet implemented.
  .
  The __ECDSA implementation is vulnerable to timing attacks__ and
  should only be used for verification.

homepage:            https://github.com/frasertweedale/hs-jose
bug-reports:         https://github.com/frasertweedale/hs-jose/issues
license:             Apache-2.0
license-file:        LICENSE
extra-source-files:
  README.md
author:              Fraser Tweedale
maintainer:          frase@frase.id.au
copyright:           Copyright (C) 2013-2018  Fraser Tweedale
category:            Cryptography
build-type:          Simple
tested-with:
  GHC==7.10.3, GHC==8.0.2, GHC==8.2.2, GHC==8.4.4, GHC==8.6.5, GHC==8.8.4, GHC==8.10.2

flag demos
  description: Build demonstration programs
  default: False

common common
  default-language: Haskell2010
  ghc-options:    -Wall

  build-depends:
    base >= 4.8 && < 5
    , aeson >= 0.8.0.1
    , bytestring == 0.10.*
    , lens >= 4.16
    , mtl >= 2
    , text >= 1.1
  if impl(ghc < 8.0)
    build-depends:
      semigroups >= 0.15

library
  import: common

  exposed-modules:
    Crypto.JOSE
    Crypto.JOSE.Compact
    Crypto.JOSE.Error
    Crypto.JOSE.Header
    Crypto.JOSE.JWE
    Crypto.JOSE.JWK
    Crypto.JOSE.JWK.Store
    Crypto.JOSE.JWS
    Crypto.JOSE.Types
    Crypto.JWT
    Crypto.JOSE.AESKW
    Crypto.JOSE.JWA.JWK
    Crypto.JOSE.JWA.JWS
    Crypto.JOSE.JWA.JWE
    Crypto.JOSE.JWA.JWE.Alg

  other-modules:
    Crypto.JOSE.TH
    Crypto.JOSE.Types.Internal
    Crypto.JOSE.Types.Orphans

  build-depends:
    attoparsec
    , base64-bytestring >= 1.1 && < 1.3
    , concise >= 0.1
    , containers >= 0.5
    , cryptonite >= 0.7
    , memory >= 0.7
    , monad-time >= 0.1
    , template-haskell >= 2.4
    , safe >= 0.3
    , unordered-containers == 0.2.*
    , time >= 1.5
    , network-uri >= 2.6
    , QuickCheck >= 2
    , quickcheck-instances
    , x509 >= 1.4
    , vector

  if impl(ghc<8)
    build-depends: fail

  hs-source-dirs: src

source-repository head
  type: git
  location: https://github.com/frasertweedale/hs-jose.git

test-suite tests
  import: common
  type:           exitcode-stdio-1.0
  hs-source-dirs: test
  main-is:        Test.hs
  other-modules:
    AESKW
    Examples
    JWK
    JWS
    JWT
    Properties
    Types

  build-depends:
    attoparsec
    , base64-bytestring
    , containers
    , cryptonite
    , memory
    , monad-time
    , template-haskell
    , safe
    , unordered-containers
    , time
    , network-uri
    , vector
    , x509
    , pem

    , concise
    , jose

    , tasty
    , tasty-hspec >= 1.0
    , tasty-quickcheck
    , hspec
    , QuickCheck
    , quickcheck-instances

executable jose-example
  import: common
  if !flag(demos)
    buildable: False
  hs-source-dirs: example
  main-is:  Main.hs
  other-modules:
    KeyDB
    JWS

  build-depends:
    unix
    , jose