ccid-emulator: Build libopensc from source code

There is no longer an external (or stable) interface for libopensc.
Linking this program with an existing version of libopensc that is
pre-installed in the system library paths is not practical.

However, a specific snapshot of the OpenSC source code is embedded
here as a Git submodule (and included in the source distributions).
Build libopensc from this and statically link it into this program.
(Options such as '--enable-openpace' that are passed to ./configure
will be forwarded to control the build configuration of libopensc.)

Remove code that existed for compatibility when dynamically linking
with older versions of libopensc.
This commit is contained in:
David Ward
2020-04-11 10:09:27 -04:00
parent c18df66d4c
commit bc8b237c5a
16 changed files with 40 additions and 456 deletions

View File

@@ -34,10 +34,6 @@
#include "config.h"
#include "scutil.h"
#ifndef HAVE_BOXING_BUF_TO_PACE_INPUT
#include <libopensc/reader-boxing.c>
#endif
static sc_context_t *ctx = NULL;
static sc_card_t *card = NULL;
static sc_reader_t *reader = NULL;
@@ -464,11 +460,6 @@ perform_PC_to_RDR_IccPowerOn(const __u8 *in, size_t inlen, __u8 **out, size_t *o
}
if (sc_result >= 0) {
#ifdef WITH_PACE
#ifndef DISABLE_GLOBAL_BOXING_INITIALIZATION
sc_initialize_boxing_cmds(ctx);
#endif
#endif
return get_RDR_to_PC_SlotStatus(request->bSeq,
sc_result, out, outlen, card->atr.value, card->atr.len);
} else {