move emv crypto tests to folder client/emv/test

This commit is contained in:
merlokk 2017-12-06 18:12:13 +02:00
commit eba3b97a16
14 changed files with 27 additions and 24 deletions

View file

@ -115,17 +115,17 @@ CMDSRCS = crapto1/crapto1.c\
emv/emv_pk.c\ emv/emv_pk.c\
emv/emv_pki.c\ emv/emv_pki.c\
emv/emv_pki_priv.c\ emv/emv_pki_priv.c\
emv/cryptotest.c\ emv/test/cryptotest.c\
emv/apduinfo.c\ emv/apduinfo.c\
emv/dump.c\ emv/dump.c\
emv/tlv.c\ emv/tlv.c\
emv/emv_tags.c\ emv/emv_tags.c\
emv/dol.c\ emv/dol.c\
emv/emvcore.c\ emv/emvcore.c\
emv/crypto_test.c\ emv/test/crypto_test.c\
emv/sda_test.c\ emv/test/sda_test.c\
emv/dda_test.c\ emv/test/dda_test.c\
emv/cda_test.c\ emv/test/cda_test.c\
emv/cmdemv.c\ emv/cmdemv.c\
cmdhf.c \ cmdhf.c \
cmdhf14a.c \ cmdhf14a.c \

View file

@ -9,7 +9,7 @@
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
#include "cmdemv.h" #include "cmdemv.h"
#include "cryptotest.h" #include "test/cryptotest.h"
int UsageCmdHFEMVSelect(void) { int UsageCmdHFEMVSelect(void) {
PrintAndLog("HELP : Executes select applet command:\n"); PrintAndLog("HELP : Executes select applet command:\n");
@ -437,7 +437,7 @@ int CmdHFEMVExec(const char *cmd) {
TLV_ADD(0x9F66, "\x26\x00\x00\x00"); // qVSDC TLV_ADD(0x9F66, "\x26\x00\x00\x00"); // qVSDC
break; break;
case TT_CDA: case TT_CDA:
TLV_ADD(0x9F66, "\x86\x80\x00\x00"); // CDA TLV_ADD(0x9F66, "\x26\x80\x00\x00"); // CDA
break; break;
default: default:
TLV_ADD(0x9F66, "\x26\x00\x00\x00"); // qVSDC TLV_ADD(0x9F66, "\x26\x00\x00\x00"); // qVSDC

View file

@ -178,6 +178,9 @@ static struct crypto_pk *crypto_pk_polarssl_genkey_rsa(va_list vl)
unsigned int nbits = va_arg(vl, unsigned int); unsigned int nbits = va_arg(vl, unsigned int);
unsigned int exp = va_arg(vl, unsigned int); unsigned int exp = va_arg(vl, unsigned int);
if (transient) {
}
int res = rsa_gen_key(&cp->ctx, &myrand, NULL, nbits, exp); int res = rsa_gen_key(&cp->ctx, &myrand, NULL, nbits, exp);
if (res) { if (res) {
fprintf(stderr, "PolarSSL private key generation error res=%x exp=%d nbits=%d.\n", res * -1, exp, nbits); fprintf(stderr, "PolarSSL private key generation error res=%x exp=%d nbits=%d.\n", res * -1, exp, nbits);

View file

@ -17,11 +17,11 @@
#include <config.h> #include <config.h>
#endif #endif
#include "emv_pk.h" #include "../emv_pk.h"
#include "crypto.h" #include "../crypto.h"
#include "dump.h" #include "../dump.h"
#include "tlv.h" #include "../tlv.h"
#include "emv_pki.h" #include "../emv_pki.h"
#include <stdio.h> #include <stdio.h>
#include <string.h> #include <string.h>

View file

@ -17,8 +17,8 @@
#include <config.h> #include <config.h>
#endif #endif
#include "crypto.h" #include "../crypto.h"
#include "dump.h" #include "../dump.h"
#include "util_posix.h" #include "util_posix.h"
#include <stdlib.h> #include <stdlib.h>

View file

@ -19,11 +19,11 @@
#include "dda_test.h" #include "dda_test.h"
#include "emv_pk.h" #include "../emv_pk.h"
#include "crypto.h" #include "../crypto.h"
#include "dump.h" #include "../dump.h"
#include "tlv.h" #include "../tlv.h"
#include "emv_pki.h" #include "../emv_pki.h"
#include <stdio.h> #include <stdio.h>
#include <string.h> #include <string.h>

View file

@ -17,11 +17,11 @@
#include <config.h> #include <config.h>
#endif #endif
#include "emv_pk.h" #include "../emv_pk.h"
#include "crypto.h" #include "../crypto.h"
#include "dump.h" #include "../dump.h"
#include "tlv.h" #include "../tlv.h"
#include "emv_pki.h" #include "../emv_pki.h"
#include <stdio.h> #include <stdio.h>
#include <string.h> #include <string.h>

View file