mirror of
https://github.com/Yubico/yubikey-val.git
synced 2025-01-20 10:52:15 +01:00
add sn
This commit is contained in:
parent
e43404e935
commit
7f8ecb4728
@ -25,6 +25,12 @@ if ($h == '') {
|
||||
exit;
|
||||
}
|
||||
|
||||
$sn = getHttpVal('sn', '');
|
||||
if ($sn == '') {
|
||||
reply(S_MISSING_PARAMETER, '', $client, $nonce, 'sn');
|
||||
exit;
|
||||
}
|
||||
|
||||
$op = getHttpVal('operation', '');
|
||||
|
||||
if ($op == '') {
|
||||
@ -66,7 +72,7 @@ if ($reqHash != $h) {
|
||||
|
||||
$tokenId = base64_encode(genRandRaw(6));
|
||||
$secret = base64_encode(genRandRaw(16));
|
||||
$keyid = addNewKey($tokenId, 1, $secret, '', $client);
|
||||
$keyid = addNewKey($tokenId, 1, $secret, '', $client, $sn);
|
||||
|
||||
if ($keyid > 0) {
|
||||
debug('Key '.$keyid.' added');
|
||||
|
Loading…
x
Reference in New Issue
Block a user