| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
SAML2.XML.Signature
Description
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 #
Constructors
| SigningKeyDSA KeyPair | |
| SigningKeyRSA KeyPair |
Instances
| Show SigningKey Source # | |
Defined in SAML2.XML.Signature Methods showsPrec :: Int -> SigningKey -> ShowS # show :: SigningKey -> String # showList :: [SigningKey] -> ShowS # | |
| Eq SigningKey Source # | |
Defined in SAML2.XML.Signature | |
data PublicKeys Source #
Constructors
| PublicKeys | |
Fields | |
Instances
| Monoid PublicKeys Source # | |
Defined in SAML2.XML.Signature Methods mempty :: PublicKeys # mappend :: PublicKeys -> PublicKeys -> PublicKeys # mconcat :: [PublicKeys] -> PublicKeys # | |
| Semigroup PublicKeys Source # | |
Defined in SAML2.XML.Signature Methods (<>) :: PublicKeys -> PublicKeys -> PublicKeys # sconcat :: NonEmpty PublicKeys -> PublicKeys # stimes :: Integral b => b -> PublicKeys -> PublicKeys # | |
| Show PublicKeys Source # | |
Defined in SAML2.XML.Signature Methods showsPrec :: Int -> PublicKeys -> ShowS # show :: PublicKeys -> String # showList :: [PublicKeys] -> ShowS # | |
| Eq PublicKeys Source # | |
Defined in SAML2.XML.Signature | |
data SignatureError Source #
Constructors
Instances
| Show SignatureError Source # | |
Defined in SAML2.XML.Signature Methods showsPrec :: Int -> SignatureError -> ShowS # show :: SignatureError -> String # showList :: [SignatureError] -> ShowS # | |
| Eq SignatureError Source # | |
Defined in SAML2.XML.Signature Methods (==) :: 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 #