@@ -116,15 +116,15 @@ static ngx_int_t
116
116
ngx_http_secure_link_variable (ngx_http_request_t * r ,
117
117
ngx_http_variable_value_t * v , uintptr_t data )
118
118
{
119
- u_char * p , * last ;
120
- ngx_str_t value , hash , key ;
121
- time_t timestamp , expires , gmtoff ;
122
119
ngx_http_secure_link_ctx_t * ctx ;
123
120
ngx_http_secure_link_conf_t * conf ;
124
- u_char hash_buf [EVP_MAX_MD_SIZE ], hmac_buf [EVP_MAX_MD_SIZE ];
125
121
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 ];
126
125
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 ;
128
128
char gmtoff_sign ;
129
129
130
130
conf = ngx_http_get_module_loc_conf (r , ngx_http_hmac_secure_link_module );
@@ -289,11 +289,11 @@ static ngx_int_t
289
289
ngx_http_secure_link_token_variable (ngx_http_request_t * r ,
290
290
ngx_http_variable_value_t * v , uintptr_t data )
291
291
{
292
- ngx_str_t value , key , hmac , token ;
293
292
ngx_http_secure_link_conf_t * conf ;
294
- u_char hmac_buf [EVP_MAX_MD_SIZE ];
295
- const EVP_MD * evp_md ;
296
293
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 ];
297
297
298
298
conf = ngx_http_get_module_loc_conf (r , ngx_http_hmac_secure_link_module );
299
299
@@ -328,7 +328,7 @@ ngx_http_secure_link_token_variable(ngx_http_request_t *r,
328
328
hmac .data = hmac_buf ;
329
329
token .data = p ;
330
330
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 );
332
332
333
333
ngx_encode_base64url (& token , & hmac );
334
334
0 commit comments