open-quantum-safe / liboqs-python

Python 3 bindings for liboqs
https://openquantumsafe.org/
MIT License
122 stars 45 forks source link

replacing openssl111 with openssl3 #94

Open gobbledy-gook opened 2 weeks ago

gobbledy-gook commented 2 weeks ago

This is PR has "rough edges" such as some dependencies could be extra or I might have retained extra stuff while building the smaller image in stage 2 or multi-stage build in the dockerfile.

The main goal of this PR is to replace openssl111 with openssl3 which includes the usage of ops-provider. Earlier version of the docker file used python3.8 which did not have support for openssl3 so I had to install the latest python version 3.12 for this purpose. Secondly, the minitest.py files is adjusted to give output for port:6138 with sig:dilithium2 specifically which requires changing (an easy fix, can be done in a commit).

gobbledy-gook commented 2 weeks ago

Is this Docker setup tested anywhere in CI?

I'm sorry but I don't know what means, haven't done before.

SWilson4 commented 2 weeks ago

Is this Docker setup tested anywhere in CI?

I'm sorry but I don't know what means, haven't done before.

No worries! It would be nice to build the Docker image and maybe run a test in it as part of our GitHub Actions Continuous Integration tests. The configuration for these tests is in https://github.com/open-quantum-safe/liboqs-python/blob/main/.github/workflows. I don't believe any of the Docker-related functionality is tested there.

I triggered the automated tests to run on this PR, and it looks like there are a couple of build failures to sort out.

baentsch commented 2 weeks ago

I don't believe any of the Docker-related functionality is tested there.

That is a correct observation @SWilson4 and an oversight on my part (well, honestly I wasn't convinced anyone else but me uses docker images for python :), sorry. Unless @gobbledy-gook wants to learn how to do this and add that as part of this PR(?) I'll add a test docker build in a separate PR.

it looks like there are a couple of build failures to sort out.

Indeed, the PR failures look like general CI setup problems independent of the PR, so nothing for @gobbledy-gook to worry about. Tagging @vsoftco for advice.

gobbledy-gook commented 2 weeks ago

Unless @gobbledy-gook wants to learn how to do this and add that as part of this PR(?) I'll add a test docker build in a separate PR.

Indeed. I am open to this. Always eager to expand my scope.

Indeed, the PR failures look like general CI setup problems independent of the PR, so nothing for @gobbledy-gook to worry about.

Yes, I observed it being suited for openssl111 and uses python3.10 whereas I have used python3.12 which is the only lowest version that supports openssl3 (afaik).

baentsch commented 2 weeks ago

Always eager to expand my scope.

Great! As a quick way to get started, you may want to take a look at adding a step to https://github.com/open-quantum-safe/liboqs-python/blob/main/.github/workflows/python_detailed.yml following the docker (test) build in https://github.com/open-quantum-safe/oqs-demos/blob/main/.github/workflows/linux.yml (just without docker hub things like login and push).

Yes, I observed it being suited for openssl111 and uses python3.10 whereas I have used python3.12 which is the only lowest version that supports openssl3 (afaik).

Thanks for that information. Should we create a separate issue to track and fix @vsoftco ?

vsoftco commented 2 weeks ago

Always eager to expand my scope.

Great! As a quick way to get started, you may want to take a look at adding a step to https://github.com/open-quantum-safe/liboqs-python/blob/main/.github/workflows/python_detailed.yml following the docker (test) build in https://github.com/open-quantum-safe/oqs-demos/blob/main/.github/workflows/linux.yml (just without docker hub things like login and push).

Yes, I observed it being suited for openssl111 and uses python3.10 whereas I have used python3.12 which is the only lowest version that supports openssl3 (afaik).

Thanks for that information. Should we create a separate issue to track and fix @vsoftco ?

Yes, please, let's have a separate issue for this.