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

63 Commits

Author SHA1 Message Date
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
Klas Lindfors
01969a279e let sendResp take one more parameter $context
use for logging if it's a response to sync or verify.
2012-06-14 14:55:50 +02:00
Fredrik Thulin
201416b15a retrieveURLasync: logging using ident string 2012-06-14 14:54:12 +02:00
Fredrik Thulin
41f1e15a43 retrieveURLasync: cater for the last need in ykval-synclib. 2012-06-14 14:49:37 +02:00
Fredrik Thulin
df71d3a5a8 retrieveURLasync: make timeout an argument 2012-06-14 14:34:07 +02:00
Fredrik Thulin
658ddef822 Move de-arraying out of retrieveURLasync. 2012-06-14 14:31:00 +02:00
Fredrik Thulin
b5976ad3c9 delete-trailing-whitespace 2012-05-29 11:07:19 +02:00
Klas Lindfors
a8e3d36f80 use urldecode(http_build_request()) instead of looping and building request string 2012-05-16 13:45:36 +02:00
Simon Josefsson
a68539e884 Tiny fixes to silence PHP warnings from Hiroki Nose <Hiroki_Nose@totec.co.jp>.
1. PHP Notice:  Use of undefined constant CURL_OK - assumed 'CURL_OK' in /usr/share/ykval/ykval-common.php on line 156 
 2. PHP Notice:  Undefined index: HTTPS in /usr/share/ykval/ykval-verify.php on line 14 
 3. PHP Notice:  Undefined variable: query in /usr/share/ykval/ykval-db.php on line 186
2011-10-25 08:08:31 +00:00
Simon Josefsson
8ea97ab0fb Sanity check OTP variable before trusting it.
Reported by Ricky Zhou <ricky@fedoraproject.org>.
2010-09-12 10:39:23 +00:00
Simon Josefsson
369a6e0fbc Timestamp responses. 2010-08-22 13:41:21 +00:00
Simon Josefsson
c94affd1d9 When there is only one KSM, use more portable code without async.
Patch from arte42.ripe in issue #7.
2010-05-17 13:08:48 +00:00
Simon Josefsson
218a92c42c More debugging. 2010-02-22 13:17:52 +00:00
Simon Josefsson
754b0d53c8 Re-add, some duplication but needed by KSMdecryptOTP. 2010-02-22 12:55:29 +00:00