mirror of
https://github.com/Proxmark/proxmark3.git
synced 2025-08-22 14:13:42 -07:00
fix
This commit is contained in:
parent
3b2709a44a
commit
e60b9ccae3
2 changed files with 66 additions and 0 deletions
53
client/emv/cryptotest.c
Normal file
53
client/emv/cryptotest.c
Normal file
|
@ -0,0 +1,53 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
// Copyright (C) 2017 Merlok
|
||||
//
|
||||
// This code is licensed to you under the terms of the GNU GPL, version 2 or,
|
||||
// at your option, any later version. See the LICENSE.txt file for the text of
|
||||
// the license.
|
||||
//-----------------------------------------------------------------------------
|
||||
// Crypto algorithms testing
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
#include "cryptotest.h"
|
||||
#include "util.h"
|
||||
|
||||
#include "sda_test.h"
|
||||
#include "bignum.h"
|
||||
#include "aes.h"
|
||||
#include "des.h"
|
||||
#include "rsa.h"
|
||||
#include "sha1.h"
|
||||
|
||||
|
||||
int ExecuteCryptoTests() {
|
||||
int res;
|
||||
bool TestFail = false;
|
||||
|
||||
res = mpi_self_test(true);
|
||||
if (res) TestFail = true;
|
||||
|
||||
res = aes_self_test(true);
|
||||
if (res) TestFail = true;
|
||||
|
||||
res = des_self_test(true);
|
||||
if (res) TestFail = true;
|
||||
|
||||
res = sha1_self_test(true);
|
||||
if (res) TestFail = true;
|
||||
|
||||
res = rsa_self_test(true);
|
||||
if (res) TestFail = true;
|
||||
|
||||
res = exec_sda_test();
|
||||
if (res) TestFail = true;
|
||||
|
||||
PrintAndLog("--------------------------");
|
||||
|
||||
if (TestFail)
|
||||
PrintAndLog("Test(s) [ERROR].");
|
||||
else
|
||||
PrintAndLog("Tests [OK].");
|
||||
|
||||
return TestFail;
|
||||
}
|
||||
|
13
client/emv/cryptotest.h
Normal file
13
client/emv/cryptotest.h
Normal file
|
@ -0,0 +1,13 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
// Copyright (C) 2017 Merlok
|
||||
//
|
||||
// This code is licensed to you under the terms of the GNU GPL, version 2 or,
|
||||
// at your option, any later version. See the LICENSE.txt file for the text of
|
||||
// the license.
|
||||
//-----------------------------------------------------------------------------
|
||||
// Crypto algorithms testing
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
#include <stdbool.h>
|
||||
|
||||
extern int ExecuteCryptoTests();
|
Loading…
Add table
Add a link
Reference in a new issue