scitokens / scitokens-cpp

A C++ implementation of the SciTokens library with a C library interface
Apache License 2.0
5 stars 22 forks source link

Openssl 3 0 update #96

Closed ColeBollig closed 1 year ago

ColeBollig commented 2 years ago

-Tested Compilation in Fedora 36 docker container with openssl-devel (3.0.5) and saw no compilation warnings for use of deprecated functions -Made to be compatible with JWT-CPP 0.6.0 for its openssl 3.0 support -Minimal testing (Due to lack of know how). scitokens-verify works for both RSA and EC methods.

-Please scrutinize everything. I don't want to break scitokens

djw8605 commented 2 years ago

Lots of errors in the build. Could you take a look.

ColeBollig commented 2 years ago

I believe the build failures are due to the code requiring at minimum JWT-CPP v0.5.0 for the json traits change that breaks the api and isn't getting it. In theory you want v0.6.0 for the openssl 3.0 update within JWT-CPP. I am not sure how to change it so the github build uses the correct JWT-CPP version

ColeBollig commented 2 years ago

I have figured out how to make the base requirement of jwt-cpp

ColeBollig commented 1 year ago

Depending on the rpm building test and your approval I believe all changes are here. I do have a couple of things to note.

  1. You should update the Unit test to test for both Openssl 3 and older Openssl versions.
  2. This should resolve open issues #72 and #61
  3. Updated vendor copy of JWT-CPP is v0.6.0 with some added code from a later JWT-CPP patch that fixed rpm build issues. This should probably be replaced when an official version with the change is released.
  4. I kept in the code to turn off warnings becoming errors but made the default to ON. In case another deprecation warning issue occurs again.

Tested in docker Fedora:36 container with Openssl 3. scitoken-verify was successful for both RS256 and ES256 token from demo.scitokens.org, and successfully passed all unit tests.

djw8605 commented 1 year ago

After a few iterations, I think I'm happy with the pull request. Summary of my changes: