Commit Graph

768 Commits

Author SHA1 Message Date
martin 0876222c5f Make PKCS#11 module default slot configuration more sensible:
* Increase default slot count to 16, which equals 4 concurrent readers by default
  * 2 OpenCT + 2 PC/SC on Linux for example
 * Rename num_slots to slots_per_card
 * Rename internal PKCS#11 variables, remove unneeded defines.



git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3619 c6295689-39f2-0310-b995-f0e70906c6a9
2009-01-16 16:44:35 +00:00
aj a89b14668f Enable lock_login by default for security.
Disable soft_keygen by default for security.
Make defaults code more readable.


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3604 c6295689-39f2-0310-b995-f0e70906c6a9
2008-12-28 16:01:04 +00:00
martin f4c85e7502 Cosmetic fix for [3595]
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3599 c6295689-39f2-0310-b995-f0e70906c6a9
2008-12-05 15:57:51 +00:00
martin 94d0f8d835 Remove ancient unused code
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3598 c6295689-39f2-0310-b995-f0e70906c6a9
2008-12-05 15:53:31 +00:00
ludovic.rousseau 6f3012d959 add CKM_SHA256* and CKM_SHA384* logs
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3596 c6295689-39f2-0310-b995-f0e70906c6a9
2008-11-27 10:44:57 +00:00
martin 1e41d4d267 * Fix issues with pkcs11-tool testing of C_GenerateRandom/C_SeedRandom and OpenSC PKCS#11 implementation of those functions.
Thanks goes to Rickard Bondesson who noticed the issues.

http://www.opensc-project.org/pipermail/opensc-devel/2008-November/011436.html



git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3595 c6295689-39f2-0310-b995-f0e70906c6a9
2008-11-24 22:06:27 +00:00
martin 7b93c51230 Missing SHAs
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3593 c6295689-39f2-0310-b995-f0e70906c6a9
2008-11-24 21:53:56 +00:00
ludovic.rousseau 6b89748111 slot_get_token(): return CKR_TOKEN_NOT_PRESENT if CKF_TOKEN_PRESENT is
not set.

Thanks to Douglas E. Engert for the patch
http://www.opensc-project.org/pipermail/opensc-devel/2008-October/011361.html


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3583 c6295689-39f2-0310-b995-f0e70906c6a9
2008-10-10 09:39:27 +00:00
ludovic.rousseau 001f03f18d card_removed(): warning: comparison between signed and unsigned
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3582 c6295689-39f2-0310-b995-f0e70906c6a9
2008-10-09 13:05:13 +00:00
ludovic.rousseau 6eb3ecd107 card_initialize(): correctly associate a reader to each virtual slot.
Thanks to Douglas E. Engert for the patch
http://www.opensc-project.org/pipermail/opensc-devel/2008-October/011359.html


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3581 c6295689-39f2-0310-b995-f0e70906c6a9
2008-10-09 12:59:02 +00:00
ludovic.rousseau 56ea99d8a0 print_mech_info(): replace printf by fprintf to correctly redirect the
log


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3554 c6295689-39f2-0310-b995-f0e70906c6a9
2008-08-12 09:51:43 +00:00
alonbl 7d6cf6b694 Prepare for libtool-2
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3528 c6295689-39f2-0310-b995-f0e70906c6a9
2008-06-05 17:03:47 +00:00
ludovic.rousseau 4fd85ce0cf print_generic() & print_print(): size is a CK_ULONG (unsigned) so compare
using "!= (CK_LONG)(-1)" instead of "> 0"


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3525 c6295689-39f2-0310-b995-f0e70906c6a9
2008-05-26 08:30:39 +00:00
ludovic.rousseau 4d1218b64f completely initialize pkcs11_secret_key_ops structure with NULL pointers
secretkey.c:225: warning: missing initializer
secretkey.c:225: warning: (near initialization for 'pkcs11_secret_key_ops.destroy_object')


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3524 c6295689-39f2-0310-b995-f0e70906c6a9
2008-05-22 12:37:57 +00:00
ludovic.rousseau 28c0c6283d print_ptr_in(): change log format
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3516 c6295689-39f2-0310-b995-f0e70906c6a9
2008-05-20 09:47:27 +00:00
ludovic.rousseau 232a26b62d C_Initialize(): log the value of the pInitArgs argument
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3515 c6295689-39f2-0310-b995-f0e70906c6a9
2008-05-20 09:41:44 +00:00
ludovic.rousseau d7bb718e24 C_Finalize(): do not unload the module since the application may try to
make PKCS#11 calls again


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3513 c6295689-39f2-0310-b995-f0e70906c6a9
2008-05-12 09:41:48 +00:00
ludovic.rousseau 91177e51ec Use size_t instead of int when needed, plus some other minor changes
Patch bug.1 included in Ticket #176


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3510 c6295689-39f2-0310-b995-f0e70906c6a9
2008-05-05 13:00:01 +00:00
alonbl e237574742 Plug&Play support
This is not the best solution, but focus on smallest code change.

Changes:

1. Add detect_readers() to reader opts, this adds new readers to the end
   of the readers list until list is full.

2. Add sc_ctx_detect_readers() that calls readers' detect_readers().

3. Fixup pcsc_lock() so that it reconnect to the card and report proper
   error so caller may be notified if session was lost.

4. Allow context to be created without readers.

5. Call sc_ctx_detect_readers() from PKCS#11 C_GetSlotList with NULL_PTR.

6. Allow no reader at detect_card, as reader my be removed.

7. Since I broke ABI, I updated the external module version requirement
   to match OpenSC version. In the future a separate version should be
   maintained for each interface, this should be unrelated to the package
   version.

Alon

---

svn merge -r 3480:3505 https://www.opensc-project.org/svn/opensc/branches/alonbl/pnp

M    src/tools/opensc-tool.c
M    src/pkcs11/pkcs11-global.c
M    src/pkcs11/slot.c
M    src/libopensc/reader-pcsc.c
M    src/libopensc/internal-winscard.h
M    src/libopensc/ctx.c
M    src/libopensc/reader-ctapi.c
M    src/libopensc/libopensc.exports
M    src/libopensc/reader-openct.c
M    src/libopensc/opensc.h


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3506 c6295689-39f2-0310-b995-f0e70906c6a9
2008-04-29 17:01:19 +00:00
alonbl 6c740b907e More MSVC fixups by Douglas E. Engert
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3503 c6295689-39f2-0310-b995-f0e70906c6a9
2008-04-29 06:09:00 +00:00
ludovic.rousseau 0b239489fc completely initialize the sc_pkcs11_framework_ops structure (using NULL
for undefined callbacks)


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3498 c6295689-39f2-0310-b995-f0e70906c6a9
2008-04-28 07:36:07 +00:00
ludovic.rousseau 040ac682d8 completely initialize the struct fmap fields
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3497 c6295689-39f2-0310-b995-f0e70906c6a9
2008-04-28 07:33:26 +00:00
alonbl 865f6e9c70 More fixups to maintainer-clean
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3471 c6295689-39f2-0310-b995-f0e70906c6a9
2008-04-11 12:52:46 +00:00
alonbl d84077749b Distribute autoconf generated files for MSVC build
Construct resource files and winconfig.h using autoconf
substitutions.



git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3468 c6295689-39f2-0310-b995-f0e70906c6a9
2008-04-08 18:36:42 +00:00
alonbl 5f567f7a3c More MSVC build additions
(1) use the exports for opensc-pkcs11.dll, onepin-opensc-pkcs11.dll,
      and pkcs11-spy.dll

  (2) don't link common.lib with scconf.lib, to avoid duplicate messages
      later.

  (3) add piv-tool to openssl_programs.

By Douglas E. Engert



git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3466 c6295689-39f2-0310-b995-f0e70906c6a9
2008-04-07 21:35:11 +00:00
alonbl 54c1c735f3 Attached are the latest mode to OpenSC svn 3462 to use the Makefile.mak
files to build on Windows.

I got rutoken to compile, and took out the #ifdef's I had in last week.
The rutoken programmer declared some variables in the middle of a block
rather then having all the declare statements at the beginning of a block
as is normally done in C. The Microsoft compile treats this as an error.
(Actual many errors.)

The makedef.pl is no longer needed, as the exports files can be used.
Note that in the original Makefile.mak files only opensc.def and
pkcs15init.def were created.

winconfig.h has a number of changes. As discussed last week this could
be created by autoconf. I also noted that the Active State Perl that
was required for the makedef.pl has a psed command that could be used
like sed to update winconfig.h.  I did not attempt to do this.



  win32/Make.rules.mak - Use ENABLE_OPENSSL and ENABLE_ZLIB

  src/tools/Makefile.mak - add the rutoken.tool.exe

  src/tools/eidenv.c - use PACKAGE_VERSION

  src/pkcs11/Makefile.mak - reorder the objest to match the list in the
           Makefile.am. Makes it easier to read.

  src/include/winconfig.h - The windows version of the config.h
           Changes based on discussions on the list last week.

  src/common/Makefile.mak - renamed modules.

  src/pkcs15init/Makefile.mak - reordered, and added back the rutoken modules
           replaced the use of makdef.pl to sue the exports file.

  src/scconf/Makefile.mak - reordered objects.

  src/libopensc/card-rutoken.c -
           error. Moved the declares to the beginning of blocks.

  src/libopensc/Makefile.mak - reorder names, and add rutoken.
           Use the libopensc.exports file.

  src/libopensc/pkcs15-prkey-rutoken.c - more moving of declare statements.

By Douglas E. Engert

http://www.opensc-project.org/pipermail/opensc-devel/2008-April/011011.html



git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3464 c6295689-39f2-0310-b995-f0e70906c6a9
2008-04-07 19:42:43 +00:00
alonbl 6e65efb257 Some more build cleanups
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3462 c6295689-39f2-0310-b995-f0e70906c6a9
2008-04-04 20:38:20 +00:00
alonbl e4eeba26cd Fix MSVC compiler error
http://www.opensc-project.org/pipermail/opensc-devel/2008-April/010997.html

Thanks to Douglas E. Engert


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3459 c6295689-39f2-0310-b995-f0e70906c6a9
2008-04-04 16:21:08 +00:00
alonbl 87db3c96c2 More separate srcdir fixups
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3450 c6295689-39f2-0310-b995-f0e70906c6a9
2008-04-01 19:04:33 +00:00
alonbl 39abe22798 More separate srcdir fixups
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3449 c6295689-39f2-0310-b995-f0e70906c6a9
2008-04-01 17:08:17 +00:00
ludovic.rousseau 7e30721378 use $(srcdir) when needed to be able to build in separate build
directories using: cd foobar ; ../configure srcdir=..

Thanks to Douglas E. Engert for the patch
http://www.opensc-project.org/pipermail/opensc-devel/2008-March/010959.html


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3445 c6295689-39f2-0310-b995-f0e70906c6a9
2008-04-01 12:43:26 +00:00
alonbl 2f997da125 Install PKCS#11 providers at bin for Windows
This will place file in more expected location, and
reduce runtime dependencies as dependency DLL will be located
at the same directory.



git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3441 c6295689-39f2-0310-b995-f0e70906c6a9
2008-03-27 14:13:00 +00:00
alonbl 80a16f686d ruToken cleanups
Move constants out of standard files.
Create ruToken specific interface.
Update symbols.

Thread at:
http://www.opensc-project.org/pipermail/opensc-devel/2008-March/010917.html

Cleanup of:
http://www.opensc-project.org/pipermail/opensc-devel/2007-December/010617.html



git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3439 c6295689-39f2-0310-b995-f0e70906c6a9
2008-03-26 06:24:37 +00:00
alonbl 314f2a5501 Cygwin should load .dll version of PKCS#11
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3432 c6295689-39f2-0310-b995-f0e70906c6a9
2008-03-19 21:23:47 +00:00
alonbl 8ac87f1b1e Remove useless comments
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3414 c6295689-39f2-0310-b995-f0e70906c6a9
2008-03-09 21:24:24 +00:00
alonbl 0a809dd5cb Complete rewrite of OpenSC build system.
1.  Build system now supports MinGW (Windows) compilation using msys and cross compilation.
2.  Ability to explicitly disable and enable dependencies of the package.
3.  openct, pcsc and nsplugins features are disabled by default.
4.  Modified pcsc driver to use pcsc dynamically, no compile time dependency is required.
5.  --enable-pcsc-lite configuration option renamed to --enable-pcsc.
6.  Install opensc.conf file (as opensc.conf.new if opensc.conf exists).
7.  Add--enable-doc configuration option, allow installing documentation into target.
8.  Add --disable-man configuration option, allow msys mingw32 users to
    build from svn without extra dependencies.
9.  Add export files to each library in order to export only required symbols.
    Windows native build may use these files instead of scanning objects' symbols.
10. Add opensc-tool --info to display some general information about the build.
11. Create compatibility library to be linked against library instread of recompiling the
    same source files in different places.
12. Add different win32 version resource to each class of outputs.
13. Make xsl-stylesheets location selectable.
14. Some win32 fixups.
15. Some warning fixups.
16. Many other autoconf/automake cleanups.

Alon Bar-Lev

svn diff -r 3315:3399 https://www.opensc-project.org/svn/opensc/branches/alonbl/mingw

_M   .
D    configure.in
_M   src
_M   src/openssh
M    src/openssh/Makefile.am
_M   src/tools
M    src/tools/rutoken-tool.c
M    src/tools/opensc-tool.c
M    src/tools/cardos-info.c
M    src/tools/pkcs15-crypt.c
M    src/tools/pkcs15-init.c
M    src/tools/piv-tool.c
M    src/tools/netkey-tool.c
M    src/tools/eidenv.c
M    src/tools/cryptoflex-tool.c
M    src/tools/util.c
M    src/tools/pkcs11-tool.c
M    src/tools/pkcs15-tool.c
M    src/tools/util.h
M    src/tools/opensc-explorer.c
M    src/tools/Makefile.am
_M   src/pkcs11
M    src/pkcs11/pkcs11-global.c
M    src/pkcs11/framework-pkcs15.c
M    src/pkcs11/mechanism.c
M    src/pkcs11/pkcs11-display.c
M    src/pkcs11/pkcs11-object.c
A    src/pkcs11/opensc-pkcs11.exports
M    src/pkcs11/sc-pkcs11.h
M    src/pkcs11/pkcs11-spy.c
M    src/pkcs11/openssl.c
M    src/pkcs11/Makefile.am
A    src/pkcs11/pkcs11-spy.exports
_M   src/tests
_M   src/tests/regression
M    src/tests/regression/Makefile.am
M    src/tests/sc-test.c
M    src/tests/pintest.c
M    src/tests/Makefile.am
_M   src/include
_M   src/include/opensc
M    src/include/opensc/Makefile.am
A    src/include/opensc/svnignore
M    src/include/Makefile.am
_M   src/signer
_M   src/signer/npinclude
M    src/signer/npinclude/Makefile.am
M    src/signer/Makefile.am
A    src/signer/signer.exports
_M   src/common
A    src/common/compat_dummy.c
D    src/common/getopt.txt
D    src/common/strlcpy.c
D    src/common/LICENSE
A    src/common/compat_getopt.txt
A    src/common/compat_strlcpy.c
A    src/common/LICENSE.compat_getopt
A    src/common/compat_getopt.c
D    src/common/strlcpy.h
D    src/common/ChangeLog
D    src/common/getpass.c
D    src/common/my_getopt.c
A    src/common/compat_strlcpy.h
A    src/common/compat_getpass.c
A    src/common/compat_getopt.h
A    src/common/ChangeLog.compat_getopt
D    src/common/README.strlcpy
D    src/common/my_getopt.h
A    src/common/compat_getpass.h
A    src/common/README.compat_strlcpy
D    src/common/strlcpy.3
A    src/common/README.compat_getopt
D    src/common/getopt.3
D    src/common/README.my_getopt
A    src/common/compat_strlcpy.3
A    src/common/compat_getopt.3
M    src/common/Makefile.am
M    src/Makefile.am
_M   src/pkcs15init
M    src/pkcs15init/pkcs15-oberthur.c
M    src/pkcs15init/profile.c
M    src/pkcs15init/pkcs15-lib.c
M    src/pkcs15init/pkcs15-rutoken.c
A    src/pkcs15init/pkcs15init.exports
M    src/pkcs15init/pkcs15-gpk.c
M    src/pkcs15init/Makefile.am
_M   src/scconf
M    src/scconf/Makefile.am
M    src/scconf/parse.c
A    src/scconf/scconf.exports
_M   src/libopensc
M    src/libopensc/card-rutoken.c
M    src/libopensc/compression.c
M    src/libopensc/sc.c
M    src/libopensc/card-piv.c
M    src/libopensc/pkcs15-openpgp.c
M    src/libopensc/pkcs15-postecert.c
M    src/libopensc/pkcs15-tcos.c
M    src/libopensc/opensc-config.in
M    src/libopensc/reader-pcsc.c
A    src/libopensc/internal-winscard.h
M    src/libopensc/ctx.c
A    src/libopensc/libopensc.exports
M    src/libopensc/pkcs15-piv.c
M    src/libopensc/pkcs15-infocamere.c
M    src/libopensc/internal.h
M    src/libopensc/pkcs15-actalis.c
M    src/libopensc/pkcs15-starcert.c
M    src/libopensc/card-oberthur.c
M    src/libopensc/pkcs15-atrust-acos.c
M    src/libopensc/p15card-helper.c
D    src/libopensc/part10.h
M    src/libopensc/ui.c
M    src/libopensc/card-gpk.c
M    src/libopensc/pkcs15-wrap.c
M    src/libopensc/pkcs15-gemsafeGPK.c
M    src/libopensc/log.c
M    src/libopensc/pkcs15-esteid.c
M    src/libopensc/pkcs15-prkey-rutoken.c
M    src/libopensc/log.h
M    src/libopensc/Makefile.am
M    src/libopensc/reader-openct.c
_M   aclocal
M    aclocal/Makefile.am
_M   win32
M    win32/Makefile.am
A    win32/versioninfo.rc.in
A    win32/ltrc.inc
A    configure.ac
_M   doc
_M   doc/tools
M    doc/tools/pkcs15-profile.xml
D    doc/changelog.sh
D    doc/export-wiki.xsl
_M   doc/api
_M   doc/api/file
M    doc/api/man.xsl
_M   doc/api/asn1
_M   doc/api/apps
_M   doc/api/init
_M   doc/api/types
_M   doc/api/card
M    doc/api/html.xsl
_M   doc/api/misc
_M   doc/api/util
M    doc/Makefile.am
D    doc/export-wiki.sh
AM   doc/nonpersistent
A    doc/nonpersistent/export-wiki.xsl
A    doc/nonpersistent/Makefile.am
A    doc/nonpersistent/export-wiki.sh
A    doc/nonpersistent/svn2cl.xsl
D    doc/generate-man.sh
D    doc/svn2cl.xsl
M    Makefile.am
A    svnignore
_M   etc
M    etc/opensc.conf.in
M    etc/Makefile.am
D    man
_M   solaris
M    solaris/Makefile



git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3405 c6295689-39f2-0310-b995-f0e70906c6a9
2008-03-06 16:06:59 +00:00
alonbl 56a4322c34 Convert constant SC_PKCS11_MAX_VIRTUAL_SLOTS to configuration option.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3404 c6295689-39f2-0310-b995-f0e70906c6a9
2008-03-06 15:04:29 +00:00
alonbl 1875a25c40 PKCS#11 "Application and processes" instructs the sequence
that should be taken after fork().
Applications should call C_Initialize() immediately after fork()
to reinitialize the provider.

The change monitor the pid that calls C_Initialize(), if it is
different than previous C_Finalize() is called.



git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3402 c6295689-39f2-0310-b995-f0e70906c6a9
2008-03-06 14:56:31 +00:00
martin 04942bb4f6 * Correctly return CKR_PIN_INCORRECT if PIN is out of range.
* By Alon Bar-Lev from svn diff -r 3397:3398 https://www.opensc-project.org/svn/opensc/branches/alonbl/pkcs11-login-rv



git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3400 c6295689-39f2-0310-b995-f0e70906c6a9
2008-02-29 10:18:51 +00:00
ludovic.rousseau 91288d4955 remove $(pkcs11dir)/opensc-pkcs11.so so that creating the symbolink link
does not fail if the file already exists.

Thanks to Jean-Pierre Szikora for the bug report


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3314 c6295689-39f2-0310-b995-f0e70906c6a9
2008-01-11 16:28:00 +00:00
ludovic.rousseau bf9d6beaac new patch for ruToken support
Thanks to Andrew V. Stepanov
http://www.opensc-project.org/pipermail/opensc-devel/2007-December/010631.html


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3310 c6295689-39f2-0310-b995-f0e70906c6a9
2008-01-03 08:59:14 +00:00
ludovic.rousseau 0ecc294ed8 add support of ruToken
Thanks to Andrew V. Stepanov for the patch
http://www.opensc-project.org/pipermail/opensc-devel/2007-December/010617.html


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3304 c6295689-39f2-0310-b995-f0e70906c6a9
2007-12-17 13:39:20 +00:00
ludovic.rousseau 4bf320b304 add support of /usr/lib/pkcs11/ directory. See
http://wiki.cacert.org/wiki/Pkcs11TaskForce

Thanks to Alon Bar-Lev for the better patch


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3300 c6295689-39f2-0310-b995-f0e70906c6a9
2007-11-13 09:38:18 +00:00
aj 177ff402f3 fix typo, found by Gürer Özen.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3259 c6295689-39f2-0310-b995-f0e70906c6a9
2007-08-28 20:34:42 +00:00
aj 9a10cdeebd add cflags for ltdl.h where needed.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3245 c6295689-39f2-0310-b995-f0e70906c6a9
2007-08-13 19:10:26 +00:00
ludovic.rousseau 345ce22c63 use LTLIB_CFLAGS and LTLIB_LIBS instead of the global LIBS to find and use
libltdl

thanks to Alon Bar-Lev for the patch


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3243 c6295689-39f2-0310-b995-f0e70906c6a9
2007-08-13 08:30:19 +00:00
aj dea6f8b090 update pkcs11.h header file from scute.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3196 c6295689-39f2-0310-b995-f0e70906c6a9
2007-07-03 14:14:58 +00:00
aj 4ca4eba365 silence more warnings by gcc/sparse.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3189 c6295689-39f2-0310-b995-f0e70906c6a9
2007-06-21 13:58:38 +00:00
aj 0c604cb294 silence more warnings.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3183 c6295689-39f2-0310-b995-f0e70906c6a9
2007-06-21 12:58:57 +00:00
aj c66889dc9e fix broken changes.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3182 c6295689-39f2-0310-b995-f0e70906c6a9
2007-06-21 12:14:50 +00:00
aj de0ca91355 make sc_pkcs11_print_attrs non static.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3181 c6295689-39f2-0310-b995-f0e70906c6a9
2007-06-21 12:06:33 +00:00
aj 4f0329cd18 silence more gcc/sparse warnings.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3180 c6295689-39f2-0310-b995-f0e70906c6a9
2007-06-21 12:01:39 +00:00
aj 4cc1a50a49 Alessandro Premoli:
add support for reading, writing and deleting private (require cache_pins) and
public data objects in PKCS11. updated the pkcs11-tool and fixed a few
bugs in the code. Tested on an aladdin etoken.


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3176 c6295689-39f2-0310-b995-f0e70906c6a9
2007-06-21 09:37:18 +00:00
aj a4cd33e77f Douglas E. Engert:
Looking at framework-pkcs11.c, it looks like there is a bug in the handling of
auth_count, if there is more then one pin, and one of the pins is a
SC_PKCS15_PIN_FLAG_SO_PIN. 

The for loop at line 767 will add a slot for each non SO_PIN or UNBLOCKING_PIN.
But at line 812, the auth_count is still set to the number of pins, even though
the SO_PIN did not cause a new slot to be allocated and thus the test of
hide_empty_tokens will not be used. 

With the attached patch, I can get the expected behavior when hide_empty_tokens
= yes in the opensc.conf from pkcs11-tool -L, pkcs11-tool -O and pkcs11-tool -O
-l 

There is only 1 slot allocated, the pkcs11-tool -O shows all the public
objects, and pkcs11-tool -O -l (after PIN) shows all the objects, and Heimdal
PKINIT still runs. 

I still think that if two or more slots need to be allocated for multiple auth
pins, then all the public objects should be added to each. I have an additional
mod for this too. 

Since the cards I am working with only have 1 pin, the attached mods works for
me. Note it looks like the pkcs15-openpgp.c might also be affected by this
change as it defines two pins an auth pin and a SO_PIN, much like the PIV card
does.


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3175 c6295689-39f2-0310-b995-f0e70906c6a9
2007-06-21 07:11:21 +00:00
aj f065546ccd The framework-pkcs15 will filed the modulus in a certificate and copy it to a
pubkey or from apubkey to a privkey object. But it does not copy the
modulus_len. 

This patch will look at pub_info->modulus_len and prv_info->modulus_len and
copy the modulus_len while copying the modulus.  This will be used with the
pkcs15-piv code when it creates pub and priv objects, as it has no way other
then from the certificates to know the modulus_len.

By  Douglas E. Engert.


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3171 c6295689-39f2-0310-b995-f0e70906c6a9
2007-05-25 20:06:59 +00:00
aj e3935077e1 enable pin caching by default.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3158 c6295689-39f2-0310-b995-f0e70906c6a9
2007-04-24 07:54:18 +00:00
nils ef7d8ffa86 bugfix: don't use the size of a void pointer, thanks to Carl Przybylek <crprzyby@gmail.com>
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3146 c6295689-39f2-0310-b995-f0e70906c6a9
2007-04-01 17:03:08 +00:00
martin d0a0103c70 Build a pkcs11 module with only one pin exposed to overcome issues described in #132. Closes #132
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3145 c6295689-39f2-0310-b995-f0e70906c6a9
2007-03-29 10:25:16 +00:00
aj eab8ade2ec changes by Douglas E. Engert:
change the do_decompress* to sc_decompress* and the initialize_* to
sc_pkcs15emu_initialize_* in the new code.


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3126 c6295689-39f2-0310-b995-f0e70906c6a9
2007-03-12 20:15:39 +00:00
nils a2f622a215 implement support for SHA2 (still experimental)
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3115 c6295689-39f2-0310-b995-f0e70906c6a9
2007-02-02 22:15:14 +00:00
aj 5db87927d4 convert to utf-8.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3086 c6295689-39f2-0310-b995-f0e70906c6a9
2006-12-19 21:33:15 +00:00
aj d537651ab7 update to latest pkcs11.h version.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3075 c6295689-39f2-0310-b995-f0e70906c6a9
2006-12-18 07:42:06 +00:00
nils f23ddbdba1 make it work with my compiler, add missing parenthesis
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3074 c6295689-39f2-0310-b995-f0e70906c6a9
2006-12-10 13:33:34 +00:00
aj 9aa18ea1ce update to latest pkcs11.h from Marcus.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3073 c6295689-39f2-0310-b995-f0e70906c6a9
2006-12-10 07:57:22 +00:00
aj 44d54b68dd pkcs11.h with updates from Alon.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3071 c6295689-39f2-0310-b995-f0e70906c6a9
2006-12-09 15:41:27 +00:00
aj b9daff9b28 replace rsa pkcs#11 header files with rewrite.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3066 c6295689-39f2-0310-b995-f0e70906c6a9
2006-11-30 08:11:58 +00:00
nils 65658db6e4 make the decision which locking functions to use more explicit; patch supplied by Martin
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3040 c6295689-39f2-0310-b995-f0e70906c6a9
2006-10-02 17:26:48 +00:00
nils a946dc98bf set CKF_USER_PIN_INITIALIZED only if we really have a pin object
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3033 c6295689-39f2-0310-b995-f0e70906c6a9
2006-09-27 22:10:12 +00:00
ludovic.rousseau 3e2e82dde9 C_GetInfo(): use "OpenSC (www.opensc-project.org)" instead of
"OpenSC Project (www.opensc-project.org)" for the manufacturerID to
avoid a truncation at 32 characters


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3012 c6295689-39f2-0310-b995-f0e70906c6a9
2006-09-14 08:55:06 +00:00
aj 198b68a6d3 shorten string, fixing #98.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3009 c6295689-39f2-0310-b995-f0e70906c6a9
2006-08-27 18:25:43 +00:00
aj 4608716c53 Douglas E. Engert:
Change PKCS11-Spy so it looks in HKEY_LOCAL_MACHINE, before
HKEY_LOCAL_USER.

This should not cause any problems, as the HKEY_LOCAL_MACHINE,
"Software\PKCS11-Spy" would not normally be set, accept while
the sysadmin of the machine as trying to debug a login type problem. 


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3006 c6295689-39f2-0310-b995-f0e70906c6a9
2006-08-13 21:20:05 +00:00
nils aec987df38 build fixes for win; patch supplied by Douglas E. Engert <deengert@anl.gov>
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3005 c6295689-39f2-0310-b995-f0e70906c6a9
2006-08-03 21:05:59 +00:00
nils 42ad6be451 win build fixes; patch supplied by Douglas E. Engert <deengert@anl.gov>
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3003 c6295689-39f2-0310-b995-f0e70906c6a9
2006-08-02 19:31:34 +00:00
nils 6df2a05975 bring implementation in accordance with the docu in opensc.conf
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2976 c6295689-39f2-0310-b995-f0e70906c6a9
2006-06-21 20:05:17 +00:00
aj f9dd89e53b sprintf bad. maybe even potential exploitable?
bug found by ville skytta using pscan.


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2964 c6295689-39f2-0310-b995-f0e70906c6a9
2006-05-23 20:53:15 +00:00
aj 0f64e9d3f1 make objects on piv card public.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2957 c6295689-39f2-0310-b995-f0e70906c6a9
2006-05-20 16:06:42 +00:00
aj c7a5ce3b50 revert prior change as it breaks the regression tests.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2956 c6295689-39f2-0310-b995-f0e70906c6a9
2006-05-20 16:05:14 +00:00
nils bfe05f31dc check for existing public key before creating one from the certificate; patch supplied by Albert Solana <asb@c3po.es>
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2953 c6295689-39f2-0310-b995-f0e70906c6a9
2006-05-15 18:48:30 +00:00
aj 45007b3da7 compile fixes for win32.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2949 c6295689-39f2-0310-b995-f0e70906c6a9
2006-05-12 20:01:26 +00:00
nils b28f8ed9c4 improve buffer length check
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2943 c6295689-39f2-0310-b995-f0e70906c6a9
2006-05-09 21:35:07 +00:00
nils 0c39b21b99 set the default for lock_login to false (as documented in opensc.conf)
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2941 c6295689-39f2-0310-b995-f0e70906c6a9
2006-05-05 10:35:02 +00:00
aj 449a1841b1 free(data)
(allocated by sc_pkcs15_read_data_object, no reference kept anywhere).


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2930 c6295689-39f2-0310-b995-f0e70906c6a9
2006-05-01 10:20:22 +00:00
aj ab0066b0d7 fix printf size_t problem with "%lu" and (unsigned long) cast.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2923 c6295689-39f2-0310-b995-f0e70906c6a9
2006-05-01 10:02:50 +00:00
aj 41ff15ec1f fix signed and size_t warnings.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2916 c6295689-39f2-0310-b995-f0e70906c6a9
2006-04-26 11:41:57 +00:00
aj beb55b8104 not sure it is a good idea to ignore the return value.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2898 c6295689-39f2-0310-b995-f0e70906c6a9
2006-04-26 10:00:23 +00:00
aj 347c5b0496 remove a function that is no longer used at all.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2888 c6295689-39f2-0310-b995-f0e70906c6a9
2006-04-18 15:15:45 +00:00
nils b791b1d6bc check the private flag of public key objects; patch supplied by Albert Solana <asb@c3po.es>
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2879 c6295689-39f2-0310-b995-f0e70906c6a9
2006-03-24 10:55:33 +00:00
martin 9213a29a34 Small fixes for windows compilation (Visual Studio Express 2005)
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2855 c6295689-39f2-0310-b995-f0e70906c6a9
2006-02-23 11:02:24 +00:00
nils 1f65fbe10e a unblocking pin could be used for authentication as well
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2844 c6295689-39f2-0310-b995-f0e70906c6a9
2006-02-14 22:46:54 +00:00
nils 55631edf3b support private certificates; patch supplied by Douglas E. Engert <deengert@anl.gov>
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2836 c6295689-39f2-0310-b995-f0e70906c6a9
2006-02-09 20:05:20 +00:00
nils 8e77e87551 sc_mutex_destroy should have a return value
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2832 c6295689-39f2-0310-b995-f0e70906c6a9
2006-02-05 19:35:55 +00:00
nils 5c3aed1189 - remove dependence on a specific threading library
- add two new structures: sc_thread_context_t which let
  the user specify the mutex functions to use and
  sc_context_param_t to specify parameters for the sc_context_t
  creation (including mutex functions) using sc_create_context()
- add new function sc_context_create()  
- remove timestamp code from libopensc


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2829 c6295689-39f2-0310-b995-f0e70906c6a9
2006-02-01 22:59:42 +00:00
aj b07df40932 change more opensc.org references to opensc-project.org till dns is back.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2818 c6295689-39f2-0310-b995-f0e70906c6a9
2006-01-22 21:15:07 +00:00
sth 551bcc89fa Referted the 'Fireofox 1.5' fix in log.c and replaced it by letting a blocking C_WaitForSlotEvent() return CKR_FUNCTION_NOT_SUPPORTED. This isn't a solution for the multihread problems (things hang or try to log to a released context) but at least it solves the Ff 1.5 problems
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2777 c6295689-39f2-0310-b995-f0e70906c6a9
2005-12-23 10:15:17 +00:00
sth 912946bf3f Fix for ticket #45: Firefox 1.5 and new Mozilla's crash when they are closed because there's a blocking C_WaitForSlotEvent() called from another thread then the 'main' thread that calls C_Finalize(); and this cause C_WaitForSlotEvent() to log to a NULL context -> assertion failure.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2762 c6295689-39f2-0310-b995-f0e70906c6a9
2005-12-08 20:25:54 +00:00
aj 40c67035c5 no code change, only easier to parse :)
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2724 c6295689-39f2-0310-b995-f0e70906c6a9
2005-12-05 21:53:13 +00:00
nils 346486ee70 fix problem with uninitialized pointer; this patch resolves opensc ticket #61
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2698 c6295689-39f2-0310-b995-f0e70906c6a9
2005-12-04 23:23:25 +00:00
nils ad647c66fa use sc_ctx_get_reader
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2676 c6295689-39f2-0310-b995-f0e70906c6a9
2005-10-30 21:44:05 +00:00
nils 47ee84e72d add functions
void sc_ctx_suppress_errors_on(sc_context_t *ctx);
	void sc_ctx_suppress_errors_off(sc_context_t *ctx);
to turn on/off error suppression (to avoid accessing
sc_context_t directly) and use it.


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2671 c6295689-39f2-0310-b995-f0e70906c6a9
2005-10-30 19:08:06 +00:00
sth 8f230f5c1d Do an sc_lock() before an sc_pkcs15init_bind(). Reason: in sc_pkcs15init_bind() an sc_lock() and sc_unlock() is done; and when the lock_login config option is set to false, the sc_unlock() will call logout() which for some cards means a SELECT(3F00) -> unwanted change of the current EF/DF causing errors
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2629 c6295689-39f2-0310-b995-f0e70906c6a9
2005-10-01 18:51:34 +00:00
aj 9d4d8ec98a reomve unneeded ifdefs.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2628 c6295689-39f2-0310-b995-f0e70906c6a9
2005-09-30 17:44:42 +00:00
sth 6effc69169 Removed the bundle on Mac
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2627 c6295689-39f2-0310-b995-f0e70906c6a9
2005-09-30 11:17:06 +00:00
aj 1d251cfa7a Document cryptoki header files.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2617 c6295689-39f2-0310-b995-f0e70906c6a9
2005-09-22 13:15:11 +00:00
aj 7d5d0ecfb2 scconf no longer needed for pkcs#11 spy.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2614 c6295689-39f2-0310-b995-f0e70906c6a9
2005-09-21 20:18:37 +00:00
aj d05e28d1f5 do not install bundles on mac os X. no reason to.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2613 c6295689-39f2-0310-b995-f0e70906c6a9
2005-09-21 20:17:22 +00:00
martin 3c47bb093c Fix makefiles
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2611 c6295689-39f2-0310-b995-f0e70906c6a9
2005-09-21 12:52:36 +00:00
aj 881c80d839 pkcs11-spy no longer uses a config file.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2602 c6295689-39f2-0310-b995-f0e70906c6a9
2005-09-18 11:00:00 +00:00
nils 6abeaf1f1c add a new function
void sc_mem_clear(void *ptr, size_t len);
to clear a memory buffer. If OpenSSL is used this function
is a wrapper for OPENSSL_cleanse, otherwise memset is currenlty used.

Use this function to clear memory buffers with sensitive content.


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2601 c6295689-39f2-0310-b995-f0e70906c6a9
2005-09-17 10:44:45 +00:00
nils 5123be2b85 add two new functions
sc_reader_t *sc_ctx_get_reader(sc_context_t *ctx, unsigned int i);
	unsigned int sc_ctx_get_reader_count(sc_context_t *ctx);
to access the reader_count and the sc_reader objects (to avoid accessing
the sc_context members directly).
Use these functions in src/pkcs11 + error checking to avoid accessing
invalid sc_reader objects.


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2595 c6295689-39f2-0310-b995-f0e70906c6a9
2005-09-16 10:18:55 +00:00
sth e15c54e1c5 Win32: we now need the external libtool package
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2592 c6295689-39f2-0310-b995-f0e70906c6a9
2005-09-15 05:55:53 +00:00
sth fd86e44094 Typo fix
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2570 c6295689-39f2-0310-b995-f0e70906c6a9
2005-09-11 19:57:43 +00:00
aj 21e3b71029 use ltdl not scdl.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2564 c6295689-39f2-0310-b995-f0e70906c6a9
2005-09-09 14:43:59 +00:00
aj c9e80e95ea we use libtool for linking, so it can calucalte the dependencies using
LTLIBLTDL better. Thanks to Ralf Wildenhues.


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2558 c6295689-39f2-0310-b995-f0e70906c6a9
2005-09-08 17:21:58 +00:00
aj ce14d27cb3 AC_SUBSTed variables are better used with $(..). Thanks to Ralf Wildenhues.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2557 c6295689-39f2-0310-b995-f0e70906c6a9
2005-09-08 17:15:07 +00:00
martin 8596348a75 * Get rid of reset card error that comes from pcsc only and deal with reset situations with SCardReconnect
* Add some options to control pcsc behavior.


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2553 c6295689-39f2-0310-b995-f0e70906c6a9
2005-09-08 11:35:26 +00:00
nils 7a2fec9b86 remove dependence on libopensc, instead use scconf directly.
Note: this code is still experimental !


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2552 c6295689-39f2-0310-b995-f0e70906c6a9
2005-09-07 20:05:13 +00:00
nils 9f26a4ae35 fix warning
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2551 c6295689-39f2-0310-b995-f0e70906c6a9
2005-09-07 09:34:27 +00:00
nils d37315ec35 cleanup key usage handling, cleanup
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2550 c6295689-39f2-0310-b995-f0e70906c6a9
2005-09-07 09:32:52 +00:00
aj 08a640c94b users of libpcs11.c also need @LIBLTDL@ libraries.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2544 c6295689-39f2-0310-b995-f0e70906c6a9
2005-09-06 20:22:15 +00:00
nils ffb7928f6e we need lt_dlinit()
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2538 c6295689-39f2-0310-b995-f0e70906c6a9
2005-09-05 17:05:26 +00:00
aj ff62b88e1c big configure update.
use pkg-config for openct, openssl, pcsc.
do not compilke libp11. do not compile sslengines.
remove scdl. use libltdl instead.
use libassuan.m4 macro for m4 detection.


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2528 c6295689-39f2-0310-b995-f0e70906c6a9
2005-09-01 14:01:58 +00:00
sth 891ed0f197 Added Netscape/Mozilla specific types etc.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2524 c6295689-39f2-0310-b995-f0e70906c6a9
2005-08-29 12:49:53 +00:00
martin 924a118501 Don't cache pins that protect a userconsent slot.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2502 c6295689-39f2-0310-b995-f0e70906c6a9
2005-08-21 18:39:43 +00:00
nils 6dc33041aa include sys/types.h if stdint.h doesn't exist + fix typo
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2476 c6295689-39f2-0310-b995-f0e70906c6a9
2005-08-09 21:27:50 +00:00
nils f59a51397c apply Stef's patch which puts all public objects in first slot if only one pin is present (and hide_empty_tokens is true)
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2448 c6295689-39f2-0310-b995-f0e70906c6a9
2005-07-24 14:06:02 +00:00
aj c26dde1a82 fix compiling without openssl.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2447 c6295689-39f2-0310-b995-f0e70906c6a9
2005-07-21 21:05:40 +00:00
nils e09bdac57b don't use software prng
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2436 c6295689-39f2-0310-b995-f0e70906c6a9
2005-07-18 20:20:22 +00:00
aj dd08853693 remove code dealing with random numbers for now.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2420 c6295689-39f2-0310-b995-f0e70906c6a9
2005-07-17 20:18:31 +00:00
aj 2445a52ad4 do not install libpkcs11 as shared library.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2388 c6295689-39f2-0310-b995-f0e70906c6a9
2005-07-10 17:03:15 +00:00
nils 65eec98c71 enhance attribute support; patch supplied by supplied by Marc Bevand <bevand_m@epita.fr>
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2386 c6295689-39f2-0310-b995-f0e70906c6a9
2005-07-08 21:16:31 +00:00
nils 9c011b0cab fix check of the return value in C_GetAttributeValue; supplied by Marc Bevand <bevand_m@epita.fr>
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2385 c6295689-39f2-0310-b995-f0e70906c6a9
2005-07-08 21:04:23 +00:00
martin 3d0f17bc95 Annoying typo
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2365 c6295689-39f2-0310-b995-f0e70906c6a9
2005-06-27 13:52:08 +00:00
aj bf6808e3d8 "smart card" not "smartcard" or "SmartCard".
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2354 c6295689-39f2-0310-b995-f0e70906c6a9
2005-06-16 19:35:31 +00:00
aj 4568015476 move libraries from lib/pkcs11 to lib/,
rename the engine dir to engine, and
make it "openssl" so openssl can load
the engines automaticaly.


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2350 c6295689-39f2-0310-b995-f0e70906c6a9
2005-06-15 08:56:15 +00:00
nils a248911ed2 cleanup, patch supplied by Marc Bevand
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2344 c6295689-39f2-0310-b995-f0e70906c6a9
2005-05-20 09:55:13 +00:00
sth fa333542db Don't used cashed PINs for a UserConsent key!
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2342 c6295689-39f2-0310-b995-f0e70906c6a9
2005-05-11 14:00:03 +00:00
nils d953492739 bugfix; supplied by Marc Bevand <marc.bevand@smartjog.com>
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2318 c6295689-39f2-0310-b995-f0e70906c6a9
2005-04-24 09:28:27 +00:00
sth 9221f1b2b2 Added opensc-to-pks11 error mapping
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2283 c6295689-39f2-0310-b995-f0e70906c6a9
2005-03-26 20:00:14 +00:00
aj 7133146d28 put new version in pkcs11-global.c, too.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2259 c6295689-39f2-0310-b995-f0e70906c6a9
2005-03-23 22:37:06 +00:00
aj 8d27151cf6 remove .cvsignore files.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2243 c6295689-39f2-0310-b995-f0e70906c6a9
2005-03-23 21:08:13 +00:00
bert eb4717ea17 API fixup: use defined type instead of struct for exposed structs (part 2)
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2233 c6295689-39f2-0310-b995-f0e70906c6a9
2005-03-09 00:04:44 +00:00
pisi 118c1f914a test label
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2190 c6295689-39f2-0310-b995-f0e70906c6a9
2005-02-15 14:41:30 +00:00
aet df5e357694 - Whitespace cleanup from me and Martin Paljak
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2181 c6295689-39f2-0310-b995-f0e70906c6a9
2005-02-11 20:09:34 +00:00
nils c30494a942 declare some functions static + some type fixes
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2144 c6295689-39f2-0310-b995-f0e70906c6a9
2005-02-06 10:28:43 +00:00
nils 54f8794267 indent fixes and cleanup by Martin Paljak
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2126 c6295689-39f2-0310-b995-f0e70906c6a9
2005-02-03 22:44:19 +00:00
nils c95726c782 bugfix: reselect application directory when lock_login=false
is set (at the moment only for pkcs15_prkey_sign and
pkcs15_prkey_decrypt), see:
http://www.opensc.org/pipermail/opensc-devel/2005-January/005345.html


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2120 c6295689-39f2-0310-b995-f0e70906c6a9
2005-02-01 19:02:15 +00:00
nils 485cc32f9b even more indent issues
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2086 c6295689-39f2-0310-b995-f0e70906c6a9
2005-01-19 20:12:55 +00:00
nils 14ff6bdfc5 fix indent again
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2084 c6295689-39f2-0310-b995-f0e70906c6a9
2005-01-19 19:52:08 +00:00
nils cb5d576267 some indent fixes from Martin Paljak plus some additional changes from me
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2083 c6295689-39f2-0310-b995-f0e70906c6a9
2005-01-19 18:15:43 +00:00
sth 08c3cc90fa Simplified the procedure to link with openssl on Windows: now you only need to slightly change Make.rules.mak instead of hacking in several Makefile.mak files
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2077 c6295689-39f2-0310-b995-f0e70906c6a9
2005-01-16 21:12:38 +00:00
nils f509f00d17 some cleanup + improved error checking
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2052 c6295689-39f2-0310-b995-f0e70906c6a9
2005-01-03 17:25:18 +00:00
nils 3931ee708d cleanup ...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2041 c6295689-39f2-0310-b995-f0e70906c6a9
2004-12-22 10:17:00 +00:00
nils 01f549da22 fix public key reference
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2026 c6295689-39f2-0310-b995-f0e70906c6a9
2004-12-20 19:44:38 +00:00
nils 8673508a43 fix memory leak, cleanup: use object specific release method
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2024 c6295689-39f2-0310-b995-f0e70906c6a9
2004-12-18 14:14:57 +00:00
nils 56a37d6c48 use object specific release method (if existing)
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2000 c6295689-39f2-0310-b995-f0e70906c6a9
2004-12-12 19:13:17 +00:00
sth 17fa73fb5d scdl.lib needed for for the link step due to the recent changes in dynamic loading
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1955 c6295689-39f2-0310-b995-f0e70906c6a9
2004-10-27 05:10:34 +00:00
nils bfd5b49436 pkcs15-init etc. support for pkcs15 data objects
patch supplied by Victor Tarasov <vtarasov@idealx.com>


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1877 c6295689-39f2-0310-b995-f0e70906c6a9
2004-07-26 18:47:23 +00:00
sth 1c51a8f0dd Fix: if a card couldnt be read (e.g. inverted upside down), allow to retry it later when asked
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1817 c6295689-39f2-0310-b995-f0e70906c6a9
2004-07-09 15:33:35 +00:00
aj 4b4c20196b better checking for null values.
found and fixed reported by Victor Tarasov <vtarasov@idealx.com>


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1777 c6295689-39f2-0310-b995-f0e70906c6a9
2004-04-21 21:11:06 +00:00
aj 6e15c2421e check parameters in strcpy_bp
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1760 c6295689-39f2-0310-b995-f0e70906c6a9
2004-03-29 20:34:30 +00:00
okir 393de85ac1 - Don't crash if card->serial_number is NULL
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1749 c6295689-39f2-0310-b995-f0e70906c6a9
2004-02-02 10:24:31 +00:00
aet 85d6bc7922 - Warning fixes
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1731 c6295689-39f2-0310-b995-f0e70906c6a9
2004-01-08 15:23:11 +00:00
sth 9779f07467 Fix: no keycaching if USE_PKCS15_INIT is not #defined
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1730 c6295689-39f2-0310-b995-f0e70906c6a9
2004-01-08 14:16:02 +00:00
aet 6473d2d2b3 - Unify with pkcs11.h
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1728 c6295689-39f2-0310-b995-f0e70906c6a9
2004-01-08 14:05:32 +00:00
aj 115bd355ed config.h is not used in pkcs11.h or any file included by it.
but pkcs11.h is a public header file, so it shouldn't do so anyway.


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1721 c6295689-39f2-0310-b995-f0e70906c6a9
2004-01-08 11:54:54 +00:00
sth 844ec9bc23 If the maximum allowed number of virtual slots per card is reached, then silently discard all objects that haven't been added yet instead of returning an error
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1717 c6295689-39f2-0310-b995-f0e70906c6a9
2004-01-08 09:47:23 +00:00
sth 7daafeb5da Update to the new keycache functions for caching the user and SO PINs
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1716 c6295689-39f2-0310-b995-f0e70906c6a9
2004-01-08 08:32:46 +00:00
okir f6aa07d991 - Another fix from Remo wrt keygen_args.pubkey_label
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1705 c6295689-39f2-0310-b995-f0e70906c6a9
2003-12-30 08:20:52 +00:00
okir 8a97a69d1d - C_CloseAllSessions would block on some Win32 versions because it tried
to acquire the global pkcs11 mutex twice.


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1704 c6295689-39f2-0310-b995-f0e70906c6a9
2003-12-30 08:00:10 +00:00
aet 20a707002c - Install unix.h and win32.h as well
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1701 c6295689-39f2-0310-b995-f0e70906c6a9
2003-12-29 16:54:31 +00:00
aet 13030f54b1 - Minor bundle handling fixes
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1671 c6295689-39f2-0310-b995-f0e70906c6a9
2003-12-12 09:32:34 +00:00
aet d6713aff9a - Minor naming convention harmonisation for pc/sc and ct-api
related things


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1669 c6295689-39f2-0310-b995-f0e70906c6a9
2003-12-10 14:52:58 +00:00
okir cfdd62bd49 - When generating a key in pkcs15init, allow the caller to specify a
public key label (Remo Inverardi)


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1663 c6295689-39f2-0310-b995-f0e70906c6a9
2003-12-08 12:02:28 +00:00
sth 4d68e1a28e Fix: allow a C_GetAttributeValue(privkey, CKA_MODULUS) after a C_GenerateKeyPair() -- M. Buechler
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1658 c6295689-39f2-0310-b995-f0e70906c6a9
2003-12-04 16:42:03 +00:00
sth 720b2810ee Little fix: forgotten to log an input param
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1657 c6295689-39f2-0310-b995-f0e70906c6a9
2003-12-04 15:07:26 +00:00
okir 5b1d6dd926 - Support raw RSA on decryption (Martin Buechler)
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1641 c6295689-39f2-0310-b995-f0e70906c6a9
2003-11-26 13:12:26 +00:00
sth af462ab212 Removed the exceptional (and incorrect) handling of the signature inputs of 16 and 20 bytes with pkcs11's CKM_RSA_PKCS11 signaturemechanism; and made sc_pkcs15_compute_signature() a bit more powerfull: if a digestinfo+hash input is given but the card only accepts hashes, the digestinfo is removed
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1636 c6295689-39f2-0310-b995-f0e70906c6a9
2003-11-23 16:11:32 +00:00
sth 30fba619b9 Added an error code
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1634 c6295689-39f2-0310-b995-f0e70906c6a9
2003-11-23 15:33:56 +00:00
okir 3fbdc4fbe9 - Link the spy against libopensc (Patch by Mathias Brossard)
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1619 c6295689-39f2-0310-b995-f0e70906c6a9
2003-11-20 14:16:20 +00:00
sth 0b7b3dff9c Support comparison of large object attributes
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1616 c6295689-39f2-0310-b995-f0e70906c6a9
2003-11-20 09:17:57 +00:00
sth 43c4fe5ff5 Fix: correctly set the labels of the public and private key during keypairgeneration (Remo Inverardi)
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1603 c6295689-39f2-0310-b995-f0e70906c6a9
2003-11-12 19:06:33 +00:00
sth dfba889fba Fix: allow keypair generation of keys other then the default length (Victor Tarasov)
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1602 c6295689-39f2-0310-b995-f0e70906c6a9
2003-11-12 18:28:03 +00:00
sth f5f5f7f57c Fix: link the simbolic PIN to the real name
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1595 c6295689-39f2-0310-b995-f0e70906c6a9
2003-11-01 19:13:21 +00:00
okir af0bd61682 pkcs11/framework-pkcs15.c
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1538 c6295689-39f2-0310-b995-f0e70906c6a9
2003-10-18 12:40:22 +00:00
aet 14b49ccb81 - Forgot to commit
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1526 c6295689-39f2-0310-b995-f0e70906c6a9
2003-10-14 22:11:11 +00:00
aet 603ccec619 - Fixed nightly snapshot generation
- Link keycache.h to src/include/opensc
- Move mutex function declarations to opensc.h


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1525 c6295689-39f2-0310-b995-f0e70906c6a9
2003-10-14 21:56:56 +00:00
okir fffe5b79ef - Error logging changes: replace ctx->log_errors with ctx->suppress_errors
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1520 c6295689-39f2-0310-b995-f0e70906c6a9
2003-10-14 09:57:50 +00:00
okir 12a4ef75ef - replace sc_pkcs15init_set_pin_data -> sc_keycache_put_key
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1515 c6295689-39f2-0310-b995-f0e70906c6a9
2003-10-14 08:33:20 +00:00
sth f003360c17 Fix: added all required OpenSC libs to the link dependencies (Ivo)
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1496 c6295689-39f2-0310-b995-f0e70906c6a9
2003-10-10 14:24:26 +00:00
aet fac4bd6008 Tweak out some compiler warnings
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1486 c6295689-39f2-0310-b995-f0e70906c6a9
2003-10-02 08:29:32 +00:00
sth ebca5c681c Added C_DecryptInit() and C_Decrypt() for RSA keys
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1485 c6295689-39f2-0310-b995-f0e70906c6a9
2003-10-01 06:51:49 +00:00
sth 7bd2723f6a Some fixes that accidentially crept in
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1476 c6295689-39f2-0310-b995-f0e70906c6a9
2003-09-29 14:29:43 +00:00
sth d9fbbc6ec3 Fix: the hash-based RSA algo's can only do sign/verify, no wrap, encrypt, ...)
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1475 c6295689-39f2-0310-b995-f0e70906c6a9
2003-09-29 13:54:39 +00:00
aet d208a04872 Cleanups to scconf handling
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1473 c6295689-39f2-0310-b995-f0e70906c6a9
2003-09-29 09:00:11 +00:00
sth b5984fccd6 Some changes for the spy: (1) renamed opens-spy to pkcs11-spy, (2) exported all pkcs11 functions, (3) start the log with the name of the module-to-be-loaded, (4) first look in the opensc.conf file for the module and log names
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1471 c6295689-39f2-0310-b995-f0e70906c6a9
2003-09-28 19:22:30 +00:00
aet 6857ffa11a Update PKCS#11 library version to 0.8.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1443 c6295689-39f2-0310-b995-f0e70906c6a9
2003-09-12 10:36:23 +00:00
sth c5eea382ee Fix: C_GenerateKeyPair(), C_CreateObject() returned CKR_USER_NOT_LOGGED_IN if lock_login is set to false in the config file, because then the pkcs15_init functions do a logoff internally
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1441 c6295689-39f2-0310-b995-f0e70906c6a9
2003-09-11 12:11:52 +00:00
sth 68c885ebe1 Added version info to the Win32 binaries, and set the version number to 0.8.0.0 (4 numbers seems to be needed)
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1437 c6295689-39f2-0310-b995-f0e70906c6a9
2003-09-10 14:08:29 +00:00
aet f2575116d0 Remove extra semicolons
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1435 c6295689-39f2-0310-b995-f0e70906c6a9
2003-09-10 10:41:48 +00:00
aet ba1a685c8e Don't bother exposing sc_pkcs11_module_t and scdl_context_t
to public headers, use void instead.


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1424 c6295689-39f2-0310-b995-f0e70906c6a9
2003-09-06 16:18:15 +00:00
sth 4f580598b0 Fix: don't print the contents of a NULL pointer
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1423 c6295689-39f2-0310-b995-f0e70906c6a9
2003-09-06 13:36:59 +00:00
sth 1decd28185 Typo fix
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1422 c6295689-39f2-0310-b995-f0e70906c6a9
2003-09-06 13:35:33 +00:00
sth 1941bc79b8 Build the pkcs11 spy on Win32
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1421 c6295689-39f2-0310-b995-f0e70906c6a9
2003-09-06 13:13:15 +00:00
aet 915ddc91ca PKCS#11 spy fixes by Mathias Brossard
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1416 c6295689-39f2-0310-b995-f0e70906c6a9
2003-09-04 13:50:30 +00:00
aet 3bd77d0f2b Fix make distcheck to work again, weird that it
stopped working only after the opensc-spy patching.


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1415 c6295689-39f2-0310-b995-f0e70906c6a9
2003-09-03 21:53:18 +00:00
aet d63e83d4e3 - Linking cleanups for libpkcs11 / opensc-pkcs11
- Build fixes for PKCS#11 spy module by Mathias,
  so far untested. TODO: C_UnloadModule?


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1410 c6295689-39f2-0310-b995-f0e70906c6a9
2003-09-03 18:08:54 +00:00
aet 3a2a4463b1 Add PKCS#11 spy sources by Mathias Brossard <mathias dot brossard AT idealx
dot com>


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1408 c6295689-39f2-0310-b995-f0e70906c6a9
2003-09-03 17:19:08 +00:00
aet 86475ea7c0 - Remove sslengines/libpkcs11.h, it's almost identical
to libpkcs11's pkcs11.h.
- Move default PKCS#11 library defines to pkcs11.h,
  so they can be used by 3rdparty applications as
  well.
- Minor cleanups


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1407 c6295689-39f2-0310-b995-f0e70906c6a9
2003-09-03 17:07:15 +00:00
aet bac2b601a9 Move scdl to it's own subdirectory, although it's merely
for internal purposes only.


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1403 c6295689-39f2-0310-b995-f0e70906c6a9
2003-09-01 08:43:38 +00:00
aet bd54ea7a62 - Move all dynamic loading related code to src/common/scdl.c,
probably needs some more work.

As a side bonus, we now have a working CT-API support for MacOS X.


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1402 c6295689-39f2-0310-b995-f0e70906c6a9
2003-08-29 16:29:52 +00:00
aet 763fc16704 Rename libopensc specific error/debug to sc_error/sc_debug
We should have done this ages ago.


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1392 c6295689-39f2-0310-b995-f0e70906c6a9
2003-08-25 14:21:18 +00:00
aet 2b3db944e0 - Rename sysdep_timestamp_t to sc_timestamp_t
- Add missing function prototype for sc_current_time


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1384 c6295689-39f2-0310-b995-f0e70906c6a9
2003-08-18 14:54:37 +00:00
aet 8cf5945900 Add common versioning to all libraries
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1383 c6295689-39f2-0310-b995-f0e70906c6a9
2003-08-18 14:28:47 +00:00
aet e6258f8049 - Install OpenSSL engines as bundles as well
- Don't bother "renaming" opensc-pkcs11.so
  when installing as bundle.
- More irrelevant cleanups


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1382 c6295689-39f2-0310-b995-f0e70906c6a9
2003-08-18 13:45:37 +00:00
aet 40b747a612 Minor cleanups
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1381 c6295689-39f2-0310-b995-f0e70906c6a9
2003-08-18 12:06:35 +00:00
aet bfc584e3ef - Allow MacOS X build to be able to support simultaneously
loading of .dylibs, .bundles (native MacOS X) and bundle
  objects (.so) created by GNU libtool, if dlcompat is found.
  Otherwise just support .dylibs and .bundles.


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1359 c6295689-39f2-0310-b995-f0e70906c6a9
2003-08-14 12:45:22 +00:00
aet 890d6ee2bc Cleanups
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1358 c6295689-39f2-0310-b995-f0e70906c6a9
2003-08-14 11:47:17 +00:00
aet 0aaed9f3cf - Minor cleanups
- Add preliminary support for MacOS X bundle installation


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1357 c6295689-39f2-0310-b995-f0e70906c6a9
2003-08-14 11:37:46 +00:00
okir 11e38e8d29 - first stab at user_consent handling
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1350 c6295689-39f2-0310-b995-f0e70906c6a9
2003-08-11 14:39:01 +00:00
aet 8dd292fc4b Blah, unify the string handling a bit
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1337 c6295689-39f2-0310-b995-f0e70906c6a9
2003-08-06 12:01:40 +00:00
aet c42a3bfc0f - Fixed a mac specific compiler warning
- Fixed libdl-specific code to work with Fink's dlcompat package


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1335 c6295689-39f2-0310-b995-f0e70906c6a9
2003-08-06 08:45:57 +00:00
aet 6e29c9f599 Fixed a typo
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1334 c6295689-39f2-0310-b995-f0e70906c6a9
2003-08-06 07:36:38 +00:00
sth ce51dac5e9 Fixed the verification, so that it corresponds completely with the signature functions (more specifically: the special cases are provided for SHA-1 and MD5 signatures with the RSA_PKCS1_PADDING mechanism)
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1333 c6295689-39f2-0310-b995-f0e70906c6a9
2003-08-05 19:26:07 +00:00
aet 3e1dd82f4f Remove some compiler warnings
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1332 c6295689-39f2-0310-b995-f0e70906c6a9
2003-08-05 17:28:29 +00:00
okir 77432ee438 - indentation fix
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1320 c6295689-39f2-0310-b995-f0e70906c6a9
2003-07-31 08:10:23 +00:00
sth af50810d0f Fix: if a pkcs11 attribute is requested that valid for that type of object, but that we don't have, then we should return length = 0 instead of returning CKR_ATTRIBUTE_TYPE_INVALID
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1319 c6295689-39f2-0310-b995-f0e70906c6a9
2003-07-30 14:46:27 +00:00
aet a9f05d1100 Remove CFLAGS_OPENSC, cleanups to INCLUDES handling.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1316 c6295689-39f2-0310-b995-f0e70906c6a9
2003-07-30 09:50:18 +00:00
aet a327d1994a Minor cleanups
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1309 c6295689-39f2-0310-b995-f0e70906c6a9
2003-07-28 12:11:03 +00:00
sth 01a36a8aed Added some debugging info
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1280 c6295689-39f2-0310-b995-f0e70906c6a9
2003-07-17 22:59:12 +00:00
sth 47489c5567 Added some debugging info
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1279 c6295689-39f2-0310-b995-f0e70906c6a9
2003-07-17 22:53:48 +00:00
sth f8c5da9ccc Fix: if a pkcs11 operation fails, it should be ended
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1278 c6295689-39f2-0310-b995-f0e70906c6a9
2003-07-17 22:09:18 +00:00
aet 118c7a4dcc Resync .cvsignore files
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1271 c6295689-39f2-0310-b995-f0e70906c6a9
2003-07-17 12:39:11 +00:00
sth 34fbb4219a Fix of the previous patch: show only 1 public key if both public key and cert exist
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1265 c6295689-39f2-0310-b995-f0e70906c6a9
2003-07-16 05:20:58 +00:00
sth e8cf96af9f Fix of the previous patch: if there are a public key and cert with the same ID, show the public key derived from the cert
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1262 c6295689-39f2-0310-b995-f0e70906c6a9
2003-07-14 17:34:50 +00:00
sth 864f261679 Fix: if there was a public key and cert with the same ID, you'd see the public key twice in pkcs11: once the 'real' one and once the one derived from the cert
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1261 c6295689-39f2-0310-b995-f0e70906c6a9
2003-07-14 17:28:30 +00:00
sth b093146578 If C_SetAttributeValue() wants to change the CKA_SUBJECT, simply return OK. This is OK as we don't save the CKA_SUBJECT of a public key anyway, and it's needed for doing keypair gen + cert writing with Mozilla
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1254 c6295689-39f2-0310-b995-f0e70906c6a9
2003-07-11 20:14:48 +00:00
aet c4d2611d12 - 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
2003-07-11 16:31:06 +00:00
aj d94de46a59 remove old text files.
new documentation is in opensc/docs/opensc.html (and .xml)


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1244 c6295689-39f2-0310-b995-f0e70906c6a9
2003-07-10 10:44:23 +00:00
sth 7b7f2106f2 Implemented the C_VerifyXXX() functions
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1236 c6295689-39f2-0310-b995-f0e70906c6a9
2003-06-27 15:26:17 +00:00
sth b7d92d3127 Removed the CKF_WRITE_PROTECTED tokeninfo flag
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1235 c6295689-39f2-0310-b995-f0e70906c6a9
2003-06-27 13:29:51 +00:00
sth 4fdecc39c2 Fix: register CKF_GENERATE_KEY_PAIR in a correct way
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1232 c6295689-39f2-0310-b995-f0e70906c6a9
2003-06-27 12:11:19 +00:00
sth ffadf4770c Implemented C_SetAttributeValue() that can change the CKA_VALUE and CKA_ID
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1230 c6295689-39f2-0310-b995-f0e70906c6a9
2003-06-27 12:00:43 +00:00
sth 4dc226d05f Added a little extra logging to C_GenerateKeyPair()
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1224 c6295689-39f2-0310-b995-f0e70906c6a9
2003-06-25 10:57:41 +00:00
sth 09650d29a3 Changed SC_PKCS15_MAX_PINS to MAX_OBJECTS in pkcs15_create_tokens()
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1220 c6295689-39f2-0310-b995-f0e70906c6a9
2003-06-24 11:31:02 +00:00
sth 11660330f4 Added a safer locking mechanism, based on sc_lock/sc_unlock (Olaf)
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1219 c6295689-39f2-0310-b995-f0e70906c6a9
2003-06-24 11:26:17 +00:00
sth a8724bea78 In slot_initialize(): Bugfix in a memset and added a pool_initialize()
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1218 c6295689-39f2-0310-b995-f0e70906c6a9
2003-06-24 11:11:49 +00:00
sth 97da0b6149 Now you can specify your card profile for pkcs15init, both on the command line if you use the pkcs15init tool and in the opensc.conf file. Not specifying gives the default one, like before.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1212 c6295689-39f2-0310-b995-f0e70906c6a9
2003-06-18 08:07:12 +00:00
sth bd3eab81e4 Added #include <openssl/rsa.h>, this is needed for openssl 0.9.8 and higher where openssl/evp.h wont include the algorithms anymore (Nils)
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1198 c6295689-39f2-0310-b995-f0e70906c6a9
2003-06-13 06:51:26 +00:00
sth c85913c5c7 Fix in pkcs15_gen_keypair(): labels didnt work
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1184 c6295689-39f2-0310-b995-f0e70906c6a9
2003-06-04 19:17:51 +00:00
sth fe3cb3de3f some fixes to pkcs15_create_object() and pkcs15_gen_keypair()
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1181 c6295689-39f2-0310-b995-f0e70906c6a9
2003-06-04 12:26:06 +00:00
sth e3262c5fcd added a check for CKA_CERTIFICATE_TYPE to attr_extract()
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1180 c6295689-39f2-0310-b995-f0e70906c6a9
2003-06-04 12:24:19 +00:00
sth c8c2cf725b First implementation of C_GenerateKeyPair()
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1179 c6295689-39f2-0310-b995-f0e70906c6a9
2003-06-03 13:57:52 +00:00
okir 9d6227ec64 - return value of pkcs15_login was ignored
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1165 c6295689-39f2-0310-b995-f0e70906c6a9
2003-05-27 09:58:39 +00:00
sth fc31b65a88 added sc_logout() functionality
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1153 c6295689-39f2-0310-b995-f0e70906c6a9
2003-05-20 08:30:46 +00:00
aj 705103d4d8 fix include paths.
include files are supposed to be in opensc/ and opensc/rsaref/.


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1145 c6295689-39f2-0310-b995-f0e70906c6a9
2003-05-16 22:08:41 +00:00
okir 0f29e7543e - allow full access to keys not protected by a PIN
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1126 c6295689-39f2-0310-b995-f0e70906c6a9
2003-05-15 15:27:33 +00:00
sth 053b10e2bf If signing/decryption fails because the card lost its security status, try to log in again and then do another attempt to sign/decrypt
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1113 c6295689-39f2-0310-b995-f0e70906c6a9
2003-05-15 10:34:03 +00:00
sth c79e42d82e Added support for Mac bundles
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1092 c6295689-39f2-0310-b995-f0e70906c6a9
2003-05-08 07:54:30 +00:00
aj c4e49486b9 oops, didn't remove reference to sslrandom.c. fixed.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1091 c6295689-39f2-0310-b995-f0e70906c6a9
2003-05-02 15:12:02 +00:00
aj 99d3289ecd this should fix the libscrandom issue:
the obvious solution is to create libscrandom.la (not .a)
and link with ../scrandom/libscrandom.la (not -lscrandom).


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1090 c6295689-39f2-0310-b995-f0e70906c6a9
2003-05-02 15:03:02 +00:00
aj 683b946c52 Patch by Robert Bihlmeyer:
- remove liscrandom
 - use scrandom.c directly (list as part of the SOURCES)


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1083 c6295689-39f2-0310-b995-f0e70906c6a9
2003-05-01 14:09:11 +00:00
sth dcf4a94847 Build libscrandom in both .a and .so versions (by R. Bihlmeyer)
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1080 c6295689-39f2-0310-b995-f0e70906c6a9
2003-04-29 11:10:06 +00:00
sth f417883e15 Avoid an Assertion Failed (ctx!=NULL) in log.c if sc_establish_context() fails in C_Initialize()
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1075 c6295689-39f2-0310-b995-f0e70906c6a9
2003-04-28 09:55:36 +00:00
sth 2698dc6cec Have a compile option to enable PTHREAD locking at the pkcs11 level
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1070 c6295689-39f2-0310-b995-f0e70906c6a9
2003-04-24 07:03:48 +00:00
sth a9692c9c46 Disabled OS thread locking on OSes with PTHREAD due to closing problems with Mozilla
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1067 c6295689-39f2-0310-b995-f0e70906c6a9
2003-04-23 09:52:09 +00:00
aj c0ea6e9554 remove references to SCIDI
sanitize pkcs11 include header references
(now they are installed in rsaref/ subdir,
and pkcs11.h is *not* overwritten).

remove automake 1.5 requirement
(automake 1.4 on debian stable/woody works fine)


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1064 c6295689-39f2-0310-b995-f0e70906c6a9
2003-04-22 17:02:28 +00:00
jey 0aea6fcba5 - applied build fixes from Andreas
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1058 c6295689-39f2-0310-b995-f0e70906c6a9
2003-04-21 15:01:55 +00:00
sth fb417772fb Allow non-repudation as a signature usage
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1050 c6295689-39f2-0310-b995-f0e70906c6a9
2003-04-18 15:42:04 +00:00
sth 01896a8f2e Added some files to ignore, also for Windows
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1049 c6295689-39f2-0310-b995-f0e70906c6a9
2003-04-18 14:57:50 +00:00
sth b05aadce59 Have a sec delay in C_GetSlotInfo() per reader instead of a global delay
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1048 c6295689-39f2-0310-b995-f0e70906c6a9
2003-04-18 11:58:11 +00:00
sth a85d6d7aa4 Added code for MacOSX
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1047 c6295689-39f2-0310-b995-f0e70906c6a9
2003-04-18 11:55:16 +00:00
okir 41a22174dc - bugfix for unwrap
- support getattr(CKA_VALUE) for public key objects


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1045 c6295689-39f2-0310-b995-f0e70906c6a9
2003-04-17 14:38:00 +00:00
okir c94d72f3ea - fixed signing and hopefully unwrap for split keys
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1041 c6295689-39f2-0310-b995-f0e70906c6a9
2003-04-17 13:13:48 +00:00
okir 9fae9999ea - fix for the previous change
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1040 c6295689-39f2-0310-b995-f0e70906c6a9
2003-04-17 13:03:49 +00:00
okir d2075b2c13 - implemented split-key support for CardOS
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1038 c6295689-39f2-0310-b995-f0e70906c6a9
2003-04-17 12:38:08 +00:00
okir 6faee57a95 - fixed compiler warning
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1037 c6295689-39f2-0310-b995-f0e70906c6a9
2003-04-17 11:04:28 +00:00
sth 897e4a87ca Added debug.obj
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1033 c6295689-39f2-0310-b995-f0e70906c6a9
2003-04-16 19:50:30 +00:00
okir 138346a018 - backed out AM_LDFLAGS change
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1022 c6295689-39f2-0310-b995-f0e70906c6a9
2003-04-16 14:20:40 +00:00
okir 1714b3147c - improved debugging output of CK_ATTRIBUTE data
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1021 c6295689-39f2-0310-b995-f0e70906c6a9
2003-04-16 14:18:07 +00:00
okir c53043a97e - in getattr(CKA_LABEL), do not include trailing NUL
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1020 c6295689-39f2-0310-b995-f0e70906c6a9
2003-04-16 14:17:02 +00:00
sth 92c5e24572 Have allways a label in CK_TOKEN_INFO
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1010 c6295689-39f2-0310-b995-f0e70906c6a9
2003-04-14 17:29:19 +00:00
sth f801d14ffd Removed some errors that occured with unsupported cards
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@996 c6295689-39f2-0310-b995-f0e70906c6a9
2003-04-11 14:22:52 +00:00
okir 87a0cc51a1 - build fixes from Andreas
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@991 c6295689-39f2-0310-b995-f0e70906c6a9
2003-04-11 11:46:02 +00:00
sth ac4b6dc45f Fix: card detection in C_GetSlotInfo is done at most once a second
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@969 c6295689-39f2-0310-b995-f0e70906c6a9
2003-04-02 06:59:19 +00:00
sth 0abafd0e9a Fix: root certs could be shown more then once
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@965 c6295689-39f2-0310-b995-f0e70906c6a9
2003-03-27 16:08:10 +00:00
okir 995bcfa2df - added missing win32.h
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@959 c6295689-39f2-0310-b995-f0e70906c6a9
2003-03-27 10:12:02 +00:00
okir 6717b4224b - dont install rsaref/{unix.h,win32.h}
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@947 c6295689-39f2-0310-b995-f0e70906c6a9
2003-03-10 21:35:47 +00:00
sth ca6a27e429 remove/insert fix: restore the slot->reader in slot_token_removed
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@943 c6295689-39f2-0310-b995-f0e70906c6a9
2003-03-07 14:18:55 +00:00
sth c097704149 added error msg SC_ERROR_KEYPAD_TIMEOUT
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@938 c6295689-39f2-0310-b995-f0e70906c6a9
2003-03-03 21:07:42 +00:00
okir 66a8076baa - more robust handling of concurrent WaitForSlotEvent vs Finalize
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@937 c6295689-39f2-0310-b995-f0e70906c6a9
2003-03-03 13:07:28 +00:00
sth 32f532a782 fix: clear the CK_SLOT_INFO flags in slot_token_removed
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@936 c6295689-39f2-0310-b995-f0e70906c6a9
2003-03-03 13:03:59 +00:00
sth a2ff6d66b4 take the last 8 bytes of the card as the pkcs11 serialNumber
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@935 c6295689-39f2-0310-b995-f0e70906c6a9
2003-02-28 15:16:56 +00:00
sth 0036545ffa fix in C_GetSlotInfo that previously cleared the slotDescription and didnt clear the CKF_TOKEN_PRESENT flag
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@934 c6295689-39f2-0310-b995-f0e70906c6a9
2003-02-28 12:47:32 +00:00
sth 9fe5baa4b7 added error code CKR_PIN_INVALID
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@932 c6295689-39f2-0310-b995-f0e70906c6a9
2003-02-26 07:27:42 +00:00
sth 5c1ae16ac8 fixed wrong return value in C_Finalize
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@931 c6295689-39f2-0310-b995-f0e70906c6a9
2003-02-23 20:10:24 +00:00
sth 49760f9cfb fixed some thread dead-lock bugs
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@930 c6295689-39f2-0310-b995-f0e70906c6a9
2003-02-23 19:38:50 +00:00
okir 9173c9934e - new pkcs15 object creation stuff
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@929 c6295689-39f2-0310-b995-f0e70906c6a9
2003-02-23 17:50:33 +00:00
sth d9e99b0e17 little fix in C_GetInfo
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@927 c6295689-39f2-0310-b995-f0e70906c6a9
2003-02-21 15:40:06 +00:00
okir 33133a8d5a - prevent compiler warning
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@926 c6295689-39f2-0310-b995-f0e70906c6a9
2003-02-21 12:47:30 +00:00
sth b0a8b1a26a extra check in C_Logout
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@925 c6295689-39f2-0310-b995-f0e70906c6a9
2003-02-21 12:29:14 +00:00
sth 252cbd51d2 login should return CKR_ARGUMENTS_BAD if wrong pin length
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@924 c6295689-39f2-0310-b995-f0e70906c6a9
2003-02-21 12:27:24 +00:00
sth a7a5701e0c added support for max pin length
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@922 c6295689-39f2-0310-b995-f0e70906c6a9
2003-02-20 23:19:01 +00:00
sth a69a309c6e NULL_PTR check added
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@921 c6295689-39f2-0310-b995-f0e70906c6a9
2003-02-20 18:55:35 +00:00
sth 4d4920b661 Let C_FindObjectsInit return correctly
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@920 c6295689-39f2-0310-b995-f0e70906c6a9
2003-02-20 18:54:52 +00:00
sth b75ea0a0b2 more parameter checks + fix in previous checks
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@917 c6295689-39f2-0310-b995-f0e70906c6a9
2003-02-19 21:10:39 +00:00
sth 958658102d added check for NULL pointers and uninitialized pkcs11 lib
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@916 c6295689-39f2-0310-b995-f0e70906c6a9
2003-02-19 13:44:36 +00:00
sth c05cef9678 correct behaviour of C_GetSlotInfo at empty slots
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@914 c6295689-39f2-0310-b995-f0e70906c6a9
2003-02-17 16:53:49 +00:00
okir 870d9d9f66 - made card_detect() available to everyone
- C_GetSlotInfo now always does card detection, but only for the
  reader which which the slot is associated


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@913 c6295689-39f2-0310-b995-f0e70906c6a9
2003-02-17 14:57:51 +00:00
okir cf6037314f - Introduce locks around all pkcs11 operations, in case the caller
is multithreaded and wants to access us from different threads.


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@912 c6295689-39f2-0310-b995-f0e70906c6a9
2003-02-17 14:21:38 +00:00
sth e1f4108c33 added error code CKR_USER_NOT_LOGGED_IN
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@909 c6295689-39f2-0310-b995-f0e70906c6a9
2003-02-16 18:09:10 +00:00
sth 58985e51c2 reset first_free_slot during C_Initialize
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@908 c6295689-39f2-0310-b995-f0e70906c6a9
2003-02-14 16:59:23 +00:00
sth d944d91714 added the CKR_DEVICE_REMOVED return code
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@907 c6295689-39f2-0310-b995-f0e70906c6a9
2003-02-12 14:20:53 +00:00
sth 7dcf350d7b added p11 error CKR_PIN_LOCKED
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@905 c6295689-39f2-0310-b995-f0e70906c6a9
2003-02-11 10:38:43 +00:00
okir 1c66025798 - Each reader now gets a fixed range of slots
- Each slot now shows the reader name in the description field


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@903 c6295689-39f2-0310-b995-f0e70906c6a9
2003-02-10 14:08:29 +00:00
okir 4ff3821a0a - suppress bogus insertion events
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@897 c6295689-39f2-0310-b995-f0e70906c6a9
2003-02-03 12:32:43 +00:00
okir 5276bbb1c4 - merged Stef's WaitForSlotEvent patches
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@895 c6295689-39f2-0310-b995-f0e70906c6a9
2003-02-03 12:20:54 +00:00
okir 76e7ce90e4 - fixed compiled warning
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@894 c6295689-39f2-0310-b995-f0e70906c6a9
2003-02-03 12:20:24 +00:00
sth f6a343712e added: opensc SC_ERROR_KEYPAD_CANCELLED -> pkcs11 CKR_FUNCTION_CANCELED
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@890 c6295689-39f2-0310-b995-f0e70906c6a9
2003-01-31 12:50:26 +00:00
sth 16dfb55118 the slot's slotDescription is now the reader name
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@888 c6295689-39f2-0310-b995-f0e70906c6a9
2003-01-28 15:39:47 +00:00
sth 5c1b8d9411 selection between SHA-1 and RIPEMD160 sigs when 35 bytes supplied
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@887 c6295689-39f2-0310-b995-f0e70906c6a9
2003-01-28 15:37:54 +00:00
sth dfc01ab7ed typo fix
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@885 c6295689-39f2-0310-b995-f0e70906c6a9
2003-01-27 13:43:06 +00:00
sth a383ed91d5 added return value + fix (needed if hide_empty_slots = true
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@883 c6295689-39f2-0310-b995-f0e70906c6a9
2003-01-27 13:17:08 +00:00
okir 7c6896ad73 - link against libscrandom.a, no libscrandom.la
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@873 c6295689-39f2-0310-b995-f0e70906c6a9
2003-01-20 09:57:23 +00:00
okir c83a6468ac - fixed typo in previous patch
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@872 c6295689-39f2-0310-b995-f0e70906c6a9
2003-01-20 09:56:53 +00:00
okir 4867251671 - fix sc_pkcs11_signature_size to return modulus size in bytes, not bits (Stef)
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@869 c6295689-39f2-0310-b995-f0e70906c6a9
2003-01-20 09:52:05 +00:00
okir 69f8588f47 - added card_detect_all
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@868 c6295689-39f2-0310-b995-f0e70906c6a9
2003-01-20 09:50:33 +00:00
okir 5b1eb43b93 - add some support for card removal in pkcs11
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@867 c6295689-39f2-0310-b995-f0e70906c6a9
2003-01-19 17:47:07 +00:00
okir a7551e1822 - Patches from Stef implementing PKCS11 RNG related functions
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@866 c6295689-39f2-0310-b995-f0e70906c6a9
2003-01-16 20:10:28 +00:00
aet b1eff66867 C++ warning fixes (assuan excluded)
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@863 c6295689-39f2-0310-b995-f0e70906c6a9
2003-01-14 19:55:45 +00:00
okir 0af2a35b9c - Another go at the empty slot/empty token issue
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@857 c6295689-39f2-0310-b995-f0e70906c6a9
2003-01-13 21:38:43 +00:00
aet 037dbdfa13 Fix compiler warnings
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@845 c6295689-39f2-0310-b995-f0e70906c6a9
2003-01-06 23:46:24 +00:00
okir 67608feffb - Win32 fixes in case openssl is not present (Stef)
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@842 c6295689-39f2-0310-b995-f0e70906c6a9
2003-01-06 19:52:11 +00:00
okir 9c5782e2b2 - pin pad changes from Stef
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@839 c6295689-39f2-0310-b995-f0e70906c6a9
2003-01-06 19:28:48 +00:00
okir bd96ae9be3 - C_Sign* and C_Digest* now return the proper codes when the output buffer
is too small, or when the caller is doing and output buffer size query


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@822 c6295689-39f2-0310-b995-f0e70906c6a9
2003-01-03 14:28:50 +00:00
okir 1c22c55655 - Try to fix pkcs11.hide_empty_slots
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@818 c6295689-39f2-0310-b995-f0e70906c6a9
2003-01-03 11:40:11 +00:00
okir 0ffa466eab - sc_pkcs11_slot_t typedef added
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@817 c6295689-39f2-0310-b995-f0e70906c6a9
2003-01-03 11:39:59 +00:00
okir 36930668fb - Added run-time option pkcs11.cache_pins, default false
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@816 c6295689-39f2-0310-b995-f0e70906c6a9
2003-01-03 11:09:45 +00:00
okir 8e6dc966b5 - Added run-time option pkcs11.lock_login
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@815 c6295689-39f2-0310-b995-f0e70906c6a9
2003-01-03 10:49:07 +00:00
okir 8abb5fa801 - Getattr(CKA_MODULUS_BITS) would fail for keys w/o certificate
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@813 c6295689-39f2-0310-b995-f0e70906c6a9
2003-01-02 15:23:08 +00:00
okir 4419574608 - NUL-terminate strings returned by getattr(CKA_LABEL)
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@809 c6295689-39f2-0310-b995-f0e70906c6a9
2002-12-23 17:02:05 +00:00
okir 8c7bfd1a3d - define enough reader slots
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@807 c6295689-39f2-0310-b995-f0e70906c6a9
2002-12-22 20:50:25 +00:00
okir d1fa35e1d0 - slightly changed previous patch; new flag hide_empty_slots
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@805 c6295689-39f2-0310-b995-f0e70906c6a9
2002-12-22 11:50:41 +00:00
okir 0babb91194 - Allow the admin to configure how many slots are used per card
(opensc.conf; pkcs11.num_slots)


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@804 c6295689-39f2-0310-b995-f0e70906c6a9
2002-12-21 16:45:37 +00:00
okir d22d1b13a4 - Another fix to mechanism handling: ripemd160 signatures should work now
- Got rid of get_mechanism_{list,info} in framework_ops, as they're not
  needed anymore.


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@795 c6295689-39f2-0310-b995-f0e70906c6a9
2002-12-19 09:27:08 +00:00
okir fc26b49ee5 - Values of CKA_SIGN and similar attributes now based on the pkcs15
usage flags rather than on some hardwired defaults.


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@792 c6295689-39f2-0310-b995-f0e70906c6a9
2002-12-18 19:26:18 +00:00
okir 2e4f640c2d - More win32 fixes from Stef
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@785 c6295689-39f2-0310-b995-f0e70906c6a9
2002-12-17 20:44:48 +00:00
okir 647d4bcdef - Register only those mechanisms the card actually supports
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@783 c6295689-39f2-0310-b995-f0e70906c6a9
2002-12-17 20:16:31 +00:00
okir 29dd06ba9f - more win32 fixes from Stef
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@779 c6295689-39f2-0310-b995-f0e70906c6a9
2002-12-17 16:00:40 +00:00
okir 21dfabee27 - New mechanism framework
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@775 c6295689-39f2-0310-b995-f0e70906c6a9
2002-12-17 11:49:12 +00:00
okir a01b8d0b24 - New mechanism framework
- New libpkcs11 utility library


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@774 c6295689-39f2-0310-b995-f0e70906c6a9
2002-12-17 11:48:54 +00:00