Commit Graph

6318 Commits

Author SHA1 Message Date
Ludovic Rousseau b3f5910c27 macosx: do not ignore CFLAGS
Reused the previously defined CFLAGS to add new arguments.
2016-02-29 20:19:42 +01:00
Ludovic Rousseau 89ec66fbe8 framework-pkcs15.c: fix compiler warning
framework-pkcs15.c:706:1: warning: unused function
      '__pkcs15_create_secret_key_object' [-Wunused-function]
__pkcs15_create_secret_key_object(struct pkcs15_fw_data *fw_data,
^
2016-02-29 20:19:42 +01:00
Ludovic Rousseau 7a7fb19a7d iasecc-sm.c: fix compiler warning
iasecc-sm.c:697:22: warning: cast to 'void *' from smaller integer type
      'unsigned int' [-Wint-to-void-pointer-cast]
        sm_info->cmd_data = (void *)file_id;
                            ^
2016-02-29 20:19:42 +01:00
Ludovic Rousseau ed30d4ebb7 pkcs15-isoApplet.c: fix compiler warning
pkcs15-isoApplet.c:268:38: warning: address of 'df->path' will always evaluate
      to 'true' [-Wpointer-bool-conversion]
        if(!pin || !pin_len || !df || !&df->path)
                                      ~ ~~~~^~~~
2016-02-29 20:19:42 +01:00
Ludovic Rousseau a8c741002d reader-pcsc.c: fix compiler warning
der-pcsc.c:1101:11: warning: comparison of integers of different signs:
      'LONG' (aka 'int') and 'unsigned int' [-Wsign-compare]
                        if (rv == SCARD_E_NO_SERVICE) {
                            ~~ ^  ~~~~~~~~~~~~~~~~~~
2016-02-29 20:19:42 +01:00
Ludovic Rousseau 80a313fb2a pkcs11-spy.c: fix 1 warning
pkcs11-spy.c:259:49: warning: format specifies type 'long' but the argument has
      type 'int' [-Wformat]
        fprintf(spy_output, "%s.%03ld\n", time_string, tv.tv_usec / 1000);
                                ~~~~~                  ^~~~~~~~~~~~~~~~~
                                %03d
2016-02-29 20:19:42 +01:00
Ludovic Rousseau cd42fbbc65 openpgp-tool.c: fix compiler warning
penpgp-tool.c:367:9: warning: comparison of integers of different signs: 'int'
      and 'unsigned int' [-Wsign-compare]
                if (r != count) {
                    ~ ^  ~~~~~

Remove 3 casts
Add 1 cast
Fix a format problem
2016-02-29 20:19:42 +01:00
Ludovic Rousseau e7cbc3ba82 opensc-explorer.c: fix compiler warning
opensc-explorer.c:1727:8: warning: comparison of integers of different signs:
      'int' and 'size_t' (aka 'unsigned long') [-Wsign-compare]
                if(r > len) {
                   ~ ^ ~~~
2016-02-29 20:19:42 +01:00
Ludovic Rousseau d929532b63 pkcs11-tool.c: fix 2 compiler warnings
pkcs11-tool.c:2650:25: warning: unused variable 'ecdh_parms' [-Wunused-variable]
        CK_ECDH1_DERIVE_PARAMS ecdh_parms;
                               ^
pkcs11-tool.c:2021:7: warning: unused variable 'is_private' [-Wunused-variable]
                int is_private = opt_object_class == CKO_PRIVATE_KEY;
                    ^
2016-02-29 20:19:42 +01:00
Ludovic Rousseau 08529c91ee log.c: fix compiler warning
log.c:94:87: warning: format specifies type 'long' but the argument has type
      'int' [-Wformat]
  ...%03ld ", (unsigned long)pthread_self(), time_string, tv.tv_usec / 1000);
     ~~~~~                                                ^~~~~~~~~~~~~~~~~
     %03d
2016-02-29 20:19:42 +01:00
Viktor Tarasov f29f2e62b3 pkcs15init: fix bug introduced in 50f03bc 2016-02-29 18:52:45 +01:00
Frank Morgner 50f03bca3f fixed memory leak 2016-02-29 13:08:34 +01:00
Frank Morgner 1862970212 fixed typo 2016-02-29 13:08:34 +01:00
Frank Morgner fa71448d1c added fall through comment 2016-02-29 10:52:48 +01:00
Ludovic Rousseau 8cc42fe001 .gitignore: ignore tags files
Ignore the different tags files created by "make tags"
2016-02-28 10:00:34 +01:00
Frank Morgner ceb913a7bb Merge pull request #679 from l1k/master
GemSAFE ATR + format string fixes
2016-02-25 16:35:53 +01:00
Viktor Tarasov b8c3722bf5 pkcs11/framework: no more 'for-applications' mode for slot creation
Simplify create tokens rules, no need to manipulate applications in
'pkcs11' configuration part,
applications can be enabled/disabled on the 'pkcs15' one.

Fix the possibility to expose only 'sign' PIN
2016-02-24 13:39:27 +01:00
Frank Morgner ae359ba180 Merge pull request #678 from CardContact/fix-bcd-sopin
sc-hsm: Fix BCD encoding bug with SO-PIN

Fixes https://github.com/OpenSC/OpenSC/issues/674
2016-02-23 22:33:36 +01:00
Lukas Wunner c8fbcdd076 card-gemsafeV1: Add ATR for European Patent Office smart card
The EPO hands this card out to attorneys and inventors to authenticate
with their online services. The applet on the card seems to be identical
to the one on Swedish eID cards.

Ludovic Rousseau's list identifies the card as Gemalto IDClassic 340.
Gemalto Classic Client identifies the card as GemSAFE V3.

Previously the EPO was using a GemSAFE V1 card, its ATR was added with
81bbddfc24 ("card-gemsafeV1: Add a GemSafe V1 ATR").
2016-02-20 14:27:27 +01:00
Lukas Wunner a020e1f7d4 pkcs11: Fix signedness issues in debug messages
Use the appropriate printf conversion for data->buffer_len which is
an unsigned int.
2016-02-20 14:27:27 +01:00
Viktor Tarasov a48fc73333 travis: check with coverity-scan 'master' 2016-02-19 16:34:29 +01:00
Viktor Tarasov dbca85636f pkcs11-tool: use keygen mech. from cmd arguments
There are can be more then one keygen mechanism for a given
key type.
(ex. CKM_RSA_PKCS_KEY_PAIR_GEN and CKM_RSA_X9_31_KEY_PAIR_GEN)
2016-02-19 16:05:55 +01:00
vletoux 8a2a274393 gids: no more DF selection
Theoritically, SELECT FILE with DF is not specified so avoid it.
2016-02-19 00:12:16 +01:00
LE TOUX Vincent 6a243449a0 First support for GIDS card
- minidriver included by default in Windows
- GIDS Applet is available here https://github.com/vletoux/GidsApplet
- some informative technical information is available here
  http://www.mysmartlogon.com/knowledge-base/generic-identity-device-specification-gids-kb/

closes https://github.com/OpenSC/OpenSC/pull/651
2016-02-19 00:12:16 +01:00
Andreas Schwier b9cf74361c sc-hsm: Fix BCD encoding bug with SO-PIN 2016-02-18 18:25:34 +01:00
Frank Morgner 1ca22a22d1 Merge pull request #665 from sfff/pkcs11tool-pubkey-2016
pkcs11-tool: support write of GOST Public Key object
2016-02-16 23:27:56 +01:00
Viktor Tarasov 754eaf3c14 config: allow disabling of PKCS15 application 2016-02-16 16:54:14 +01:00
Frank Morgner 0519de6c81 pkcs15-dnie: removed obsolete dll entry points 2016-02-16 07:49:19 +01:00
Frank Morgner 83d5ac5fee remove compat_strnlen.obj from windows build
windows already implements this function
2016-02-16 07:15:36 +01:00
Frank Morgner 500e358ea7 fixed syntax error 2016-02-16 07:11:57 +01:00
Frank Morgner 5e75dfc529 Merge pull request #670 from CardContact/nm_scheme_fix
sc-hsm: Fix share calculation if prime number is less than secret
2016-02-15 14:33:27 +01:00
Frank Thater b2c7803373 sc-hsm: Fix share calculation if prime number is less than secret 2016-02-12 15:36:42 +01:00
Feitian Technologies e2c21d7c25 Add new Feitian PKI Card ATR into OpenSC
Add new PKI Card ATR into OpenSC support, all of these ATR using same
PKI Applet. and the ATR/JAVA CARD is provided by Feitian.

More information, please check www.javacardos.com

Fixes a memory leak in `entersafe_select_fid`

Closes https://github.com/OpenSC/OpenSC/pull/625
2016-02-04 12:23:46 +01:00
Frank Morgner 5c018dcd8c Merge pull request #664 from sfff/fix-648
Fix #648
2016-02-02 02:59:22 +01:00
Frank Morgner 7cce5d432e Merge branch 'master' of https://github.com/OpenSC/OpenSC 2016-02-02 02:52:01 +01:00
Viktor Tarasov 848ce1947a iasecc: fix default name of SM module 2016-01-25 13:38:13 +01:00
Aleksey Samsonov 3084b3aa32 pkcs11-tool: fix mask for detect PEM format
Make universal mask for choose input format from PEM or DER.
Input file at PEM may be contain at start:
"-----BEGIN RSA PRIVATE KEY-----"
or
"-----BEGIN PRIVATE KEY-----"
2016-01-24 02:31:19 +03:00
Aleksey Samsonov 0d6ecd750e pkcs11-tool: support write of GOST Public Key object 2016-01-24 02:23:18 +03:00
Aleksey Samsonov 6b2fcf825f Rutoken ECP: additional Miller-Rabin tests aren't needed
Make universal properties at RSF-files. Additional Miller-Rabin tests
aren't needed for 'Rutoken ECP' and for 'Rutoken ECP 2.0'

fixes https://github.com/OpenSC/OpenSC/issues/648 :
'Incorrect parameters in APDU' at 'Rutoken ECP 2.0' when 'pkcs15-init -G
rsa/1024 ...'
2016-01-24 01:34:05 +03:00
Aleksey Samsonov e1a3bf8805 Rutoken ECP: set more universally 'Attempts' for RFS-files 2016-01-24 01:14:21 +03:00
Martin Paljak 79cd06ba30 Use "native" badges
shields.io has been very unreliable and overloaded recently, so ease their load and use directly native badges where available.

Also, add some formatting to the pale README so that Github front page would look better.
2016-01-22 18:42:10 +02:00
Viktor Tarasov aa8ad8d5b2 build: restore build on Win32 2016-01-22 17:32:40 +01:00
Frank Morgner 4f4b6c962a Merge pull request #661 from frankmorgner/strnlen
implemented strnlen
2016-01-22 14:36:42 +01:00
Frank Morgner b09d2777d1 Merge pull request #663 from digitallumens/pkcs15-crypt/stdin
pkcs15-crypt: Allow the use of stdin if no input file is specified.
2016-01-22 14:36:02 +01:00
Chris Elledge c56378b8ba pkcs15-crypt: Document defaults of stdin/stdout. 2016-01-21 11:30:26 -05:00
Frank Morgner f3f6e7647f Merge pull request #662 from digitallumens/pkcs11-tool/fix-pipes
pkcs11-tool: Switched some printfs to fprintfs to allow pipes to work.

fixes https://github.com/OpenSC/OpenSC/issues/657
2016-01-21 00:23:59 +01:00
Chris Elledge 92e02b50dc pkcs15-crypt: Allow the use of stdin if no input file is specified. 2016-01-20 15:35:44 -05:00
Frank Morgner 89f9d9e85d add compatibility implementation for strnlen
fixes https://github.com/OpenSC/OpenSC/issues/660
2016-01-20 10:47:27 +01:00
Chris Elledge f01a8ad22e pkcs11-tool: Switched some printfs to fprintfs to allow pipes to work. 2016-01-19 14:54:02 -05:00
Frank Morgner a0c0087446 Merge pull request #637 from germanblanco/sm_get_response_loop_fix
Stop reading a file when an error happened *or* all data requested was read.

Fixes https://github.com/OpenSC/OpenSC/issues/632 , but may need adjustments when used with SM
2016-01-15 10:32:46 +01:00