<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-gb">
<link rel="self" type="application/atom+xml" href="https://forum.yubico.com/feed.php?f=5&amp;t=247" />

<title>Yubico Forum</title>
<subtitle>...visit our web-store at</subtitle>
<link href="https://forum.yubico.com/index.php" />
<updated>2009-02-04T12:35:35+01:00</updated>

<author><name><![CDATA[Yubico Forum]]></name></author>
<id>https://forum.yubico.com/feed.php?f=5&amp;t=247</id>
<entry>
<author><name><![CDATA[maho]]></name></author>
<updated>2009-02-04T12:35:35+01:00</updated>
<published>2009-02-04T12:35:35+01:00</published>
<id>https://forum.yubico.com/viewtopic.php?t=247&amp;p=1018#p1018</id>
<link href="https://forum.yubico.com/viewtopic.php?t=247&amp;p=1018#p1018"/>
<title type="html"><![CDATA[Re: yms, yubiphpbase and yubico-php-lib]]></title>

<content type="html" xml:base="https://forum.yubico.com/viewtopic.php?t=247&amp;p=1018#p1018"><![CDATA[
The AES secret stored in the database when adding the token using YMS is 45 chars long and when added using mysql it is 24.<br /><br />From what I can tell this problem is caused by the AES encryption of the base64 AES key that yms does<br /><br />If I remove the aesEncrypt($sec) from yubiphpbase/key_lib.php the key is stored in a format that libyubikey-client accepts, the accessed date however is still a problem when it is set to '0000-00-00 00:00:00' and the AES secret shown in YMS is currupted, I guess since it is the AES decoded value of the base64 string.<br /><div class="codetitle"><b>Code:</b></div><div class="codecontent">function addNewKey($devId64, $active, $sec, $note, $client, $user=-1, $serial='') {<br />        global $admEmail;<br />        $usrid = $user &gt; 0 ? $user : base64_encode(time());<br />        $sn = $serial != '' ? $serial : nextSerial();<br />        $stmt = 'INSERT INTO yubikeys '.<br />          '(client_id,active,created,tokenId,userId,secret,counter,low,high,notes,serial) VALUES ('.<br />                $client.','.<br />                $active.','.<br />                'NOW(),'.<br />                mysql_quote($devId64).','.<br />                mysql_quote($usrid).','.<br />                mysql_quote($sec).','.<br />                '0,'.<br />                '0,'.<br />                '0,'.<br />                mysql_quote($note).','.<br />                mysql_quote($sn).<br />                ')';<br />        writeLog($stmt);<br />        if (!query($stmt)) {<br />                $err = 'Failed to add a new key, devId='.$devId64.' for client '.$client;<br />                writeLog($err);<br />                sendMail($admEmail, 'Failed to add a new yubikey', $err, $admEmail);<br />                return null;<br />        }<br />        $a = array();<br />        $a&#91;'keyid'&#93; = mysql_insert_id();<br />        $a&#91;'sn'&#93; = $sn;<br />        $a&#91;'usrid'&#93; = $usrid;<br />        return $a;<br />}</div><p>Statistics: Posted by <a href="https://forum.yubico.com/memberlist.php?mode=viewprofile&amp;u=386">maho</a> — Wed Feb 04, 2009 12:35 pm</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[network-marvels]]></name></author>
<updated>2009-02-04T12:08:01+01:00</updated>
<published>2009-02-04T12:08:01+01:00</published>
<id>https://forum.yubico.com/viewtopic.php?t=247&amp;p=1017#p1017</id>
<link href="https://forum.yubico.com/viewtopic.php?t=247&amp;p=1017#p1017"/>
<title type="html"><![CDATA[Re: yms, yubiphpbase and yubico-php-lib]]></title>

<content type="html" xml:base="https://forum.yubico.com/viewtopic.php?t=247&amp;p=1017#p1017"><![CDATA[
We would appreciate if you can check the values stored in the database when the AES key is inserted using the YMS and when we manually insert the AES Key into the database. Both the time the AES Key values stored in the database should be same.<p>Statistics: Posted by <a href="https://forum.yubico.com/memberlist.php?mode=viewprofile&amp;u=280">network-marvels</a> — Wed Feb 04, 2009 12:08 pm</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[maho]]></name></author>
<updated>2009-02-04T11:29:24+01:00</updated>
<published>2009-02-04T11:29:24+01:00</published>
<id>https://forum.yubico.com/viewtopic.php?t=247&amp;p=1016#p1016</id>
<link href="https://forum.yubico.com/viewtopic.php?t=247&amp;p=1016#p1016"/>
<title type="html"><![CDATA[Re: yms, yubiphpbase and yubico-php-lib]]></title>

<content type="html" xml:base="https://forum.yubico.com/viewtopic.php?t=247&amp;p=1016#p1016"><![CDATA[
I did cut and paste the b64 encoded key from api.yubico.com/yms to my own yms installation, however the result in my database looks nothing like what I inserted into yms, one interesting thing is that if I base64 decode the key from api.yubico base64 tells me that the input is invalid while base64 have no problem decoding the secret from my own installation.<br /><br />If I look at the token in yms when It has been manually added using <br /><div class="codetitle"><b>Code:</b></div><div class="codecontent">mysql yubikey -e &quot;insert into yubikeys(client_id, userId, active, created, accessed, tokenId, secret) values(1,xxx, 1, '`date +&quot;%Y-%m-%d %H:%M:%S&quot;`', '`date +&quot;%Y-%m-%d %H:%M:%S&quot;`', 'base65 yubikeyid', 'base64 AES secret');&quot; </div><br />The AES secret information is completely wrong and incomplete but if I add the key using yms it looks alright.<br /><br />So my guess is that yms encodes the encoded key and then decodes it when displayed in yms, libubikey-client/server-j however does not seem to decode the key that is in the database.<p>Statistics: Posted by <a href="https://forum.yubico.com/memberlist.php?mode=viewprofile&amp;u=386">maho</a> — Wed Feb 04, 2009 11:29 am</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[network-marvels]]></name></author>
<updated>2009-02-04T11:08:13+01:00</updated>
<published>2009-02-04T11:08:13+01:00</published>
<id>https://forum.yubico.com/viewtopic.php?t=247&amp;p=1015#p1015</id>
<link href="https://forum.yubico.com/viewtopic.php?t=247&amp;p=1015#p1015"/>
<title type="html"><![CDATA[Re: yms, yubiphpbase and yubico-php-lib]]></title>

<content type="html" xml:base="https://forum.yubico.com/viewtopic.php?t=247&amp;p=1015#p1015"><![CDATA[
The AES key stored in the YMS database should be base 64 encoded. While using the YMS to enter the AES key, please enter the AES key in base 64 encoded format.<br /><br />Feel free to write back to us in case you face any problems.<p>Statistics: Posted by <a href="https://forum.yubico.com/memberlist.php?mode=viewprofile&amp;u=280">network-marvels</a> — Wed Feb 04, 2009 11:08 am</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[maho]]></name></author>
<updated>2009-02-04T10:49:00+01:00</updated>
<published>2009-02-04T10:49:00+01:00</published>
<id>https://forum.yubico.com/viewtopic.php?t=247&amp;p=1014#p1014</id>
<link href="https://forum.yubico.com/viewtopic.php?t=247&amp;p=1014#p1014"/>
<title type="html"><![CDATA[Re: yms, yubiphpbase and yubico-php-lib]]></title>

<content type="html" xml:base="https://forum.yubico.com/viewtopic.php?t=247&amp;p=1014#p1014"><![CDATA[
I noticed another thing, except that the key added through yms gets BAD_OTP when I try it, it seems like the AES secret in the database is wrong it is almost twice as long as the one I entered, does yms AES encrypt the AES key I enter and if so why?<br />If I add the key manually I'm able verify the OTP so I guess that yms does something wrong.<p>Statistics: Posted by <a href="https://forum.yubico.com/memberlist.php?mode=viewprofile&amp;u=386">maho</a> — Wed Feb 04, 2009 10:49 am</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[maho]]></name></author>
<updated>2009-02-04T10:39:28+01:00</updated>
<published>2009-02-04T10:39:28+01:00</published>
<id>https://forum.yubico.com/viewtopic.php?t=247&amp;p=1013#p1013</id>
<link href="https://forum.yubico.com/viewtopic.php?t=247&amp;p=1013#p1013"/>
<title type="html"><![CDATA[Re: yms, yubiphpbase and yubico-php-lib]]></title>

<content type="html" xml:base="https://forum.yubico.com/viewtopic.php?t=247&amp;p=1013#p1013"><![CDATA[
I might have been a bit early shouting success, not sure who to blame here but server-j seems to have problems dealing with 0000-00-00 00:00:00 which is set on the accessed column in the yubikey table when the token is added to the database.<br /><br />2009-02-04 11:34:55,458 [http-8080-Processor23] WARN  com.yubico.wsapi.Database - java.sql.SQLException: Value '0000-00-00' can not be represe            nted as java.sql.Date<br />2009-02-04 11:34:55,458 [http-8080-Processor23] INFO  com.yubico.wsapi.KeySubsystem - While checking otp=dbdvkiukuvcevijfdcinjfvcbltcjtunvjhfn            jkhtjhe<br />2009-02-04 11:34:55,458 [http-8080-Processor23] INFO  com.yubico.wsapi.KeySubsystem - java.lang.NullPointerException<p>Statistics: Posted by <a href="https://forum.yubico.com/memberlist.php?mode=viewprofile&amp;u=386">maho</a> — Wed Feb 04, 2009 10:39 am</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[maho]]></name></author>
<updated>2009-02-04T10:34:01+01:00</updated>
<published>2009-02-04T10:34:01+01:00</published>
<id>https://forum.yubico.com/viewtopic.php?t=247&amp;p=1012#p1012</id>
<link href="https://forum.yubico.com/viewtopic.php?t=247&amp;p=1012#p1012"/>
<title type="html"><![CDATA[Re: yms, yubiphpbase and yubico-php-lib]]></title>

<content type="html" xml:base="https://forum.yubico.com/viewtopic.php?t=247&amp;p=1012#p1012"><![CDATA[
Thank you!<p>Statistics: Posted by <a href="https://forum.yubico.com/memberlist.php?mode=viewprofile&amp;u=386">maho</a> — Wed Feb 04, 2009 10:34 am</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[network-marvels]]></name></author>
<updated>2009-02-04T10:26:17+01:00</updated>
<published>2009-02-04T10:26:17+01:00</published>
<id>https://forum.yubico.com/viewtopic.php?t=247&amp;p=1011#p1011</id>
<link href="https://forum.yubico.com/viewtopic.php?t=247&amp;p=1011#p1011"/>
<title type="html"><![CDATA[Re: yms, yubiphpbase and yubico-php-lib]]></title>

<content type="html" xml:base="https://forum.yubico.com/viewtopic.php?t=247&amp;p=1011#p1011"><![CDATA[
Please replace the setStatVal function definition from the &quot;yubiphpbase/appinclude.php&quot; file with the function definition given below:<br /><br /><div class="codetitle"><b>Code:</b></div><div class="codecontent">function setStatVal($name, $val) {<br />   if (getStatVal($name) == null) { // Insert new<br />      $stmt = 'INSERT INTO stats (name, value) VALUES ('.<br />         mysql_quote($name).','.<br />         mysql_quote($val).<br />         ')';<br />      query($stmt);<br />   } else { // Update existing<br />      $stmt = 'UPDATE stats SET value='.mysql_quote($val).<br />         ' WHERE name='.mysql_quote($name);<br />      query($stmt);<br />   }<br />}<br /></div><br /><br />Feel free to write back to us in case you face any problems.<p>Statistics: Posted by <a href="https://forum.yubico.com/memberlist.php?mode=viewprofile&amp;u=280">network-marvels</a> — Wed Feb 04, 2009 10:26 am</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[maho]]></name></author>
<updated>2009-02-04T10:10:42+01:00</updated>
<published>2009-02-04T10:10:42+01:00</published>
<id>https://forum.yubico.com/viewtopic.php?t=247&amp;p=1010#p1010</id>
<link href="https://forum.yubico.com/viewtopic.php?t=247&amp;p=1010#p1010"/>
<title type="html"><![CDATA[Re: yms, yubiphpbase and yubico-php-lib]]></title>

<content type="html" xml:base="https://forum.yubico.com/viewtopic.php?t=247&amp;p=1010#p1010"><![CDATA[
Got a new error, Invalid query -- INSERT INTO stats VALUES ('serial','34251') -- Column count doesn't match value count at row 1<br /><br /><br />mysql&gt; show columns from stats;<br />+-------+------------------+------+-----+---------+----------------+<br />| Field | Type             | Null | Key | Default | Extra          |<br />+-------+------------------+------+-----+---------+----------------+<br />| id    | int(10) unsigned | NO   | PRI | NULL    | auto_increment |<br />| name  | varchar(55)      | YES  |     | NULL    |                |<br />| value | varchar(120)     | YES  |     | NULL    |                |<br />+-------+------------------+------+-----+---------+----------------+<br /><br /><br />-M<p>Statistics: Posted by <a href="https://forum.yubico.com/memberlist.php?mode=viewprofile&amp;u=386">maho</a> — Wed Feb 04, 2009 10:10 am</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[network-marvels]]></name></author>
<updated>2009-02-04T09:56:56+01:00</updated>
<published>2009-02-04T09:56:56+01:00</published>
<id>https://forum.yubico.com/viewtopic.php?t=247&amp;p=1009#p1009</id>
<link href="https://forum.yubico.com/viewtopic.php?t=247&amp;p=1009#p1009"/>
<title type="html"><![CDATA[Re: yms, yubiphpbase and yubico-php-lib]]></title>

<content type="html" xml:base="https://forum.yubico.com/viewtopic.php?t=247&amp;p=1009#p1009"><![CDATA[
Here is the table structure of the stats table:<br /><br /><div class="codetitle"><b>Code:</b></div><div class="codecontent">DROP TABLE IF EXISTS `stats`;<br />SET @saved_cs_client     = @@character_set_client;<br />SET character_set_client = utf8;<br />CREATE TABLE `stats` (<br />  `id` int(10) unsigned NOT NULL auto_increment,<br />  `name` varchar(55) default NULL,<br />  `value` varchar(120) default NULL,<br />  PRIMARY KEY  (`id`),<br />) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=latin1;<br />SET character_set_client = @saved_cs_client;<br /></div><br /><br />Feel free to write back to us in case you face any problems.<p>Statistics: Posted by <a href="https://forum.yubico.com/memberlist.php?mode=viewprofile&amp;u=280">network-marvels</a> — Wed Feb 04, 2009 9:56 am</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[maho]]></name></author>
<updated>2009-02-03T18:05:47+01:00</updated>
<published>2009-02-03T18:05:47+01:00</published>
<id>https://forum.yubico.com/viewtopic.php?t=247&amp;p=1005#p1005</id>
<link href="https://forum.yubico.com/viewtopic.php?t=247&amp;p=1005#p1005"/>
<title type="html"><![CDATA[Re: yms, yubiphpbase and yubico-php-lib]]></title>

<content type="html" xml:base="https://forum.yubico.com/viewtopic.php?t=247&amp;p=1005#p1005"><![CDATA[
<div class="quotetitle">network-marvels wrote:</div><div class="quotecontent"><br />We are unable to recreate the problem you are facing. There is no stats table in our Yubico database.<br /></div><br /><br />That is pretty much my problem I would love to have the stats table what ever it is, it would make adding new keys so much easier.<p>Statistics: Posted by <a href="https://forum.yubico.com/memberlist.php?mode=viewprofile&amp;u=386">maho</a> — Tue Feb 03, 2009 6:05 pm</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[maho]]></name></author>
<updated>2009-02-03T18:04:14+01:00</updated>
<published>2009-02-03T18:04:14+01:00</published>
<id>https://forum.yubico.com/viewtopic.php?t=247&amp;p=1004#p1004</id>
<link href="https://forum.yubico.com/viewtopic.php?t=247&amp;p=1004#p1004"/>
<title type="html"><![CDATA[Re: yms, yubiphpbase and yubico-php-lib]]></title>

<content type="html" xml:base="https://forum.yubico.com/viewtopic.php?t=247&amp;p=1004#p1004"><![CDATA[
Sure, to large to attach so <a href="http://www.mighty.se/yubico-stuff.tar" class="postlink">http://www.mighty.se/yubico-stuff.tar</a><br /><br />-M<p>Statistics: Posted by <a href="https://forum.yubico.com/memberlist.php?mode=viewprofile&amp;u=386">maho</a> — Tue Feb 03, 2009 6:04 pm</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[network-marvels]]></name></author>
<updated>2009-02-03T16:32:27+01:00</updated>
<published>2009-02-03T16:32:27+01:00</published>
<id>https://forum.yubico.com/viewtopic.php?t=247&amp;p=1003#p1003</id>
<link href="https://forum.yubico.com/viewtopic.php?t=247&amp;p=1003#p1003"/>
<title type="html"><![CDATA[Re: yms, yubiphpbase and yubico-php-lib]]></title>

<content type="html" xml:base="https://forum.yubico.com/viewtopic.php?t=247&amp;p=1003#p1003"><![CDATA[
We are unable to recreate the problem you are facing. There is no stats table in our Yubico database.<br />We would appreciate if you can provide us all the source code files that you are using to install the YMS and validation server. We would look into the source code files provided by you and we will update you accordingly.<p>Statistics: Posted by <a href="https://forum.yubico.com/memberlist.php?mode=viewprofile&amp;u=280">network-marvels</a> — Tue Feb 03, 2009 4:32 pm</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[network-marvels]]></name></author>
<updated>2009-02-02T07:39:17+01:00</updated>
<published>2009-02-02T07:39:17+01:00</published>
<id>https://forum.yubico.com/viewtopic.php?t=247&amp;p=997#p997</id>
<link href="https://forum.yubico.com/viewtopic.php?t=247&amp;p=997#p997"/>
<title type="html"><![CDATA[Re: yms, yubiphpbase and yubico-php-lib]]></title>

<content type="html" xml:base="https://forum.yubico.com/viewtopic.php?t=247&amp;p=997#p997"><![CDATA[
Thanks for providing the information. We are working on the problem and we will update you accordingly.<p>Statistics: Posted by <a href="https://forum.yubico.com/memberlist.php?mode=viewprofile&amp;u=280">network-marvels</a> — Mon Feb 02, 2009 7:39 am</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[maho]]></name></author>
<updated>2009-01-30T11:53:58+01:00</updated>
<published>2009-01-30T11:53:58+01:00</published>
<id>https://forum.yubico.com/viewtopic.php?t=247&amp;p=990#p990</id>
<link href="https://forum.yubico.com/viewtopic.php?t=247&amp;p=990#p990"/>
<title type="html"><![CDATA[Re: yms, yubiphpbase and yubico-php-lib]]></title>

<content type="html" xml:base="https://forum.yubico.com/viewtopic.php?t=247&amp;p=990#p990"><![CDATA[
Sure.<br /><br />yms logs:<br />2009-01-29 17:23:46: Check time? 1 by 10.20.0.29<br />2009-01-29 17:23:50: SELECT id, pin FROM admin WHERE keyid= by 10.20.0.29<br />2009-01-29 17:23:50: Invalid query -- SELECT id, pin FROM admin WHERE keyid= -- by 10.20.0.29<br />2009-01-29 17:24:17: SELECT id, pin FROM admin WHERE keyid= by 10.20.0.29<br />2009-01-29 17:24:17: Invalid query -- SELECT id, pin FROM admin WHERE keyid= -- by 10.20.0.29<br />2009-01-29 17:24:33: Check time? 1 by 10.20.0.29<br />2009-01-29 17:24:42: SELECT id, pin FROM admin WHERE keyid= by 10.20.0.29<br />2009-01-29 17:24:42: Invalid query -- SELECT id, pin FROM admin WHERE keyid= -- by 10.20.0.29<br />2009-01-29 17:24:49: SELECT id, pin FROM admin WHERE keyid= by 10.20.0.29<br />2009-01-29 17:24:49: Invalid query -- SELECT id, pin FROM admin WHERE keyid= -- by 10.20.0.29<br />2009-01-29 17:24:51: SELECT id, pin FROM admin WHERE keyid= by 10.20.0.29<br />2009-01-29 17:24:51: Invalid query -- SELECT id, pin FROM admin WHERE keyid= -- by 10.20.0.29<br />2009-01-29 17:24:56: SELECT id, pin FROM admin WHERE keyid= by 10.20.0.29<br />2009-01-29 17:24:56: Invalid query -- SELECT id, pin FROM admin WHERE keyid= -- by 10.20.0.29<br />2009-01-29 17:31:57: Check time? 1 by 10.20.0.29<br />2009-01-29 17:32:04: SELECT id, pin FROM admin WHERE keyid=1 by 10.20.0.29<br />2009-01-29 17:32:26: # act=find_client, client=-1 by 10.20.0.29<br />2009-01-29 17:46:21: Del adm key 2 by 10.20.0.29<br />2009-01-29 17:46:28: Del adm key 2 by 10.20.0.29<br />2009-01-29 17:46:37: Del adm key 1 by 10.20.0.29<br />2009-01-29 17:46:38: Del adm key 1 by 10.20.0.29<br />2009-01-29 17:46:46: Del adm key 2 by 10.20.0.29<br />2009-01-29 17:47:35: idstr=ghjdhhecrhvd idtype=tokid by 10.20.0.29<br />2009-01-29 17:48:16: idstr=ghjdhhecrhvd idtype=tokid by 10.20.0.29<br />2009-01-29 17:49:05: Del adm key 2 by 10.20.0.29<br />2009-01-29 17:49:05: Invalid query -- UPDATE clients SET perm_id=2 WHERE id=1 -- by 10.20.0.29<br />2009-01-29 17:54:51: # act=find_client, client=-1 by 10.20.0.29<br />2009-01-29 21:51:01: Del adm key 1 by 10.20.0.30<br />2009-01-29 21:51:02: Del adm key 1 by 10.20.0.30<br />2009-01-29 21:55:19: Invalid query -- SELECT value FROM stats WHERE name='serial' -- by 10.20.0.30<br />2009-01-29 22:12:27: Invalid query -- SELECT value FROM yubikeys WHERE name='serial' -- by 10.20.0.30<br /><br /><br />Here are my notes from the installation of yms, my complete setup can be found at <!-- m --><a class="postlink" href="http://www.mattiasholm.com/node/25">http://www.mattiasholm.com/node/25</a><!-- m --> a work in progress.<br /><br /><br /><br />The database setup script that is recomended by the documentation needs to be altered to fit the setup we got, they basically want to create the client, yubikeys and perms tables again, we dont..<br /><br />SET character_set_client = utf8;<br />CREATE TABLE `admin` (<br />  `id` int(10) unsigned NOT NULL auto_increment,<br />  `keyid` int(11) NOT NULL default '0',<br />  `note` varchar(45) default NULL,<br />  `pin` varchar(120) default NULL,<br />  `last_access` datetime default NULL,<br />  `ip` varchar(45) default NULL,<br />  `creation` datetime default NULL,<br />  `client` int(11) NOT NULL default '0',<br />  `timeout` int(10) unsigned NOT NULL default '3600',<br />  PRIMARY KEY  (`id`),<br />  KEY `FK_admin_2` (`keyid`),<br />  KEY `FK_admin_1` (`client`),<br />  CONSTRAINT `FK_admin_1` FOREIGN KEY (`client`) REFERENCES `clients` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,<br />  CONSTRAINT `FK_admin_2` FOREIGN KEY (`keyid`) REFERENCES `yubikeys` (`id`) ON DELETE CASCADE ON UPDATE CASCADE<br />) ENGINE=InnoDB AUTO_INCREMENT=33 DEFAULT CHARSET=latin1;<br /><br />CREATE TABLE `buyers` (<br />  `id` int(10) unsigned NOT NULL auto_increment,<br />  `email` varchar(100) default NULL,<br />  `created` datetime default NULL,<br />  `addr` varchar(200) default NULL,<br />  `qty` int(10) unsigned default NULL,<br />  `client_id` int(11) NOT NULL default '0',<br />  `name` varchar(45) default NULL,<br />  PRIMARY KEY  (`id`),<br />  KEY `FK_client_id_1` USING BTREE (`client_id`),<br />  CONSTRAINT `FK_client_info_1` FOREIGN KEY (`client_id`) REFERENCES `clients` (`id`) ON DELETE CASCADE ON UPDATE CASCADE<br />) ENGINE=InnoDB AUTO_INCREMENT=2201 DEFAULT CHARSET=latin1;<br /><br />CREATE TABLE `history` (<br />  `id` int(10) unsigned NOT NULL auto_increment,<br />  `usrid` int(10) unsigned NOT NULL default '0',<br />  `note` varchar(45) NOT NULL default '',<br />  `ip` varchar(45) NOT NULL default '',<br />  `creation` datetime NOT NULL default '0000-00-00 00:00:00',<br />  `keyid` int(10) unsigned NOT NULL default '0',<br />  PRIMARY KEY  (`id`),<br />  KEY `FK_hist_1` (`usrid`)<br />) ENGINE=InnoDB AUTO_INCREMENT=347 DEFAULT CHARSET=latin1;<br /><br />alter table clients add `notes` varchar(100) default NULL;<br />alter table clients add `chk_sig` tinyint(1) NOT NULL default '0';<br />alter table clients add `chk_owner` tinyint(1) NOT NULL default '0';<br />alter table clients add `chk_time` tinyint(1) NOT NULL default '1';<br />alter table yubikeys add `notes` varchar(100) default NULL;<br />alter table yubikeys add `serial` varchar(45) default NULL;<br /><br />copy config.php.sample to config.php<br />open config.php with an editor and change<br />$opt, a key from you yubikey<br />$pin, you pin tu use when accessing YMS<br />$aesParams['__ADM_KEY_SECRET__'], your yubikeys AES secret<br />$aesParams['__ENC_KEY_SECRET__'], secret to use when encrypting data in the database, keep this one safe for future use<br />$baseParams['__DB_HOST__'], database host<br />$baseParams['__DB_USER__'], database user<br />$baseParams['__DB_PW__'], database password<br />$baseParams['__DB_NAME__', database name<br />$baseParams['__ROOT_EMAIL__'], your email address or whoever is responsible for this<br />$baseParams['__ORDER_URL__'], url to user yubikey request form perhaps?<br />$baseParams['__DOMAIN__'], your domain<br />$baseParams['__DOC_ROOT__'], filesystem path to apache root<br />$valParams['__VAL_URL__'], validation server URL if you have followed my instructions it should be <!-- m --><a class="postlink" href="http://localhost:8080/wsapi/verify?id=">http://localhost:8080/wsapi/verify?id=</a><!-- m --> make sure that this one does not point to verify.php which is the default value.<br />$headParams['__SHORTCUT_ICON_URL__'], URL to favicon, should be located in yms/images<br />$letterParams['__KMS_URL__'], URL to yms, why the keep calling it kms is a mystery <img src="https://forum.yubico.com/images/smilies/icon_e_smile.gif" alt=":)" title="Smile" /><br /><br />When finished save and close config.php<br />before you can go on and run the installer you need to install yubikey-val-server-php in to yourwebroot/wsapi since there are undocumented dependencies to a file in that package..<br /><br />The script will try to create the first user which already exists so we need to modify the script, open install.php and remove the entire variables starting with<br />$stmt = 'INSERT INTO clients VALUES (1,1,1,' .<br />and<br />$stmt = 'INSERT INTO yubikeys VALUES (1,1,1,' .<br />or just remove quert($stmt); beneath those variables.<br /><br />run install.php, php install.php<br />the install script is very likely to fail a few times, that is no problem just correct the problems and run the script again..<br /><br />After a successful run of install.php open config.php and remove everything between the remove this section comments.<br /><br />copy yms to your web server root and rename it to kms<br /><br />touch /tmp/kms.log;chown apache.apache /tmp/kms.log<br /><br />In yubiphpbase/key_lib.php there is a function that sets $id to default if no $id is provided, I don't know what this is and it will not work unless there is an id 28 in the clients table, I just set to to 1 to make it work, I have no idea what the impact on security or other functionality will be..<br />function verifyYubikeyOtp($otp, $id=28) &gt; function verifyYubikeyOtp($otp, $id=1)<br />If I can find some time I might patch this but for now, good enough..<p>Statistics: Posted by <a href="https://forum.yubico.com/memberlist.php?mode=viewprofile&amp;u=386">maho</a> — Fri Jan 30, 2009 11:53 am</p><hr />
]]></content>
</entry>
</feed>