refactor so verify early finds out which of $_GET and $_POST to use and
then stick to using only that for the entire flow.
sync only works with GET anyways so use $_GET directly.
- introduced recently in these log format changes.
- require_once 'ykval-config.php in logformat()
did not import, because it takes place in ykval-verify.php.
- hence logformat() did not have $baseParams in scope,
so we never write the log line.
- refactor and set format outside the class itself.
- Traditionally we wrote two lines for each ykval-verify.php call,
'Request:' and 'Response:'.
- This commit allows us to log both request/response values in a single line.
- For backward compatibility, the old logging is kept in place.
- To write this line to syslog, __YKVAL_VERIFY_LOGFORMAT__ needs to be set.
Ubuntu 12.04 LTS will be supported until April 2017, but Ubuntu 14.04
LTS has been around long enough, so it’s well tested and probably more
common to install than 12.04 LTS. It’s supported until April 2019 [1].
[1] https://wiki.ubuntu.com/Releases
- previously the default config only included port 80.
- this was changed in 382cfc2ab506a4c0f6ba0222d473ff3df77dd6f5,
to avoid issues with yhsm-yubikey-ksm, which defaults to port 8002.
- however, this broke configurations running with yubikey-ksm,
which defaults to port 80.
- a better approach is to have both projects using the same defaults,
but for now we'll include both urls instead.
- the ksm decrypt requests happen asynchronously,
so there should not be any performance degradation.
(since either one of the urls will timeout)
- simplify and avoid using different arrays with same values.
- build $otpParams from $otpinfo as soon as we have ksm result,
then unset $otpinfo.
- futher down, only use $otpParams and $localParams.
- avoid doing what is already handled by the Log class.
- the log name is appended automatically,
so don't append it again in the invocation.
i.e. "ykval-verify"
- the log level name is also appended automatically,
so don't append it manually, especially when it doesn't match the log priority!
i.e. LOG_WARNING -> ":notice:"
- fix whitespace in some messages.