1
0
mirror of https://github.com/Yubico/yubikey-val.git synced 2025-02-08 12:54:21 +01:00

55 Commits

Author SHA1 Message Date
Jean Paul Galea
f3fc957431 Fix.
- introduced bug in 0d03c2be29d394a7a8a9c9617481f4b6a5ff0556.
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 29deb6007dd66a47ab9275687fcac140a228e404.

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
Simon Josefsson
c1fbae2408 Remove (hopefully) unused stuff. 2010-02-22 12:53:09 +00:00
Olov Danielson
a839954882 Unified logging to use Log class defined in ykval-log.php which in turn uses syslog.
NOTE: ykval common debug function is still available but uses Log class aswell to actually
log message.
2010-01-11 12:06:00 +00:00
Olov Danielson
6788e5effa 1. Nonce introduced in protocol. This required changes in the chain from client->verify->sync.
2. ykval-verify is modified a bit. It now acts more as a flow controller and relies on ykval-synclib 
to do details on DB-calls and counterlogic. The "system" decision making is still located in ykval-verify.
2009-12-15 10:17:51 +00:00
Olov Danielson
55aeffc066 Storing local param info at the time when verify request arrived.
Used to give correct warnings of wether local/remote is out of sync or not
2009-12-04 11:57:49 +00:00
Olov Danielson
f04dcbc0e7 Committed first trial version for replication protocol. 2009-12-02 17:32:20 +00:00
Olov Danielson
65d150ccde Added option to get timestamp and session counters in the response.
Use with

verify?id=x&otp=xxx..&timestamp=1

returns timestamp, sessoncounter and session use in response
2009-10-05 14:53:28 +00:00
Simon Josefsson
9b5602656a Lay foundation for get-api-key service. 2009-08-28 10:55:56 +00:00
Simon Josefsson
479d5b1e7f Cleanups. 2009-05-06 15:07:05 +00:00