fix shit
parent
44924b797a
commit
052ef59e3f
|
@ -1,14 +1,18 @@
|
|||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <openssl/ssl.h>
|
||||
|
||||
#include "nfc.h"
|
||||
#include "barcode.h"
|
||||
#include "ldap.h"
|
||||
#include "tts.h"
|
||||
#include "config.h"
|
||||
#include "network.h"
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
SSL_library_init();
|
||||
|
||||
if (nfc_initialize())
|
||||
{
|
||||
printf("NFC initialization failed\n");
|
||||
|
@ -65,8 +69,9 @@ int main(int argc, char **argv)
|
|||
int BarcodeResult = barcode_read(Barcode);
|
||||
if (BarcodeResult == 0)
|
||||
{
|
||||
tts_speak_cached("bip");
|
||||
tts_speak_cached("Bip, bip!");
|
||||
printf("Scanned barcode %s\n", Barcode);
|
||||
send_purchase(MAINFRAME_HOST, MAINFRAME_PORT, Barcode, UID);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -23,8 +23,13 @@ int initialize_ctx(const char* chainfile, const char* keyfile, const char* passw
|
|||
int result = 1;
|
||||
|
||||
/* Create our context*/
|
||||
meth=SSLv23_method();
|
||||
meth=TLSv1_client_method();
|
||||
ctx=SSL_CTX_new(meth);
|
||||
if (!ctx)
|
||||
{
|
||||
ERR_print_errors_fp(stderr);
|
||||
return -1;
|
||||
}
|
||||
|
||||
/* Load our keys and certificates*/
|
||||
result = SSL_CTX_use_certificate_chain_file(ctx, chainfile);
|
||||
|
|
Reference in New Issue