|
43 | 43 | # Trust test.openquantumsafe.org root CA: |
44 | 44 | sslContext.load_verify_locations(cafile="CA.crt") |
45 | 45 |
|
46 | | -# Iterate over all algorithm/port combinations: |
47 | | -for sigs, kexs in assignments.items(): |
48 | | - for kex, port in kexs.items(): |
49 | | - if (kex != "*"): # '*' denoting any classic KEX alg |
50 | | - # Enable use of the specific QSC KEX algorithm |
51 | | - os.environ["TLS_DEFAULT_GROUPS"]=kex |
52 | | - try: |
53 | | - with urllib.request.urlopen('https://test.openquantumsafe.org:'+str(port), context=sslContext) as response: |
54 | | - if response.getcode() != 200: |
55 | | - print("Failed to test %s successfully" % (kex)) |
56 | | - else: |
57 | | - print("Success testing %s at port %d" % (kex, port)) |
58 | | - except: |
59 | | - print("Test of algorithm combination SIG %s/KEX %s failed. Are all algorithms supported by current OQS library?" % (sigs, kex)) |
60 | | - |
61 | | - if "SHORT_TEST" in os.environ: |
62 | | - exit(0) |
| 46 | +port = 6138 |
| 47 | +kex="kyber512" |
| 48 | +sigs = "dilithium2" |
| 49 | + |
| 50 | +try: |
| 51 | + with urllib.request.urlopen('https://test.openquantumsafe.org:'+str(port), context=sslContext) as response: |
| 52 | + if response.getcode() != 200: |
| 53 | + print("Failed to test %s successfully" % (kex)) |
| 54 | + else: |
| 55 | + print("Success testing %s at port %d" % (kex, port)) |
| 56 | +except: |
| 57 | + print("Test of algorithm combination SIG %s/KEX %s failed. Are all algorithms supported by current OQS library?" % (sigs, kex)) |
| 58 | + |
| 59 | + |
| 60 | +# # Iterate over all algorithm/port combinations: |
| 61 | +# for sigs, kexs in assignments.items(): |
| 62 | +# for kex, port in kexs.items(): |
| 63 | +# if (kex != "*"): # '*' denoting any classic KEX alg |
| 64 | +# # Enable use of the specific QSC KEX algorithm |
| 65 | +# os.environ["TLS_DEFAULT_GROUPS"]=kex |
| 66 | +# try: |
| 67 | +# with urllib.request.urlopen('https://test.openquantumsafe.org:'+str(port), context=sslContext) as response: |
| 68 | +# if response.getcode() != 200: |
| 69 | +# print("Failed to test %s successfully" % (kex)) |
| 70 | +# else: |
| 71 | +# print("Success testing %s at port %d" % (kex, port)) |
| 72 | +# except: |
| 73 | +# print("Test of algorithm combination SIG %s/KEX %s failed. Are all algorithms supported by current OQS library?" % (sigs, kex)) |
| 74 | + |
| 75 | +# if "SHORT_TEST" in os.environ: |
| 76 | +# exit(0) |
0 commit comments