- Various build fixes for various operating systems and compilers
- Add missing .cvsignore files - Remove tools/ and make configure to work again git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1251 c6295689-39f2-0310-b995-f0e70906c6a9
This commit is contained in:
parent
dbefbade41
commit
c4d2611d12
|
@ -1,6 +1,6 @@
|
|||
## Makefile.am -- Process this file with automake to produce Makefile.in
|
||||
|
||||
SUBDIRS = . tools aclocal docs etc src win32
|
||||
SUBDIRS = . aclocal docs etc src win32
|
||||
|
||||
EXTRA_DIST = CodingStyle bootstrap Makefile.mak
|
||||
|
||||
|
|
|
@ -3,13 +3,13 @@ dnl Process this file with autoconf to produce a configure script.
|
|||
|
||||
# Require autoconf 2.52
|
||||
AC_PREREQ(2.52)
|
||||
AC_INIT(opensc, 0.8.0-rc2)
|
||||
AC_CONFIG_SRCDIR(src/libopensc/sc.c)
|
||||
AC_CONFIG_AUX_DIR(tools)
|
||||
|
||||
AM_INIT_AUTOMAKE([foreign])
|
||||
AC_INIT(COPYING)
|
||||
AM_INIT_AUTOMAKE(opensc, 0.8.0-rc2)
|
||||
AM_CONFIG_HEADER(config.h)
|
||||
|
||||
AC_CONFIG_SRCDIR(src/libopensc/sc.c)
|
||||
|
||||
AC_CANONICAL_HOST
|
||||
case $host in
|
||||
darwin* | rhapsody*)
|
||||
|
@ -1194,7 +1194,6 @@ src/tests/Makefile
|
|||
src/tests/regression/Makefile
|
||||
src/tools/Makefile
|
||||
src/usbtoken/Makefile
|
||||
tools/Makefile
|
||||
win32/Makefile
|
||||
])
|
||||
|
||||
|
|
|
@ -5,6 +5,9 @@
|
|||
* Copyright (C) 2002 Olaf Kirch <okir@lst.de>
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
#include "pkcs11.h"
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
|
@ -17,7 +20,7 @@
|
|||
|
||||
struct sc_pkcs11_module {
|
||||
unsigned int _magic;
|
||||
#if defined(linux) || defined(_WIN32)
|
||||
#if defined(HAVE_DLFCN_H) || defined(_WIN32)
|
||||
void * _dl_handle;
|
||||
#endif
|
||||
#ifdef __APPLE__
|
||||
|
@ -78,7 +81,7 @@ C_UnloadModule(sc_pkcs11_module_t *mod)
|
|||
return CKR_OK;
|
||||
}
|
||||
|
||||
#ifdef linux
|
||||
#ifdef HAVE_DLFCN_H
|
||||
#include <dlfcn.h>
|
||||
|
||||
/*
|
||||
|
@ -187,7 +190,7 @@ sys_dlsym(sc_pkcs11_module_t *mod, const char *name)
|
|||
#include <mach-o/dyld.h>
|
||||
|
||||
/*
|
||||
* Module loader for MacOSX 10
|
||||
* Module loader for MacOS X
|
||||
*/
|
||||
int
|
||||
sys_dlopen(struct sc_pkcs11_module *mod, const char *name)
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
* Copyright (C) 2002 Olaf Kirch <okir@lst.de>
|
||||
*/
|
||||
|
||||
#include <string.h>
|
||||
#include "sc-pkcs11.h"
|
||||
#include "opensc/scrandom.h"
|
||||
|
||||
|
|
|
@ -937,11 +937,13 @@ CK_RV C_VerifyInit(CK_SESSION_HANDLE hSession, /* the session's handle */
|
|||
if (rv != CKR_OK)
|
||||
goto out;
|
||||
|
||||
//rv = object->ops->get_attribute(session, object, &verify_attribute);
|
||||
//if (rv != CKR_OK || !can_verify) {
|
||||
// rv = CKR_KEY_TYPE_INCONSISTENT;
|
||||
// goto out;
|
||||
//}
|
||||
#if 0
|
||||
rv = object->ops->get_attribute(session, object, &verify_attribute);
|
||||
if (rv != CKR_OK || !can_verify) {
|
||||
rv = CKR_KEY_TYPE_INCONSISTENT;
|
||||
goto out;
|
||||
}
|
||||
#endif
|
||||
rv = object->ops->get_attribute(session, object, &key_type_attr);
|
||||
if (rv != CKR_OK) {
|
||||
rv = CKR_KEY_TYPE_INCONSISTENT;
|
||||
|
|
|
@ -19,11 +19,11 @@
|
|||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#ifndef _WIN32
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#ifndef _WIN32
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
@ -310,14 +310,15 @@ int scrandom_get_data(unsigned char *buf, unsigned int len)
|
|||
#undef BLOCK_SIZE
|
||||
}
|
||||
|
||||
#else // #ifndef _WIN32
|
||||
#else
|
||||
|
||||
// Since the above is very *nix specific, we use Window's CryptoAPI
|
||||
// random generation instead.
|
||||
/* Since the above is very *nix specific, we use Window's CryptoAPI
|
||||
* random generation instead.
|
||||
*/
|
||||
|
||||
#include "scrandom.h"
|
||||
#include "windows.h"
|
||||
#include "wincrypt.h"
|
||||
#include <windows.h>
|
||||
#include <wincrypt.h>
|
||||
|
||||
int scrandom_get_data(unsigned char *buf, unsigned int len)
|
||||
{
|
||||
|
@ -334,4 +335,4 @@ int scrandom_get_data(unsigned char *buf, unsigned int len)
|
|||
return 0;
|
||||
}
|
||||
|
||||
#endif // #ifndef _WIN32
|
||||
#endif
|
||||
|
|
|
@ -0,0 +1,19 @@
|
|||
.deps
|
||||
.libs
|
||||
.#*#
|
||||
.*.bak
|
||||
.*.orig
|
||||
.*.rej
|
||||
.*~
|
||||
#*#
|
||||
*.bak
|
||||
*.orig
|
||||
*.rej
|
||||
*~
|
||||
*.lo
|
||||
*.la
|
||||
*.u
|
||||
gmon.out
|
||||
core
|
||||
Makefile
|
||||
Makefile.in
|
|
@ -915,7 +915,9 @@ set_id_attr(CK_SLOT_ID slot, CK_SESSION_HANDLE session)
|
|||
{
|
||||
CK_OBJECT_HANDLE obj;
|
||||
CK_ATTRIBUTE templ[] = {CKA_ID, new_object_id, new_object_id_len};
|
||||
//CK_ATTRIBUTE templ2[] = {CKA_LABEL, "new_label", 9};
|
||||
#if 0
|
||||
CK_ATTRIBUTE templ2[] = {CKA_LABEL, "new_label", 9};
|
||||
#endif
|
||||
CK_RV rv;
|
||||
|
||||
if (!find_object(session, opt_object_class, &obj, opt_object_id, opt_object_id_len, 0)) {
|
||||
|
@ -2109,7 +2111,6 @@ p11_perror(const char *msg, CK_RV rv)
|
|||
|
||||
int hex_to_bin(const char *in, unsigned char *out, size_t *outlen)
|
||||
{
|
||||
int err = 0;
|
||||
size_t left, count = 0;
|
||||
|
||||
if (in == NULL || *in == '\0') {
|
||||
|
@ -2153,7 +2154,6 @@ int hex_to_bin(const char *in, unsigned char *out, size_t *outlen)
|
|||
c++;
|
||||
}
|
||||
|
||||
out:
|
||||
*outlen = count;
|
||||
return 1;
|
||||
}
|
||||
|
|
|
@ -1,7 +1,9 @@
|
|||
# Process this file with automake to create Makefile.in
|
||||
MAINTAINERCLEANFILES = Makefile.in
|
||||
|
||||
if HAVE_USBTOKEN
|
||||
sbin_PROGRAMS = usbtoken
|
||||
endif
|
||||
|
||||
usbtoken_SOURCES= atr.c eutron.c etoken.c ikey2k.c ikey3k.c main.c pid.c \
|
||||
socket.c t1.c usb.c usbtoken.h
|
||||
|
|
|
@ -0,0 +1,19 @@
|
|||
.deps
|
||||
.libs
|
||||
.#*#
|
||||
.*.bak
|
||||
.*.orig
|
||||
.*.rej
|
||||
.*~
|
||||
#*#
|
||||
*.bak
|
||||
*.orig
|
||||
*.rej
|
||||
*~
|
||||
*.lo
|
||||
*.la
|
||||
*.u
|
||||
gmon.out
|
||||
core
|
||||
Makefile
|
||||
Makefile.in
|
Loading…
Reference in New Issue