Commit Graph

393 Commits

Author SHA1 Message Date
martin d3201511c7 r3717:3719 from trunk
git-svn-id: https://www.opensc-project.org/svnp/opensc/branches/martin/0.12@3720 c6295689-39f2-0310-b995-f0e70906c6a9
2009-09-12 11:46:00 +00:00
aj 5f185e3079 Weitao Sun: no one can create more than 15 files
under 5015 df. I increase it from 15 to 48, and all are OK.


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3713 c6295689-39f2-0310-b995-f0e70906c6a9
2009-07-23 08:56:41 +00:00
aj 0c2fe83c3b Aktiv Co./Aleksey Samsonov:
fix a bug in rutoken driver.


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3711 c6295689-39f2-0310-b995-f0e70906c6a9
2009-07-22 12:24:33 +00:00
aj 7931ded481 Add new rutoken_ecp driver by Aktiv Co. / Aleksey Samsonov
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3696 c6295689-39f2-0310-b995-f0e70906c6a9
2009-06-24 15:26:37 +00:00
aj 4670238556 Entersafe changes by Weitao Sun:
1.Card type FTCOS/PK-01C added. (new)
2.Limit pin length in range [4,16). (bug fix)
3.Can not unblock PIN. (bug fix)


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3674 c6295689-39f2-0310-b995-f0e70906c6a9
2009-04-02 10:32:02 +00:00
aj 50f9ef865b check if len or p is 0/NULL and return.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3661 c6295689-39f2-0310-b995-f0e70906c6a9
2009-03-06 09:30:54 +00:00
aj 54a35a2f4f fix typo.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3660 c6295689-39f2-0310-b995-f0e70906c6a9
2009-03-06 09:26:41 +00:00
aj 3347ededf6 Improve this function even more.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3659 c6295689-39f2-0310-b995-f0e70906c6a9
2009-03-05 18:37:55 +00:00
aj aadf09d1de resolve an "undefined code" situation.
the old code was undefined, but ok (variables where never used
again in the "goto error" case). but the new code should
be clearer on this.


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3658 c6295689-39f2-0310-b995-f0e70906c6a9
2009-03-05 15:28:17 +00:00
aj 9dd1407703 change base id so it does not overlap with the next one.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3657 c6295689-39f2-0310-b995-f0e70906c6a9
2009-03-05 15:15:24 +00:00
alonbl 34a75de5d7 Rutoken updates
By Aktiv Co. Aleksey Samsonov

- use PKCS#15 (not builtin PKCS#15 emulator)
- rutoken.profile (add privdata)
- correct using ACL
- correct erase procedure



git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3640 c6295689-39f2-0310-b995-f0e70906c6a9
2009-01-28 12:10:13 +00:00
alonbl 2b41afbb3f Set hardcoded default for profile_dir
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3624 c6295689-39f2-0310-b995-f0e70906c6a9
2009-01-16 21:27:46 +00:00
aj 8a6bc59e66 Create new type "privdata" in all profiles with different
ACL settings, and check C_CreateObject parameter CKA_PRIVATE aka
pkcs15_create_data args.auth_id variable, aka sc_pkcs15init_new_object
object->flags & SC_PKCS15_CO_FLAG_PRIVATE to decide if "data" or "privdata"
profile needs to be used.

Tested with cryptoflex 32k and opensc-explorer, now I no longer can
"get" the data object file stored with "--private".


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3605 c6295689-39f2-0310-b995-f0e70906c6a9
2008-12-28 16:07:51 +00:00
aj 27d00f9265 Add new entersafe driver for ePass 3000 tokens.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3556 c6295689-39f2-0310-b995-f0e70906c6a9
2008-08-20 05:41:20 +00:00
aj 64fd479aa5 Chaskiel Grundman:
Nowhere in pkcs15init/pkcs15-cardos.c is the user pin ever 
requested or presented to the card. 
Since the update acl for the key object uses the user pin, the GENERATE 
KEY operation fails when it isn't logged in.


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3537 c6295689-39f2-0310-b995-f0e70906c6a9
2008-07-21 14:35:21 +00:00
ludovic.rousseau fb7c59e7aa use #ifdef instead of #if
pkcs15-cardos.c:547:5: warning: "SET_SM_BYTES" is not defined
pkcs15-cardos.c:585:5: warning: "SET_SM_BYTES" is not defined


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3517 c6295689-39f2-0310-b995-f0e70906c6a9
2008-05-22 12:13: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 932cc41f30 convert C++ comment in C comment
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3501 c6295689-39f2-0310-b995-f0e70906c6a9
2008-04-28 07:45:28 +00:00
ludovic.rousseau 7201fc7ace convert a C++ comment in C comment
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3500 c6295689-39f2-0310-b995-f0e70906c6a9
2008-04-28 07:44:07 +00:00
ludovic.rousseau 63b55ea0aa rutoken_new_file(): initialize sec_attr
pkcs15-rutoken.c:372: warning: 'sec_attr' may be used uninitialized in
this function


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3499 c6295689-39f2-0310-b995-f0e70906c6a9
2008-04-28 07:42:22 +00:00
alonbl 8d7bce4de2 ruToken fixups
http://www.opensc-project.org/pipermail/opensc-devel/2008-April/011057.html

By Aktiv Co. Aleksey Samsonov



git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3478 c6295689-39f2-0310-b995-f0e70906c6a9
2008-04-18 14:08:23 +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 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 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 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 f49f765ac6 Fix libtool versioning issues
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3421 c6295689-39f2-0310-b995-f0e70906c6a9
2008-03-15 11:05:26 +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 440ea331db Windows DLL suffix is actually delta
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3410 c6295689-39f2-0310-b995-f0e70906c6a9
2008-03-09 12:01:22 +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
nils 5a04a103fb do not use memory quota
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3392 c6295689-39f2-0310-b995-f0e70906c6a9
2008-02-25 20:36:59 +00:00
nils c46c366f1d check tpin before trying to delete application
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3391 c6295689-39f2-0310-b995-f0e70906c6a9
2008-02-25 19:47:11 +00:00
ludovic.rousseau 156f368f9d add two missing files for ruToken support
Thanks to Ian Young for the bug report


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3312 c6295689-39f2-0310-b995-f0e70906c6a9
2008-01-04 08:57:12 +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
jps 27257f2278 support for Siemens CardOS V4.2C
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3306 c6295689-39f2-0310-b995-f0e70906c6a9
2007-12-19 09:58:29 +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
nils 5cdd93982d the so-puk is optional
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3276 c6295689-39f2-0310-b995-f0e70906c6a9
2007-09-28 19:10:39 +00:00
aj a7912a2426 add information about cardos 4.2b - latest cardos update.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3237 c6295689-39f2-0310-b995-f0e70906c6a9
2007-08-08 20:06:53 +00:00
ludovic.rousseau f0cbecfeb1 AM_LDFLAGS is not used in libpkcs15init_la_LDFLAGS so explicitly use it
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3235 c6295689-39f2-0310-b995-f0e70906c6a9
2007-08-02 13:53:40 +00:00
aj d7bde1e9e0 inline is something the compiler can decide on his own.
static is a good hint to the compiler for that - the function isn't used
outside of this file. 
"static inline" is not valid, visual studio doesn't compile that.


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3209 c6295689-39f2-0310-b995-f0e70906c6a9
2007-07-09 14:17:43 +00:00
vtarasov 174802aa56 Enables the second PIN (one-time PIN) defined for the same application DF
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3206 c6295689-39f2-0310-b995-f0e70906c6a9
2007-07-04 14:25:39 +00:00
nils 8770859315 add support for asepcos
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3200 c6295689-39f2-0310-b995-f0e70906c6a9
2007-07-03 20:44:34 +00:00
aj 047ee1d73e fix more warnings found by gcc/sparse.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3178 c6295689-39f2-0310-b995-f0e70906c6a9
2007-06-21 11:07:00 +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
nils 1645684fd5 increase size of pin buffer
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3153 c6295689-39f2-0310-b995-f0e70906c6a9
2007-04-23 19:23:51 +00:00
vtarasov 7ce5aa3b13 change inappropriate oberthur profile
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3121 c6295689-39f2-0310-b995-f0e70906c6a9
2007-03-05 17:30:35 +00:00
ludovic.rousseau 45f5fcea0e comment out static and unused functions (sc_pkcs15init_read_unusedspace,
sc_pkcs15init_update_unusedspace, merge_paths,
sc_pkcs15init_add_unusedspace and sc_pkcs15init_remove_unusedspace)


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3118 c6295689-39f2-0310-b995-f0e70906c6a9
2007-02-06 14:29:45 +00:00