Commit Graph

2632 Commits

Author SHA1 Message Date
nils 57f7f6e6e5 ignore paths with a AID in it
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3277 c6295689-39f2-0310-b995-f0e70906c6a9
2007-09-29 07:43:25 +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
gurer ab94915277 two new debugging commands.
asn1 2f01
Dumps asn.1 content of a file

apdu 00:20:00:00:04:31:31:32:32
Send the custom APDU inside the session


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3275 c6295689-39f2-0310-b995-f0e70906c6a9
2007-09-27 18:19:17 +00:00
gurer 4dd4d52921 AKIS can handle bigger data blocks, but that causes GET_RESPONSE calls.
So for a 300 byte file, this saves one transaction (244 + 56) instead of
(244 + 11 + 45).


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3273 c6295689-39f2-0310-b995-f0e70906c6a9
2007-09-23 10:19:43 +00:00
gurer 780b4afe8a On a third thought, it is better to not introduce any confusion at all :)
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3272 c6295689-39f2-0310-b995-f0e70906c6a9
2007-09-22 20:47:04 +00:00
gurer eada3a7e1c On a second thought, it is better to stay compatible with released
0.11.4 code, and still use ISO7814 pin_cmd.


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3271 c6295689-39f2-0310-b995-f0e70906c6a9
2007-09-22 20:34:53 +00:00
gurer 3b47022051 * instead of using a custom PIN VERIFY command, pin_reference is
reported back, and used for verifying.

* PIN CHANGE command is implemented (that is really different
from ISO7816)

* max_pin_len is set to 16 in akis_init



git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3270 c6295689-39f2-0310-b995-f0e70906c6a9
2007-09-17 11:41:28 +00:00
aj af9199b059 Appy patch by magog to build a static opensc_a.lib on windows.
Also removes *.lib on "make clean".


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3265 c6295689-39f2-0310-b995-f0e70906c6a9
2007-09-10 06:22:36 +00:00
aj 6882b13287 fix typo found by Gürer Özen.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3264 c6295689-39f2-0310-b995-f0e70906c6a9
2007-09-04 05:39:15 +00:00
nils 4d1871d74c properly check return value
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3263 c6295689-39f2-0310-b995-f0e70906c6a9
2007-08-29 19:54:10 +00:00
nils c2ee37e6c7 bugfix: select DF before setting sec. attributes
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3262 c6295689-39f2-0310-b995-f0e70906c6a9
2007-08-29 19:32:23 +00:00
aj c25e4f765c akis update by Gürer Özen: implement logout code.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3261 c6295689-39f2-0310-b995-f0e70906c6a9
2007-08-28 20:35:27 +00:00
aj 43b7391a94 fix typo, found by Gürer Özen.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3260 c6295689-39f2-0310-b995-f0e70906c6a9
2007-08-28 20:35:06 +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 11ec3adace mark supported padding and a comment - by Gürer Özen
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3258 c6295689-39f2-0310-b995-f0e70906c6a9
2007-08-22 18:38:37 +00:00
aj f9b30e48c4 fix typos, patch by Gürer Özen
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3257 c6295689-39f2-0310-b995-f0e70906c6a9
2007-08-22 18:38:02 +00:00
aj 26e2e5477f update version info for windows.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3255 c6295689-39f2-0310-b995-f0e70906c6a9
2007-08-20 20:20:35 +00:00
aj 832e325ff7 fix typo.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3248 c6295689-39f2-0310-b995-f0e70906c6a9
2007-08-14 06:17:34 +00:00
aj 3264588c3e restores ability to change opensc-explorer debug level at
runtime, using "debug" command from opensc prompt. by Jakub Bogusz


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3247 c6295689-39f2-0310-b995-f0e70906c6a9
2007-08-14 06:02:51 +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 0cebca4ceb the commands line tools do not call lt_dlopen() so do not need to link
with libltdl


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3244 c6295689-39f2-0310-b995-f0e70906c6a9
2007-08-13 08:32:07 +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 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
aj f7636ab5db Add same hack for Prime cards.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3236 c6295689-39f2-0310-b995-f0e70906c6a9
2007-08-03 07:47:13 +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 7ea1d00791 pkcs11-tool crashes while printing its usage message.
fixed by Ville Skyttä.


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3233 c6295689-39f2-0310-b995-f0e70906c6a9
2007-07-28 18:22:07 +00:00
aj 8e37bfd68d cryptoflex-tool.c:505: warning: array subscript is above array bounds
gcc 4.3 warning, reported and fixed by novell:
Problem found by David Binderman
Patch created by Michal Vaner
closes our trac bug #153 and novell bug 238660


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3232 c6295689-39f2-0310-b995-f0e70906c6a9
2007-07-28 18:18:39 +00:00
aj e1002b91eb fix a compiler warning.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3231 c6295689-39f2-0310-b995-f0e70906c6a9
2007-07-24 06:42:12 +00:00
aj 25e85b4cc9 Gürer Özen:
* akis_get_data() implemented
* akis_delete_file() implemented
* akis_set_security_env() implemented, pkcs15 signing works now
* life cycle set/get via cardctl implemented
* card_ops commented, so it is clear whether a function is supported via 
iso7816 implementation or not
* mark pin apdu as sensitive in akis_pin_cmd


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3230 c6295689-39f2-0310-b995-f0e70906c6a9
2007-07-22 19:56:03 +00:00
aj 94c62b0b50 create plugin directory if it does not exist.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3229 c6295689-39f2-0310-b995-f0e70906c6a9
2007-07-21 07:31:26 +00:00
aj 8875fe0296 add explicit option to enable/disable the ns plugin. patch by Alon Bar-Lev.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3228 c6295689-39f2-0310-b995-f0e70906c6a9
2007-07-20 18:50:23 +00:00
aj c1130f7f93 oops, define tmplen at start of block.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3227 c6295689-39f2-0310-b995-f0e70906c6a9
2007-07-20 14:38:46 +00:00
aj a577a25813 silence a warning we get with siemens cards.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3226 c6295689-39f2-0310-b995-f0e70906c6a9
2007-07-20 13:47:17 +00:00
aj d59917cd21 asn1_decode_entry() allocates (objlen - 1) bytes for SC_ASN1_UTF8STRING
types with SC_ASN1_ALLOC flag, then calls the sc_asn1_decode_utf8string()
function which then fails with BUFFER TOO SMALL cause it wants to end the
string with an extra NULL.

allocation size was supposed to be objlen + 1.

Patch by Gürer Özen


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3225 c6295689-39f2-0310-b995-f0e70906c6a9
2007-07-20 12:30:59 +00:00
aj b757ff1719 Gürer Özen send another akis update:
* create_file implemented
* EF(DIR) hack removed, it is easier to put a real EF(DIR)
* SC_CARDCTL_GET_SERIALNR implemented


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3224 c6295689-39f2-0310-b995-f0e70906c6a9
2007-07-20 12:28:43 +00:00
aj 14bc32dda2 Sign by using the decrypt function.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3223 c6295689-39f2-0310-b995-f0e70906c6a9
2007-07-20 12:19:27 +00:00
aj 60e3e1e683 add akis support by Gürer Özen.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3222 c6295689-39f2-0310-b995-f0e70906c6a9
2007-07-17 20:01:55 +00:00
aj fc20adecbc Douglas E. Engert:
The IdAlly CSP calls C_FindObjectsInit looking for CK_PRIVATE_KEY before
C_Login with a pin. If it does not find any, it fails. The pkcs15-piv.c in
0.11.3 and 0.11.3-pre3 set the pubkey and prvkey objects as private. 
This patch removes the SC_PKCS15_CO_FLAG_PRIVATE so IdAlly will work with the
PIV cards.


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3221 c6295689-39f2-0310-b995-f0e70906c6a9
2007-07-15 15:29:40 +00:00
aj 486db2f584 put openssl rsautl in raw signatures mode.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3216 c6295689-39f2-0310-b995-f0e70906c6a9
2007-07-11 09:35:36 +00:00
aj c224b0c824 allow regression test suite to work installed as well.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3215 c6295689-39f2-0310-b995-f0e70906c6a9
2007-07-11 09:15:45 +00:00
aj e9b29d1019 add test for decrypting binary data of key size.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3214 c6295689-39f2-0310-b995-f0e70906c6a9
2007-07-11 09:10:57 +00:00
aj 0d4ee51976 stop using p15dump, switch to pkcs15-tool --dump.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3213 c6295689-39f2-0310-b995-f0e70906c6a9
2007-07-11 09:07:33 +00:00
vtarasov 8222427947 typo, manifested when explicitely using 'reader_drivers = internal;' in opensc.conf
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3211 c6295689-39f2-0310-b995-f0e70906c6a9
2007-07-10 12:04:31 +00:00
aj c6a54578fc use static without inline - the compiler can optimize the function as
inline or not, whatever it prefers. "static inline" is not supported by
the visual studio c compiler.


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3210 c6295689-39f2-0310-b995-f0e70906c6a9
2007-07-09 14:52:03 +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
nils 703edfb68e improve atr matching for cardos m4.01[a]
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3207 c6295689-39f2-0310-b995-f0e70906c6a9
2007-07-07 11:29:12 +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
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 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
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
martin 60b4570531 * Add support for SCARD_E_NO_READERS_AVAILABLE to describe errors like:
{{{
sc.c:201:sc_detect_card_presence: returning with: Unknown error
SCardGetStatusChange failed: 8010002e
}}}
 * When doing a reset with pcsc_reconnect do a cold reset instead a warm one to allow next change
 * Change the protocol force feature to change the protocol with a hard reset only when needed to prevent:
{{{
SCardConnect failed: 8010000f
card.c:228:sc_connect_card: returning with: Unknown error
}}}



git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3144 c6295689-39f2-0310-b995-f0e70906c6a9
2007-03-21 09:41:08 +00:00
martin fa272faf68 Missing file
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3143 c6295689-39f2-0310-b995-f0e70906c6a9
2007-03-21 09:34:10 +00:00
martin 5dba203363 Make sure the right thing is always selected on the card by bypassing cache
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3142 c6295689-39f2-0310-b995-f0e70906c6a9
2007-03-21 09:33:40 +00:00
martin 62d2d6cbe0 Simplify esteid detection
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3141 c6295689-39f2-0310-b995-f0e70906c6a9
2007-03-21 09:32:36 +00:00
aj e7d88163ea fix --serial option.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3139 c6295689-39f2-0310-b995-f0e70906c6a9
2007-03-18 17:55:15 +00:00
aj 38b9a8091f add missing header file to noinst_HEADERS.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3132 c6295689-39f2-0310-b995-f0e70906c6a9
2007-03-14 18:26:37 +00:00
aj 74610a8fdf Ian Young: use proper card type for acos5.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3131 c6295689-39f2-0310-b995-f0e70906c6a9
2007-03-13 23:10:54 +00:00
aj 25f8509fc1 Douglas E. Engert:
piv-tool needs openssl, so compile only if it is present.


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3130 c6295689-39f2-0310-b995-f0e70906c6a9
2007-03-13 20:59:15 +00:00
aj 1ca622b7f7 Patch by Douglas E. Engert:
use c style comments and different header files (for mac os X?).


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3129 c6295689-39f2-0310-b995-f0e70906c6a9
2007-03-13 20:57:55 +00:00
aj 97f2569f14 Add acos5 driver by Ian Young.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3128 c6295689-39f2-0310-b995-f0e70906c6a9
2007-03-13 13:38:24 +00:00
aj 39b5c42397 test new chop size (256 bytes by default).
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3127 c6295689-39f2-0310-b995-f0e70906c6a9
2007-03-12 20:17:29 +00:00