Git Product home page Git Product logo

Comments (7)

LeShadow avatar LeShadow commented on July 28, 2024

@baentsch I can say I have a patch that works! I will upload the patch here later today and start amending the docker container file as well.

This is my current test code:

import json
import sys
import urllib.request
import ssl
import os


sslSettings= ssl.SSLContext(ssl.PROTOCOL_TLS_CLIENT)
sslSettings.verify_mode = ssl.CERT_REQUIRED


# Trust LetsEncrypt Root CA to get required files:
#sslSettings.load_verify_locations(cafile="isrgrootx1.pem")


with urllib.request.urlopen('https://test.openquantumsafe.org/assignments.json', context=sslSettings) as json_file:
    algos = json.load(json_file)


with urllib.request.urlopen('https://test.openquantumsafe.org/CA.crt', context=sslSettings) as ca_file:
    data = ca_file.read().decode()


with open("CA.crt", "w+") as ca_file:
    ca_file.write(data)


# now switch root CA:
sslSettings.load_verify_locations(cafile="CA.crt")


for sig, kexalgos in algos.items():
    print("Testing Signature Algorithm: " + sig)
    for kexalgo, port in kexalgos.items():
        try:
            if kexalgo == "*": continue
            sslContext.set_tls13_groups_list(kexalgo)
            with urllib.request.urlopen('https://test.openquantumsafe.org:' + str(port), context=sslSettings) as response:
                if response.getcode() == 200:
                    print("Test successful for: " + kexalgo)
                else:
                    print("Test failed with code " + str(response.getcode()) + " for algo: " + kexalgo)
        except urllib.error.URLError as e:
            print("Test failed with code " + str(response.getcode()) + " for algo: " + kexalgo)
            print(e)
        except Exception as e:
            print("Test failed with code " + str(response.getcode()) + " for algo: " + kexalgo)
            print(e)

If you look at this line: sslContext.set_tls13_groups_list(kexalgo)
Is this the way you think is best for the function-naming? (As discussed here)

from oqs-demos.

LeShadow avatar LeShadow commented on July 28, 2024

@baentsch I have the patch ready + an additional test. Can I commit straight to the branch in this repo, or would you like me to fork the repository first and then make a commit? (If I can commit straight to this repository, then I think I need the rights of a contributor to this repository first?)

(Added the patch as an attachment, please rename .txt to .patch, so it can be used by patch!)
cpython_tls13_function.txt

from oqs-demos.

dstebila avatar dstebila commented on July 28, 2024

@baentsch I have the patch ready + an additional test. Can I commit straight to the branch in this repo, or would you like me to fork the repository first and then make a commit? (If I can commit straight to this repository, then I think I need the rights of a contributor to this repository first?)

Can you try doing a fork and PR from there?

from oqs-demos.

LeShadow avatar LeShadow commented on July 28, 2024

@dstebila no problem at all!

from oqs-demos.

LeShadow avatar LeShadow commented on July 28, 2024

@dstebila hey, is there a way to contact you? I'd like to ask some questions unrelated to this specific repository :). (But in relation to OQS!)

from oqs-demos.

dstebila avatar dstebila commented on July 28, 2024

@dstebila hey, is there a way to contact you? I'd like to ask some questions unrelated to this specific repository :). (But in relation to OQS!)

Sure, you can email me at [email protected].

from oqs-demos.

baentsch avatar baentsch commented on July 28, 2024

Please check out open-quantum-safe/liboqs-python#47: It doesn't contain any changes to Python but may fulfill the minimum goals set (enable OQS algorithms for the python ssl package) all the while making using OQS algorithms simple for python-oqs users (see open-quantum-safe/liboqs-python#46). If that PR merges and no further feedback is entered here, I'd suggest closing this issue in a week or so.

from oqs-demos.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.