255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
|
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
|
-
-
+
+
|
for file in logging.h scard_structs_serialization.h dom_requests_manager.h thread_safe_string_pool.h \
pp_var_utils.cc pp_var_utils.h scard_structs_serialization.cc dom_requests_manager.cc logging.cc; do
find . -type f -name "${file}" -exec cp '{}' third_party/pcsc-lite/client-side/ ';'
done
## Create Makefile
cat << \_EOF_ > third_party/pcsc-lite/client-side/Makefile || exit 1
CFLAGS += -Wall -std=gnu++11
CXXFLAGS += -Wall -std=gnu++11
CFLAGS += -Wall -std=gnu++11 -g3 -ggdb3
CXXFLAGS += -Wall -std=gnu++11 -g3 -ggdb3
CPPFLAGS += -I../src/src/PCSC
OBJS = pcsc_nacl.o pcsc_nacl_global.o scard_structs_serialization.o pp_var_utils.o logging.o dom_requests_manager.o pcsc_nacl_init.o
all: libpcsc.a
libpcsc.a: $(OBJS)
|
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
|
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
|
+
-
-
-
+
+
+
+
|
smartcardManagerAppId = "khpfeaanjngmcnplbdlpegiifgpfgdco";
}
if (clientId == NULL) {
clientId = "UNKNOWN";
}
if (pcscNaClDRM == NULL) {
drmDelegateImpl = new DomRequestsManager::PpDelegateImpl(instance, core);
pcscNaClDRM = new DomRequestsManager("pcsc-nacl", drmDelegateImpl);
drmDelegateImpl = new DomRequestsManager::PpDelegateImpl(instance, core);
pcscNaClDRM = new DomRequestsManager("pcsc-nacl", drmDelegateImpl);
}
pcsc_nacl = new PcscNacl(pcscNaClDRM, smartcardManagerAppId, clientId);
if (!pcsc_nacl->Initialize()) {
return;
}
|
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
|
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
|
-
+
|
buildPCSC || return 1
(
cd ../.. || exit 1
make distclean
./configure --host=nacl --with-pcsc-headers="${instdir}/include/PCSC" --with-pcsc-libs="-lpcsc" cackey_cv_pcsc_works=okay --disable-dod-certs || exit 1
./configure --host=nacl --with-pcsc-headers="${instdir}/include/PCSC" --with-pcsc-libs="-lpcsc" cackey_cv_pcsc_works=okay --disable-dod-certs CFLAGS='-g3 -ggdb3 -Wall' || exit 1
make || exit 1
) || return 1
mkdir -p "${instdir}/lib"
cp ../../libcackey.a ../../libcackey_g.a "${instdir}/lib" || return 1
return 0
|