diff --git a/tests/test_42_enc.py b/tests/test_42_enc.py index e9242eb..87126b5 100644 --- a/tests/test_42_enc.py +++ b/tests/test_42_enc.py @@ -4,6 +4,7 @@ from saml2.sigver import pre_encryption_part, ASSERT_XPATH, EncryptError from saml2.sigver import CryptoBackendXmlSec1 from saml2.sigver import pre_encrypt_assertion from pathutils import xmlsec_path +from pathutils import full_path __author__ = 'roland' @@ -65,7 +66,7 @@ def test_enc1(): # data_file.close() key_type = "des-192" - com_list = [xmlsec_path, "encrypt", "--pubkey-cert-pem", "pubkey.pem", + com_list = [xmlsec_path, "encrypt", "--pubkey-cert-pem", full_path("pubkey.pem"), "--session-key", key_type, "--xml-data", data, "--node-xpath", ASSERT_XPATH] @@ -89,7 +90,7 @@ def test_enc2(): IDENTITY, "id12", "http://lingon.catalogix.se:8087/", "urn:mace:example.com:saml:roland:sp", name_id=name_id) - enc_resp = crypto.encrypt_assertion(resp_, "pubkey.pem", + enc_resp = crypto.encrypt_assertion(resp_, full_path("pubkey.pem"), pre_encryption_part()) print enc_resp diff --git a/tests/test_82_pefim.py b/tests/test_82_pefim.py index a580f27..cc82551 100644 --- a/tests/test_82_pefim.py +++ b/tests/test_82_pefim.py @@ -9,6 +9,7 @@ from saml2.extension.pefim import SPCertEnc from saml2.samlp import Extensions from saml2.samlp import authn_request_from_string from saml2.sigver import read_cert_from_file +from pathutils import full_path __author__ = 'roland' @@ -17,7 +18,7 @@ conf.load_file("server_conf") client = Saml2Client(conf) # place a certificate in an authn request -cert = read_cert_from_file("test.pem", "pem") +cert = read_cert_from_file(full_path("test.pem"), "pem") spcertenc = SPCertEnc( x509_data=ds.X509Data(