1
0
mirror of https://github.com/Yubico/yubikey-val.git synced 2024-12-01 15:24:16 +01:00
Commit Graph

76 Commits

Author SHA1 Message Date
Jean Paul Galea
17378733af Refactor.
- rename $curlopts -> $opts.
2015-07-22 19:48:43 +00:00
Jean Paul Galea
5fc6c1c37d Refactor. 2015-07-22 19:44:35 +00:00
Jean Paul Galea
6246aa5ab4 Refactor.
- rename $handle -> $ch.
2015-07-22 19:43:06 +00:00
Jean Paul Galea
9dfb9b9302 Refactor. 2015-07-22 19:41:25 +00:00
Jean Paul Galea
4c2d4414a0 Cosmetic changes. 2015-07-22 19:38:32 +00:00
Jean Paul Galea
bef2c0cd4a Cosmetic changes. 2015-07-22 19:21:45 +00:00
Jean Paul Galea
ca5e787452 Refactor. 2015-07-21 21:38:37 +00:00
Jean Paul Galea
2aa06ec0a3 Refactor sign function.
- this commit might affect LOG_DEBUG message,
    since now we log utf8_encode($qs) not $qs.

- this is probably what we want though,
    since we run hash_hmac on the latter.
2015-07-21 20:36:56 +00:00
Jean Paul Galea
b417759932 Update copyright year. 2015-07-20 20:01:16 +00:00
Jean Paul Galea
db0f55b818 Fix.
- fix bug introduced in a28ad6df69.
2015-07-18 00:07:22 +02:00
Jean Paul Galea
9e81b1fd72 Refactor.
- minor improvements.

- move $ret init right before it's used.

- use string substitution rather than concatenation.
2015-07-17 22:51:11 +02:00
Jean Paul Galea
c5b6b3c567 Refactor.
- retrieveURLasync() always returns FALSE on failure now,
	before it might have returned a string.

- use array_shift($a) to pop first element,
	safer than $a[0];

- this commit might affect what is written to LOG_DEBUG,
	since now we only write the YK-KSM message when we
	are certain to have a valid response.
2015-07-17 22:25:42 +02:00
Jean Paul Galea
107995fc24 Refactor.
- remove counter and use count($array) instead.
2015-07-17 22:06:13 +02:00
Jean Paul Galea
90b6511301 Cosmetic changes. 2015-07-17 22:04:09 +02:00
Jean Paul Galea
175dca8755 Refactor.
- $id never used.
2015-07-17 22:03:49 +02:00
Jean Paul Galea
4080adef81 Refactor.
- use string substitution rather than concatenation.
2015-07-17 22:00:11 +02:00
Jean Paul Galea
0bbb2e2a5e Cosmetic changes. 2015-07-17 21:57:16 +02:00
Jean Paul Galea
890a446063 Refactor.
- $mrc never used.
2015-07-17 21:55:46 +02:00
Jean Paul Galea
73943ba807 Cosmetic changes. 2015-07-17 21:54:51 +02:00
Jean Paul Galea
a28ad6df69 Refactor.
- enable strict comparison for sscanf result.

- use single quotes where possible.

- styling.
2015-07-17 21:50:28 +02:00
Jean Paul Galea
45ea62445c Cosmetic changes. 2015-07-17 21:38:00 +02:00
Jean Paul Galea
f3fc957431 Fix.
- introduced bug in 0d03c2be29.
2015-07-17 10:11:43 +02:00
Jean Paul Galea
069660e4ef Refactor.
- gmdate(, $x) already defaults to time()
2015-07-17 00:43:11 +02:00
Jean Paul Galea
b1df4deaf1 Refactor.
- unwrap getUTCTimeStamp()

- use gmdate() instead of
	date_default_timezone_set('UTC') + date()
2015-07-17 00:42:42 +02:00
Jean Paul Galea
ba82acf79b Refactor.
- $status is always set in invocation, and never to null.
2015-07-17 00:34:14 +02:00
Jean Paul Galea
c258997f51 Cosmetic changes.
- readability.
2015-07-17 00:33:53 +02:00
Jean Paul Galea
d502b644c0 Refactor.
- improve readability.
2015-07-17 00:29:22 +02:00
Jean Paul Galea
291bd32bae Refactor.
- after each sendResp() we had an exit;

- move exit; inside sendResp() function instead.
2015-07-16 22:47:16 +02:00
Jean Paul Galea
adb7a49608 Prettify. 2015-07-16 22:26:10 +02:00
Jean Paul Galea
6c0b62f77e Prettify hash_equals. 2015-07-16 22:19:47 +02:00
Jean Paul Galea
0d03c2be29 Unwrap, only used here. 2015-07-16 22:14:36 +02:00
Jean Paul Galea
057eb0b563 Removed dead code, second try.
- grep with -i switch.

- left UnixToDbTime...
	will refactor later and unwrap to plain date()

- left timestamp* methods in ykval-db,
	not used but might be useful while refactoring other code.
2015-07-16 22:07:39 +02:00
Jean Paul Galea
b4f9bd4939 Revert "Removed dead code."
This reverts commit 29deb6007d.

PHP functions are __not__ case-sensitive!
2015-07-16 15:44:35 +02:00
Jean Paul Galea
29deb6007d Removed dead code. 2015-07-16 14:26:14 +02:00
Jean Paul Galea
e76c5002f2 Drop php closing tags. 2015-07-15 15:14:25 +02:00
Jean Paul Galea
4da7dc7895 Have enough rope to hang yourself.
- Don't be overly strict,
	and allow users to hang themselves in they want to.
2015-04-14 09:00:18 +02:00
Jean Paul Galea
8df329aa0e Allowed certain cURL options to be configurable.
- When calling either URLs in the sync pool or the KSMs,
    the following curl options are configurable;

    CURLOPT_PROTOCOLS
    CURLOPT_IPRESOLVE
    CURLOPT_SSLVERSION
    CURLOPT_SSL_VERIFYPEER
    CURLOPT_SSL_VERIFYHOST
    CURLOPT_CAINFO
    CURLOPT_CAPATH
2015-04-13 17:42:13 +02:00
Dain Nilsson
1b2dfd136c Use constant time string comparisson for validating HMAC signature
(fixes #26).
2014-09-27 15:47:57 +02:00
Klas Lindfors
775417718a raise logging on KSM response 2014-09-23 10:09:17 +02:00
Klas Lindfors
24b948e7d4 let the ksm decrypt function always call retrieveUrlAsync()
fixes #12
2013-10-16 13:56:34 +02:00
Simon Josefsson
276616d871 Use LF as EOL consistently. 2013-04-17 17:24:50 +02:00
Dain Nilsson
ee1f040b00 Updated copyright headers. 2013-02-04 17:39:36 +01:00
Fredrik Thulin
38185be07d Fix errors with our new logging code :( 2012-06-15 11:59:42 +02:00
Fredrik Thulin
1fd2e77da1 Make logdie() take logger as argument. 2012-06-14 16:16:29 +02:00
Fredrik Thulin
6c80f76102 Get rid of debug() - use log_format() for the formatting part. 2012-06-14 15:23:53 +02:00
Fredrik Thulin
765620f17b Merge branch 'master' of github.com:Yubico/yubikey-val-server-php into devel/refactor_retrieveURLasync 2012-06-14 15:19:19 +02:00
Fredrik Thulin
c8e9eb828f Pass logger object to retrieveURLasync() 2012-06-14 15:19:04 +02:00
Klas Lindfors
6c9edb0db2 instead of passing context to sendResp, give it a logger. 2012-06-14 15:15:47 +02:00
Fredrik Thulin
60bfa8ff1a minor debug log fixes 2012-06-14 15:10:44 +02:00
Fredrik Thulin
46180c9de9 Merge branch 'master' of github.com:Yubico/yubikey-val-server-php into devel/refactor_retrieveURLasync 2012-06-14 15:00:47 +02:00