Commit Graph

3013 Commits

Author SHA1 Message Date
aj 2012f64ba2 add image files to release tar.gz
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3205 c6295689-39f2-0310-b995-f0e70906c6a9
2007-07-04 09:19:25 +00:00
ludovic.rousseau d15326cf96 update the list of distributed .m4 files
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3204 c6295689-39f2-0310-b995-f0e70906c6a9
2007-07-04 08:55:50 +00:00
ludovic.rousseau 70c7bb4dd1 libassuan.m4 is provided by libassuan-dev
pkg.m4 is provided by pkg-config
lib-link.m4, lib-prefix.m4 and lib-ld.m4 are provided by gettext but
should not be needed after revision 3202


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3203 c6295689-39f2-0310-b995-f0e70906c6a9
2007-07-04 08:54:45 +00:00
ludovic.rousseau 69a5c1a843 do not use AC_LIB_LINKFLAGS() since this macro is provided by gettext
and we do not use gettext. Use AC_CHECK_LIB() instead


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3202 c6295689-39f2-0310-b995-f0e70906c6a9
2007-07-04 08:46:57 +00:00
aj a7f102fc2e update NEWS with list of all changes (that I remember).
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3201 c6295689-39f2-0310-b995-f0e70906c6a9
2007-07-04 06:51:36 +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
nils 7c5fe33cfe re-add cardos m4.01a ATR
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3199 c6295689-39f2-0310-b995-f0e70906c6a9
2007-07-03 19:42:34 +00:00
vtarasov 4fcabecf9f PIN unblock error. Internal pin reference procedure updated.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3198 c6295689-39f2-0310-b995-f0e70906c6a9
2007-07-03 15:33:28 +00:00
aj be022c16d3 fix version numbers preparing for next release.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3197 c6295689-39f2-0310-b995-f0e70906c6a9
2007-07-03 14:15:15 +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
vtarasov 16c5ab4d5b Error when output allocation length is not equal to the signature length. 'Compute_signature' now returns the answer's length
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3195 c6295689-39f2-0310-b995-f0e70906c6a9
2007-07-03 13:44:45 +00:00
aj 8c222a0b44 remove unused definition.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3194 c6295689-39f2-0310-b995-f0e70906c6a9
2007-06-29 14:14:02 +00:00
aj db600912c6 fix duplicate static.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3193 c6295689-39f2-0310-b995-f0e70906c6a9
2007-06-29 13:31:04 +00:00
aj cea32a8016 make app_name, options and option_help static.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3192 c6295689-39f2-0310-b995-f0e70906c6a9
2007-06-29 13:19:19 +00:00
nils fa12a3dd4f implement more flexible cardos detection func
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3191 c6295689-39f2-0310-b995-f0e70906c6a9
2007-06-25 18:01:26 +00:00
aj 1069b4e018 Douglas E. Engert: fix more compiler warnings.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3190 c6295689-39f2-0310-b995-f0e70906c6a9
2007-06-24 21:03:30 +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
ludovic.rousseau be309330e5 do not use global variables app_name, options and option_help so they
can be static


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3188 c6295689-39f2-0310-b995-f0e70906c6a9
2007-06-21 13:46:08 +00:00
aj b0bc6df80c fix more warnings.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3187 c6295689-39f2-0310-b995-f0e70906c6a9
2007-06-21 13:38:16 +00:00
ludovic.rousseau 209ee45007 eidenv.c:55: attention : ‘option_help’ defined but not used
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3186 c6295689-39f2-0310-b995-f0e70906c6a9
2007-06-21 13:29:57 +00:00
ludovic.rousseau 41004ac438 initialize objs to NULL to avoid: pintest.c:83: attention : ‘objs’ may
be used uninitialized in this function


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3185 c6295689-39f2-0310-b995-f0e70906c6a9
2007-06-21 13:29:06 +00:00
ludovic.rousseau 2f66c5b87e correct a typo
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3184 c6295689-39f2-0310-b995-f0e70906c6a9
2007-06-21 13:20:45 +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 9c35397f50 revert change - is needed by pkcs15-syn.c
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3179 c6295689-39f2-0310-b995-f0e70906c6a9
2007-06-21 11:34:08 +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 4acfe6b096 fix compiler/sparse warnings.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3177 c6295689-39f2-0310-b995-f0e70906c6a9
2007-06-21 10:07:01 +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 9946e237de Douglas E. Engert:
Major improvments in the PIV card modules: 
* OpenSC-0.11.2 only supported RSA 1K keys, the patch supports RSA 2K and 3K
  keys.
* The FASC-N in the CHUID object is used as the card serial number. 
* A PIV card may have additional objects. These can now be read by pkcs11-tool
  and pkcs15-tool. 
* The p15card-helper.c module is no longer used. The code to call the
  sc_pkcs15emu_* routines has been moved back into pkcs15-piv.c and uses
  existing OpenSC routines to parse the certificate to find the modulus_len. 
* pkcs15-piv.c will now get the modulus_len from the certificates to store into
  the emulated prvkey an pubkey objects as they are being created using the
  sc_pkcs15emu_* routines. 
* The caching code that was added to card-piv.c in 0.11.2 is disabled, as
  pkcs15-piv.c will cache the certificate using existing OpenSC routines. 
* piv-tool will now print a serial number. 
* The key-usage bits for prvkey and pubkey objects are set in pkcs15-piv.c 
* The PIV "9E" key was added. It is not a private object, and can be used
  without a PIN. It is used with the "Certificate for Card Authenticaiton". 
* When used with the OpenSSL engine to generate a certificate request, the
  public key saved by piv-tool during a "generate asymmetric key pair" card
  command can be read from a file pointed at by the environment variable
  PIV_9*_KEY. Where * is A, C, D or E. 
* In the card_atr section of opensc.conf, flags = 20; can be used to only show
  the PIV Authentication cert. This feature was in 0.11.1 but was dropped in
  0.11.2 when the p15card-helper.c was introduced.


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3174 c6295689-39f2-0310-b995-f0e70906c6a9
2007-06-21 07:07:49 +00:00
aj 20985fcfdc Added the application name to logging to allow for easier debugging. Since a
lot of testing needed multiple applications to be running, it became important
to know what application was making each log entry. 
This was reported by Russell Larner <rlarner@rsasecurity.com> on 5/17/2007


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3173 c6295689-39f2-0310-b995-f0e70906c6a9
2007-05-25 20:10:34 +00:00
aj 6c324049e7 If a PKCS11 get attrribute failes for some reason, pkcs11-tool may return
garbage along with the error message. The attached patch to pkcs11-tool.c
initializes the type to 0 so the attribute will be 0 in case of an error.
by Douglas E. Engert


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3172 c6295689-39f2-0310-b995-f0e70906c6a9
2007-05-25 20:09:11 +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
nils a8908b8548 252 bytes work as well
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3170 c6295689-39f2-0310-b995-f0e70906c6a9
2007-05-13 15:43:22 +00:00
nils dee4faea64 fix warning
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3169 c6295689-39f2-0310-b995-f0e70906c6a9
2007-05-13 09:32:13 +00:00
nils 37157f38ee bugfix: try to read at most 248 bytes
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3168 c6295689-39f2-0310-b995-f0e70906c6a9
2007-05-13 09:31:46 +00:00
nils 8135be4166 bugfix: avoid recursion
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3167 c6295689-39f2-0310-b995-f0e70906c6a9
2007-05-13 09:30:53 +00:00
aj b5df816684 fix wiki html export.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3166 c6295689-39f2-0310-b995-f0e70906c6a9
2007-05-04 07:13:04 +00:00
aj 60195aa9bf add date for 0.11.2
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3163 c6295689-39f2-0310-b995-f0e70906c6a9
2007-05-04 06:17:54 +00:00
aj 36d0cf2301 probe for readline+ncurses too.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3161 c6295689-39f2-0310-b995-f0e70906c6a9
2007-04-25 06:53:45 +00:00
aj d08da29418 update NEWS with latest changes.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3159 c6295689-39f2-0310-b995-f0e70906c6a9
2007-04-24 07:59:13 +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
aj c3438ef4ff use 255/256 bytes as max_send/recv_size by default.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3155 c6295689-39f2-0310-b995-f0e70906c6a9
2007-04-24 07:52:27 +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
nils 4199969461 authenticate if data object is protected
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3151 c6295689-39f2-0310-b995-f0e70906c6a9
2007-04-23 19:18:46 +00:00
nils 91109128c0 request at most for 256 bytes
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3149 c6295689-39f2-0310-b995-f0e70906c6a9
2007-04-15 17:26:42 +00:00
aj c3fcd9f7dd Steve Jacobs: fix muscle driver.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3148 c6295689-39f2-0310-b995-f0e70906c6a9
2007-04-10 19:49:26 +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