- Add missing error->sc_error conversions and other
Assuan specific build fixes git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1499 c6295689-39f2-0310-b995-f0e70906c6a9
This commit is contained in:
parent
106351eb5c
commit
c5bd03af1c
|
@ -61,12 +61,12 @@ static void card_inserted(struct openscd_context *dctx,
|
||||||
|
|
||||||
r = sc_connect_card(reader, slot_id, &card);
|
r = sc_connect_card(reader, slot_id, &card);
|
||||||
if (r) {
|
if (r) {
|
||||||
error(dctx->ctx, "Unable to connect to card: %s\n", sc_strerror(r));
|
sc_error(dctx->ctx, "Unable to connect to card: %s\n", sc_strerror(r));
|
||||||
} else {
|
} else {
|
||||||
dctx->cards[n].card = card;
|
dctx->cards[n].card = card;
|
||||||
r = sc_pkcs15_bind(card, &p15card);
|
r = sc_pkcs15_bind(card, &p15card);
|
||||||
if (r) {
|
if (r) {
|
||||||
error(dctx->ctx, "Error with PKCS #15 card: %s\n", sc_strerror(r));
|
sc_error(dctx->ctx, "Error with PKCS #15 card: %s\n", sc_strerror(r));
|
||||||
} else
|
} else
|
||||||
dctx->cards[n].p15card = p15card;
|
dctx->cards[n].p15card = p15card;
|
||||||
}
|
}
|
||||||
|
@ -348,12 +348,12 @@ void command_handler(struct openscd_context *dctx)
|
||||||
if (r == -1)
|
if (r == -1)
|
||||||
break;
|
break;
|
||||||
if (r) {
|
if (r) {
|
||||||
error(dctx->ctx, "Assuan accept problem: %s\n", assuan_strerror(r));
|
sc_error(dctx->ctx, "Assuan accept problem: %s\n", assuan_strerror(r));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
r = assuan_process(assuan_ctx);
|
r = assuan_process(assuan_ctx);
|
||||||
if (r) {
|
if (r) {
|
||||||
error(dctx->ctx, "Assuan processing failed: %s\n", assuan_strerror(r));
|
sc_error(dctx->ctx, "Assuan processing failed: %s\n", assuan_strerror(r));
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -21,7 +21,7 @@ struct openscd_context *dctx = NULL;
|
||||||
|
|
||||||
int opt_pipe = 0;
|
int opt_pipe = 0;
|
||||||
|
|
||||||
void cleanup()
|
void cleanup(void)
|
||||||
{
|
{
|
||||||
if (dctx == NULL)
|
if (dctx == NULL)
|
||||||
return;
|
return;
|
||||||
|
@ -100,7 +100,7 @@ void setup_socket(void)
|
||||||
dctx->socket_fd = fd;
|
dctx->socket_fd = fd;
|
||||||
}
|
}
|
||||||
|
|
||||||
void do_fork()
|
void do_fork(void)
|
||||||
{
|
{
|
||||||
int pid;
|
int pid;
|
||||||
|
|
||||||
|
@ -126,7 +126,7 @@ void do_fork()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void init_dctx()
|
void init_dctx(void)
|
||||||
{
|
{
|
||||||
int r;
|
int r;
|
||||||
|
|
||||||
|
@ -138,8 +138,6 @@ void init_dctx()
|
||||||
|
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
int r;
|
|
||||||
|
|
||||||
dctx = malloc(sizeof(struct openscd_context));
|
dctx = malloc(sizeof(struct openscd_context));
|
||||||
assert(dctx != NULL);
|
assert(dctx != NULL);
|
||||||
memset(dctx, 0, sizeof(struct openscd_context));
|
memset(dctx, 0, sizeof(struct openscd_context));
|
||||||
|
|
|
@ -9,7 +9,7 @@ SUBDIRS = . npinclude
|
||||||
|
|
||||||
EXTRA_DIST = testprog.c
|
EXTRA_DIST = testprog.c
|
||||||
|
|
||||||
INCLUDES = @CPPFLAGS@ @CFLAGS_ASSUAN@
|
INCLUDES = @CPPFLAGS@ @CFLAGS_ASSUAN@ -I$(top_srcdir)/src/signer/npinclude
|
||||||
|
|
||||||
if HAVE_SSL
|
if HAVE_SSL
|
||||||
if HAVE_ASSUAN
|
if HAVE_ASSUAN
|
||||||
|
@ -19,7 +19,7 @@ endif
|
||||||
|
|
||||||
opensc_signer_la_LDFLAGS = -module -avoid-version
|
opensc_signer_la_LDFLAGS = -module -avoid-version
|
||||||
opensc_signer_la_LIBADD = @LIBOPENSC@ @LIBCRYPTO@ @LIBASSUAN@
|
opensc_signer_la_LIBADD = @LIBOPENSC@ @LIBCRYPTO@ @LIBASSUAN@
|
||||||
opensc_signer_la_CFLAGS = $(AM_CFLAGS) -Inpinclude -DXP_UNIX
|
opensc_signer_la_CFLAGS = $(AM_CFLAGS) -DXP_UNIX
|
||||||
opensc_signer_la_SOURCES = \
|
opensc_signer_la_SOURCES = \
|
||||||
opensc-crypto.c opensc-support.c signer.c stubs.c dialog.c
|
opensc-crypto.c opensc-support.c signer.c stubs.c dialog.c
|
||||||
noinst_HEADERS = \
|
noinst_HEADERS = \
|
||||||
|
|
Loading…
Reference in New Issue