From e787d0855b51a47f10547d0346faa7fe6def5064 Mon Sep 17 00:00:00 2001 From: Jose Date: Tue, 21 Oct 2014 11:33:27 +0200 Subject: OS X 10.10 SSL configuration fixes --- cpp/test/IceSSL/configuration/run.py | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) (limited to 'cpp/test/IceSSL/configuration/run.py') diff --git a/cpp/test/IceSSL/configuration/run.py b/cpp/test/IceSSL/configuration/run.py index 44891d3bbe6..61da2e86b04 100755 --- a/cpp/test/IceSSL/configuration/run.py +++ b/cpp/test/IceSSL/configuration/run.py @@ -8,7 +8,7 @@ # # ********************************************************************** -import os, sys +import os, sys, atexit path = [ ".", "..", "../..", "../../..", "../../../.." ] head = os.path.dirname(sys.argv[0]) @@ -23,20 +23,17 @@ import TestUtil certsPath = os.path.abspath(os.path.join(os.getcwd(), "..", "certs")) keychainPath = os.path.abspath(os.path.join(certsPath, "Find.keychain")) + +def keychainCleanup(): + os.system("rm -rf %s ../certs/keychain" % keychainPath) + +atexit.register(keychainCleanup) if TestUtil.isDarwin(): - try: - os.remove(keychainPath) - except OSError: - pass + 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"]: os.system("security import %s -f pkcs12 -A -P password -k %s" % (os.path.join(certsPath, cert), keychainPath)) TestUtil.clientServerTest(additionalClientOptions = '"%s"' % os.getcwd()) - -if TestUtil.isDarwin(): - try: - os.remove(keychainPath) - except OSError: - pass -- cgit v1.2.3