2009-04-27 19:57:24 +02:00
|
|
|
<?php # -*- php -*-
|
2009-03-10 23:50:35 +01:00
|
|
|
|
2009-08-28 12:55:56 +02:00
|
|
|
# For the validation interface.
|
2009-03-10 23:50:35 +01:00
|
|
|
$baseParams = array ();
|
2009-08-28 12:55:56 +02:00
|
|
|
$baseParams['__YKVAL_DB_HOST__'] = 'localhost';
|
|
|
|
$baseParams['__YKVAL_DB_NAME__'] = 'ykval';
|
|
|
|
$baseParams['__YKVAL_DB_USER__'] = 'ykval_verifier';
|
2009-12-02 18:32:20 +01:00
|
|
|
$baseParams['__YKVAL_DB_PW__'] = 'lab';
|
2009-12-15 15:56:01 +01:00
|
|
|
|
2009-12-02 18:32:20 +01:00
|
|
|
# For the validation server sync
|
2009-12-15 15:56:01 +01:00
|
|
|
$baseParams['__YKVAL_SYNC_POOL__'] = "http://1.2.3.4/wsapi/2.0/sync;http://2.3.4.5/wsapi/2.0/sync;http://3.4.5.6/wsapi/2.0/sync";
|
|
|
|
|
|
|
|
# Specify how often the sync daemon awakens
|
2009-12-07 16:31:33 +01:00
|
|
|
$baseParams['__YKVAL_SYNC_INTERVAL__'] = 60;
|
2009-12-15 15:56:01 +01:00
|
|
|
# Specify how long the sync daemon will wait for response
|
2009-12-07 20:13:20 +01:00
|
|
|
$baseParams['__YKVAL_SYNC_RESYNC_TIMEOUT__'] = 30;
|
2009-12-15 15:56:01 +01:00
|
|
|
# Specify how old entries in the database should be considered aborted attempts
|
2009-12-07 17:10:07 +01:00
|
|
|
$baseParams['__YKVAL_SYNC_OLD_LIMIT__'] = 1;
|
2009-12-15 15:56:01 +01:00
|
|
|
|
|
|
|
# These are settings for the validation server.
|
2009-12-07 20:13:20 +01:00
|
|
|
$baseParams['__YKVAL_SYNC_FAST_LEVEL__'] = 1;
|
|
|
|
$baseParams['__YKVAL_SYNC_SECURE_LEVEL__'] = 50;
|
|
|
|
$baseParams['__YKVAL_SYNC_DEFAULT_LEVEL__'] = 50;
|
|
|
|
$baseParams['__YKVAL_SYNC_DEFAULT_TIMEOUT__'] = 1;
|
2009-08-28 12:55:56 +02:00
|
|
|
|
2009-12-15 15:56:01 +01:00
|
|
|
$baseParams['__YKVAL_SYNC_MAX_SIMUL__'] = 50;
|
|
|
|
|
2009-04-27 19:57:24 +02:00
|
|
|
// otp2ksmurls: Return array of YK-KSM URLs for decrypting OTP for
|
|
|
|
// CLIENT. The URLs must be fully qualified, i.e., contain the OTP
|
|
|
|
// itself.
|
|
|
|
function otp2ksmurls ($otp, $client) {
|
|
|
|
if ($client == 42) {
|
2009-05-05 12:47:22 +02:00
|
|
|
return array("http://another-ykkms.example.com/wsapi/decrypt?otp=$otp");
|
2009-04-27 19:57:24 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
if (preg_match ("/^dteffujehknh/", $otp)) {
|
2009-05-05 12:47:22 +02:00
|
|
|
return array("http://different-ykkms.example.com/wsapi/decrypt?otp=$otp");
|
2009-04-27 19:57:24 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
return array(
|
2009-05-05 12:47:22 +02:00
|
|
|
"http://ykkms1.example.com/wsapi/decrypt?otp=$otp",
|
|
|
|
"http://ykkms2.example.com/wsapi/decrypt?otp=$otp",
|
2009-04-27 19:57:24 +02:00
|
|
|
);
|
|
|
|
}
|
2009-03-10 23:50:35 +01:00
|
|
|
|
|
|
|
?>
|