Changeset 4718
- Timestamp:
- 24/12/08 14:17:38 (12 years ago)
- Location:
- TI12-security/trunk/python/ndg.security.test/ndg/security/test
- Files:
-
- 44 added
- 5 deleted
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
TI12-security/trunk/python/ndg.security.test/ndg/security/test/__init__.py
r4716 r4718 24 24 '''Convenience base class from which other unit tests can extend. Its 25 25 sets the generic data directory path''' 26 dataDirEnvVarName = 'NDGSEC_UNITTEST_DATA_DIR'26 configDirEnvVarName = 'NDGSEC_UNITTEST_CONFIG_DIR' 27 27 28 28 def setUp(self): 29 if BaseTestCase. dataDirEnvVarName not in os.environ:30 os.environ[BaseTestCase. dataDirEnvVarName] = \29 if BaseTestCase.configDirEnvVarName not in os.environ: 30 os.environ[BaseTestCase.configDirEnvVarName] = \ 31 31 os.path.join(os.path.abspath(os.path.dirname(__file__)), 32 32 'config') 33 33 34 mkDataDirPath = lambda file:jnPath(os.environ[BaseTestCase. dataDirEnvVarName],34 mkDataDirPath = lambda file:jnPath(os.environ[BaseTestCase.configDirEnvVarName], 35 35 file) 36 36 -
TI12-security/trunk/python/ndg.security.test/ndg/security/test/attCert/AttCertTest.py
r4680 r4718 21 21 from ConfigParser import SafeConfigParser 22 22 from ndg.security.common.AttCert import AttCert 23 from ndg.security.test import BaseTestCase 23 24 24 25 xpdVars = os.path.expandvars … … 26 27 mkPath = lambda file: jnPath(os.environ['NDGSEC_ATTCERT_UNITTEST_DIR'], file) 27 28 28 class AttCertTestCase( unittest.TestCase):29 class AttCertTestCase(BaseTestCase): 29 30 30 31 def setUp(self): 32 super(AttCertTestCase, self).setUp() 31 33 32 34 if 'NDGSEC_INT_DEBUG' in os.environ: -
TI12-security/trunk/python/ndg.security.test/ndg/security/test/attCert/ac.xml
r3199 r4718 9 9 <userId>/O=NDG/OU=BADC/CN=pjkershaw</userId> 10 10 <validity> 11 <notBefore>2008 01 10 15 26 32</notBefore>12 <notAfter>2008 01 10 23 26 32</notAfter>11 <notBefore>2008 12 24 13 04 58</notBefore> 12 <notAfter>2008 12 24 21 04 58</notAfter> 13 13 </validity> 14 14 <attributes> … … 27 27 <provenance>original</provenance> 28 28 </acInfo> 29 <ds:Signature><ds:SignedInfo><ds:CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"><ec:InclusiveNamespaces PrefixList="ds"></ec:InclusiveNamespaces></ds:CanonicalizationMethod><ds:SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1"></ds:SignatureMethod><ds:Reference URI=""><ds:Transforms><ds:Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature"></ds:Transform><ds:Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"><ec:InclusiveNamespaces PrefixList="xmlns"></ec:InclusiveNamespaces></ds:Transform></ds:Transforms><ds:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></ds:DigestMethod><ds:DigestValue> srClFxmtD9f6gOox0fewjJ+5VBg=</ds:DigestValue></ds:Reference></ds:SignedInfo><ds:SignatureValue>Djy+IKg94DRZSmzbYD1CIudKzoiOKOVMxOQOF6un5+N1jgormdEUbS0FwiHBgCl2QgF59MuBPNHM30 YtCOyuJX29+mIHlXATcMDZb7i62uXYKsIzBHDkN6wWlVaYlJvGFCmtWpJcSFpKlHigLfeO8GXEEg 31 A8iHfaoj9G/YMvxwL9WrxmrFOOq//kBeCPUyRBhwlmFf6ZRAEP/O/wh9BfBQZ0J99G8WETwpEznI 32 Ui20MJG7jjHmUD4GnK/h7MsajvrH9m48HHp/f9uVaAjGWJHTnDpVWBH4ueBGnsIsiyZHSgUz37pa 33 0FFB01OjNTeuS+OZ/4V/IScIWQrBFcDA6tOVkw==</ds:SignatureValue><ds:KeyInfo><ds:X509Data><ds:X509Certificate>MIICazCCAdSgAwIBAgICAPcwDQYJKoZIhvcNAQEEBQAwLzEMMAoGA1UEChMDTkRH34 MQ0wCwYDVQQLEwRCQURDMRAwDgYDVQQDEwdUZXN0IENBMB4XDTA4M DEwNDEwMTk035 N1oXDTA5MDEwMzEwMTk0N1owLDEMMAoGA1UEChMDTkRHMQ0wCwYDVQQLEwRCQURD29 <ds:Signature><ds:SignedInfo><ds:CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"><ec:InclusiveNamespaces PrefixList="ds"></ec:InclusiveNamespaces></ds:CanonicalizationMethod><ds:SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1"></ds:SignatureMethod><ds:Reference URI=""><ds:Transforms><ds:Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature"></ds:Transform><ds:Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"><ec:InclusiveNamespaces PrefixList="xmlns"></ec:InclusiveNamespaces></ds:Transform></ds:Transforms><ds:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></ds:DigestMethod><ds:DigestValue>esXomhLkAv4tgd3USP9x7KbryTo=</ds:DigestValue></ds:Reference></ds:SignedInfo><ds:SignatureValue>FPXml5l/mvHqBHJFUBhSp3SPu7dJGq9uvwEkjWXCmXbBBp6EE1hzYeCZ/JO0aV6zlmULI1qgP2ix 30 tiXbi6SmXbqsbB08GY5hJ76mxis+9tsg/FMfDB34S6eS+CZDdLh3f1f4KnZ6uYhW5DyMJmsqKBj4 31 af+1eTJmSchLoDnZcpOLBpsL9IqOJWXwbpmDUmGY0Bm5j7iJxXd2tcrhsODS09uisaNnVEaLoOWw 32 h0lwKU4JIeCkhW/wAKum0qGAOnxHuwEz97GchTasxOazqvcwOi0p01M2Q7ls6bu5uiwUWnf9pl2A 33 DmBEWcPeUsdgEd9iJdh1725O0zCRBcNG/26Obg==</ds:SignatureValue><ds:KeyInfo><ds:X509Data><ds:X509Certificate>MIICazCCAdSgAwIBAgICAQEwDQYJKoZIhvcNAQEEBQAwLzEMMAoGA1UEChMDTkRH 34 MQ0wCwYDVQQLEwRCQURDMRAwDgYDVQQDEwdUZXN0IENBMB4XDTA4MTIxNjE1MTE0 35 OFoXDTEzMTIxNTE1MTE0OFowLDEMMAoGA1UEChMDTkRHMQ0wCwYDVQQLEwRCQURD 36 36 MQ0wCwYDVQQDEwR0ZXN0MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA 37 37 rpbuNUHWVRwhjHzhTOdym+fcZdmD7HbaeoFdef2V//Wj41xMieMZy9XQft2dFBDY … … 41 41 B0g11YOBgshZ0SpNwEEyhDzHUt3Ii2XmAh25/II08BR61fhMZvSJ/tVGJY4HfWG7 42 42 B4PZzYwo5vn/tYH1mk7w5QIDAQABoxUwEzARBglghkgBhvhCAQEEBAMCBPAwDQYJ 43 KoZIhvcNAQEEBQADgYEA FKEdr2FwlposAGRDHBMX9d48TKm1gXzOMEvReTYIaq4644 aMpDDuApsbjpRqohvKIrngGa2e1p81tOTL5kbuusNjcNsagXkNgeO6qcGZCly/Bl 45 9Kxfynaned5jmgWgoxJP7VtOynvlLqJfrS/cEwOWDYpyPjJDRx2cZgEd3P4WfYI=</ds:X509Certificate></ds:X509Data></ds:KeyInfo></ds:Signature></attributeCertificate>43 KoZIhvcNAQEEBQADgYEAPC1EgoD9A+9O60P5Us3rDChvR2x2f8uX/7w+3GlNBc0A 44 7UD0ZUEEngUmnvkcm1YTOCwj3EINnvP6S6Alxj6s2X8tLWPUGTLVu2p93X5y7RnY 45 k6isSEoYjzmw/LiayQHzrm/7hNR20TAE/axEW7rS6s7cRy5wVDUV0VNMQQuJcSg=</ds:X509Certificate></ds:X509Data></ds:KeyInfo></ds:Signature></attributeCertificate> -
TI12-security/trunk/python/ndg.security.test/ndg/security/test/attCert/attCertTest.cfg
r4680 r4718 22 22 23 23 [test12IsValid] 24 certFilePathList: $NDGSEC_ ATTCERT_UNITTEST_DIR/ndg-test-ca.crt24 certFilePathList: $NDGSEC_UNITTEST_CONFIG_DIR/ca/ndg-test-ca.crt 25 25 26 26 [test13IsValidStressTest] -
TI12-security/trunk/python/ndg.security.test/ndg/security/test/attributeauthority/test_attributeauthority.cfg
r4717 r4718 9 9 10 10 [DEFAULT] 11 siteBPropFilePath=$NDGSEC_UNITTEST_ DATA_DIR/attributeauthority/siteB/siteBAttAuthority.cfg11 siteBPropFilePath=$NDGSEC_UNITTEST_CONFIG_DIR/attributeauthority/siteB/siteBAttAuthority.cfg 12 12 13 13 [setUp] 14 14 # ! SiteBMapConfig.xml trusted site A aaURI setting must agree with this 15 15 # setting for test6GetMappedAttCert 16 propFilePath=$NDGSEC_UNITTEST_ DATA_DIR/attributeauthority/siteA/siteAAttributeAuthority.cfg16 propFilePath=$NDGSEC_UNITTEST_CONFIG_DIR/attributeauthority/siteA/siteAAttributeAuthority.cfg 17 17 18 18 # For https connections only. !Omit ssl* settings if using http! … … 20 20 # same as peer hostname. 21 21 sslPeerCertCN = AttributeAuthority 22 sslCACertFilePathList = $NDGSEC_UNITTEST_ DATA_DIR/ca/ndg-test-ca.crt22 sslCACertFilePathList = $NDGSEC_UNITTEST_CONFIG_DIR/ca/ndg-test-ca.crt 23 23 24 24 [test02GetTrustedHostInfo] -
TI12-security/trunk/python/ndg.security.test/ndg/security/test/attributeauthorityclient/attAuthorityClientTest.cfg
r4680 r4718 20 20 # same as peer hostname. 21 21 sslPeerCertCN = AttributeAuthority 22 sslCACertFilePathList = $NDGSEC_ AACLNT_UNITTEST_DIR/ca/ndg-test-ca.crt22 sslCACertFilePathList = $NDGSEC_UNITTEST_CONFIG_DIR/ca/ndg-test-ca.crt 23 23 24 24 [test02GetTrustedHostInfo] … … 30 30 31 31 [test06GetAttCert] 32 # If clntcertfilepath is a proxy set this cert as the one that issued the33 # proxy. Comment out if clntcertfilepath is a standard X.509 cert.34 #issuingclntcertfilepath = $NDGSEC_AACLNT_UNITTEST_DIR/user-cert.pem35 36 # Test with no digital signature applied37 #issuingclntcertfilepath = $NDGSEC_AACLNT_UNITTEST_DIR/proxy-cert.pem38 39 32 # Setup for use by test08GetMappedAttCert test 40 33 attCertFilePath = $NDGSEC_AACLNT_UNITTEST_DIR/ac-clnt.xml … … 62 55 # Certificate associated with private key used to sign a message. The sign 63 56 # method will add this to the BinarySecurityToken element of the WSSE header. 64 signingCertFilePath=$NDGSEC_ AACLNT_UNITTEST_DIR/test.crt57 signingCertFilePath=$NDGSEC_UNITTEST_CONFIG_DIR/pki/wsse-clnt.crt 65 58 66 59 # PEM encoded private key file 67 signingPriKeyFilePath=$NDGSEC_ AACLNT_UNITTEST_DIR/test.key60 signingPriKeyFilePath=$NDGSEC_UNITTEST_CONFIG_DIR/pki/wsse-clnt.key 68 61 69 62 # Set the ValueType for the BinarySecurityToken added to the WSSE header for a … … 88 81 89 82 # Provide a space separated list of file paths 90 caCertFilePathList=$NDGSEC_ AACLNT_UNITTEST_DIR/ca/ndg-test-ca.crt83 caCertFilePathList=$NDGSEC_UNITTEST_CONFIG_DIR/ca/ndg-test-ca.crt 91 84
Note: See TracChangeset
for help on using the changeset viewer.