https://bz.apache.org/bugzilla/show_bug.cgi?id=70276
Bug ID: 70276
Summary: mod_autht_jwt: apr_jose_signature_make() called with
wrong argument count → fails to compile against
apr-util ≥ 1.7
Product: Apache httpd-2
Version: 2.5-HEAD
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P2
Component: mod_autht_jwt
Assignee: [email protected]
Reporter: [email protected]
Target Milestone: ---
SUMMARY
-------
The token-signing path in mod_autht_jwt calls apr_jose_signature_make() with 4
arguments, but every current apr-util (1.7.x branch and trunk/2.0) declares the
function with 5. The module therefore fails to compile when JOSE support is
actually enabled.
ROOT CAUSE
----------
jwt_get_token() in modules/aaa/mod_autht_jwt.c:
671 apr_jose_signature_make(&signature, NULL, protect, r->pool);
apr-util declares (apr_jose.h):
apr_jose_signature_make(apr_jose_signature_t *signature,
apr_json_value_t *header,
apr_json_value_t *protected,
void *ctx, <-- missing in the
call
apr_pool_t *pool);
The call omits the ctx argument.
STEPS TO REPRODUCE
------------------
1. Build httpd trunk against an apr-util that provides JOSE (apr-util >= 1.7 or
APR 2.0), with mod_autht_jwt's real body enabled (JOSE present).
2. Compilation fails:
mod_autht_jwt.c: In function 'jwt_get_token':
mod_autht_jwt.c:671:5: error: too few arguments to function
'apr_jose_signature_make'
Confirmed against both apr-util 1.7.x and APR 2.0 trunk; both declare 5 args.
EXPECTED
--------
mod_autht_jwt compiles cleanly against the supported apr-util JOSE API.
IMPACT
------
AuthtJwtSign (outgoing JWT generation) cannot be built against any current
apr-util; a build/correctness defect. (Combined with the gate issue in the
companion report, the module as shipped does not compile into its real form.)
FIX
---
Add the missing ctx argument (NULL):
apr_jose_signature_make(&signature, NULL, protect, NULL, r->pool);
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]