Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
XML Signature Syntax and Processing
http://www.w3.org/TR/2008/REC-xmldsig-core-20080610/ (selected portions)
Synopsis
- module SAML2.XML.Signature.Types
- generateReference :: Reference -> XmlTree -> IO Reference
- data SigningKey
- data PublicKeys = PublicKeys {}
- data SignatureError
- = SignedElementNotFound
- | SignatureNotFoundOrEmpty
- | SignatureParseError String
- | SignatureCanonicalizationError String
- | SignatureVerifyReferenceError String
- | SignatureVerifyBadReferences String
- | SignatureVerifyInputNotReferenced String
- | SignatureVerificationCryptoUnsupported String
- | SignatureVerificationCryptoFailed String
- | SignatureVerificationLegacyFailure (Either String (Maybe Bool))
- signingKeySignatureAlgorithm :: SigningKey -> SignatureAlgorithm
- signBase64 :: SigningKey -> ByteString -> IO ByteString
- verifyBase64 :: PublicKeys -> IdentifiedURI SignatureAlgorithm -> ByteString -> ByteString -> Maybe Bool
- generateSignature :: SigningKey -> SignedInfo -> IO Signature
- verifySignatureUnenvelopedSigs :: PublicKeys -> String -> XmlTree -> IO (Either SignatureError ())
- applyCanonicalization :: CanonicalizationMethod -> Maybe String -> XmlTree -> IO ByteString
- applyTransforms :: Maybe Transforms -> XmlTree -> IO ByteString
Documentation
module SAML2.XML.Signature.Types
data SigningKey Source #
Instances
Show SigningKey Source # | |
Defined in SAML2.XML.Signature showsPrec :: Int -> SigningKey -> ShowS # show :: SigningKey -> String # showList :: [SigningKey] -> ShowS # | |
Eq SigningKey Source # | |
Defined in SAML2.XML.Signature (==) :: SigningKey -> SigningKey -> Bool # (/=) :: SigningKey -> SigningKey -> Bool # |
data PublicKeys Source #
Instances
Monoid PublicKeys Source # | |
Defined in SAML2.XML.Signature mempty :: PublicKeys # mappend :: PublicKeys -> PublicKeys -> PublicKeys # mconcat :: [PublicKeys] -> PublicKeys # | |
Semigroup PublicKeys Source # | |
Defined in SAML2.XML.Signature (<>) :: PublicKeys -> PublicKeys -> PublicKeys # sconcat :: NonEmpty PublicKeys -> PublicKeys # stimes :: Integral b => b -> PublicKeys -> PublicKeys # | |
Show PublicKeys Source # | |
Defined in SAML2.XML.Signature showsPrec :: Int -> PublicKeys -> ShowS # show :: PublicKeys -> String # showList :: [PublicKeys] -> ShowS # | |
Eq PublicKeys Source # | |
Defined in SAML2.XML.Signature (==) :: PublicKeys -> PublicKeys -> Bool # (/=) :: PublicKeys -> PublicKeys -> Bool # |
data SignatureError Source #
Instances
Show SignatureError Source # | |
Defined in SAML2.XML.Signature showsPrec :: Int -> SignatureError -> ShowS # show :: SignatureError -> String # showList :: [SignatureError] -> ShowS # | |
Eq SignatureError Source # | |
Defined in SAML2.XML.Signature (==) :: SignatureError -> SignatureError -> Bool # (/=) :: SignatureError -> SignatureError -> Bool # |
signBase64 :: SigningKey -> ByteString -> IO ByteString Source #
verifyBase64 :: PublicKeys -> IdentifiedURI SignatureAlgorithm -> ByteString -> ByteString -> Maybe Bool Source #
generateSignature :: SigningKey -> SignedInfo -> IO Signature Source #
verifySignatureUnenvelopedSigs :: PublicKeys -> String -> XmlTree -> IO (Either SignatureError ()) Source #
It turns out sometimes we don't get envelopped signatures, but signatures that are
located outside the signed sub-tree. Since verifySiganture
doesn't support this case, if
you encounter it you should fall back to verifySignatureUnenvelopedSigs
.
applyCanonicalization :: CanonicalizationMethod -> Maybe String -> XmlTree -> IO ByteString Source #
applyTransforms :: Maybe Transforms -> XmlTree -> IO ByteString Source #