packages feed

glirc 2.34 → 2.35

raw patch · 5 files changed

+29/−13 lines, 5 filesdep ~hookupdep ~lensdep ~vtyPVP ok

version bump matches the API change (PVP)

Dependency ranges changed: hookup, lens, vty

API changes (from Hackage documentation)

- Client.State.EditBox: class HasLine c_a18Ql
+ Client.State.EditBox: class HasLine c_a193H
- Client.State.EditBox: line :: HasLine c_a18Ql => Lens' c_a18Ql Line
+ Client.State.EditBox: line :: HasLine c_a193H => Lens' c_a193H Line
- Client.State.EditBox: pos :: HasLine c_a18Ql => Lens' c_a18Ql Int
+ Client.State.EditBox: pos :: HasLine c_a193H => Lens' c_a193H Int
- Client.State.EditBox: text :: HasLine c_a18Ql => Lens' c_a18Ql String
+ Client.State.EditBox: text :: HasLine c_a193H => Lens' c_a193H String
- Client.State.EditBox.Content: class HasLine c_a18Ql
+ Client.State.EditBox.Content: class HasLine c_a193H
- Client.State.EditBox.Content: line :: HasLine c_a18Ql => Lens' c_a18Ql Line
+ Client.State.EditBox.Content: line :: HasLine c_a193H => Lens' c_a193H Line
- Client.State.EditBox.Content: pos :: HasLine c_a18Ql => Lens' c_a18Ql Int
+ Client.State.EditBox.Content: pos :: HasLine c_a193H => Lens' c_a193H Int
- Client.State.EditBox.Content: text :: HasLine c_a18Ql => Lens' c_a18Ql String
+ Client.State.EditBox.Content: text :: HasLine c_a193H => Lens' c_a193H String

Files

ChangeLog.md view
@@ -1,5 +1,8 @@ # Revision history for glirc2 +## 2.35+* Added client certificate information to `/cert`+ ## 2.34  * Add `/dump` command
glirc.cabal view
@@ -1,6 +1,6 @@ cabal-version:       2.2 name:                glirc-version:             2.34+version:             2.35 synopsis:            Console IRC client description:         Console IRC client                      .@@ -24,7 +24,7 @@ custom-setup   setup-depends: base     >=4.12 && <4.14,                  filepath >=1.4  && <1.5,-                 Cabal    >=2.2  && <4,+                 Cabal    >=2.2  && <4  source-repository head   type: git@@ -151,14 +151,14 @@                        free                 >=4.12   && <5.2,                        gitrev               >=1.2    && <1.4,                        hashable             >=1.2.4  && <1.4,-                       hookup               >=0.2.3  && <0.4,+                       hookup               >=0.3.1  && <0.4,                        irc-core             >=2.7.1  && <2.8,                        kan-extensions       >=5.0    && <5.3,-                       lens                 >=4.14   && <4.19,+                       lens                 >=4.14   && <4.20,                        network              >=2.6.2  && <3.2,                        process              >=1.4.2  && <1.7,                        psqueues             >=0.2.7  && <0.3,-                       regex-tdfa           >=1.3    && <1.4,+                       regex-tdfa           >=1.3.1  && <1.4,                        semigroupoids        >=5.1    && <5.4,                        split                >=0.2    && <0.3,                        stm                  >=2.4    && <2.6,@@ -169,7 +169,7 @@                        unix                 >=2.7    && <2.8,                        unordered-containers >=0.2.7  && <0.3,                        vector               >=0.11   && <0.13,-                       vty                  >=5.23.1 && <5.27,+                       vty                  >=5.23.1 && <5.28  test-suite test   type:                exitcode-stdio-1.0
src/Client/EventLoop.hs view
@@ -364,7 +364,8 @@             let upd Nothing = Just $! view clientFocus st                 upd x       = x             in return $! Just $! over clientActivityReturn upd out-        | otherwise = return (Just out)+        | otherwise = return $! Just+                     $! set clientActivityReturn Nothing out        changeEditor  f = continue (over clientTextBox f st)       changeContent f = changeEditor
src/Client/EventLoop/Actions.hs view
@@ -258,6 +258,8 @@         "Delete"    -> pure KDel         "Left"      -> pure KLeft         "Right"     -> pure KRight+        "Up"        -> pure KUp+        "Down"      -> pure KDown         [c]         -> pure (KChar c)         'F':xs      -> KFun <$> liftMaybe (readMaybe xs)         'C':'-':xs  -> modifier MCtrl  *> go xs@@ -293,4 +295,6 @@ prettyKey KBS       = "Backspace" prettyKey KLeft     = "Left" prettyKey KRight    = "Right"+prettyKey KUp       = "Up"+prettyKey KDown     = "Down" prettyKey k         = show k
src/Client/Network/Async.hs view
@@ -53,7 +53,7 @@ import qualified Data.Text as Text import           Data.Word (Word8) import           Numeric (showHex)-import           OpenSSL.X509 (printX509)+import           OpenSSL.X509 (X509, printX509)   -- | Handle for a network connection@@ -202,12 +202,20 @@ reportNetworkOpen :: Connection -> TQueue NetworkEvent -> IO () reportNetworkOpen h inQueue =   do now <- getZonedTime-     mbX509 <- getPeerCertificate h-     txts <- case mbX509 of-               Nothing -> return []-               Just x509 -> do str <- printX509 x509-                               return $! reverse (Text.lines (Text.pack str))+     mbServer <- getPeerCertificate h+     let mbClient = getClientCertificate h+     cTxts <- certText "Server" mbServer+     sTxts <- certText "Client" mbClient+     let txts = cTxts ++ sTxts      atomically (writeTQueue inQueue (NetworkOpen now txts))++certText :: String -> Maybe X509 -> IO [Text]+certText label mbX509 =+  case mbX509 of+    Nothing -> pure []+    Just x509 ->+      do str <- printX509 x509+         return $! reverse (Text.lines (Text.pack ("<<" ++ label ++ ">>\n" ++ str)))  formatDigest :: ByteString -> String formatDigest