2009-04-27 17:57:24 +00:00
|
|
|
<?php # -*- php -*-
|
2009-03-10 22:50:35 +00:00
|
|
|
|
2009-08-28 10:55:56 +00:00
|
|
|
# For the validation interface.
|
2009-03-10 22:50:35 +00:00
|
|
|
$baseParams = array ();
|
2009-08-28 10:55:56 +00:00
|
|
|
$baseParams['__YKVAL_DB_HOST__'] = 'localhost';
|
|
|
|
$baseParams['__YKVAL_DB_NAME__'] = 'ykval';
|
|
|
|
$baseParams['__YKVAL_DB_USER__'] = 'ykval_verifier';
|
2009-12-02 17:32:20 +00:00
|
|
|
$baseParams['__YKVAL_DB_PW__'] = 'lab';
|
|
|
|
# For the validation server sync
|
2009-12-04 12:22:07 +00:00
|
|
|
$baseParams['__YKVAL_SYNC_POOL__'] = "http://api2.yubico.com/wsapi/sync;http://api3.yubico.com/wsapi/sync;http://api4.yubico.com/wsapi/sync";
|
2009-12-07 15:31:33 +00:00
|
|
|
$baseParams['__YKVAL_SYNC_INTERVAL__'] = 60;
|
|
|
|
$baseParams['__YKVAL_SYNC_MAX_SIMUL__'] = 50;
|
|
|
|
$baseParams['__YKVAL_SYNC_TIMEOUT__'] = 30;
|
2009-12-07 16:10:07 +00:00
|
|
|
$baseParams['__YKVAL_SYNC_OLD_LIMIT__'] = 1;
|
2009-08-28 10:55:56 +00:00
|
|
|
|
|
|
|
# For the get-api-key service.
|
|
|
|
$baseParams['__YKGAK_DB_HOST__'] = $baseParams['__YKVAL_DB_HOST__'];
|
|
|
|
$baseParams['__YKGAK_DB_NAME__'] = $baseParams['__YKVAL_DB_NAME__'];
|
|
|
|
$baseParams['__YKGAK_DB_USER__'] = 'ykval_getapikey';
|
2009-08-31 08:25:01 +00:00
|
|
|
$baseParams['__YKGAK_DB_PW__'] = 'secondpassword';
|
2009-08-28 10:55:56 +00:00
|
|
|
$baseParams['__YKGAK_ID__'] = '';
|
|
|
|
$baseParams['__YKGAK_KEY__'] = '';
|
2009-04-27 17:57:24 +00:00
|
|
|
|
2009-08-31 08:25:01 +00:00
|
|
|
# For the revoke service.
|
|
|
|
$baseParams['__YKR_DB_HOST__'] = $baseParams['__YKVAL_DB_HOST__'];
|
|
|
|
$baseParams['__YKR_DB_NAME__'] = $baseParams['__YKVAL_DB_NAME__'];
|
|
|
|
$baseParams['__YKR_DB_USER__'] = 'ykval_revoke';
|
|
|
|
$baseParams['__YKR_DB_PW__'] = 'thirdpassword';
|
|
|
|
$baseParams['__YKR_IP__'] = '1.2.3.4';
|
|
|
|
|
2009-12-02 17:32:20 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
2009-04-27 17:57:24 +00: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 10:47:22 +00:00
|
|
|
return array("http://another-ykkms.example.com/wsapi/decrypt?otp=$otp");
|
2009-04-27 17:57:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
if (preg_match ("/^dteffujehknh/", $otp)) {
|
2009-05-05 10:47:22 +00:00
|
|
|
return array("http://different-ykkms.example.com/wsapi/decrypt?otp=$otp");
|
2009-04-27 17:57:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
return array(
|
2009-05-05 10:47:22 +00:00
|
|
|
"http://ykkms1.example.com/wsapi/decrypt?otp=$otp",
|
|
|
|
"http://ykkms2.example.com/wsapi/decrypt?otp=$otp",
|
2009-04-27 17:57:24 +00:00
|
|
|
);
|
|
|
|
}
|
2009-03-10 22:50:35 +00:00
|
|
|
|
|
|
|
?>
|