packages feed

keystore 0.9.0.0 → 0.9.0.1

raw patch · 8 files changed

+24/−47 lines, 8 filesdep +cryptondep −cryptonitePVP: major bump suggested

API removals or changes: PVP suggests a major version bump

Dependencies added: crypton

Dependencies removed: cryptonite

API changes (from Hackage documentation)

- Data.KeyStore.Types.E: instance Control.Monad.Trans.Error.Error Data.KeyStore.Types.E.Reason
+ Data.KeyStore.Types.AesonCompat: AesonException :: String -> AesonException
+ Data.KeyStore.Types.AesonCompat: newtype AesonException
+ Data.KeyStore.Types.AesonCompat: throwDecode :: (FromJSON a, MonadThrow m) => ByteString -> m a
+ Data.KeyStore.Types.AesonCompat: throwDecode' :: (FromJSON a, MonadThrow m) => ByteString -> m a
+ Data.KeyStore.Types.AesonCompat: throwDecodeStrict :: (FromJSON a, MonadThrow m) => ByteString -> m a
+ Data.KeyStore.Types.AesonCompat: throwDecodeStrict' :: (FromJSON a, MonadThrow m) => ByteString -> m a
- Data.KeyStore.Types.AesonCompat: class GToJSON' enc arity (f :: Type -> Type)
+ Data.KeyStore.Types.AesonCompat: class GToJSON' enc arity (f :: TYPE LiftedRep -> Type)
- Data.KeyStore.Types.AesonCompat: class ToJSON1 (f :: Type -> Type)
+ Data.KeyStore.Types.AesonCompat: class ToJSON1 (f :: TYPE LiftedRep -> TYPE LiftedRep)
- Data.KeyStore.Types.AesonCompat: class ToJSON2 (f :: Type -> Type -> Type)
+ Data.KeyStore.Types.AesonCompat: class ToJSON2 (f :: TYPE LiftedRep -> TYPE LiftedRep -> TYPE LiftedRep)
- Data.KeyStore.Types.E: strMsg :: Error a => String -> a
+ Data.KeyStore.Types.E: strMsg :: String -> Reason

Files

changelog view
@@ -119,3 +119,10 @@   * switch cryptonite in place of older deprecated packages   * upgrade to aeson-2.*   * upgrade to api-tools 0.10.*++0.9.0.1 Chris Dornan <chrisd@irisconnect.co.uk> 2023-10-14++* fix for GHC 9.6+* switch crypton for cryptonite+* upgrade to aeson-2.*+* upgrade to api-tools 0.10.*
keystore.cabal view
@@ -1,5 +1,5 @@ Name:                   keystore-Version:                0.9.0.0+Version:                0.9.0.1 Synopsis:               Managing stores of secret things Homepage:               http://github.com/cdornan/keystore Author:                 Chris Dornan@@ -121,8 +121,6 @@   See the bottom <https://github.com/cdornan/keystore#launch-instructions README>   on GitHub home page for launch instructions for the deploy example. Data-files:-    stack.yaml-    stack-8.10.yaml     examples/deploy/zshenv/.zshrc     examples/deploy/example-pwstore.dat @@ -178,7 +176,7 @@         byteable               >= 0.1               ,         bytestring             >= 0.9               ,         crypto-pubkey-types    >= 0.4.3             ,-        cryptonite             >= 0.30              ,+        crypton                >= 0.32              ,         containers             >= 0.4               ,         directory              >= 1.2               ,         filepath               >= 1.3               ,
src/Data/KeyStore/KS/Crypto.hs view
@@ -72,7 +72,7 @@ import qualified Crypto.Types.PubKey.RSA        as CPT  -- avoiding class with crypto-pubkey-types which we are using for DER generation-import qualified "cryptonite" Crypto.Cipher.Types as CCT+import qualified "crypton" Crypto.Cipher.Types as CCT   sizeAesIV, sizeOAE :: Octets
src/Data/KeyStore/KS/KS.hs view
@@ -48,13 +48,13 @@ import           Data.Typeable import           Data.Time import           Control.Monad.RWS.Strict-import qualified Control.Monad.Error            as E+import qualified Control.Monad.Except           as E import           Control.Exception import           Control.Lens import           Crypto.PubKey.RSA.Types  -newtype KS a = KS { _KS :: E.ErrorT Reason (RWS Ctx [LogEntry] State) a }+newtype KS a = KS { _KS :: E.ExceptT Reason (RWS Ctx [LogEntry] State) a }     deriving (Functor, Applicative, Monad, E.MonadError Reason)  data Ctx@@ -127,7 +127,7 @@ e2ks = either throwKS return  run_ :: Ctx -> State -> KS a -> (E a,State,[LogEntry])-run_ c s p = runRWS (E.runErrorT (_KS p)) c s+run_ c s p = runRWS (E.runExceptT (_KS p)) c s  randomBytes :: Octets -> (B.ByteString->a) -> KS a randomBytes (Octets sz) k = fmap k $ getRandomBytes sz
src/Data/KeyStore/KS/Packet.hs view
@@ -22,7 +22,7 @@ import           Data.Char import           Text.Printf import           Control.Monad.RWS.Strict-import qualified Control.Monad.Error            as E+import qualified Control.Monad.Except           as E   newtype MagicWord = MagicWord B.ByteString@@ -95,7 +95,7 @@  type ShowB = B.ByteString -> B.ByteString -newtype BP a = BP { _BP :: E.ErrorT Reason (RWS () [LogEntry] B.ByteString) a }+newtype BP a = BP { _BP :: E.ExceptT Reason (RWS () [LogEntry] B.ByteString) a }     deriving (Functor, Applicative, Monad, E.MonadError Reason)  e2bp :: E a -> BP a@@ -110,7 +110,7 @@     (e,bs',_) = runBP bs bp  runBP :: B.ByteString -> BP a -> (E a,B.ByteString,[LogEntry])-runBP s p = runRWS (E.runErrorT (_BP p)) () s+runBP s p = runRWS (E.runExceptT (_BP p)) () s  testBP :: B.ByteString -> BP a -> IO a testBP bs p =
src/Data/KeyStore/Types/E.hs view
@@ -3,7 +3,7 @@ module Data.KeyStore.Types.E     ( E     , Reason-    , E.strMsg+    , strMsg     , rsaError     , eWrap     , showReason@@ -11,7 +11,7 @@  import           Crypto.PubKey.RSA import           Data.Typeable-import qualified Control.Monad.Error            as E+import qualified Control.Monad.Except           as E import qualified Control.Exception              as X import           System.IO import           System.Exit@@ -27,9 +27,12 @@  instance X.Exception Reason -instance E.Error Reason where-    noMsg  = R_GEN-    strMsg = R_MSG+-- instance E.Error Reason where+--     noMsg  = R_GEN+--     strMsg = R_MSG++strMsg :: String -> Reason+strMsg = R_MSG  rsaError :: Error -> Reason rsaError = R_RSA
− stack-8.10.yaml
@@ -1,14 +0,0 @@-resolver: lts-18.28--allow-newer: true--packages:-- '.'--flags:-  cryptonite:-    use_target_attributes: false--extra-deps:-- api-tools-0.9.0.0-- pbkdf-1.1.1.1
− stack.yaml
@@ -1,17 +0,0 @@-resolver: nightly-2022-05-31--ghc-options:-    "$locals": -Werror--allow-newer: true--packages:-- '.'--flags:-  cryptonite:-    use_target_attributes: false--extra-deps:-- api-tools-0.10.0.0-- pbkdf-1.1.1.1