Header file cleanup.

git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4081 c6295689-39f2-0310-b995-f0e70906c6a9
This commit is contained in:
aj 2010-03-04 08:14:36 +00:00
parent 1bd07bacd6
commit d22a2483c0
169 changed files with 777 additions and 633 deletions

View File

@ -1,5 +1,5 @@
SUBDIRS = src
SUBDIRS = win32 src
all::

View File

@ -652,13 +652,9 @@ AC_DEFINE_UNQUOTED([OPENSC_VERSION_MINOR], [${OPENSC_VERSION_MINOR}], [OpenSC ve
AC_DEFINE_UNQUOTED([OPENSC_VERSION_FIX], [${OPENSC_VERSION_FIX}], [OpenSC version fix component])
AC_DEFINE_UNQUOTED([OPENSC_FEATURES], ["${OPENSC_FEATURES}"], [Enabled OpenSC features])
openscincludedir="\$(includedir)/opensc"
pkcs11dir="\$(libdir)/pkcs11"
pkgconfigdir="\$(libdir)/pkgconfig"
AC_SUBST([openscincludedir])
AC_SUBST([pkcs11dir])
AC_SUBST([pkgconfigdir])
AC_SUBST([xslstylesheetsdir])
AC_SUBST([OPENSC_VERSION_MAJOR])
AC_SUBST([OPENSC_VERSION_MINOR])
@ -713,9 +709,6 @@ AC_CONFIG_FILES([
etc/Makefile
src/Makefile
src/common/Makefile
src/include/Makefile
src/include/winconfig.h
src/include/opensc/Makefile
src/libopensc/Makefile
src/libopensc/libopensc.pc
src/pkcs11/Makefile
@ -728,6 +721,7 @@ AC_CONFIG_FILES([
src/cardmod/cardmod.inf
win32/Makefile
win32/versioninfo.rc
win32/winconfig.h
])
AC_OUTPUT

View File

@ -2,5 +2,5 @@ MAINTAINERCLEANFILES = $(srcdir)/Makefile.in
EXTRA_DIST = Makefile.mak
# Order IS important
SUBDIRS = common include scconf pkcs15init libopensc pkcs11 \
SUBDIRS = common scconf pkcs15init libopensc pkcs11 \
tools tests cardmod

View File

@ -2,7 +2,7 @@ TOPDIR = ..
!INCLUDE $(TOPDIR)\win32\Make.rules.mak
SUBDIRS = include common scconf pkcs15init libopensc pkcs11 tools tests cardmod
SUBDIRS = common scconf pkcs15init libopensc pkcs11 tools tests cardmod
all::

View File

@ -12,9 +12,7 @@ else
dist_noinst_DATA = cardmod.inf cardmod-westcos.reg
endif
INCLUDES = -I$(top_builddir)/src/include \
-I$(top_srcdir)/src/common \
-I$(top_srcdir)/src/libopensc
INCLUDES = -I$(top_srcdir)/src
opensc_cardmod@LIBRARY_BITNESS@_la_SOURCES = cardmod.c cardmod.exports \
$(top_builddir)/win32/versioninfo.rc

View File

@ -27,20 +27,17 @@
#pragma managed(push, off)
#endif
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include "config.h"
#include <log.h>
#include <stdio.h>
#include <stdlib.h>
#include <windows.h>
#include <cardmod.h>
#include <opensc/opensc.h>
#include <opensc/pkcs15.h>
#include <log.h>
#include <stdio.h>
#include <stdlib.h>
#include "libopensc/opensc.h"
#include "libopensc/pkcs15.h"
#define NULLSTR(a) (a == NULL ? "<NULL>" : a)
#define NULLWSTR(a) (a == NULL ? L"<NULL>" : a)

View File

@ -14,6 +14,5 @@ libcompat_la_SOURCES = \
compat_strlcpy.h compat_strlcpy.c \
compat_getpass.h compat_getpass.c \
compat_getopt.h compat_getopt.c \
simclist.c
simclist.c simclist.h
openscinclude_HEADERS = simclist.h

View File

@ -23,9 +23,7 @@
* DEALINGS IN THE SOFTWARE.
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#ifndef HAVE_GETOPT_H
@ -33,6 +31,7 @@
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include "compat_getopt.h"
int my_optind=1, my_opterr=1, my_optopt=0;

View File

@ -1,9 +1,10 @@
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#ifndef HAVE_GETPASS
#include "config.h"
#ifndef HAVE_GETPASS /* empty file if getpass is available */
#include <stdio.h>
#include "compat_getpass.h"
#ifdef _WIN32
char *getpass(const char *prompt)
{
@ -24,4 +25,4 @@ char *getpass(const char *prompt)
#else
#error Need getpass implementation
#endif
#endif
#endif /* HAVE_GETPASS */

View File

@ -17,8 +17,8 @@
*/
#include "config.h"
#ifndef HAVE_STRLCPY
#ifndef HAVE_STRLCPY /* empty file if strlcpy is available */
#include <sys/types.h>
#include <string.h>
@ -55,4 +55,4 @@ strlcpy(char *dst, const char *src, size_t siz)
return(s - src - 1); /* count does not include NUL */
}
#endif
#endif /* HAVE_STRLCPY */

View File

@ -1,7 +0,0 @@
MAINTAINERCLEANFILES = \
$(srcdir)/Makefile.in $(srcdir)/winconfig.h
EXTRA_DIST = Makefile.mak
SUBDIRS = opensc
dist_noinst_HEADERS = winconfig.h

View File

@ -1,21 +0,0 @@
MAINTAINERCLEANFILES = $(srcdir)/Makefile.in
EXTRA_DIST = svnignore
all-local:
@-rm -f *.h
@$(LN_S) $(top_srcdir)/src/libopensc/asn1.h asn1.h
@$(LN_S) $(top_srcdir)/src/libopensc/cardctl.h cardctl.h
@$(LN_S) $(top_srcdir)/src/libopensc/cards.h cards.h
@$(LN_S) $(top_srcdir)/src/libopensc/errors.h errors.h
@$(LN_S) $(top_srcdir)/src/libopensc/log.h log.h
@$(LN_S) $(top_srcdir)/src/libopensc/opensc.h opensc.h
@$(LN_S) $(top_srcdir)/src/libopensc/pkcs15.h pkcs15.h
@$(LN_S) $(top_srcdir)/src/libopensc/types.h types.h
@$(LN_S) $(top_srcdir)/src/pkcs11/pkcs11.h pkcs11.h
@$(LN_S) $(top_srcdir)/src/pkcs11/pkcs11-opensc.h pkcs11-opensc.h
@$(LN_S) $(top_srcdir)/src/pkcs15init/pkcs15-init.h pkcs15-init.h
@$(LN_S) $(top_srcdir)/src/scconf/scconf.h scconf.h
@$(LN_S) $(top_srcdir)/src/common/simclist.h simclist.h
distclean-local:
-rm -f *.h

View File

@ -1,3 +0,0 @@
*.h
*.in
Makefile

View File

@ -5,19 +5,17 @@ MAINTAINERCLEANFILES = $(srcdir)/Makefile.in
EXTRA_DIST = Makefile.mak
lib_LTLIBRARIES = libopensc.la
openscinclude_HEADERS = \
noinst_HEADERS = cards.h ctbcs.h internal.h esteid.h muscle.h muscle-filesystem.h \
internal-winscard.h p15card-helper.h \
opensc.h pkcs15.h \
cardctl.h asn1.h log.h \
errors.h types.h compression.h
noinst_HEADERS = cards.h ctbcs.h internal.h esteid.h muscle.h muscle-filesystem.h \
internal-winscard.h p15card-helper.h
pkgconfig_DATA = libopensc.pc
AM_CPPFLAGS = -DOPENSC_CONF_PATH=\"$(sysconfdir)/opensc.conf\"
AM_CFLAGS = $(OPTIONAL_OPENSSL_CFLAGS) $(OPTIONAL_OPENCT_CFLAGS) \
$(OPTIONAL_PCSC_CFLAGS) $(OPTIONAL_ZLIB_CFLAGS) \
$(OPTIONAL_ICONV_CFLAGS) $(LTLIB_CFLAGS)
INCLUDES = -I$(top_builddir)/src/include -I$(top_srcdir)/src/common
INCLUDES = -I$(top_srcdir)/src
libopensc_la_SOURCES = \
sc.c ctx.c log.c errors.c \

View File

@ -18,6 +18,8 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "config.h"
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>

View File

@ -18,14 +18,17 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "internal.h"
#include "asn1.h"
#include "config.h"
#include <stdio.h>
#include <string.h>
#include <ctype.h>
#include <assert.h>
#include <stdlib.h>
#include "internal.h"
#include "asn1.h"
static int asn1_decode(sc_context_t *ctx, struct sc_asn1_entry *asn1,
const u8 *in, size_t len, const u8 **newp, size_t *len_left,
int choice, int depth);

View File

@ -25,8 +25,8 @@
extern "C" {
#endif
#include <opensc/opensc.h>
#include <opensc/pkcs15.h>
#include "libopensc/opensc.h"
#include "libopensc/pkcs15.h"
struct sc_asn1_entry {
const char *name;

View File

@ -18,12 +18,15 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "internal.h"
#include "config.h"
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include <assert.h>
#include "internal.h"
static const u8 base64_table[66] =
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"
"0123456789+/=";

View File

@ -18,7 +18,10 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "config.h"
#include <string.h>
#include "internal.h"
#include "cardctl.h"

View File

@ -19,6 +19,8 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "config.h"
#include <string.h>
#include <stdlib.h>

View File

@ -16,10 +16,12 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "internal.h"
#include "config.h"
#include <ctype.h>
#include <string.h>
#include "internal.h"
#include "asn1.h"
#include "cardctl.h"

View File

@ -20,11 +20,14 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "config.h"
#include <stdlib.h>
#include <string.h>
#include "internal.h"
#include "asn1.h"
#include "cardctl.h"
#include <stdlib.h>
#include <string.h>
/*****************************************************************************/

View File

@ -80,11 +80,14 @@
* language-selection functionality.
*/
#include "internal.h"
#include "log.h"
#include "config.h"
#include <stdlib.h>
#include <string.h>
#include "internal.h"
#include "log.h"
#ifdef BELPIC_PIN_PAD
#ifndef HAVE_GUI
#define HAVE_GUI

View File

@ -21,12 +21,14 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "internal.h"
#include "cardctl.h"
#include "config.h"
#include <ctype.h>
#include <string.h>
#include <opensc/asn1.h>
#include "internal.h"
#include "asn1.h"
#include "cardctl.h"
static const struct sc_card_operations *iso_ops = NULL;

View File

@ -18,9 +18,12 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "internal.h"
#include "config.h"
#include <string.h>
#include "internal.h"
static struct sc_card_operations default_ops;
static struct sc_card_driver default_drv = {
"Default driver for unknown cards",

View File

@ -16,15 +16,18 @@
/* Initially written by Weitao Sun (weitao@ftsafe.com) 2008 */
#include "internal.h"
#include "asn1.h"
#include "cardctl.h"
#include "config.h"
#ifdef ENABLE_OPENSSL /* empty file without openssl */
#include <stdlib.h>
#include <string.h>
#ifdef ENABLE_OPENSSL
#include <openssl/evp.h>
#include "internal.h"
#include "asn1.h"
#include "cardctl.h"
static struct sc_atr_table entersafe_atrs[] = {
{
"3b:0f:00:65:46:53:05:19:05:71:df:00:00:00:00:00:00",

View File

@ -18,11 +18,14 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "internal.h"
#include "cardctl.h"
#include "config.h"
#include <stdlib.h>
#include <string.h>
#include "internal.h"
#include "cardctl.h"
#define IS_CYBERFLEX(card) (card->type == SC_CARD_TYPE_FLEX_CYBER)
static struct sc_atr_table flex_atrs[] = {

View File

@ -17,12 +17,15 @@
/* Initially written by David Mattes (david.mattes@boeing.com) */
/* Portuguese eID card support by Joao Poupino (joao.poupino@ist.utl.pt) */
#include "internal.h"
#include "cardctl.h"
#include "asn1.h"
#include "config.h"
#include <stdlib.h>
#include <string.h>
#include "internal.h"
#include "asn1.h"
#include "cardctl.h"
static struct sc_card_operations gemsafe_ops;
static struct sc_card_operations *iso_ops = NULL;

View File

@ -18,15 +18,18 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "internal.h"
#include "cardctl.h"
#include "pkcs15.h"
#ifdef ENABLE_OPENSSL
#include "config.h"
#ifdef ENABLE_OPENSSL /* empty file without openssl */
#include <stdlib.h>
#include <string.h>
#include <openssl/evp.h>
#include <openssl/rand.h>
#include "internal.h"
#include "cardctl.h"
#include "pkcs15.h"
#define GPK_SEL_MF 0x00
#define GPK_SEL_DF 0x01
#define GPK_SEL_EF 0x02

View File

@ -22,12 +22,15 @@
* Thanks to Andre Cruz, Jorge Ferreira and Paulo F. Andrade
*/
#include "internal.h"
#include "cardctl.h"
#include "asn1.h"
#include "config.h"
#include <stdlib.h>
#include <string.h>
#include "internal.h"
#include "asn1.h"
#include "cardctl.h"
/* Portugal eID uses 1024 bit keys */
#define PTEID_RSA_KEYSIZE 128

View File

@ -21,11 +21,14 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "internal.h"
#include "cardctl.h"
#include "config.h"
#include <ctype.h>
#include <string.h>
#include "internal.h"
#include "cardctl.h"
/* andreas says: hm, my card only works for small payloads */
/* comment by okir: one of the examples in the developer guide
* also talks about copying data in chunks of 128.

View File

@ -18,11 +18,14 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "internal.h"
#include "cardctl.h"
#include "config.h"
#include <string.h>
#include <stdlib.h>
#include "internal.h"
#include "cardctl.h"
static struct sc_atr_table jcop_atrs[] = {
{ "3B:E6:00:FF:81:31:FE:45:4A:43:4F:50:33:31:06", NULL, NULL, SC_CARD_TYPE_JCOP_GENERIC, 0, NULL },
#if 0

View File

@ -22,12 +22,15 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "internal.h"
#include "asn1.h"
#include "cardctl.h"
#include "config.h"
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include "internal.h"
#include "asn1.h"
#include "cardctl.h"
#include "esteid.h"
static struct sc_atr_table mcrd_atrs[] = {

View File

@ -18,11 +18,14 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "config.h"
#include <stdlib.h>
#include <string.h>
#include "internal.h"
#include "asn1.h"
#include "cardctl.h"
#include <stdlib.h>
#include <string.h>
static struct sc_atr_table miocos_atrs[] = {
/* Test card with 32 kB memory */

View File

@ -18,15 +18,17 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "config.h"
#include <stdlib.h>
#include <string.h>
#include "internal.h"
#include "cardctl.h"
#include "muscle.h"
#include "muscle-filesystem.h"
#include <opensc/types.h>
#include <opensc.h>
#include <stdlib.h>
#include <string.h>
#include "types.h"
#include "opensc.h"
static struct sc_card_operations muscle_ops;
static struct sc_card_driver muscle_drv = {

View File

@ -18,13 +18,16 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "internal.h"
#include "asn1.h"
#include "types.h"
#include "cardctl.h"
#include "config.h"
#include <string.h>
#include <stdlib.h>
#include "internal.h"
#include "asn1.h"
#include "cardctl.h"
#include "types.h"
#define LOAD_KEY_MODULUS 0x80
#define LOAD_KEY_PUBLIC_EXPONENT 0x81
#define LOAD_KEY_PRIME_P 0x83

View File

@ -23,11 +23,9 @@
* best view with tabstop=4
*/
#include "internal.h"
#include "cardctl.h"
#include "pkcs15.h"
#include "config.h"
#ifdef ENABLE_OPENSSL
#ifdef ENABLE_OPENSSL /* empty file without openssl */
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
@ -36,6 +34,10 @@
#include <openssl/rsa.h>
#include <openssl/opensslv.h>
#include "internal.h"
#include "cardctl.h"
#include "pkcs15.h"
#define OBERTHUR_PIN_LOCAL 0x80
#define OBERTHUR_PIN_REFERENCE_USER 0x81
#define OBERTHUR_PIN_REFERENCE_ONETIME 0x82

View File

@ -18,13 +18,16 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "internal.h"
#include "asn1.h"
#include "cardctl.h"
#include "config.h"
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include "internal.h"
#include "asn1.h"
#include "cardctl.h"
static struct sc_atr_table pgp_atrs[] = {
{ "3b:fa:13:00:ff:81:31:80:45:00:31:c1:73:c0:01:00:00:90:00:b1", NULL, NULL, SC_CARD_TYPE_OPENPGP_GENERIC, 0, NULL },
{ NULL, NULL, NULL, 0, 0, NULL }

View File

@ -22,9 +22,9 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "internal.h"
#include "config.h"
#ifdef ENABLE_OPENSSL
#ifdef ENABLE_OPENSSL /* empty file without openssl */
#include <ctype.h>
#include <string.h>
@ -33,6 +33,8 @@
#include <openssl/bio.h>
#include <openssl/pem.h>
#include <openssl/rsa.h>
#include "internal.h"
#include "asn1.h"
#include "cardctl.h"
#ifdef ENABLE_ZLIB
@ -1955,4 +1957,4 @@ struct sc_card_driver * sc_get_piv_driver(void)
}
#endif
#endif
#endif /* ENABLE_OPENSSL */

View File

@ -18,13 +18,16 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "internal.h"
#include "config.h"
#include <assert.h>
#include <stddef.h>
#include <stdlib.h>
#include <string.h>
#include "cardctl.h"
#include "internal.h"
#include "asn1.h"
#include "cardctl.h"
static const struct sc_card_operations *iso_ops = NULL;
static struct sc_card_operations rtecp_ops;

View File

@ -19,9 +19,8 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include "config.h"
#if defined(HAVE_INTTYPES_H)
#include <inttypes.h>
#elif defined(HAVE_STDINT_H)
@ -38,17 +37,17 @@ typedef __int8 int8_t;
#include <string.h>
#include <stdlib.h>
#include <stdio.h>
#include "internal.h"
#include "opensc.h"
#include "pkcs15.h"
#include "internal.h"
#include "cardctl.h"
#include "asn1.h"
#include "cardctl.h"
#ifdef ENABLE_OPENSSL
#include <openssl/evp.h>
#include <openssl/rsa.h>
#include <openssl/dsa.h>
#include <opensc/asn1.h>
#include <openssl/x509.h>
#include <openssl/err.h>
#endif

View File

@ -20,12 +20,14 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "internal.h"
#include "cardctl.h"
#include "config.h"
#include <stdlib.h>
#include <string.h>
#include <opensc/asn1.h>
#include "internal.h"
#include "asn1.h"
#include "cardctl.h"
static struct sc_atr_table setcos_atrs[] = {
/* some Nokia branded SC */

View File

@ -18,11 +18,15 @@
* 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 "config.h"
#include <stdlib.h>
#include <string.h>
#include "internal.h"
#include "asn1.h"
#include "cardctl.h"
#include <stdlib.h>
#include <string.h>
static struct sc_atr_table starcos_atrs[] = {
{ "3B:B7:94:00:c0:24:31:fe:65:53:50:4b:32:33:90:00:b4", NULL, NULL, SC_CARD_TYPE_STARCOS_GENERIC, 0, NULL },

View File

@ -20,14 +20,17 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "internal.h"
#include "asn1.h"
#include "cardctl.h"
#include "config.h"
#include <string.h>
#include <ctype.h>
#include <time.h>
#include <stdlib.h>
#include "internal.h"
#include "asn1.h"
#include "cardctl.h"
static struct sc_atr_table tcos_atrs[] = {
/* Infineon SLE44 */
{ "3B:BA:13:00:81:31:86:5D:00:64:05:0A:02:01:31:80:90:00:8B", NULL, NULL, SC_CARD_TYPE_TCOS_V2, 0, NULL },

View File

@ -18,13 +18,16 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "internal.h"
#include "config.h"
#include <assert.h>
#include <string.h>
#include <stdlib.h>
#include <stdio.h>
#include "cardctl.h"
#include "internal.h"
#include "asn1.h"
#include "cardctl.h"
#ifdef ENABLE_OPENSSL
#include <openssl/des.h>

View File

@ -18,8 +18,8 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "internal.h"
#include "asn1.h"
#include "config.h"
#include <assert.h>
#include <stdlib.h>
#ifdef HAVE_UNISTD_H
@ -27,6 +27,9 @@
#endif
#include <string.h>
#include "internal.h"
#include "asn1.h"
int sc_check_sw(sc_card_t *card, unsigned int sw1, unsigned int sw2)
{
if (card == NULL)

View File

@ -21,7 +21,7 @@
#ifndef _OPENSC_CARDCTL_H
#define _OPENSC_CARDCTL_H
#include <opensc/types.h>
#include "libopensc/types.h"
#ifdef __cplusplus
extern "C" {

View File

@ -21,7 +21,7 @@
#ifndef _OPENSC_CARDS_H
#define _OPENSC_CARDS_H
#include <opensc/types.h>
#include "libopensc/types.h"
#ifdef __cplusplus
extern "C" {

View File

@ -17,14 +17,17 @@
* 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"
#ifdef ENABLE_ZLIB
#include "compression.h"
#include "config.h"
#ifdef ENABLE_ZLIB /* empty file without zlib */
#include <zlib.h>
#include <string.h>
#include <stdlib.h>
#include "internal.h"
#include "errors.h"
#include "compression.h"
static int zerr_to_opensc(int err) {
switch(err) {

View File

@ -20,8 +20,8 @@
#ifndef COMPRESSION_H
#define COMPRESSION_H
#include "opensc.h"
#include "types.h"
#include "libopensc/opensc.h"
#include "libopensc/types.h"
#define COMPRESSION_AUTO 0
#define COMPRESSION_ZLIB 1

View File

@ -18,12 +18,15 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "internal.h"
#include "ctbcs.h"
#include "config.h"
#include <assert.h>
#include <stdlib.h>
#include <string.h>
#include "internal.h"
#include "ctbcs.h"
static void
ctbcs_init_apdu(sc_apdu_t *apdu, int cse, int ins, int p1, int p2)
{

View File

@ -18,7 +18,8 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "internal.h"
#include "config.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@ -32,6 +33,8 @@
#include <winreg.h>
#endif
#include "internal.h"
int _sc_add_reader(sc_context_t *ctx, sc_reader_t *reader)
{
assert(reader != NULL);

View File

@ -18,12 +18,15 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "internal.h"
#include "asn1.h"
#include "config.h"
#include <assert.h>
#include <stdlib.h>
#include <string.h>
#include "internal.h"
#include "asn1.h"
struct app_entry {
const u8 *aid;
size_t aid_len;

View File

@ -18,7 +18,10 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "config.h"
#include <stdio.h>
#include "errors.h"
#define DIM(v) (sizeof(v)/(sizeof((v)[0])))

View File

@ -23,22 +23,23 @@
#define _SC_INTERNAL_H
#ifdef HAVE_CONFIG_H
#include <config.h>
#include "config.h"
#endif
#ifdef __cplusplus
extern "C" {
#endif
#include "opensc.h"
#include "simclist.h"
#include "log.h"
#include "cards.h"
#include <assert.h>
#ifdef _WIN32
#include <windows.h>
#endif
#include "common/simclist.h"
#include "libopensc/opensc.h"
#include "libopensc/log.h"
#include "libopensc/cards.h"
#define SC_FILE_MAGIC 0x14426950
#define SC_CARD_MAGIC 0x27182818
#define SC_CTX_MAGIC 0x0A550335

View File

@ -18,13 +18,16 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "internal.h"
#include "asn1.h"
#include "config.h"
#include <assert.h>
#include <ctype.h>
#include <stdlib.h>
#include <string.h>
#include "internal.h"
#include "asn1.h"
static const struct sc_card_error iso7816_errors[] = {
{ 0x6200, SC_ERROR_MEMORY_FAILURE, "State of non-volatile memory unchanged" },
{ 0x6281, SC_ERROR_MEMORY_FAILURE, "Part of returned data may be corrupted" },

View File

@ -19,7 +19,8 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "internal.h"
#include "config.h"
#include <stdarg.h>
#include <stdlib.h>
#include <assert.h>
@ -39,6 +40,8 @@
#include <pthread.h>
#endif
#include "internal.h"
/* Although not used, we need this for consistent exports */
void _sc_debug(sc_context_t *ctx, const char *format, ...)
{

View File

@ -27,7 +27,7 @@ extern "C" {
#endif
#include <stdarg.h>
#include <opensc/opensc.h>
#include "libopensc/opensc.h"
#define SC_LOG_TYPE_ERROR 0
#define SC_LOG_TYPE_VERBOSE 1

View File

@ -18,12 +18,15 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "muscle-filesystem.h"
#include <opensc/errors.h>
#include "config.h"
#include <memory.h>
#include <stdio.h>
#include <assert.h>
#include "libopensc/muscle-filesystem.h"
#include "libopensc/errors.h"
#define MSCFS_NO_MEMORY SC_ERROR_OUT_OF_MEMORY
#define MSCFS_INVALID_ARGS SC_ERROR_INVALID_ARGUMENTS
#define MSCFS_FILE_NOT_FOUND SC_ERROR_FILE_NOT_FOUND

View File

@ -23,7 +23,7 @@
#include <stdlib.h>
#include <opensc/types.h>
#include "libopensc/types.h"
typedef struct msc_id {
u8 id[4];

View File

@ -17,11 +17,14 @@
* 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 "muscle.h"
#include "internal.h"
#include "config.h"
#include <string.h>
#include "internal.h"
#include "muscle.h"
#define MSC_RSA_PUBLIC 0x01
#define MSC_RSA_PRIVATE 0x02
#define MSC_RSA_PRIVATE_CRT 0x03

View File

@ -22,11 +22,10 @@
#include <stddef.h>
#include <opensc/types.h>
#include <opensc.h>
#include <opensc/cardctl.h>
#include "muscle-filesystem.h"
#include "libopensc/types.h"
#include "libopensc/opensc.h"
#include "libopensc/cardctl.h"
#include "libopensc/muscle-filesystem.h"
#define MSC_MAX_APDU 512 /* Max APDU send/recv, used for stack allocation */
#define MSC_MAX_PIN_LENGTH 8

View File

@ -36,10 +36,10 @@
extern "C" {
#endif
#include <opensc/simclist.h>
#include <opensc/scconf.h>
#include <opensc/errors.h>
#include <opensc/types.h>
#include "common/simclist.h"
#include "scconf/scconf.h"
#include "libopensc/errors.h"
#include "libopensc/types.h"
/* Different APDU cases */
#define SC_APDU_CASE_NONE 0x00

View File

@ -18,20 +18,22 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "internal.h"
#include "config.h"
#if ENABLE_OPENSSL
#include "p15card-helper.h"
#include <opensc/opensc.h>
#include <opensc/types.h>
#include <opensc/log.h>
#include <opensc/pkcs15.h>
#if ENABLE_OPENSSL /* empty file without openssl */
#include <string.h>
#include <stdlib.h>
#include <openssl/bio.h>
#include <openssl/rsa.h>
#include <openssl/x509.h>
#include "internal.h"
#include "p15card-helper.h"
#include "opensc.h"
#include "types.h"
#include "log.h"
#include "pkcs15.h"
int sc_pkcs15emu_initialize_objects(sc_pkcs15_card_t *p15card, p15data_items *items) {
sc_card_t* card = p15card->card;
const objdata* objects = items->objects;
@ -344,4 +346,4 @@ int sc_pkcs15emu_initialize_all(sc_pkcs15_card_t *p15card, p15data_items* items)
return SC_SUCCESS;
}
#endif
#endif /* ENABLE_OPENSSL */

View File

@ -21,7 +21,7 @@
#ifndef P15CARD_HELPER_H
#define P15CARD_HELPER_H
#include <opensc/pkcs15.h>
#include "libopensc/pkcs15.h"
#define USAGE_NONREP SC_PKCS15_PRKEY_USAGE_NONREPUDIATION | \

View File

@ -18,15 +18,16 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "internal.h"
#include "config.h"
#include <string.h>
#include <stdlib.h>
#include <stdio.h>
#include "internal.h"
#include "pkcs15.h"
#include "cardctl.h"
#include "compat_strlcpy.h"
#include "common/compat_strlcpy.h"
static int sc_pkcs15emu_westcos_init(sc_pkcs15_card_t * p15card)
{

View File

@ -19,10 +19,13 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "internal.h"
#include "config.h"
#include <string.h>
#include <stdlib.h>
#include "internal.h"
/* TODO doxygen comments */
/*

View File

@ -22,21 +22,19 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include "config.h"
#include <opensc/pkcs15.h>
#include <opensc/log.h>
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include <compat_strlcpy.h>
#ifdef ENABLE_ZLIB
#include <zlib.h>
#endif
#include "common/compat_strlcpy.h"
#include "libopensc/pkcs15.h"
#include "libopensc/log.h"
int sc_pkcs15emu_actalis_init_ex(sc_pkcs15_card_t *, sc_pkcs15emu_opt_t *);
static int (*set_security_env) (sc_card_t *, const sc_security_env_t *, int);

View File

@ -18,14 +18,17 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "internal.h"
#include "asn1.h"
#include "config.h"
#include <stdio.h>
#include <string.h>
#include <ctype.h>
#include <assert.h>
#include <stdlib.h>
#include "internal.h"
#include "asn1.h"
/*
* AlgorithmIdentifier handling
*/

View File

@ -19,12 +19,15 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include <opensc/pkcs15.h>
#include <opensc/cardctl.h>
#include "config.h"
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include <compat_strlcpy.h>
#include "common/compat_strlcpy.h"
#include "libopensc/pkcs15.h"
#include "libopensc/cardctl.h"
#define MANU_ID "A-Trust"
#define CARD_LABEL "a.sign Premium a"

View File

@ -18,8 +18,8 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "internal.h"
#include "pkcs15.h"
#include "config.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@ -31,6 +31,9 @@
#include <errno.h>
#include <assert.h>
#include "internal.h"
#include "pkcs15.h"
static int generate_cache_filename(struct sc_pkcs15_card *p15card,
const sc_path_t *path,
char *buf, size_t bufsize)

View File

@ -18,9 +18,8 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "internal.h"
#include "pkcs15.h"
#include "asn1.h"
#include "config.h"
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
@ -30,6 +29,10 @@
#endif
#include <assert.h>
#include "internal.h"
#include "asn1.h"
#include "pkcs15.h"
static int parse_x509_cert(sc_context_t *ctx, const u8 *buf, size_t buflen, struct sc_pkcs15_cert *cert)
{
int r;

View File

@ -20,9 +20,8 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "internal.h"
#include "pkcs15.h"
#include "asn1.h"
#include "config.h"
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
@ -31,6 +30,10 @@
#include <unistd.h>
#endif
#include "internal.h"
#include "asn1.h"
#include "pkcs15.h"
static const struct sc_asn1_entry c_asn1_data_object[] = {
{ "dataObject", SC_ASN1_OCTET_STRING, SC_ASN1_TAG_OCTET_STRING, 0, NULL, NULL },
{ NULL, 0, 0, 0, NULL, NULL }

View File

@ -15,14 +15,15 @@
*/
/* Initially written by Weitao Sun (weitao@ftsafe.com) 2008*/
#include "internal.h"
#include "pkcs15.h"
#include "cardctl.h"
#include "config.h"
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include "internal.h"
#include "pkcs15.h"
#include "cardctl.h"
#define MANU_ID "entersafe"

View File

@ -21,19 +21,21 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "internal.h"
#include "pkcs15.h"
#include "config.h"
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include "esteid.h"
#include <compat_strlcpy.h>
#ifdef ENABLE_ICONV
#include <iconv.h>
#endif
#include "common/compat_strlcpy.h"
#include "internal.h"
#include "pkcs15.h"
#include "esteid.h"
int sc_pkcs15emu_esteid_init_ex(sc_pkcs15_card_t *, sc_pkcs15emu_opt_t *);
static void

View File

@ -19,14 +19,17 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "internal.h"
#include <opensc/pkcs15.h>
#include <opensc/log.h>
#include <opensc/cardctl.h>
#include "config.h"
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include <compat_strlcpy.h>
#include "common/compat_strlcpy.h"
#include "internal.h"
#include "pkcs15.h"
#include "log.h"
#include "cardctl.h"
#define MANU_ID "GemSAFE on GPK16000"

View File

@ -16,12 +16,15 @@
/* Initially written by David Mattes (david.mattes@boeing.com) */
#include "internal.h"
#include "pkcs15.h"
#include "config.h"
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include "internal.h"
#include "pkcs15.h"
#define MANU_ID "Gemplus"
#define APPLET_NAME "GemSAFE V1"
#define DRIVER_SERIAL_NUMBER "v0.9"

View File

@ -21,21 +21,19 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include "config.h"
#include <opensc/pkcs15.h>
#include <opensc/log.h>
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include <compat_strlcpy.h>
#ifdef ENABLE_ZLIB
#include <zlib.h>
#endif
#include "common/compat_strlcpy.h"
#include "pkcs15.h"
#include "log.h"
int sc_pkcs15emu_infocamere_init_ex(sc_pkcs15_card_t *,
sc_pkcs15emu_opt_t *);

View File

@ -19,14 +19,17 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "internal.h"
#include <opensc/pkcs15.h>
#include <opensc/log.h>
#include "config.h"
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include <assert.h>
#include <compat_strlcpy.h>
#include "common/compat_strlcpy.h"
#include "internal.h"
#include "pkcs15.h"
#include "log.h"
int sc_pkcs15emu_openpgp_init_ex(sc_pkcs15_card_t *, sc_pkcs15emu_opt_t *);

View File

@ -18,14 +18,17 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "internal.h"
#include "pkcs15.h"
#include "asn1.h"
#include "config.h"
#include <assert.h>
#include <string.h>
#include <stdlib.h>
#include <stdio.h>
#include "internal.h"
#include "asn1.h"
#include "pkcs15.h"
static const struct sc_asn1_entry c_asn1_com_ao_attr[] = {
{ "authId", SC_ASN1_PKCS15_ID, SC_ASN1_TAG_OCTET_STRING, 0, NULL, NULL },
{ NULL, 0, 0, 0, NULL, NULL }

View File

@ -23,13 +23,16 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "internal.h"
#include "config.h"
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include <ctype.h>
#include "pkcs15.h"
#include "internal.h"
#include "cardctl.h"
#include "pkcs15.h"
#define MANU_ID "piv_II "

View File

@ -20,13 +20,16 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "internal.h"
#include <opensc/pkcs15.h>
#include <opensc/log.h>
#include "config.h"
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include <compat_strlcpy.h>
#include "common/compat_strlcpy.h"
#include "internal.h"
#include "pkcs15.h"
#include "log.h"
int sc_pkcs15emu_postecert_init_ex(sc_pkcs15_card_t *, sc_pkcs15emu_opt_t *);

View File

@ -18,14 +18,17 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "internal.h"
#include "pkcs15.h"
#include "asn1.h"
#include "config.h"
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include <assert.h>
#include "internal.h"
#include "asn1.h"
#include "pkcs15.h"
static const struct sc_asn1_entry c_asn1_com_key_attr[] = {
{ "iD", SC_ASN1_PKCS15_ID, SC_ASN1_TAG_OCTET_STRING, 0, NULL, NULL },
{ "usage", SC_ASN1_BIT_FIELD, SC_ASN1_TAG_BIT_STRING, 0, NULL, NULL },

View File

@ -35,13 +35,15 @@
*
*/
#include "internal.h"
#include "pkcs15.h"
#include "config.h"
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include <compat_strlcpy.h>
#include "common/compat_strlcpy.h"
#include "internal.h"
#include "pkcs15.h"
#define IAS_CARD 0
#define GEMSAFE_CARD 1

View File

@ -18,19 +18,20 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "internal.h"
#include "pkcs15.h"
#include "asn1.h"
#include "config.h"
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include <assert.h>
#ifdef ENABLE_OPENSSL
#include <openssl/evp.h>
#include <openssl/pem.h>
#endif
#include "internal.h"
#include "asn1.h"
#include "pkcs15.h"
static const struct sc_asn1_entry c_asn1_com_key_attr[] = {
{ "iD", SC_ASN1_PKCS15_ID, SC_ASN1_TAG_OCTET_STRING, 0, NULL, NULL },

View File

@ -19,8 +19,8 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "internal.h"
#include "pkcs15.h"
#include "config.h"
#include <string.h>
#include <stdlib.h>
#include <stdio.h>
@ -28,6 +28,9 @@
#include <unistd.h>
#endif
#include "internal.h"
#include "pkcs15.h"
static int select_key_file(struct sc_pkcs15_card *p15card,
const struct sc_pkcs15_prkey_info *prkey,
sc_security_env_t *senv)

View File

@ -18,12 +18,15 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include <opensc/pkcs15.h>
#include <opensc/cardctl.h>
#include "config.h"
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include <compat_strlcpy.h>
#include "common/compat_strlcpy.h"
#include "pkcs15.h"
#include "cardctl.h"
#define MANU_ID "Giesecke & Devrient GmbH"
#define STARCERT "StarCertV2201"

View File

@ -19,15 +19,18 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "internal.h"
#include "pkcs15.h"
#include "asn1.h"
#include "config.h"
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include <assert.h>
#include <ltdl.h>
#include "internal.h"
#include "asn1.h"
#include "pkcs15.h"
extern int sc_pkcs15emu_westcos_init_ex(sc_pkcs15_card_t *p15card,
sc_pkcs15emu_opt_t *opts);
extern int sc_pkcs15emu_openpgp_init_ex(sc_pkcs15_card_t *,

View File

@ -18,12 +18,14 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "internal.h"
#include "config.h"
#include <stdlib.h>
#include <string.h>
#include <opensc/log.h>
#include <opensc/pkcs15.h>
#include "internal.h"
#include "log.h"
#include "pkcs15.h"
#define MANU_ID "SIEMENS AG"
#define TC_CARDOS_APP_DF "3F001002"

View File

@ -18,14 +18,17 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "internal.h"
#include <opensc/pkcs15.h>
#include <opensc/cardctl.h>
#include <opensc/log.h>
#include "config.h"
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include <compat_strlcpy.h>
#include "common/compat_strlcpy.h"
#include "internal.h"
#include "pkcs15.h"
#include "cardctl.h"
#include "log.h"
int sc_pkcs15emu_tcos_init_ex(
sc_pkcs15_card_t *p15card,

View File

@ -18,8 +18,8 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "internal.h"
#include "pkcs15.h"
#include "config.h"
#ifdef ENABLE_OPENSSL
#include <openssl/evp.h>
#include <openssl/rand.h>
@ -36,7 +36,9 @@
* Everything seems to work fine however if the openssl one is included
* first.
*/
#include "internal.h"
#include "asn1.h"
#include "pkcs15.h"
#ifndef ENABLE_OPENSSL

View File

@ -18,15 +18,18 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "internal.h"
#include "pkcs15.h"
#include "asn1.h"
#include "config.h"
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include <assert.h>
#include <ltdl.h>
#include "internal.h"
#include "pkcs15.h"
#include "asn1.h"
static const struct sc_asn1_entry c_asn1_twlabel[] = {
{ "twlabel", SC_ASN1_UTF8STRING, SC_ASN1_TAG_UTF8STRING, 0, NULL, NULL },
{ NULL, 0, 0, 0, NULL, NULL }

View File

@ -25,7 +25,7 @@
extern "C" {
#endif
#include <opensc/opensc.h>
#include "libopensc/opensc.h"
#define SC_PKCS15_CACHE_DIR ".eid"

View File

@ -18,14 +18,17 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "internal.h"
#include "config.h"
#ifdef ENABLE_CTAPI
#include "ctbcs.h"
#include <assert.h>
#include <stdlib.h>
#include <string.h>
#include <ltdl.h>
#include "internal.h"
#include "ctbcs.h"
#define GET_PRIV_DATA(r) ((struct ctapi_private_data *) (r)->drv_data)
#ifdef _WIN32

View File

@ -4,8 +4,9 @@
* Copyright (C) 2003 Olaf Kirch <okir@suse.de>
*/
#include "internal.h"
#ifdef ENABLE_OPENCT
#include "config.h"
#ifdef ENABLE_OPENCT /* empty file without openct */
#include <errno.h>
#include <stdlib.h>
#include <string.h>
@ -21,6 +22,8 @@
#include <openct/logging.h>
#include <openct/error.h>
#include "internal.h"
/* function declarations */
static int openct_reader_init(sc_context_t *ctx, void **priv_data);
static int openct_add_reader(sc_context_t *ctx, unsigned int num, ct_info_t *info);

View File

@ -19,8 +19,9 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "internal.h"
#ifdef ENABLE_PCSC
#include "config.h"
#ifdef ENABLE_PCSC /* empty file without pcsc */
#include <assert.h>
#include <stdlib.h>
#include <string.h>
@ -33,6 +34,7 @@
#include <arpa/inet.h>
#endif
#include "internal.h"
#include "internal-winscard.h"
/* Some windows specific kludge */
@ -1841,5 +1843,5 @@ struct sc_reader_driver * sc_get_cardmod_driver(void)
#endif
#endif /* HAVE_PCSC */
#endif /* ENABLE_PCSC */

View File

@ -18,23 +18,21 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include "config.h"
#ifdef ENABLE_OPENSSL
#include <openssl/crypto.h> /* for OPENSSL_cleanse */
#endif
#ifdef HAVE_SYS_MMAN_H
#include <sys/mman.h>
#endif
#include "internal.h"
#include <stdio.h>
#include <ctype.h>
#include <stdlib.h>
#include <string.h>
#include <assert.h>
#ifdef HAVE_SYS_MMAN_H
#include <sys/mman.h>
#endif
#ifdef ENABLE_OPENSSL
#include <openssl/crypto.h> /* for OPENSSL_cleanse */
#endif
#include "internal.h"
#ifdef PACKAGE_VERSION
static const char *sc_version = PACKAGE_VERSION;

View File

@ -18,13 +18,16 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "internal.h"
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
#include "config.h"
#include <stdio.h>
#include <string.h>
#include <assert.h>
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
#include "internal.h"
int sc_decipher(sc_card_t *card,
const u8 * crgram, size_t crgram_len, u8 * out, size_t outlen)

View File

@ -4,14 +4,13 @@ MAINTAINERCLEANFILES = $(srcdir)/Makefile.in
EXTRA_DIST = Makefile.mak
dist_noinst_SCRIPTS = opensc_pkcs11_install.js
openscinclude_HEADERS = pkcs11.h pkcs11-opensc.h
lib_LTLIBRARIES = opensc-pkcs11.la pkcs11-spy.la onepin-opensc-pkcs11.la
noinst_LTLIBRARIES = libpkcs11.la
AM_CFLAGS = $(OPTIONAL_OPENSSL_CFLAGS) $(LTLIB_CFLAGS) $(PTHREAD_CFLAGS)
INCLUDES = -I$(top_srcdir)/src/pkcs15init -I$(top_builddir)/src/include -I$(top_srcdir)/src/common
INCLUDES = -I$(top_srcdir)/src
OPENSC_PKCS11_INC = sc-pkcs11.h
OPENSC_PKCS11_INC = sc-pkcs11.h pkcs11.h pkcs11-opensc.h
OPENSC_PKCS11_SRC = pkcs11-global.c pkcs11-session.c pkcs11-object.c misc.c slot.c \
mechanism.c openssl.c secretkey.c framework-pkcs15.c \
framework-pkcs15init.c debug.c opensc-pkcs11.exports \

View File

@ -18,8 +18,11 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "config.h"
#include <stdlib.h>
#include <string.h>
#include "sc-pkcs11.h"
#define DUMP_TEMPLATE_MAX 32

Some files were not shown because too many files have changed in this diff Show More