Basic U2FDevice implementation.

This commit is contained in:
2019-08-23 13:00:22 +01:00
parent 2987cbe26e
commit 0606772cc3
5 changed files with 68 additions and 74 deletions

View File

@@ -21,7 +21,7 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
#include "Storage.hpp"
#include "Controller.hpp"
#include "LED.hpp"
#include <signal.h>
#include <csignal>
#include <unistd.h>
using namespace std;
@@ -40,9 +40,6 @@ bool initialiseLights(const string& prog) {
{
cerr << e.what() << endl;
if (getuid() != 0)
cerr << "Try running as root, using \'sudo " << prog << "\'" << endl;
return false;
}
@@ -65,9 +62,6 @@ int handleTransactions(const string& prog, const string& privKeyDir)
{
cerr << e.what() << endl;
if (getuid() != 0)
cerr << "Try running as root, using \'sudo " << prog << "\'" << endl;
raise(SIGINT);
return EXIT_FAILURE;
}
@@ -88,9 +82,6 @@ bool deinitialiseLights(const string& prog) {
{
cerr << e.what() << endl;
if (getuid() != 0)
cerr << "Try running as root, using \'sudo " << prog << "\'" << endl;
return false;
}