title: Running a compiled C++ program as CGI
body: <p>We're going to add Fingerprint authentication to an iPad app;
  Since we couldn't find any actual fingerprint hardware that works with an iPad, we found DigitalPersona, which is a supplier of great fingerprint scanner hardware, as well as an SDK for Linux C/C++. The idea is that the user would tap "authenticate with fingerprint" which would send a RESTful request to the linux box with the fingerprint scanner; the linux box would be running the compiled C++ program which waits for a user to scan their finger, determines a match or no-match, and send that response back to the iPad program's original request.</p>
  
  <p>So... with very little C++ experience, and even less CGI (but lots of PHP and Objective-C), I was wondering if this is technically possible. Can a CGI binary accessed via HTTP actually wait for local user input (at the console) before sending the result to the HTTP request?</p>
  
  <p>The linux box would run headless, and we'd control some LED's to help with letting the user know that the program is waiting for a fingerprint scan.</p>
  
  <p>SOME Additional Details:
   No PHP is planned on being used. Initially, we want three devices:
  iPad
  Linux
  Server</p>
  
  <p>iPad is running an app which would have a biometric authentication IBOutlet;
  Linux has the fingerprint scanner on it, and a basic Apache; additionally the C++ SDK for the finger print scanner, which we would use to build the CGI program that, when invoked (by server), waits for a finger scanned, and once scanned, sends a "match" or "no match" to it's requestor.
  Server would be the requestor. Once it receives a request from the iPad app, it invokes the CGI program on the Linux box, waiting for a "match" or "no match" request.</p>
  
  <p>Another member of my team offered this:
  iPad is running the app; user clicks 'auth with fingerprint' and the iPad is in a 'waiting' state
  Linux has the finger print scanner, user scans finger print, and the finger print gets sent via HTTPS to the server
  Server would receive a finger print, and match it up with a user. then checks if any iPad is in a 'waiting' state, and which user initiated it. If it matches the finger print-authenticated user, it would accept the iPad's data as an authentic punch, and release the iPad from the waiting state.</p>