Skip to content

Commit f5d250f

Browse files
authored
Merge pull request #4 from scrive/dev-fredrik-crypton-boundaries
relax crypton upper boundary
2 parents df78255 + 6514805 commit f5d250f

4 files changed

Lines changed: 11 additions & 8 deletions

File tree

‎SAML2/Metadata/Metadata.hs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -400,7 +400,7 @@ instance XP.XmlPickler RoleDescriptor where
400400
where
401401
xpAnyURIList = XP.xpWrapEither
402402
( mapM (maybe (Left "invalid anyURI") Right . URI.parseURIReference) . words
403-
, tail . foldr ((.) (' ':) . URI.uriToString id) ""
403+
, drop 1 . foldr ((.) (' ':) . URI.uriToString id) ""
404404
) $ XP.xpTextDT $ XPS.scDT (namespaceURIString ns) "anyURIListType" []
405405

406406
instance DS.Signable RoleDescriptor where

‎SAML2/XML/Signature.hs‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ import GHC.Stack
2828
import Control.Applicative ((<|>))
2929
import Control.Exception (SomeException, handle)
3030
import Control.Monad ((<=<))
31-
import Control.Monad.Except
3231
import Crypto.Number.Serialize (i2ospOf_, os2ip)
3332
import Crypto.Hash (hashlazy, SHA1(..), SHA256(..), SHA512(..), RIPEMD160(..))
3433
import qualified Crypto.PubKey.DSA as DSA
@@ -40,6 +39,7 @@ import qualified Data.ByteString.Base64 as Base64
4039
import qualified Data.ByteString.Lazy as BSL
4140
import qualified Data.List.NonEmpty as NonEmpty
4241
import Data.Either (isRight)
42+
import Data.Maybe (listToMaybe)
4343
import Network.URI (URI(..))
4444
import qualified Text.XML.HXT.Core as HXT
4545
import qualified Text.XML.HXT.DOM.ShowXml as DOM
@@ -72,7 +72,9 @@ applyTransformsXML (Transform (Identified (TransformCanonicalization a)) ins x :
7272
applyTransformsXML (Transform (Identified TransformEnvelopedSignature) Nothing [] : tl) =
7373
-- XXX assumes "this" signature in top-level
7474
applyTransformsXML tl
75-
. head . HXT.runLA (HXT.processChildren $ HXT.processChildren
75+
. maybe (error "applyTransformsXML: EnvelopedSignature transform produced no result") id
76+
. listToMaybe
77+
. HXT.runLA (HXT.processChildren $ HXT.processChildren
7678
$ HXT.neg (isDSElem "Signature"))
7779
applyTransformsXML tl = applyTransformsBytes tl . DOM.xshowBlob . return
7880

‎hsaml2.cabal‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,11 +70,11 @@ library
7070
c-sources:
7171
SAML2/XML/libxml2_stub.c
7272
build-depends:
73-
crypton >=1.0.6 && <1.1,
73+
crypton >=1.1 && <1.2,
7474
crypton-x509,
7575
crypton-asn1-types,
7676
crypton-asn1-encoding,
77-
memory
77+
ram
7878
build-depends:
7979
base >=4.8 && <5,
8080
base64-bytestring,

‎stack.yaml‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
1-
resolver: nightly-2026-01-19
1+
resolver: nightly-2026-06-03
22
packages:
33
- .
44
extra-deps:
5-
- crypton-1.0.6
6-
- crypton-x509-1.8.0
5+
- crypton-1.1.4
6+
- crypton-x509-1.9.1
77
- crypton-asn1-types-0.4.1
88
- crypton-asn1-encoding-0.10.0
99
- crypton-asn1-parse-0.10.0
1010
- invertible-0.2.0.8
1111
- invertible-hxt-0.1
12+
- ram-0.22.0

0 commit comments

Comments
 (0)