Closed danieldonoghue closed 8 months ago
I couldn't build it in my development environment or CI, so I used it as a reference and tried to deal with it.
https://github.com/kjdev/nginx-auth-jwt/tree/feat/gnutls-support
I have not been able to pass the test yet, so I need to make some adjustments.
t/auth_jwt.t ................. ok
t/auth_jwt_claim.t ........... ok
t/auth_jwt_claim_set.t ....... ok
t/auth_jwt_claims.t .......... ok
t/auth_jwt_key_file.t ........ ok
t/auth_jwt_key_request.t ..... ok
t/auth_jwt_leeway.t .......... ok
t/auth_jwt_phase.t ........... ok
t/auth_jwt_validate_alg.t ....
Dubious, test returned 15 (wstat 3840, 0xf00)
Failed 15/176 subtests
t/auth_jwt_validate_aud.t .... ok
t/auth_jwt_validate_exp.t .... ok
t/auth_jwt_validate_iat.t .... ok
t/auth_jwt_validate_iss.t .... ok
t/auth_jwt_validate_nbf.t .... ok
t/auth_jwt_validate_nonce.t .. ok
t/auth_jwt_validate_sig.t .... ok
t/auth_jwt_validate_sub.t .... ok
t/bearer_token.t ............. ok
Test Summary Report
-------------------
t/auth_jwt_validate_alg.t (Wstat: 3840 (exited 15) Tests: 176 Failed: 15)
Failed tests: 97-101, 118-122, 139-143
Non-zero exit status: 15
Files=18, Tests=977, 1144 wallclock secs ( 0.15 usr 0.05 sys + 3.71 cusr 2.19 csys = 6.10 CPU)
I did manage to get this working and used it for some internal testing but I ended up abandoning it in favour of using the openssl version on a more recent os distro.
Im considering declining this PR but if you wanted to carry on working on it, feel free :)
Allow use of either GnuTLS or OpenSSL for crypto functions in the module. (defaults to OpenSSL).