Closed baentsch closed 1 year ago
liboqs
indeed has no runtime API to query its version number (in a shared lib, say). So, either we add such function (and then query it from a language wrapper as discussed) OR we document that "wrapper and liboqs version may differ with unknown functional results in case of mismatch". The latter I find personally unsatisfactory. The former would be trivial. Right now, the only way to query the liboqs version is by running the test programs that output the version string (and that would be the only way someone can detect such differences to explain possibly weird behaviours).
@dstebila @vsoftco : Other suggestions? Preferences?
I'd go with a char const* get_oqs_ver()
function that we can invoke at runtime
Yes, an char *OQS_version()
function defined in src/common.h
and implemented in src/common.c
seems appropriate for this.
I'll implement that then propagate to the wrappers
Thanks. Proposal in https://github.com/open-quantum-safe/liboqs/tree/mb-version
done in the wrapper as well (oqs_version()
and oqs_python_version()
)
@baentsch @dstebila Fixed in the latest release https://github.com/open-quantum-safe/liboqs-python/blob/4be47c8d8fcc4e59f262ea2a96955349de8bb40f/oqs/oqs.py#L69, we emit a warning if the versions don't coincide
we emit a warning if the versions don't coincide
That's OK -- but something seems to be not quite OK as CI fails...
Problem found: Docker image didn't install the package/call setup.py.
https://github.com/open-quantum-safe/liboqs-python/blob/2928d8a6327dcfdb3cef4e515afd7c0e25f9bb0d/setup.py#L7 specifies a definite
liboqs
version number, but https://github.com/open-quantum-safe/liboqs-python/blob/2928d8a6327dcfdb3cef4e515afd7c0e25f9bb0d/oqs/oqs.py#L30 seems to load anyliboqs
library -- including one with a distinctly different version number.This issue is to ask how to reconcile/avoid such mismatch 1) Add assertion to not run a library different from the version stated in "setup.py" 2) Obtain version number from
liboqs
and drop/supersede the one in "setup.py".Other suggestions welcome.