ticket48194_test.py 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456
  1. # --- BEGIN COPYRIGHT BLOCK ---
  2. # Copyright (C) 2016 Red Hat, Inc.
  3. # All rights reserved.
  4. #
  5. # License: GPL (version 3 or any later version).
  6. # See LICENSE for details.
  7. # --- END COPYRIGHT BLOCK ---
  8. #
  9. import logging
  10. import subprocess
  11. import time
  12. import ldap
  13. import pytest
  14. from lib389 import Entry
  15. from lib389._constants import *
  16. from lib389.topologies import topology_st
  17. log = logging.getLogger(__name__)
  18. CONFIG_DN = 'cn=config'
  19. ENCRYPTION_DN = 'cn=encryption,%s' % CONFIG_DN
  20. RSA = 'RSA'
  21. RSA_DN = 'cn=%s,%s' % (RSA, ENCRYPTION_DN)
  22. LDAPSPORT = str(DEFAULT_SECURE_PORT)
  23. SERVERCERT = 'Server-Cert'
  24. plus_all_ecount = 0
  25. plus_all_dcount = 0
  26. plus_all_ecount_noweak = 0
  27. plus_all_dcount_noweak = 0
  28. def _header(topology_st, label):
  29. topology_st.standalone.log.info("\n\n###############################################")
  30. topology_st.standalone.log.info("####### %s" % label)
  31. topology_st.standalone.log.info("###############################################")
  32. def test_init(topology_st):
  33. """
  34. Generate self signed cert and import it to the DS cert db.
  35. Enable SSL
  36. """
  37. _header(topology_st, 'Testing Ticket 48194 - harden the list of ciphers available by default')
  38. conf_dir = topology_st.standalone.confdir
  39. log.info("\n######################### Checking existing certs ######################\n")
  40. os.system('certutil -L -d %s -n "CA certificate"' % conf_dir)
  41. os.system('certutil -L -d %s -n "%s"' % (conf_dir, SERVERCERT))
  42. log.info("\n######################### Create a password file ######################\n")
  43. pwdfile = '%s/pwdfile.txt' % (conf_dir)
  44. opasswd = os.popen("(ps -ef ; w ) | sha1sum | awk '{print $1}'", "r")
  45. passwd = opasswd.readline()
  46. pwdfd = open(pwdfile, "w")
  47. pwdfd.write(passwd)
  48. pwdfd.close()
  49. log.info("\n######################### Create a noise file ######################\n")
  50. noisefile = '%s/noise.txt' % (conf_dir)
  51. noise = os.popen("(w ; ps -ef ; date ) | sha1sum | awk '{print $1}'", "r")
  52. noisewdfd = open(noisefile, "w")
  53. noisewdfd.write(noise.readline())
  54. noisewdfd.close()
  55. time.sleep(1)
  56. log.info("\n######################### Create key3.db and cert8.db database ######################\n")
  57. os.system("ls %s" % pwdfile)
  58. os.system("cat %s" % pwdfile)
  59. os.system('certutil -N -d %s -f %s' % (conf_dir, pwdfile))
  60. log.info("\n######################### Creating encryption key for CA ######################\n")
  61. os.system('certutil -G -d %s -z %s -f %s' % (conf_dir, noisefile, pwdfile))
  62. log.info("\n######################### Creating self-signed CA certificate ######################\n")
  63. os.system(
  64. '( echo y ; echo ; echo y ) | certutil -S -n "CA certificate" -s "cn=CAcert" -x -t "CT,," -m 1000 -v 120 -d %s -z %s -f %s -2' %
  65. (conf_dir, noisefile, pwdfile))
  66. log.info("\n######################### Exporting the CA certificate to cacert.asc ######################\n")
  67. cafile = '%s/cacert.asc' % conf_dir
  68. catxt = os.popen('certutil -L -d %s -n "CA certificate" -a' % conf_dir)
  69. cafd = open(cafile, "w")
  70. while True:
  71. line = catxt.readline()
  72. if (line == ''):
  73. break
  74. cafd.write(line)
  75. cafd.close()
  76. log.info("\n######################### Generate the server certificate ######################\n")
  77. ohostname = os.popen('hostname --fqdn', "r")
  78. myhostname = ohostname.readline()
  79. os.system(
  80. 'certutil -S -n "%s" -s "cn=%s,ou=389 Directory Server" -c "CA certificate" -t "u,u,u" -m 1001 -v 120 -d %s -z %s -f %s' %
  81. (SERVERCERT, myhostname.rstrip(), conf_dir, noisefile, pwdfile))
  82. log.info("\n######################### create the pin file ######################\n")
  83. pinfile = '%s/pin.txt' % (conf_dir)
  84. pintxt = 'Internal (Software) Token:%s' % passwd
  85. pinfd = open(pinfile, "w")
  86. pinfd.write(pintxt)
  87. pinfd.close()
  88. time.sleep(1)
  89. log.info("\n######################### enable SSL in the directory server with all ciphers ######################\n")
  90. topology_st.standalone.simple_bind_s(DN_DM, PASSWORD)
  91. topology_st.standalone.modify_s(ENCRYPTION_DN, [(ldap.MOD_REPLACE, 'nsSSL3', 'off'),
  92. (ldap.MOD_REPLACE, 'nsTLS1', 'on'),
  93. (ldap.MOD_REPLACE, 'nsSSLClientAuth', 'allowed'),
  94. (ldap.MOD_REPLACE, 'allowWeakCipher', 'on'),
  95. (ldap.MOD_REPLACE, 'nsSSL3Ciphers', '+all')])
  96. topology_st.standalone.modify_s(CONFIG_DN, [(ldap.MOD_REPLACE, 'nsslapd-security', 'on'),
  97. (ldap.MOD_REPLACE, 'nsslapd-ssl-check-hostname', 'off'),
  98. (ldap.MOD_REPLACE, 'nsslapd-secureport', LDAPSPORT)])
  99. topology_st.standalone.add_s(Entry((RSA_DN, {'objectclass': "top nsEncryptionModule".split(),
  100. 'cn': RSA,
  101. 'nsSSLPersonalitySSL': SERVERCERT,
  102. 'nsSSLToken': 'internal (software)',
  103. 'nsSSLActivation': 'on'})))
  104. def connectWithOpenssl(topology_st, cipher, expect):
  105. """
  106. Connect with the given cipher
  107. Condition:
  108. If expect is True, the handshake should be successful.
  109. If expect is False, the handshake should be refused with
  110. access log: "Cannot communicate securely with peer:
  111. no common encryption algorithm(s)."
  112. """
  113. log.info("Testing %s -- expect to handshake %s", cipher, "successfully" if expect else "failed")
  114. myurl = 'localhost:%s' % LDAPSPORT
  115. cmdline = ['/usr/bin/openssl', 's_client', '-connect', myurl, '-cipher', cipher]
  116. strcmdline = '/usr/bin/openssl s_client -connect localhost:%s -cipher %s' % (LDAPSPORT, cipher)
  117. log.info("Running cmdline: %s", strcmdline)
  118. try:
  119. proc = subprocess.Popen(cmdline, stdout=subprocess.PIPE, stdin=subprocess.PIPE, stderr=subprocess.STDOUT)
  120. except ValueError:
  121. log.info("%s failed: %s", cmdline, ValueError)
  122. proc.kill()
  123. while True:
  124. l = proc.stdout.readline()
  125. if l == "":
  126. break
  127. if 'Cipher is' in l:
  128. log.info("Found: %s", l)
  129. if expect:
  130. if '(NONE)' in l:
  131. assert False
  132. else:
  133. proc.stdin.close()
  134. assert True
  135. else:
  136. if '(NONE)' in l:
  137. assert True
  138. else:
  139. proc.stdin.close()
  140. assert False
  141. def test_run_0(topology_st):
  142. """
  143. Check nsSSL3Ciphers: +all
  144. All ciphers are enabled except null.
  145. Note: allowWeakCipher: on
  146. """
  147. _header(topology_st, 'Test Case 1 - Check the ciphers availability for "+all"; allowWeakCipher: on')
  148. topology_st.standalone.simple_bind_s(DN_DM, PASSWORD)
  149. topology_st.standalone.modify_s(CONFIG_DN, [(ldap.MOD_REPLACE, 'nsslapd-errorlog-level', '64')])
  150. log.info("\n######################### Restarting the server ######################\n")
  151. topology_st.standalone.restart(timeout=120)
  152. connectWithOpenssl(topology_st, 'RC4-SHA', True)
  153. connectWithOpenssl(topology_st, 'AES256-SHA256', True)
  154. def test_run_1(topology_st):
  155. """
  156. Check nsSSL3Ciphers: +all
  157. All ciphers are enabled except null.
  158. Note: default allowWeakCipher (i.e., off) for +all
  159. """
  160. _header(topology_st, 'Test Case 2 - Check the ciphers availability for "+all" with default allowWeakCiphers')
  161. topology_st.standalone.simple_bind_s(DN_DM, PASSWORD)
  162. topology_st.standalone.modify_s(CONFIG_DN, [(ldap.MOD_REPLACE, 'nsslapd-errorlog-level', '64')])
  163. # Make sure allowWeakCipher is not set.
  164. topology_st.standalone.modify_s(ENCRYPTION_DN, [(ldap.MOD_DELETE, 'allowWeakCipher', None)])
  165. log.info("\n######################### Restarting the server ######################\n")
  166. topology_st.standalone.stop(timeout=10)
  167. os.system('mv %s %s.48194_0' % (topology_st.standalone.errlog, topology_st.standalone.errlog))
  168. os.system('touch %s' % (topology_st.standalone.errlog))
  169. time.sleep(2)
  170. topology_st.standalone.start(timeout=120)
  171. connectWithOpenssl(topology_st, 'RC4-SHA', False)
  172. connectWithOpenssl(topology_st, 'AES256-SHA256', True)
  173. def test_run_2(topology_st):
  174. """
  175. Check nsSSL3Ciphers: +rsa_aes_128_sha,+rsa_aes_256_sha
  176. rsa_aes_128_sha, tls_rsa_aes_128_sha, rsa_aes_256_sha, tls_rsa_aes_256_sha are enabled.
  177. default allowWeakCipher
  178. """
  179. _header(topology_st,
  180. 'Test Case 3 - Check the ciphers availability for "+rsa_aes_128_sha,+rsa_aes_256_sha" with default allowWeakCipher')
  181. topology_st.standalone.simple_bind_s(DN_DM, PASSWORD)
  182. topology_st.standalone.modify_s(ENCRYPTION_DN,
  183. [(ldap.MOD_REPLACE, 'nsSSL3Ciphers', '+rsa_aes_128_sha,+rsa_aes_256_sha')])
  184. log.info("\n######################### Restarting the server ######################\n")
  185. topology_st.standalone.stop(timeout=10)
  186. os.system('mv %s %s.48194_1' % (topology_st.standalone.errlog, topology_st.standalone.errlog))
  187. os.system('touch %s' % (topology_st.standalone.errlog))
  188. time.sleep(2)
  189. topology_st.standalone.start(timeout=120)
  190. connectWithOpenssl(topology_st, 'RC4-SHA', False)
  191. connectWithOpenssl(topology_st, 'AES256-SHA256', False)
  192. connectWithOpenssl(topology_st, 'AES128-SHA', True)
  193. connectWithOpenssl(topology_st, 'AES256-SHA', True)
  194. def test_run_3(topology_st):
  195. """
  196. Check nsSSL3Ciphers: -all
  197. All ciphers are disabled.
  198. default allowWeakCipher
  199. """
  200. _header(topology_st, 'Test Case 4 - Check the ciphers availability for "-all"')
  201. topology_st.standalone.simple_bind_s(DN_DM, PASSWORD)
  202. topology_st.standalone.modify_s(ENCRYPTION_DN, [(ldap.MOD_REPLACE, 'nsSSL3Ciphers', '-all')])
  203. log.info("\n######################### Restarting the server ######################\n")
  204. topology_st.standalone.stop(timeout=10)
  205. os.system('mv %s %s.48194_2' % (topology_st.standalone.errlog, topology_st.standalone.errlog))
  206. os.system('touch %s' % (topology_st.standalone.errlog))
  207. time.sleep(1)
  208. topology_st.standalone.start(timeout=120)
  209. connectWithOpenssl(topology_st, 'RC4-SHA', False)
  210. connectWithOpenssl(topology_st, 'AES256-SHA256', False)
  211. def test_run_4(topology_st):
  212. """
  213. Check no nsSSL3Ciphers
  214. Default ciphers are enabled.
  215. default allowWeakCipher
  216. """
  217. _header(topology_st, 'Test Case 5 - Check no nsSSL3Ciphers (-all) with default allowWeakCipher')
  218. topology_st.standalone.simple_bind_s(DN_DM, PASSWORD)
  219. topology_st.standalone.modify_s(ENCRYPTION_DN, [(ldap.MOD_DELETE, 'nsSSL3Ciphers', '-all')])
  220. log.info("\n######################### Restarting the server ######################\n")
  221. topology_st.standalone.stop(timeout=10)
  222. os.system('mv %s %s.48194_3' % (topology_st.standalone.errlog, topology_st.standalone.errlog))
  223. os.system('touch %s' % (topology_st.standalone.errlog))
  224. time.sleep(2)
  225. topology_st.standalone.start(timeout=120)
  226. connectWithOpenssl(topology_st, 'RC4-SHA', False)
  227. connectWithOpenssl(topology_st, 'AES256-SHA256', True)
  228. def test_run_5(topology_st):
  229. """
  230. Check nsSSL3Ciphers: default
  231. Default ciphers are enabled.
  232. default allowWeakCipher
  233. """
  234. _header(topology_st, 'Test Case 6 - Check default nsSSL3Ciphers (default setting) with default allowWeakCipher')
  235. topology_st.standalone.simple_bind_s(DN_DM, PASSWORD)
  236. topology_st.standalone.modify_s(ENCRYPTION_DN, [(ldap.MOD_REPLACE, 'nsSSL3Ciphers', 'default')])
  237. log.info("\n######################### Restarting the server ######################\n")
  238. topology_st.standalone.stop(timeout=10)
  239. os.system('mv %s %s.48194_4' % (topology_st.standalone.errlog, topology_st.standalone.errlog))
  240. os.system('touch %s' % (topology_st.standalone.errlog))
  241. time.sleep(2)
  242. topology_st.standalone.start(timeout=120)
  243. connectWithOpenssl(topology_st, 'RC4-SHA', False)
  244. connectWithOpenssl(topology_st, 'AES256-SHA256', True)
  245. def test_run_6(topology_st):
  246. """
  247. Check nsSSL3Ciphers: +all,-TLS_RSA_WITH_AES_256_CBC_SHA256
  248. All ciphers are disabled.
  249. default allowWeakCipher
  250. """
  251. _header(topology_st,
  252. 'Test Case 7 - Check nsSSL3Ciphers: +all,-TLS_RSA_WITH_AES_256_CBC_SHA256 with default allowWeakCipher')
  253. topology_st.standalone.simple_bind_s(DN_DM, PASSWORD)
  254. topology_st.standalone.modify_s(ENCRYPTION_DN,
  255. [(ldap.MOD_REPLACE, 'nsSSL3Ciphers', '+all,-TLS_RSA_WITH_AES_256_CBC_SHA256')])
  256. log.info("\n######################### Restarting the server ######################\n")
  257. topology_st.standalone.stop(timeout=10)
  258. os.system('mv %s %s.48194_5' % (topology_st.standalone.errlog, topology_st.standalone.errlog))
  259. os.system('touch %s' % (topology_st.standalone.errlog))
  260. time.sleep(2)
  261. topology_st.standalone.start(timeout=120)
  262. connectWithOpenssl(topology_st, 'RC4-SHA', False)
  263. connectWithOpenssl(topology_st, 'AES256-SHA256', False)
  264. connectWithOpenssl(topology_st, 'AES128-SHA', True)
  265. def test_run_7(topology_st):
  266. """
  267. Check nsSSL3Ciphers: -all,+rsa_rc4_128_md5
  268. All ciphers are disabled.
  269. default allowWeakCipher
  270. """
  271. _header(topology_st, 'Test Case 8 - Check nsSSL3Ciphers: -all,+rsa_rc4_128_md5 with default allowWeakCipher')
  272. topology_st.standalone.simple_bind_s(DN_DM, PASSWORD)
  273. topology_st.standalone.modify_s(ENCRYPTION_DN, [(ldap.MOD_REPLACE, 'nsSSL3Ciphers', '-all,+rsa_rc4_128_md5')])
  274. log.info("\n######################### Restarting the server ######################\n")
  275. topology_st.standalone.stop(timeout=10)
  276. os.system('mv %s %s.48194_6' % (topology_st.standalone.errlog, topology_st.standalone.errlog))
  277. os.system('touch %s' % (topology_st.standalone.errlog))
  278. time.sleep(2)
  279. topology_st.standalone.start(timeout=120)
  280. connectWithOpenssl(topology_st, 'RC4-SHA', False)
  281. connectWithOpenssl(topology_st, 'AES256-SHA256', False)
  282. connectWithOpenssl(topology_st, 'RC4-MD5', True)
  283. def test_run_8(topology_st):
  284. """
  285. Check nsSSL3Ciphers: default + allowWeakCipher: off
  286. Strong Default ciphers are enabled.
  287. """
  288. _header(topology_st, 'Test Case 9 - Check default nsSSL3Ciphers (default setting + allowWeakCipher: off)')
  289. topology_st.standalone.simple_bind_s(DN_DM, PASSWORD)
  290. topology_st.standalone.modify_s(ENCRYPTION_DN, [(ldap.MOD_REPLACE, 'nsSSL3Ciphers', 'default'),
  291. (ldap.MOD_REPLACE, 'allowWeakCipher', 'off')])
  292. log.info("\n######################### Restarting the server ######################\n")
  293. topology_st.standalone.stop(timeout=10)
  294. os.system('mv %s %s.48194_7' % (topology_st.standalone.errlog, topology_st.standalone.errlog))
  295. os.system('touch %s' % (topology_st.standalone.errlog))
  296. time.sleep(2)
  297. topology_st.standalone.start(timeout=120)
  298. connectWithOpenssl(topology_st, 'RC4-SHA', False)
  299. connectWithOpenssl(topology_st, 'AES256-SHA256', True)
  300. def test_run_9(topology_st):
  301. """
  302. Check no nsSSL3Ciphers
  303. Default ciphers are enabled.
  304. allowWeakCipher: on
  305. nsslapd-errorlog-level: 0
  306. """
  307. _header(topology_st,
  308. 'Test Case 10 - Check no nsSSL3Ciphers (default setting) with no errorlog-level & allowWeakCipher on')
  309. topology_st.standalone.simple_bind_s(DN_DM, PASSWORD)
  310. topology_st.standalone.modify_s(ENCRYPTION_DN, [(ldap.MOD_REPLACE, 'nsSSL3Ciphers', None),
  311. (ldap.MOD_REPLACE, 'allowWeakCipher', 'on')])
  312. topology_st.standalone.modify_s(CONFIG_DN, [(ldap.MOD_REPLACE, 'nsslapd-errorlog-level', None)])
  313. log.info("\n######################### Restarting the server ######################\n")
  314. topology_st.standalone.stop(timeout=10)
  315. os.system('mv %s %s.48194_8' % (topology_st.standalone.errlog, topology_st.standalone.errlog))
  316. os.system('touch %s' % (topology_st.standalone.errlog))
  317. time.sleep(2)
  318. topology_st.standalone.start(timeout=120)
  319. connectWithOpenssl(topology_st, 'RC4-SHA', True)
  320. connectWithOpenssl(topology_st, 'AES256-SHA256', True)
  321. def test_run_10(topology_st):
  322. """
  323. Check nsSSL3Ciphers: -TLS_RSA_WITH_NULL_MD5,+TLS_RSA_WITH_RC4_128_MD5,
  324. +TLS_RSA_EXPORT_WITH_RC4_40_MD5,+TLS_RSA_EXPORT_WITH_RC2_CBC_40_MD5,
  325. +TLS_DHE_RSA_WITH_DES_CBC_SHA,+SSL_RSA_FIPS_WITH_DES_CBC_SHA,
  326. +TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA,+SSL_RSA_FIPS_WITH_3DES_EDE_CBC_SHA,
  327. +TLS_RSA_EXPORT1024_WITH_RC4_56_SHA,+TLS_RSA_EXPORT1024_WITH_DES_CBC_SHA,
  328. -SSL_CK_RC4_128_WITH_MD5,-SSL_CK_RC4_128_EXPORT40_WITH_MD5,
  329. -SSL_CK_RC2_128_CBC_WITH_MD5,-SSL_CK_RC2_128_CBC_EXPORT40_WITH_MD5,
  330. -SSL_CK_DES_64_CBC_WITH_MD5,-SSL_CK_DES_192_EDE3_CBC_WITH_MD5
  331. allowWeakCipher: on
  332. nsslapd-errorlog-level: 0
  333. """
  334. _header(topology_st,
  335. 'Test Case 11 - Check nsSSL3Ciphers: long list using the NSS Cipher Suite name with allowWeakCipher on')
  336. topology_st.standalone.simple_bind_s(DN_DM, PASSWORD)
  337. topology_st.standalone.modify_s(ENCRYPTION_DN, [(ldap.MOD_REPLACE, 'nsSSL3Ciphers',
  338. '-TLS_RSA_WITH_NULL_MD5,+TLS_RSA_WITH_RC4_128_MD5,+TLS_RSA_EXPORT_WITH_RC4_40_MD5,+TLS_RSA_EXPORT_WITH_RC2_CBC_40_MD5,+TLS_DHE_RSA_WITH_DES_CBC_SHA,+SSL_RSA_FIPS_WITH_DES_CBC_SHA,+TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA,+SSL_RSA_FIPS_WITH_3DES_EDE_CBC_SHA,+TLS_RSA_EXPORT1024_WITH_RC4_56_SHA,+TLS_RSA_EXPORT1024_WITH_DES_CBC_SHA,-SSL_CK_RC4_128_WITH_MD5,-SSL_CK_RC4_128_EXPORT40_WITH_MD5,-SSL_CK_RC2_128_CBC_WITH_MD5,-SSL_CK_RC2_128_CBC_EXPORT40_WITH_MD5,-SSL_CK_DES_64_CBC_WITH_MD5,-SSL_CK_DES_192_EDE3_CBC_WITH_MD5')])
  339. log.info("\n######################### Restarting the server ######################\n")
  340. topology_st.standalone.stop(timeout=10)
  341. os.system('mv %s %s.48194_9' % (topology_st.standalone.errlog, topology_st.standalone.errlog))
  342. os.system('touch %s' % (topology_st.standalone.errlog))
  343. time.sleep(1)
  344. topology_st.standalone.start(timeout=120)
  345. connectWithOpenssl(topology_st, 'RC4-SHA', False)
  346. connectWithOpenssl(topology_st, 'RC4-MD5', True)
  347. connectWithOpenssl(topology_st, 'AES256-SHA256', False)
  348. def test_run_11(topology_st):
  349. """
  350. Check nsSSL3Ciphers: +fortezza
  351. SSL_GetImplementedCiphers does not return this as a secuire cipher suite
  352. """
  353. _header(topology_st, 'Test Case 12 - Check nsSSL3Ciphers: +fortezza, which is not supported')
  354. topology_st.standalone.simple_bind_s(DN_DM, PASSWORD)
  355. topology_st.standalone.modify_s(ENCRYPTION_DN, [(ldap.MOD_REPLACE, 'nsSSL3Ciphers', '+fortezza')])
  356. log.info("\n######################### Restarting the server ######################\n")
  357. topology_st.standalone.stop(timeout=10)
  358. os.system('mv %s %s.48194_10' % (topology_st.standalone.errlog, topology_st.standalone.errlog))
  359. os.system('touch %s' % (topology_st.standalone.errlog))
  360. time.sleep(1)
  361. topology_st.standalone.start(timeout=120)
  362. connectWithOpenssl(topology_st, 'RC4-SHA', False)
  363. connectWithOpenssl(topology_st, 'AES256-SHA256', False)
  364. if __name__ == '__main__':
  365. # Run isolated
  366. # -s for DEBUG mode
  367. CURRENT_FILE = os.path.realpath(__file__)
  368. pytest.main("-s %s" % CURRENT_FILE)