Commit Graph

173 Commits

Author SHA1 Message Date
viktor.tarasov 3a3c41a6db pkcs15: encode/decode 'AccessControlRules' in 'CommonObjectAttributes'
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4515 c6295689-39f2-0310-b995-f0e70906c6a9
2010-07-06 09:09:04 +00:00
viktor.tarasov b78d7630e7 pkcs15: encode/decode 'subjectName' in 'CommonPrivateKeyAttributes'
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4512 c6295689-39f2-0310-b995-f0e70906c6a9
2010-07-05 13:29:10 +00:00
viktor.tarasov f18ba7d984 pkcs15: decode 'supportedAlgorithms' in 'TokenInfo'
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4510 c6295689-39f2-0310-b995-f0e70906c6a9
2010-07-05 12:54:23 +00:00
viktor.tarasov be3670600b emulator fix #125: thanks to Thomas Harning: emulator specific 'clear' handler
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4255 c6295689-39f2-0310-b995-f0e70906c6a9
2010-04-18 16:38:49 +00:00
ludovic.rousseau 385c5da2eb Fix
pkcs15-pubkey.c:445: warning: no previous prototype for ‘sc_pkcs15_decode_pubkey_gostr3410’
pkcs15-pubkey.c:462: warning: no previous prototype for ‘sc_pkcs15_encode_pubkey_gostr3410’ 


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4149 c6295689-39f2-0310-b995-f0e70906c6a9
2010-03-28 09:41:34 +00:00
aj 02768fb5dc remove "split-key" option and emulat sign for sign,decrypt keys with padding
and decrypt() for cardos.


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4113 c6295689-39f2-0310-b995-f0e70906c6a9
2010-03-13 22:52:51 +00:00
viktor.tarasov 22f067863a libopensc emu: more general implementation of the postponed DF parsing
In previous version the card specific 'parse_df' handler was a part of 'sc_pkcs15_df'.

Now the placehold ('sc_pkcs15_operations') created for the all card emulator specific operations .


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4109 c6295689-39f2-0310-b995-f0e70906c6a9
2010-03-13 19:48:09 +00:00
viktor.tarasov 052881c38f libopensc: in pkcs15 PIN commands 'pin_info' parameter replaced by 'pin_object'
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4103 c6295689-39f2-0310-b995-f0e70906c6a9
2010-03-10 09:23:01 +00:00
viktor.tarasov 0027a21204 libopensc emu: sorry, fix
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4098 c6295689-39f2-0310-b995-f0e70906c6a9
2010-03-09 17:11:31 +00:00
viktor.tarasov 3a2f0415fe libopensc emu: postponed object loading
Some non-pkcs15 cards protect the reading of the private objects attributes. 

For the emulated pkcs15 cards, the 'init' emu-handler was the only place where pkcs15 objects could be loaded.
This handler is called before the card is binded, and so, for an application there was no 'normal' way to verify PIN and load the objects with protected attributes.

Actually it's possible to complete list of the pkcs15 objects after the emulated pkcs15 card has been binded. 


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4096 c6295689-39f2-0310-b995-f0e70906c6a9
2010-03-09 16:49:00 +00:00
viktor.tarasov 26dc34c83f libopensc: add structure name to the 'typedef structure' definitions
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4087 c6295689-39f2-0310-b995-f0e70906c6a9
2010-03-04 16:19:41 +00:00
aj d22a2483c0 Header file cleanup.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4081 c6295689-39f2-0310-b995-f0e70906c6a9
2010-03-04 08:14:36 +00:00
viktor.tarasov 02c35be138 asepcos: 'trasport PIN' (global PIN with reference '0') is presented as 'AUT' key
; no more need of athena dedicated PIN flag 'TRANSPORT KEY';



git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4078 c6295689-39f2-0310-b995-f0e70906c6a9
2010-03-02 16:22:33 +00:00
viktor.tarasov de6649fed5 pkcs15init asepcos: fixup initialisation with protected profile
; new, athena dedicated, PIN pkcs15 flag 'TRANSPORT_KEY': 
in the Athena initialization procedure the 'trasport' SOPIN object is used. This object references to the pre-existing global SOPIN and is different from the final SOPIN of the card. This object should be ignored when fixing up the ACLs of the newly created file;

; the pkcs15 refereces of the new private keys are derived from the file-id;

; remove duplicated code;

; some log messages in  pkcs15-lib.c;




git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4077 c6295689-39f2-0310-b995-f0e70906c6a9
2010-03-02 09:50:07 +00:00
viktor.tarasov 258a867bbc libopensc: re-design 'sc_pkcs15_allocate_object_content' for the case when the 'new' and 'old' data pointers are the same
;change the prototype of 'sc_pkcs15_find_pin_by_type_and_reference' to eliminate the compilation warnings;


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4067 c6295689-39f2-0310-b995-f0e70906c6a9
2010-02-24 08:28:15 +00:00
viktor.tarasov 9c964e3d71 pincache: implement pincache as the content of the AUTH pkcs15 object
; in 'sc_pkcs15_pin_info' structure add 'auth_method' member to keep the PIN authentication method: CHV, AUT or SM;
; in pkcs15init profile add function to search PIN template by auth method and reference;
; in 'sc_pkcs15_remove_object' return silently if object to delete is NULL;
; in 'sc_pkcs15_object' structure add 'usage_counter' member;
; new 'sc_pkcs15_find_pin_by_type_and_reference' procedure to search PIN pkcs15 object by auth method and reference;
 


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4048 c6295689-39f2-0310-b995-f0e70906c6a9
2010-02-20 22:04:07 +00:00
viktor.tarasov b28add8e3b libopensc: in sc_pkcs15_object introduce the 'content' member
Replace not-used 'der' structure member by the 'content' one.

'Der' member was introduced to keep the ASN1 encoded object attributes. Actually it's not used.
'Content' is intended to keep the object value (AUTH object - pin cache value; CERT object - der value, ...)



git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4008 c6295689-39f2-0310-b995-f0e70906c6a9
2010-02-09 14:45:07 +00:00
viktor.tarasov 935b0740e4 libopensc: remove not used function
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4006 c6295689-39f2-0310-b995-f0e70906c6a9
2010-02-09 13:53:27 +00:00
aj f0484968a9 merge changes 0.11.11 -> 0.11.12
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3899 c6295689-39f2-0310-b995-f0e70906c6a9
2009-12-18 13:33:03 +00:00
s 5320ca6fd1 Corrected GOSTR3410 public key structure
Working now with GOST R 34.10:
$ pkcs15-init --store-private-key key --key-usage sign,decrypt --auth-id 2 --id 1 --pin "12345678"
$ pkcs15-init --store-certificate my_cert --id 1 --pin "12345678"

But have problem: no CKA_GOSTR3410_PARAMS by retrieve pub_key from certificate, if pub_key object was removed (see parse_x509_cert, asn1_decode_gostr3410_params)


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3859 c6295689-39f2-0310-b995-f0e70906c6a9
2009-11-19 15:41:03 +00:00
martin 3ea5bb7987 Merge [3804:3822/trunk]
git-svn-id: https://www.opensc-project.org/svnp/opensc/branches/martin/0.12@3824 c6295689-39f2-0310-b995-f0e70906c6a9
2009-11-13 09:45:21 +00:00
martin 95a5ab0654 Re-implement PIN cache on PKCS#15 layer; remove it from PKCS#11. Re-name and log PKCS#15 options to better reflect the purpose.
Data objects and PKCS#15 init are left broken currently.



git-svn-id: https://www.opensc-project.org/svnp/opensc/branches/martin/0.12@3784 c6295689-39f2-0310-b995-f0e70906c6a9
2009-10-22 08:59:59 +00:00
martin ea37069272 Merged r3749:3758 from trunk
git-svn-id: https://www.opensc-project.org/svnp/opensc/branches/martin/0.12@3759 c6295689-39f2-0310-b995-f0e70906c6a9
2009-10-05 20:10:07 +00:00
martin a614dff522 PKCS#11: Implement more token flags that describe available PIN retries.
git-svn-id: https://www.opensc-project.org/svnp/opensc/branches/martin/0.12@3731 c6295689-39f2-0310-b995-f0e70906c6a9
2009-09-14 10:05:40 +00:00
martin 7e7b94d879 Fix PKCS#15 emulation handling:
* Work as expected without a configuration file
  * "Normalize" the configuration file: show the used default and give examples with opposite values.
 * DWIM:    
  * If there is no config file: try all builtin drivers
  * If there is a configuration file, allow to turn emulation off
  * If there is a configuration file, allow to filter the list of internal drivers                   
 * Introduce a PKCS#15 layer card flag for emulated cards



git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3613 c6295689-39f2-0310-b995-f0e70906c6a9
2009-01-15 21:08:30 +00:00
alonbl 8828faeccf Allow delete data objects by specifying application-name and label
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3608 c6295689-39f2-0310-b995-f0e70906c6a9
2008-12-28 21:28:53 +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
martin 9f1d63a56c Allow to specify at compile time that a card will work only via pkcs15 emulation. This way no matter what is
configured in the config file (try_emulation_first option) the card is usable via pkcs15 tools.



git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3099 c6295689-39f2-0310-b995-f0e70906c6a9
2007-01-05 16:20:50 +00:00
aj b3ad2f9dd2 convert to utf-8.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3084 c6295689-39f2-0310-b995-f0e70906c6a9
2006-12-19 21:31:17 +00:00
nils 01f72933af add support to parse the seInfo TokenInfo entry, improve aid support in opensc-explorer
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3045 c6295689-39f2-0310-b995-f0e70906c6a9
2006-10-30 18:51:48 +00:00
henryk b45617c451 Make absolute paths from all paths read from the PKCS#15 directories by prepending the DF(PKCS#15) path if necessary.
Fixes compatibility with Siemens HiPath SIcurity formatted cards which use relative paths.


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3028 c6295689-39f2-0310-b995-f0e70906c6a9
2006-09-26 10:55:02 +00:00
ludovic.rousseau 2b8a2f4d90 sc_pkcs15_parse_tokeninfo() and sc_pkcs15_encode_tokeninfo() now use a
(sc_pkcs15_tokeninfo_t *) instead of struct (sc_pkcs15_card *)


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2872 c6295689-39f2-0310-b995-f0e70906c6a9
2006-03-07 07:22:58 +00:00
sth 9df2cde416 Add support for reading and writing from/to an EF(UnusedSpace) file; this functionality can be used for deleting and creating pkcs15 objects (that reside in a file)
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2769 c6295689-39f2-0310-b995-f0e70906c6a9
2005-12-17 19:53:12 +00:00
nils b325af7fac remove deprecated pkcs15 emulation api. Add temporary wrappers for
the new functions in some pkcs15 emulation drivers.


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2675 c6295689-39f2-0310-b995-f0e70906c6a9
2005-10-30 21:42:35 +00:00
nils 95200e0f50 add pkcs15 emu function for data objects
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2672 c6295689-39f2-0310-b995-f0e70906c6a9
2005-10-30 19:55:21 +00:00
martin fc3048f55e Remove the (stupid) use_pinpad option from pkcs15 structures
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2482 c6295689-39f2-0310-b995-f0e70906c6a9
2005-08-13 13:04:02 +00:00
nils 44384eccbf - Initial support for TokenUpdate;;lastUpdate field. Change pkcs15 caching
code to use the card serial number and lastUpdate field (if present) to
  specify the cache file. 
- consistently use unsigned data types to specify object types
- make sc_pkcs15emu_get_df a local function (it's not used outside
  pkcs15-syn.c and honestly I see no reason to export it).
- start of a new ChangeLog file (with some intial entries)


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2466 c6295689-39f2-0310-b995-f0e70906c6a9
2005-08-05 16:24:35 +00:00
sth b12711e6b3 Reverse the export of function parse_x509_cert()
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2462 c6295689-39f2-0310-b995-f0e70906c6a9
2005-08-04 06:29:35 +00:00
sth 41889b27a1 Export function parse_x509_cert()
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2458 c6295689-39f2-0310-b995-f0e70906c6a9
2005-08-03 09:07:09 +00:00
sth 37cd955055 Allow to seach a data object by it's application OID
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2457 c6295689-39f2-0310-b995-f0e70906c6a9
2005-08-03 09:05:09 +00:00
pisi b6f9aa561b A single flag for all pkcs15 layer applications to detect a) if pinpad is
present b) and if we should make use of it. Also remove the CCID specific
option for pinpad detection - if detected, the flag will anyway always be
set as it reflects the capabilities of the actual reader. Also, the
detection mechanism is changed to be crossplatform.


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2236 c6295689-39f2-0310-b995-f0e70906c6a9
2005-03-09 11:45:29 +00:00
nils 5c2f9f72d3 first part of a pkcs15 emulation driver cleanup/rework:
use new api the create pkcs15 objects (note: the part enclosed
in '#ifndef OPENSC_NO_DEPRECATED' statement will be removed
in someday). At first only for pkcs15-esteid.c and pkcs15-starcert.c
but the others will follow soon (including some documentation)


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2124 c6295689-39f2-0310-b995-f0e70906c6a9
2005-02-02 21:18:54 +00:00
aet c1b0626cdd - Cleanup, typo fix
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2123 c6295689-39f2-0310-b995-f0e70906c6a9
2005-02-02 10:21:10 +00:00
nils bd02c1a6be add data field for subject Common{Private|Public}KeyAttributes
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2046 c6295689-39f2-0310-b995-f0e70906c6a9
2004-12-27 13:22:06 +00:00
nils 08826acb4d flags/types are unsigned int, the exponent shouldn't be negative and more const
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2040 c6295689-39f2-0310-b995-f0e70906c6a9
2004-12-22 09:54:41 +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 5985415603 some cleanup: 'int' -> 'unsigned int' for flags, 'int' -> 'size_t'
for length + remove some compiler warnings


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1940 c6295689-39f2-0310-b995-f0e70906c6a9
2004-10-17 20:20:59 +00:00
nils 5b4730dabd flags should be stored in a 'unsigned int' (at least this seems to be
the convention in libopensc) => change tokenInfo flags from
'unsigned long' to 'unsigned int'


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1936 c6295689-39f2-0310-b995-f0e70906c6a9
2004-10-17 16:46:34 +00:00
nils 5a328e3dcc update pkcs15 emulation stuff
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1916 c6295689-39f2-0310-b995-f0e70906c6a9
2004-10-08 21:29:55 +00:00
nils 02cbe02bc2 include common object attributes in the sc_pkcs15emu_add_* api
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1781 c6295689-39f2-0310-b995-f0e70906c6a9
2004-05-04 17:58:04 +00:00
sth 345d30a9d6 Moved the sc_pkcs15emu_xxx() functions to pkcs15_syn.c
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1755 c6295689-39f2-0310-b995-f0e70906c6a9
2004-03-08 13:59:27 +00:00
sth 9abadbc711 Increased the maximum number of PINs and removed some unused #defines
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1713 c6295689-39f2-0310-b995-f0e70906c6a9
2004-01-07 09:51:07 +00:00
okir 9ee5c76a4d - Support direct encoding of certs in the CDF
- Added prototypes for sc_der_{copy,clear}
- Changed sc_pkcs15_print_id to return const char *


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1613 c6295689-39f2-0310-b995-f0e70906c6a9
2003-11-19 20:31:52 +00:00
okir d91ecdc245 - Moved sc_pkcs15_bind_synthetic to a separate file
- Moved sc_pkcs15_print_card to ../tests/print.c
- added dll_handle and preferred_language fields to p15card


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1583 c6295689-39f2-0310-b995-f0e70906c6a9
2003-10-31 12:26:24 +00:00
okir d3d7664c11 - Changed the internal object search machinery quite a bit so it
can search for more than one type of object at the same time.
- When enumerating a DF as part of the search, no longer ignore all
  errors.
- When parsing a DF, SC_ERROR_ASN1_END_OF_CONTENTS really means
  we've just reached the end of data in the file, so return 0
  instead


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1573 c6295689-39f2-0310-b995-f0e70906c6a9
2003-10-30 11:43:21 +00:00
okir 9e70efba8a - sc_pkcs15_find_pin_by_reference now searches by reference and path
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1548 c6295689-39f2-0310-b995-f0e70906c6a9
2003-10-21 11:02:48 +00:00
okir 45e820cdac - added sc_pkcs15_find_prkey_by_reference
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1506 c6295689-39f2-0310-b995-f0e70906c6a9
2003-10-13 14:35:27 +00:00
sth 3669fa86e7 Increased the pkcs15 ID size from 16 to 255
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1238 c6295689-39f2-0310-b995-f0e70906c6a9
2003-06-28 07:02:26 +00:00
okir 7fe0ba8749 - fixed typodef in sc_pkcs15_*_info_t (spotted by Nils)
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1178 c6295689-39f2-0310-b995-f0e70906c6a9
2003-05-30 09:54:14 +00:00
okir 2abc504051 - remove signedness warnings printed by new gcc
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1176 c6295689-39f2-0310-b995-f0e70906c6a9
2003-05-30 08:54:42 +00:00
okir 27e105540e - added sc_pkcs15_find_pin_by_reference
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1114 c6295689-39f2-0310-b995-f0e70906c6a9
2003-05-15 11:27:38 +00:00
aj 7cbe523cc4 At least the rainbow ikey 3000 need bigger labels.
Label size should be 255, as per pkcs15.


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1100 c6295689-39f2-0310-b995-f0e70906c6a9
2003-05-13 13:43:09 +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 3b36593ada - added pkcs15 unblock functionality
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1008 c6295689-39f2-0310-b995-f0e70906c6a9
2003-04-14 14:51:42 +00:00
okir c07de5157a - added SC_PKCS15_PIN_TYPE_* defines for weirdo encodings
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@983 c6295689-39f2-0310-b995-f0e70906c6a9
2003-04-11 10:30:25 +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
okir a7615abdeb - attempt to fix DODF encoding/decoding
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@798 c6295689-39f2-0310-b995-f0e70906c6a9
2002-12-19 14:26:54 +00:00
okir b86d2e994b - First shot at pkcs15 data objects from Danny De Cock
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@788 c6295689-39f2-0310-b995-f0e70906c6a9
2002-12-18 10:17:01 +00:00
jey 79b5672edc - Keep the DER encoding of each PKCS #15 object in memory
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@761 c6295689-39f2-0310-b995-f0e70906c6a9
2002-12-10 13:27:17 +00:00
jey d38851b9e4 - Fixed prototype for sc_pkcs15_card_new()
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@687 c6295689-39f2-0310-b995-f0e70906c6a9
2002-08-21 10:22:48 +00:00
okir 7f6453d715 - sc_pkcs15_decipher now takes a flags argument, so we know when to
strip off any pkcs#1 padding.


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@585 c6295689-39f2-0310-b995-f0e70906c6a9
2002-04-23 08:17:06 +00:00
aet f7fcaee513 Extract certificate crlDistributionPoints and store it in sc_pkcs15_cert
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@580 c6295689-39f2-0310-b995-f0e70906c6a9
2002-04-21 18:54:10 +00:00
aet 3dccd63989 - C++ support. Compiles with gcc/g++ for Linux, otherwise
completely untested.


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@574 c6295689-39f2-0310-b995-f0e70906c6a9
2002-04-19 14:23:31 +00:00
jey 546f920fc1 - PKCS #15 objects and DFs are now stored with linked lists
in struct sc_pkcs15_card; this way we can have 'floating'
  objects that don't belong in any DF, for e.g. generating
  public key objects from certificates
- Removed some unused function prototypes


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@572 c6295689-39f2-0310-b995-f0e70906c6a9
2002-04-19 09:22:44 +00:00
okir 7cd061c91a - added a bunch of prototypes
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@567 c6295689-39f2-0310-b995-f0e70906c6a9
2002-04-18 10:59:35 +00:00
okir 2b65c73cfb - missing prototypes for {de,en}code_prkey
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@555 c6295689-39f2-0310-b995-f0e70906c6a9
2002-04-17 20:45:15 +00:00
okir fcbbb6c3e5 - eliminated RSA specific code to support generic pubkeys instead
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@548 c6295689-39f2-0310-b995-f0e70906c6a9
2002-04-17 18:33:27 +00:00
okir af262521e7 - new generic function sc_pkcs15_read_file
- structs and functions for data wrap/unwrap


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@534 c6295689-39f2-0310-b995-f0e70906c6a9
2002-04-17 09:00:52 +00:00
okir 596220e821 - pkcs15-init does not require openssl anymore
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@523 c6295689-39f2-0310-b995-f0e70906c6a9
2002-04-15 13:42:10 +00:00
okir 2d47103692 - implemented sc_pkcs15_find_so_pin
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@496 c6295689-39f2-0310-b995-f0e70906c6a9
2002-04-08 15:45:28 +00:00
jey 22636c2df9 - Added SC_ERROR_FILE_ALREADY_EXISTS
- Changed call convention for reader finish()
- CT-API driver now frees its resources correctly
- Added year 2002 to some of the copyright statements
- sc_pkcs15_decipher() and sc_pkcs15_compute_signature()
  now select only the parent DF of the private key file


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@463 c6295689-39f2-0310-b995-f0e70906c6a9
2002-04-05 14:46:44 +00:00
aet 076a26bbac Rework the header structure
Currently fails to compile, unless you symlink
all the necessary headers to src/include/opensc
by yourself.


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@459 c6295689-39f2-0310-b995-f0e70906c6a9
2002-04-05 13:48:00 +00:00
aet d81d10ba90 Upgrade sources to use new headers, part #1
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@458 c6295689-39f2-0310-b995-f0e70906c6a9
2002-04-05 10:44:51 +00:00
jey 0fe85e6563 - Added typedefs for the most common structs
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@436 c6295689-39f2-0310-b995-f0e70906c6a9
2002-04-04 09:20:19 +00:00
okir 8f07d6706d - now extracting issuer from certificate
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@346 c6295689-39f2-0310-b995-f0e70906c6a9
2002-03-20 13:08:09 +00:00
okir 7d6cf8fa81 - extract certificate issuer and store it in sc_pkcs15_cert
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@338 c6295689-39f2-0310-b995-f0e70906c6a9
2002-03-15 15:19:34 +00:00
jey a3b521a704 - started adding support for DSA private keys
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@337 c6295689-39f2-0310-b995-f0e70906c6a9
2002-03-15 12:48:06 +00:00
jey 67ffdfa213 - Added support for big serial numbers in certificates
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@332 c6295689-39f2-0310-b995-f0e70906c6a9
2002-03-15 10:10:33 +00:00
okir 41cd4c4d2c - implemented sc_pkcs15_free_pubkey
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@330 c6295689-39f2-0310-b995-f0e70906c6a9
2002-03-15 10:01:25 +00:00
okir c94fb9a1d5 - added sc_pkcs15_read_pubkey to retrieve public key from a public key file
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@281 c6295689-39f2-0310-b995-f0e70906c6a9
2002-03-08 19:47:26 +00:00
jey 3416461c4b - Added X.509 algorithm id decoding and encoding to asn1.c
- Implemented a generic ATR matching helper function
- Made signing much smarter (should even work now)
- Added info about supported crypto algorithms to struct sc_card


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@276 c6295689-39f2-0310-b995-f0e70906c6a9
2002-03-08 05:59:57 +00:00
okir 364328212b - sc_pkcs15_parse_df now understands PuKDFs
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@271 c6295689-39f2-0310-b995-f0e70906c6a9
2002-03-07 12:33:42 +00:00
jey 6b07ff64f6 - Reworked PKCS #15 structure a bit (MANY THINGS
WILL BREAK)
- Added support for public key DFs (not tested yet)


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@251 c6295689-39f2-0310-b995-f0e70906c6a9
2002-03-03 00:32:28 +00:00
jey e78dc96440 - added ATR for RSA SecurID 3100
- exported pkcs15_encode_* functions
- minor modification to sc_file_add_acl_entry()
- boosted up opensc-explorer
- added error(), warn() and fatal()
- implemented a generic PKCS #15 structure generation tool


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@215 c6295689-39f2-0310-b995-f0e70906c6a9
2002-02-21 18:53:23 +00:00
jey 61fc1f9327 - all instances struct sc_file should now be
dynamically allocated with sc_file_new() and released
  with sc_file_free()
- improved ACL's
- moved struct sc_card_error to opensc.h
- moved EF(DIR) parsing and encoding to dir.c
  (encoding is not working yet)
- removed hst-test.c and filetest.c


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@213 c6295689-39f2-0310-b995-f0e70906c6a9
2002-02-20 09:56:47 +00:00
jey fd9c25eeed - added README.Cryptoflex
- modified ChangeLog
- _really_ bumped up the version number this time


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@192 c6295689-39f2-0310-b995-f0e70906c6a9
2002-01-24 16:24:24 +00:00
jey c1cac5f311 - bumped up version number in preparation of the new release
- unified PKCS #15 DF decoding
- added PKCS #15 file caching


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@191 c6295689-39f2-0310-b995-f0e70906c6a9
2002-01-24 16:02:54 +00:00
jey d9792242cc - fixed a bug with file permissions in flex_create_file()
- added RSA signature generation with Cryptoflex cards
- improved security environment handling
- implemented cryptoflex-tool


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@177 c6295689-39f2-0310-b995-f0e70906c6a9
2002-01-20 21:20:09 +00:00
jey e7c65bf669 - PKCS #15 generation is now in a semi-working state
- started coding crypto support for Cryptoflexes


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@175 c6295689-39f2-0310-b995-f0e70906c6a9
2002-01-17 23:47:03 +00:00
jey 54e5d23e93 - improved PKCS #15 generation
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@170 c6295689-39f2-0310-b995-f0e70906c6a9
2002-01-17 11:44:27 +00:00