remove obsolete module support in libopensc (scdl should now
be used) git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1958 c6295689-39f2-0310-b995-f0e70906c6a9
This commit is contained in:
parent
17fa73fb5d
commit
a37338352a
@ -13,7 +13,7 @@ bin_SCRIPTS = opensc-config
|
||||
|
||||
lib_LTLIBRARIES = libopensc.la
|
||||
libopensc_la_SOURCES = \
|
||||
sc.c ctx.c ui.c log.c errors.c portability.c module.c \
|
||||
sc.c ctx.c ui.c log.c errors.c portability.c \
|
||||
asn1.c base64.c sec.c card.c iso7816.c dir.c padding.c \
|
||||
\
|
||||
pkcs15.c pkcs15-cert.c pkcs15-data.c pkcs15-pin.c \
|
||||
|
@ -11,7 +11,7 @@ HEADERS = \
|
||||
HEADERSDIR = $(TOPDIR)\src\include\opensc
|
||||
|
||||
OBJECTS = \
|
||||
sc.obj ctx.obj ui.obj log.obj errors.obj portability.obj module.obj \
|
||||
sc.obj ctx.obj ui.obj log.obj errors.obj portability.obj \
|
||||
asn1.obj base64.obj sec.obj card.obj iso7816.obj dir.obj padding.obj \
|
||||
\
|
||||
pkcs15.obj pkcs15-cert.obj pkcs15-data.obj pkcs15-pin.obj \
|
||||
|
@ -65,10 +65,6 @@ int _sc_card_add_rsa_alg(struct sc_card *card, unsigned int key_length,
|
||||
struct sc_algorithm_info * _sc_card_find_rsa_alg(struct sc_card *card,
|
||||
unsigned int key_length);
|
||||
|
||||
int sc_module_open(struct sc_context *ctx, void **mod_handle, const char *filename);
|
||||
int sc_module_close(struct sc_context *ctx, void *mod_handle);
|
||||
int sc_module_get_address(struct sc_context *ctx, void *mod_handle, void **sym_address, const char *sym_name);
|
||||
|
||||
int sc_asn1_read_tag(const u8 ** buf, size_t buflen, unsigned int *cla_out,
|
||||
unsigned int *tag_out, size_t *taglen);
|
||||
|
||||
|
@ -1,78 +0,0 @@
|
||||
/*
|
||||
* module.c: Dynamic linking loader
|
||||
*
|
||||
* Copyright (C) 2002 Antti Tapaninen <aet@cc.hut.fi>
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#include "internal.h"
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <assert.h>
|
||||
#include <opensc/scdl.h>
|
||||
|
||||
int sc_module_open(struct sc_context *ctx, void **mod_handle, const char *filename)
|
||||
{
|
||||
void *handle;
|
||||
|
||||
assert(ctx != NULL);
|
||||
|
||||
if (!filename)
|
||||
return SC_ERROR_UNKNOWN;
|
||||
|
||||
handle = scdl_open(filename);
|
||||
|
||||
if (handle == NULL) {
|
||||
if (ctx->debug)
|
||||
/* TODO: scdl_error */
|
||||
sc_debug(ctx, "sc_module_open: unknown error");
|
||||
return SC_ERROR_UNKNOWN;
|
||||
}
|
||||
*mod_handle = handle;
|
||||
return SC_SUCCESS;
|
||||
}
|
||||
|
||||
int sc_module_close(struct sc_context *ctx, void *mod_handle)
|
||||
{
|
||||
assert(ctx != NULL);
|
||||
|
||||
if (!mod_handle)
|
||||
return SC_ERROR_UNKNOWN;
|
||||
|
||||
scdl_close(mod_handle);
|
||||
return SC_SUCCESS;
|
||||
}
|
||||
|
||||
int sc_module_get_address(struct sc_context *ctx, void *mod_handle, void **sym_address, const char *sym_name)
|
||||
{
|
||||
void *address;
|
||||
|
||||
assert(ctx != NULL);
|
||||
|
||||
if (!mod_handle || !sym_name)
|
||||
return SC_ERROR_UNKNOWN;
|
||||
|
||||
address = scdl_get_address(mod_handle, sym_name);
|
||||
|
||||
if (address == NULL) {
|
||||
if (ctx->debug)
|
||||
/* TODO: scdl_error */
|
||||
sc_debug(ctx, "sc_module_get_address: unable to get symbol %s\n", sym_name);
|
||||
return SC_ERROR_UNKNOWN;
|
||||
}
|
||||
*sym_address = address;
|
||||
return SC_SUCCESS;
|
||||
}
|
Loading…
Reference in New Issue
Block a user