-
Notifications
You must be signed in to change notification settings - Fork 101
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
No QSC TLS signature support #231
Comments
This is a typical error (message) when |
Hello, I encountered the same issue. If openssl list -providers is run with the -provider-path option I can see the OpenSSL OQS provider as active. |
Ahh -- it works when |
Thanks for your reply. I included the lines:
But it's not clear to me if the
But it is still not working. In my previous tests the provider has been always activated with |
No; "module=" as you did it.
Are you 100% certain that this "openssl.cnf" is loaded? Set OPENSSL_CONF env var explicitly to be sure. Also check that "ls -l /to/oqs/folder/oqs.so" shows the proper binary. |
I am sure that openssl.cnf has been loaded correctly. I am not sure how to check the if the binary is the proper one, but up to now I was able to generate the certificates, while the attempt to open a connection fails. |
Well, if you can generate proper QSC certs then the provider is surely loaded. What happens if you (try to) display the cert (via the |
I opened the certificates with I build it with the cmake command shown in the README.md |
with 99% certainty means that |
Hi, although @baentsch know infinitely more about this than I do, maybe I can help you with the steps I followed to install it and it worked correctly:
If you already have OpenSSL installed and it is in another path such as /usr/local/ssl, I had to modify the fullbuild.sh file as you can see at this discussion. Remember that in this case you will need to modify the file If I have said anything wrong, @baentsch please correct me. Thank you so much! |
In such case, please set the environment variable OPENSSL_INSTALL when calling |
Consider that I have two version of openssl installed:
In the terminal I type: The output I obtain is: I am sure that the 3.2.0-dev version of OpenSSL is run and the provider is loaded, as shown here. |
I think that this is my case. |
Thanks for the additional check/explanation. So do I understand correctly that you cannot successfully decode an X509 cert and/or start a server when running OpenSSL3.2.0? If so, please show the complete command line and output of trying so. Or is the statement "with this one I loaded the provider but again I couldn't start a server connection (the same way as explained before)" indeed only applying to OpenSSL3.0.2? In other words, does OpenSSL3.2.0 work as expected in all regards and 3.0.2 does not (as is documented)? |
I build again the oqs-provider with:
and run again the commands in USAGE.md > Creating keys and certificates and Setting up a (quantum-safe) test server The output of the commands, considering that OpenSSL3.2.0-dev is used is:
This time is correct.
with output:
The problem is that I have the same issue with both OpenSSL3.0.2 and OpenSSL3.2.0 when a server connection is started. Thanks a lot. |
Good to hear. What changed compared to the first try? Can this be applied to the server start too?
Again, this code path can only be taken if the provider is not active -- or the certificate chain is bad(ly built). Again, please use our ready-built dockerfile to eliminate the latter as an error cause (and to validate your scripts). Remote debugging with too many "moving parts" is just not really doable. |
I used the wrong OpenSSL version, unfortunately the server connection is still not working.
How should I use it? Thanks for your answers. |
So are you now using the correct version (3.2.0-dev)? And are you certain to have generated all certificates with the correct OpenSSL version? Verify the chain before use.
Usage is documented (https://hub.docker.com/repository/docker/openquantumsafe/oqs-ossl3/general) |
Now I am sure about it, the certificates has been generated with the correct OpenSSL version and again, the OQS provider is shown as actived.
In docker I tried to replicate the example is USAGE.md with certificate generation and the attempt to establish a server connection:
when
I am not sure if I am not using properly docker. |
The error message above cannot be returned when issuing an |
I see the same error as described in the original post. I'm on oqsprovider commit f463621 and openssl commit 79cdbe893da0c613db97356d05c0b088e885707f. I have built and installed openssl locally (in addition to my system installation). I have modified openssl.cnf, so oqsprovider is found and used. For the following, I'm in the installation directory of this local openssl version.
I have used I can see that Is there anything I can do to diagnose this more precisely? Thanks. |
CI built the container: The log of the build is this -- but I fail to spot the commit id :-( On the binary, I'm afraid I'm not aware of a mechanism to determine the commit id in an openssl build.
Not really -- this is pretty much all I'd have recommended. Just one question for me to try to reproduce: Which environment/platform are you using? OS, compiler, etc. |
Additional info: I built openssl with debug info and stopped in
lists, among many others:
Do you know where |
I should as I added that code to OpenSSL in openssl/openssl#19312: https://github.com/openssl/openssl/blob/6404d064b8012a2c353603a3b3effa6289313d61/ssl/t1_lib.c#L662
Indeed that'd be the place to understand why the OQS sigalgs don't get "accepted" in your setup. |
It seems, the code referenced in the previous comment never runs in my setup. To investigate, I set a breakpoint on |
Very good analysis, Thanks @cryptobsv !
Absolutely. Presence of that (OpenSSL) define is prerequisite for proper pluggable signature support: https://www.openssl.org/docs/manmaster/man7/provider-base.html. It would be a serious bummer for that define to not be available (in "master"/3.2.0-dev); unavailability of it in OpenSSL 3.1 or 3.0 in turn would be expected --- so my question is whether you have compiled Before you state it, I'll say it: Building |
Yes, this is it. I built oqsprovider with |
Thanks for the thorough analysis/"attribution research", @cryptobsv ! I now wonder what caused Final question (also to @cryptojane94 ): Have you run |
right after
in the output of |
Indeed, it looks like a
Yup - Wanted to do that when adding the warning about (having to) skip that test, but |
FWIW and for the fun of it, I started a docker image of your Linux ("Kali") distro, installed
--> This distro has OpenSSL installed and I begin to wonder how you even got as far as you did(?). The underlying issue seems to be none of OQS, though. @cryptojane94 : As you use a different distro, can you confirm your problem is indeed of the same nature (compiling |
Thanks for your replies @baentsch and @cryptobsv .
The output I got is: 4: Test command: /pwd/oqs-provider/_build/test/oqs_test_tlssig "oqsprovider" "/home/kristjane/oqs-provider/test/openssl-ca.cnf" "/pwd/oqs-provider/_build/test/tmp" I guess this is suspicious. |
Now I can't reproduce your issue. :-) Never mind.
I agree. It's not worth following it up any further. Just one small update: Building with |
More than suspicious :-) Rather tell-tale: It's clearly saying that the OpenSSL version you built against is not supporting provider-based TLS signatures (i.e., is not 3.2.0-dev). You may want to try out the approach explained by @cryptobsv above (and/or set OPENSSL_INSTALL if your |
Closing the issue due to inactivity (and after adding #235 for a telltale warning). Please re-open with new findings if necessary. |
Describe the bug
I generated the keys and ceritifcates following the procedure described, but when running the server the connection couldn't be established because I got the error:
error setting certificate
80DBC4E8877F0000:error:0A0000F7:SSL routines:ssl_set_cert_unknown certificate type:ssl/ssl_rsa.c:257:
I have installed Ubuntu 22.04.3 LTS and I am using OpenSSL 3.2.0-dev
The text was updated successfully, but these errors were encountered: