235
236
237
238
239
240
241
242
243
244
245
246
247
248
|
#ifndef PCSC_NACL_H
#define PCSC_NACL_H 1
#ifdef __cplusplus
#include <ppapi/cpp/core.h>
#include <ppapi/cpp/instance.h>
void pcscNaClInit(pp::Instance *instance, pp::Core *core);
#endif
#endif
_EOF_
# Copy out JavaScript files for later use
mkdir "${instdir}/js" || exit 1
cp common-utils/*.js "${instdir}/js" || exit 1
|
>
>
|
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
|
#ifndef PCSC_NACL_H
#define PCSC_NACL_H 1
#ifdef __cplusplus
#include <ppapi/cpp/core.h>
#include <ppapi/cpp/instance.h>
void pcscNaClInit(pp::Instance *instance, pp::Core *core);
bool pcscNaClHandleMessage(const pp::Var &message);
#endif
#endif
_EOF_
# Copy out JavaScript files for later use
mkdir "${instdir}/js" || exit 1
cp common-utils/*.js "${instdir}/js" || exit 1
|
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
|
_EOF_
## Create initialization procedure, since it lacks one
cat << \_EOF_ > third_party/pcsc-lite/client-side/pcsc_nacl_init.cc
#include <ppapi/cpp/core.h>
#include <ppapi/cpp/instance.h>
#include <stdio.h>
#include "pcsc_nacl_global.h"
#include "dom_requests_manager.h"
#include "pcsc_nacl.h"
void pcscNaClInit(pp::Instance *instance, pp::Core *core) {
DomRequestsManager::PpDelegateImpl *drmDelegateImpl;
PcscNacl *pcsc_nacl;
fprintf(stderr, "Called pcscNaClInit()\n");
drmDelegateImpl = new DomRequestsManager::PpDelegateImpl(instance, core);
pcsc_nacl = new PcscNacl(new DomRequestsManager("pcsc-nacl", drmDelegateImpl), "khpfeaanjngmcnplbdlpegiifgpfgdco", "CACKey");
fprintf(stderr, "New PcscNacl object = %p\n", pcsc_nacl);
if (!pcsc_nacl->Initialize()) {
fprintf(stderr, "PcscNacl->Initialize() failed !");
return;
}
SetPcscNaclGlobalInstance(pcsc_nacl);
fprintf(stderr, "Global instance set to %p\n", pcsc_nacl);
fprintf(stderr, "Returning.\n");
return;
}
_EOF_
## Make it
make -C third_party/pcsc-lite/client-side || exit 1
# Install the built libpcsc
mkdir -p "${instdir}/lib" || exit 1
|
>
>
>
|
>
>
>
>
>
>
|
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
|
_EOF_
## Create initialization procedure, since it lacks one
cat << \_EOF_ > third_party/pcsc-lite/client-side/pcsc_nacl_init.cc
#include <ppapi/cpp/core.h>
#include <ppapi/cpp/instance.h>
#include <unistd.h>
#include <stdio.h>
#include "pcsc_nacl_global.h"
#include "dom_requests_manager.h"
#include "pcsc_nacl.h"
static DomRequestsManager *pcscNaClDRM = NULL;
void pcscNaClInit(pp::Instance *instance, pp::Core *core) {
DomRequestsManager::PpDelegateImpl *drmDelegateImpl;
PcscNacl *pcsc_nacl;
fprintf(stderr, "Called pcscNaClInit()\n");
drmDelegateImpl = new DomRequestsManager::PpDelegateImpl(instance, core);
pcscNaClDRM = new DomRequestsManager("pcsc-nacl", drmDelegateImpl);
pcsc_nacl = new PcscNacl(pcscNaClDRM, "khpfeaanjngmcnplbdlpegiifgpfgdco", "CACKey");
fprintf(stderr, "New PcscNacl object = %p\n", pcsc_nacl);
if (!pcsc_nacl->Initialize()) {
fprintf(stderr, "PcscNacl->Initialize() failed !");
return;
}
SetPcscNaclGlobalInstance(pcsc_nacl);
fprintf(stderr, "Global instance set to %p\n", pcsc_nacl);
fprintf(stderr, "Returning.\n");
return;
}
bool pcscNaClHandleMessage(const pp::Var &message) {
return(pcscNaClDRM->HandleMessage(message));
}
_EOF_
## Make it
make -C third_party/pcsc-lite/client-side || exit 1
# Install the built libpcsc
mkdir -p "${instdir}/lib" || exit 1
|