diff options
author | Benoit Foucher <benoit@zeroc.com> | 2015-04-16 09:37:33 +0200 |
---|---|---|
committer | Benoit Foucher <benoit@zeroc.com> | 2015-04-16 09:37:33 +0200 |
commit | d931421851c73b676a0a5c566780ad940791ad1e (patch) | |
tree | c24d59b82eebc898216673212994ea0b893217d6 /cpp/test/IceSSL/configuration/run.py | |
parent | README updates (diff) | |
download | ice-d931421851c73b676a0a5c566780ad940791ad1e.tar.bz2 ice-d931421851c73b676a0a5c566780ad940791ad1e.tar.xz ice-d931421851c73b676a0a5c566780ad940791ad1e.zip |
New set of certificates for IceSSL/configuration test and various
IceSSL fixes.
- Windows C++ and C# implementation of IceSSL is now a bit less picky
for SUBJECTDN and ISSUERDN
- Windows SChannel implementation now accept PKCS#1 certificates
Diffstat (limited to 'cpp/test/IceSSL/configuration/run.py')
-rwxr-xr-x | cpp/test/IceSSL/configuration/run.py | 25 |
1 files changed, 19 insertions, 6 deletions
diff --git a/cpp/test/IceSSL/configuration/run.py b/cpp/test/IceSSL/configuration/run.py index 39b75511bf6..f959fa7cc1e 100755 --- a/cpp/test/IceSSL/configuration/run.py +++ b/cpp/test/IceSSL/configuration/run.py @@ -23,17 +23,30 @@ import TestUtil certsPath = os.path.abspath(os.path.join(os.getcwd(), "..", "certs")) keychainPath = os.path.abspath(os.path.join(certsPath, "Find.keychain")) +def cleanup(): + if TestUtil.isDarwin(): + os.system("rm -rf %s ../certs/keychain" % keychainPath) + elif TestUtil.isLinux(): + for c in ["cacert1.pem", "cacert2.pem"]: + pem = os.path.join(certsPath, c) + os.system("rm {dir}/`openssl x509 -subject_hash -noout -in {pem}`.0".format(pem=pem, dir=certsPath)) -def keychainCleanup(): - os.system("rm -rf %s ../certs/keychain" % keychainPath) +cleanup() +atexit.register(cleanup) if TestUtil.isDarwin(): - atexit.register(keychainCleanup) - keychainCleanup() os.system("mkdir -p ../certs/keychain") - os.system("security create-keychain -p password %s" % keychainPath) - for cert in ["s_rsa_ca1.pfx", "c_rsa_ca1.pfx"]: + for cert in ["s_rsa_ca1.p12", "c_rsa_ca1.p12"]: os.system("security import %s -f pkcs12 -A -P password -k %s" % (os.path.join(certsPath, cert), keychainPath)) +elif TestUtil.isLinux(): + # + # Create copies of the CA certificates named after the subject + # hash. This is used by the tests to find the CA certificates in + # the IceSSL.DefaultDir + # + for c in ["cacert1.pem", "cacert2.pem"]: + pem = os.path.join(certsPath, c) + os.system("cp {pem} {dir}/`openssl x509 -subject_hash -noout -in {pem}`.0".format(pem=pem, dir=certsPath)) TestUtil.clientServerTest(additionalClientOptions = '"%s"' % os.getcwd()) |