@@ -116,15 +116,15 @@ static ngx_int_t
116116ngx_http_secure_link_variable (ngx_http_request_t * r ,
117117 ngx_http_variable_value_t * v , uintptr_t data )
118118{
119- u_char * p , * last ;
120- ngx_str_t value , hash , key ;
121- time_t timestamp , expires , gmtoff ;
122119 ngx_http_secure_link_ctx_t * ctx ;
123120 ngx_http_secure_link_conf_t * conf ;
124- u_char hash_buf [EVP_MAX_MD_SIZE ], hmac_buf [EVP_MAX_MD_SIZE ];
125121 const EVP_MD * evp_md ;
122+ u_char * p , * last ;
123+ ngx_str_t value , hash , key ;
124+ u_char hash_buf [EVP_MAX_MD_SIZE ], hmac_buf [EVP_MAX_MD_SIZE ];
126125 u_int hmac_len ;
127- ngx_int_t year , month , mday , hour , min , sec , gmtoff_hour , gmtoff_min ;
126+ time_t timestamp , expires , gmtoff ;
127+ int_t year , month , mday , hour , min , sec , gmtoff_hour , gmtoff_min ;
128128 char gmtoff_sign ;
129129
130130 conf = ngx_http_get_module_loc_conf (r , ngx_http_hmac_secure_link_module );
@@ -289,11 +289,11 @@ static ngx_int_t
289289ngx_http_secure_link_token_variable (ngx_http_request_t * r ,
290290 ngx_http_variable_value_t * v , uintptr_t data )
291291{
292- ngx_str_t value , key , hmac , token ;
293292 ngx_http_secure_link_conf_t * conf ;
294- u_char hmac_buf [EVP_MAX_MD_SIZE ];
295- const EVP_MD * evp_md ;
296293 u_char * p ;
294+ ngx_str_t value , key , hmac , token ;
295+ const EVP_MD * evp_md ;
296+ u_char hmac_buf [EVP_MAX_MD_SIZE ];
297297
298298 conf = ngx_http_get_module_loc_conf (r , ngx_http_hmac_secure_link_module );
299299
@@ -328,7 +328,7 @@ ngx_http_secure_link_token_variable(ngx_http_request_t *r,
328328 hmac .data = hmac_buf ;
329329 token .data = p ;
330330
331- HMAC (evp_md , key .data , key .len , value .data , value .len , hmac .data , & hmac .len );
331+ HMAC (evp_md , key .data , key .len , value .data , value .len , hmac .data , ( u_int * ) & hmac .len );
332332
333333 ngx_encode_base64url (& token , & hmac );
334334
0 commit comments