Yubico Forum

...visit our web-store at store.yubico.com
It is currently Tue Jan 30, 2018 11:56 am

All times are UTC + 1 hour




Post new topic Reply to topic  [ 2 posts ] 
Author Message
PostPosted: Fri Jul 10, 2009 6:55 pm 
Offline

Joined: Sat May 31, 2008 1:15 am
Posts: 4
Been meaning to post this for a while. This is a demo script (sadly I have yet to apply it anywhere) that uses the curl extension in php. It signs the request, sends over ssl, and verifies the response signature.

Demo: http://rikku.vrillusions.com/~vr/yubikey-verify.php
Source: http://rikku.vrillusions.com/~vr/yubikey-verify.phps

Only bug I've been noticing is sometimes the sent signature for message I sent comes back from yubico as invalid. It's reproducable enough that it goes no more than 10 times before I'll see it. Not sure if it's on my end or yubico's since I don't think the official libraries verify it. I'm sending everything over ssl so verifying hashes is redundant. I set this up as a most secure way possible. If anyone can figure out how to fix that part I'd be happy to know. Otherwise this library could be useful for people that don't even want to depend on PEAR.


Top
 Profile  
Reply with quote  

Share On:

Share on Facebook FacebookShare on Twitter TwitterShare on Tumblr TumblrShare on Google+ Google+

PostPosted: Wed Sep 09, 2009 8:22 pm 
Offline

Joined: Tue Sep 08, 2009 7:52 am
Posts: 3
Code:
         $signature = preg_replace('/\+/', '%2B', $signature);


This will help :) and thanks for sharing


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group