Skip to content

Commit 7ea8880

Browse files
author
Bogdan Despotov
committed
Adding test to expose issue with validating XML signature due to encoding issues
1 parent 7368a49 commit 7ea8880

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

tests/test_30_mdstore.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,13 @@
77
from future.backports.urllib.parse import quote_plus
88

99
from saml2.config import Config
10-
from saml2.mdstore import MetadataStore
10+
from saml2.mdstore import MetadataStore, MetaDataExtern
1111
from saml2.mdstore import MetaDataMDX
1212
from saml2.mdstore import SAML_METADATA_CONTENT_TYPE
1313
from saml2.mdstore import destinations
1414
from saml2.mdstore import name
1515
from saml2 import sigver
16+
from saml2.httpbase import HTTPBase
1617
from saml2 import BINDING_SOAP
1718
from saml2 import BINDING_HTTP_REDIRECT
1819
from saml2 import BINDING_HTTP_POST
@@ -385,6 +386,14 @@ def test_load_local():
385386
assert cfg
386387

387388

389+
def test_load_remote_encoding():
390+
crypto = sigver._get_xmlsec_cryptobackend()
391+
sc = sigver.SecurityContext(crypto, key_type="", cert_type="")
392+
httpc = HTTPBase()
393+
mds = MetaDataExtern(ATTRCONV, 'http://metadata.aai.switch.ch/metadata.aaitest.xml', sc, '/tmp/SWITCHaaiRootCA.crt.pem', httpc)
394+
mds.load()
395+
396+
388397
def test_load_string():
389398
sec_config.xmlsec_binary = sigver.get_xmlsec_binary(["/opt/local/bin"])
390399
mds = MetadataStore(ATTRCONV, sec_config,

0 commit comments

Comments
 (0)