Check-in [c4916c27cd]
Overview
SHA1:c4916c27cd507a421d69c787c89be95212807fc1
Date: 2016-02-19 17:50:11
User: rkeene
Comment:ChromeOS: Slightly better PCSC-NaCl initialization and enabled debugging in all projects
Timelines: family | ancestors | descendants | both | trunk
Downloads: Tarball | ZIP archive
Other Links: files | file ages | folders | manifest
Tags And Properties
Context
2016-02-19
17:50
[5acacab000] ChromeOS: Fix a potential free(NULL) in initialization of PCSC-NaCl (user: rkeene, tags: trunk)
17:50
[c4916c27cd] ChromeOS: Slightly better PCSC-NaCl initialization and enabled debugging in all projects (user: rkeene, tags: trunk)
14:29
[a779f950ca] ChromeOS: Ignore debugging binaries (user: rkeene, tags: trunk)
Changes

Modified build/chrome/build-deps from [2732a78124] to [dd6eb9c6ce].

255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
...
320
321
322
323
324
325
326

327
328
329

330
331
332
333
334
335
336
...
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
		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
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)
................................................................................
		smartcardManagerAppId = "khpfeaanjngmcnplbdlpegiifgpfgdco";
	}

	if (clientId == NULL) {
		clientId = "UNKNOWN";
	}


	drmDelegateImpl = new DomRequestsManager::PpDelegateImpl(instance, core);

	pcscNaClDRM = new DomRequestsManager("pcsc-nacl", drmDelegateImpl);


	pcsc_nacl = new PcscNacl(pcscNaClDRM, smartcardManagerAppId, clientId);

	if (!pcsc_nacl->Initialize()) {
		return;
	}

................................................................................
	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
		make || exit 1
	) || return 1

	mkdir -p "${instdir}/lib"
	cp ../../libcackey.a ../../libcackey_g.a "${instdir}/lib" || return 1

	return 0







|
|







 







>
|
|
|
>







 







|







255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
...
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
...
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
		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 -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)
................................................................................
		smartcardManagerAppId = "khpfeaanjngmcnplbdlpegiifgpfgdco";
	}

	if (clientId == NULL) {
		clientId = "UNKNOWN";
	}

	if (pcscNaClDRM == NULL) {
		drmDelegateImpl = new DomRequestsManager::PpDelegateImpl(instance, core);
	
		pcscNaClDRM = new DomRequestsManager("pcsc-nacl", drmDelegateImpl);
	}

	pcsc_nacl = new PcscNacl(pcscNaClDRM, smartcardManagerAppId, clientId);

	if (!pcsc_nacl->Initialize()) {
		return;
	}

................................................................................
	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 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