Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion SAML2/Metadata/Metadata.hs
Original file line number Diff line number Diff line change
Expand Up @@ -400,7 +400,7 @@ instance XP.XmlPickler RoleDescriptor where
where
xpAnyURIList = XP.xpWrapEither
( mapM (maybe (Left "invalid anyURI") Right . URI.parseURIReference) . words
, tail . foldr ((.) (' ':) . URI.uriToString id) ""
, drop 1 . foldr ((.) (' ':) . URI.uriToString id) ""
) $ XP.xpTextDT $ XPS.scDT (namespaceURIString ns) "anyURIListType" []

instance DS.Signable RoleDescriptor where
Expand Down
6 changes: 4 additions & 2 deletions SAML2/XML/Signature.hs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ import GHC.Stack
import Control.Applicative ((<|>))
import Control.Exception (SomeException, handle)
import Control.Monad ((<=<))
import Control.Monad.Except
import Crypto.Number.Serialize (i2ospOf_, os2ip)
import Crypto.Hash (hashlazy, SHA1(..), SHA256(..), SHA512(..), RIPEMD160(..))
import qualified Crypto.PubKey.DSA as DSA
Expand All @@ -40,6 +39,7 @@ import qualified Data.ByteString.Base64 as Base64
import qualified Data.ByteString.Lazy as BSL
import qualified Data.List.NonEmpty as NonEmpty
import Data.Either (isRight)
import Data.Maybe (listToMaybe)
import Network.URI (URI(..))
import qualified Text.XML.HXT.Core as HXT
import qualified Text.XML.HXT.DOM.ShowXml as DOM
Expand Down Expand Up @@ -72,7 +72,9 @@ applyTransformsXML (Transform (Identified (TransformCanonicalization a)) ins x :
applyTransformsXML (Transform (Identified TransformEnvelopedSignature) Nothing [] : tl) =
-- XXX assumes "this" signature in top-level
applyTransformsXML tl
. head . HXT.runLA (HXT.processChildren $ HXT.processChildren
. maybe (error "applyTransformsXML: EnvelopedSignature transform produced no result") id
. listToMaybe
. HXT.runLA (HXT.processChildren $ HXT.processChildren
$ HXT.neg (isDSElem "Signature"))
applyTransformsXML tl = applyTransformsBytes tl . DOM.xshowBlob . return

Expand Down
4 changes: 2 additions & 2 deletions hsaml2.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,11 @@ library
c-sources:
SAML2/XML/libxml2_stub.c
build-depends:
crypton >=1.0.6 && <1.1,
crypton >=1.1 && <1.2,
crypton-x509,
crypton-asn1-types,
crypton-asn1-encoding,
memory
ram
build-depends:
base >=4.8 && <5,
base64-bytestring,
Expand Down
7 changes: 4 additions & 3 deletions stack.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
resolver: nightly-2026-01-19
resolver: nightly-2026-06-03
packages:
- .
extra-deps:
- crypton-1.0.6
- crypton-x509-1.8.0
- crypton-1.1.4
- crypton-x509-1.9.1
- crypton-asn1-types-0.4.1
- crypton-asn1-encoding-0.10.0
- crypton-asn1-parse-0.10.0
- invertible-0.2.0.8
- invertible-hxt-0.1
- ram-0.22.0
Loading