From 0c94974da652a5d7a2281dba0e828bf146909f8a Mon Sep 17 00:00:00 2001 From: Andre Puschmann Date: Sat, 5 May 2018 20:39:58 +0200 Subject: [PATCH] add compile-time flag to turn off pin check --- srsue/src/upper/pcsc_usim.cc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/srsue/src/upper/pcsc_usim.cc b/srsue/src/upper/pcsc_usim.cc index 7bbaf0f01..26b7f8a1a 100644 --- a/srsue/src/upper/pcsc_usim.cc +++ b/srsue/src/upper/pcsc_usim.cc @@ -29,6 +29,8 @@ #include #include "srslte/common/bcd_helpers.h" +#define CHECK_SIM_PIN 1 + using namespace srslte; namespace srsue{ @@ -502,6 +504,7 @@ int pcsc_usim::scard::init(usim_args_t *args, srslte::log *log_) } } +#if CHECK_SIM_PIN // Verify whether CHV1 (PIN1) is needed to access the card. ret = pin_needed(buf, blen); if (ret < 0) { @@ -530,6 +533,9 @@ int pcsc_usim::scard::init(usim_args_t *args, srslte::log *log_) goto clean_exit; } } +#else + pin1_needed = false; +#endif ret = SCardEndTransaction(scard_handle, SCARD_LEAVE_CARD); if (ret != SCARD_S_SUCCESS) {