Skip to content

HMAC Algorithm #7

@eklinger

Description

@eklinger

In the HMAC algorithm code, there is a line:

secret = v + 1

When I enable debug and print the value of secret and string_to_sign variables, secret is really string_to_sign and string_to_sign is null. It seems that v is a pointer to the last variable in the conf for that directive. However, when I change secret = v -1, the data for secret ends up being the value of secret + the value of string_to_sign concated together.

With secret = v-1
set $secret 'yzY3mIMZfyO03';
set $string_to_sign 'ec_country_allow=US';
set_hmac_sha1 $tok $secret $string_to_sign;

from log:
secret=yzY3mIMZfyO03ec_country_allow=US, string_to_sign=ec_country_allow=US

With secret = v+1

secret=ec_country_allow=US, string_to_sign=(null)

Any ideas? Thank you

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions