Commit Graph

148 Commits

Author SHA1 Message Date
vtarasov e600a1e0ac opensc-explorer: in 'asn1' command print raw content of the ASN1_APPLICATION data
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5055 c6295689-39f2-0310-b995-f0e70906c6a9
2011-01-07 09:00:39 +00:00
vtarasov 0761a61a65 libopensc: use 'struct sc_aid' instead of 'u8 *aid, size_t aid_len'
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5048 c6295689-39f2-0310-b995-f0e70906c6a9
2011-01-05 15:42:36 +00:00
vtarasov 4b5bc9900c libopensc: asn1: allow empty path
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5022 c6295689-39f2-0310-b995-f0e70906c6a9
2011-01-02 14:14:24 +00:00
ludovic.rousseau f47416d60e Do not cast the return value of malloc(3) and calloc(3)
From http://en.wikipedia.org/wiki/Malloc#Casting_and_type_safety
" Casting and type safety

malloc returns a void pointer (void *), which indicates that it is a
pointer to a region of unknown data type. One may "cast" (see type
conversion) this pointer to a specific type, as in

int *ptr = (int*)malloc(10 * sizeof (int));

When using C, this is considered bad practice; it is redundant under the
C standard. Moreover, putting in a cast may mask failure to include the
header stdlib.h, in which the prototype for malloc is found. In the
absence of a prototype for malloc, the C compiler will assume that
malloc returns an int, and will issue a warning in a context such as the
above, provided the error is not masked by a cast. On certain
architectures and data models (such as LP64 on 64 bit systems, where
long and pointers are 64 bit and int is 32 bit), this error can actually
result in undefined behavior, as the implicitly declared malloc returns
a 32 bit value whereas the actually defined function returns a 64 bit
value. Depending on calling conventions and memory layout, this may
result in stack smashing.

The returned pointer need not be explicitly cast to a more specific
pointer type, since ANSI C defines an implicit conversion between the
void pointer type and other pointers to objects. An explicit cast of
malloc's return value is sometimes performed because malloc originally
returned a char *, but this cast is unnecessary in standard C
code.[4][5] Omitting the cast, however, creates an incompatibility with
C++, which does require it.

The lack of a specific pointer type returned from malloc is type-unsafe
behaviour: malloc allocates based on byte count but not on type. This
distinguishes it from the C++ new operator that returns a pointer whose
type relies on the operand. (see C Type Safety). "

See also
http://www.opensc-project.org/pipermail/opensc-devel/2010-August/014586.html


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4636 c6295689-39f2-0310-b995-f0e70906c6a9
2010-08-18 15:08:51 +00:00
viktor.tarasov 006c30c2e0 #245: pkcs15 asn1: 'subjectName' in 'commonPrivateKeyAttributes' is optional
thanks to Jean-Michel


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4518 c6295689-39f2-0310-b995-f0e70906c6a9
2010-07-08 08:09:46 +00:00
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
martin 68f12c881d Fix a segfault leftover from r4118
Thanks to Andre Zepezauer for the report and patch.

git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4391 c6295689-39f2-0310-b995-f0e70906c6a9
2010-05-31 16:49:55 +00:00
ludovic.rousseau 0c77a52f37 Remove 2 ugly casts and fix warnings
asn1.c: In function ‘asn1_decode_entry’:
asn1.c:979: warning: dereferencing type-punned pointer will break strict-aliasing rules
asn1.c: In function ‘asn1_encode_entry’:
asn1.c:1263: warning: dereferencing type-punned pointer will break strict-aliasing rules


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4207 c6295689-39f2-0310-b995-f0e70906c6a9
2010-04-02 13:12:53 +00:00
viktor.tarasov f75f539a6f libopensc: export 'sc_asn1_encode_object_id'
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4142 c6295689-39f2-0310-b995-f0e70906c6a9
2010-03-22 14:14:51 +00:00
aj 6545b42c02 cleanup of the debug code:
* reduce to a few, supported functions.
* change all functions to take the debug level as parameter.
* use symbolic names for the debug levels.
* fix tools to pass "verbose"/"opt_debug" as ctx->debug.


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4118 c6295689-39f2-0310-b995-f0e70906c6a9
2010-03-15 12:17:13 +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 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
martin d672fde449 Remove sc_error and sc_ctx_suppress_errors_* in favor of sc_debug/fprintf
git-svn-id: https://www.opensc-project.org/svnp/opensc/branches/martin/0.12@3721 c6295689-39f2-0310-b995-f0e70906c6a9
2009-09-14 08:46:59 +00:00
alonbl c862f88ce7 SIGSEGV print_tags_recursive - fix
Patch opensc-0.11.4.trunk-r3502-fix-segv_print_tags_asn1.diff (for trunk
trunk revision 3502) is draft.


Example 1 (SIGSEGV):

OpenSC Explorer version 0.11.4-svn
OpenSC [3F00]> cd ff00
OpenSC [3F00/FF00]> asn1 0001
Printing tags for buffer of length 512
[Switching to Thread -1211906368 (LWP 25131)]

By Aktiv Co. Aleksey Samsonov



git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3504 c6295689-39f2-0310-b995-f0e70906c6a9
2008-04-29 06:11:34 +00:00
ludovic.rousseau 9740726f16 sc_asn1_decode_integer/asn1_encode_integer: correctly manage negative
numbers and some positive numbers like 128


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3401 c6295689-39f2-0310-b995-f0e70906c6a9
2008-02-29 15:37:46 +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 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
nils fdd0baa633 bugfix: return error if OID is invalid
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2986 c6295689-39f2-0310-b995-f0e70906c6a9
2006-07-11 22:25:45 +00:00
aj 7ffd0f1d79 remove dead code.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2902 c6295689-39f2-0310-b995-f0e70906c6a9
2006-04-26 10:01:52 +00:00
nils 8494d9cfde add support for two byte tags in sc_asn1_find_tag() + normalize return value
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2839 c6295689-39f2-0310-b995-f0e70906c6a9
2006-02-12 18:29:52 +00:00
nils e8c05ca648 use more opensc specific names for ASN.1 tags to avoid name conflicts
with other ASN.1 libraries


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2815 c6295689-39f2-0310-b995-f0e70906c6a9
2006-01-20 20:52:36 +00:00
nils 59cae4140b fix compiler warnings
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2585 c6295689-39f2-0310-b995-f0e70906c6a9
2005-09-12 21:09:12 +00:00
nils 9ca1bc2a09 remove unused internal function
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2534 c6295689-39f2-0310-b995-f0e70906c6a9
2005-09-04 08:57:17 +00:00
nils eec0e22b03 de-/encode printable strings as well
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2514 c6295689-39f2-0310-b995-f0e70906c6a9
2005-08-24 08:00:44 +00:00
nils f8d6634339 set obj to NULL to avoid double free in case of an error
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2479 c6295689-39f2-0310-b995-f0e70906c6a9
2005-08-10 21:00:52 +00:00
nils 45a9d05830 cleanup, mostly signed/unsigned issues
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2469 c6295689-39f2-0310-b995-f0e70906c6a9
2005-08-08 10:22:14 +00:00
nils ed3ba0231e improve generalizedTime support + more cleanup
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2464 c6295689-39f2-0310-b995-f0e70906c6a9
2005-08-05 07:28:20 +00:00
nils d67389dfd6 bools are int; pointed out by William Wanders <william@wanders.org>
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2288 c6295689-39f2-0310-b995-f0e70906c6a9
2005-03-30 16:40:01 +00:00
pisi a1ffc6b72e Space cleanups
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2234 c6295689-39f2-0310-b995-f0e70906c6a9
2005-03-09 10:47:01 +00:00
bert 2d97002824 API fixup: use defined type instead of struct for exposed structs
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2232 c6295689-39f2-0310-b995-f0e70906c6a9
2005-03-08 20:59:35 +00:00
sth 90e967d042 Fix: stop parsing at the end of the file, not when finding padding bytes
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2103 c6295689-39f2-0310-b995-f0e70906c6a9
2005-01-27 21:35:23 +00:00
nils a82a40e977 some cleanup + improved error checking
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2051 c6295689-39f2-0310-b995-f0e70906c6a9
2005-01-03 17:20:17 +00:00
nils ebf6c8ecfa fix type, found by T.Fujita <fujita@ouk.jp>
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2043 c6295689-39f2-0310-b995-f0e70906c6a9
2004-12-23 10:49:10 +00:00
nils 9953d0b21d fix some compiler warnings
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1905 c6295689-39f2-0310-b995-f0e70906c6a9
2004-09-20 09:47:35 +00:00
nils 0464df9235 fix ASN1 NULL handling and avoid malloc(0)
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1862 c6295689-39f2-0310-b995-f0e70906c6a9
2004-07-23 16:11:23 +00:00
nils f044157553 fix incorrect use of realloc (x = realloc(x, y) doesn't free
the x in case of a failure)


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1775 c6295689-39f2-0310-b995-f0e70906c6a9
2004-04-21 18:10:58 +00:00
aet 7d3fc55736 - Minor build and C++ warning fixes
- pkcs15init: Use u8 for pin variable
  declarations like libopensc does


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1686 c6295689-39f2-0310-b995-f0e70906c6a9
2003-12-18 21:37:34 +00:00
okir 8ed95baff1 - Updated previous patch
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1675 c6295689-39f2-0310-b995-f0e70906c6a9
2003-12-16 11:04:01 +00:00
sth 6b66973692 Prevent running off the end of the buffer if the asn.1 is invalid (Chaskiel G.)
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1674 c6295689-39f2-0310-b995-f0e70906c6a9
2003-12-16 08:01:36 +00:00
okir 3c89fc8edb - improved support for CHOICE
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1642 c6295689-39f2-0310-b995-f0e70906c6a9
2003-11-26 15:35:17 +00:00
okir 12386d65c9 - When encoding a path, either encode _neither_ index/count, or both.
- Added new functions sc_der_copy, sc_der_clear to handle DER blobs
- Somewhat improved debug output


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1609 c6295689-39f2-0310-b995-f0e70906c6a9
2003-11-19 20:22:52 +00:00
okir 6e9412cd98 - When encountering the end of a SEQUENCE, while there should be
more items, we used to return SC_ERROR_ASN1_END_OF_CONTENTS.
  That error code is reserved for the real end of content markers
  though. Changed the return code to SC_ERROR_ASN1_OBJECT_NOT_FOUND


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1572 c6295689-39f2-0310-b995-f0e70906c6a9
2003-10-30 11:38:05 +00:00
aet 5616dba08e - Stop using unflexible automake conditionals when
building PC/SC, OpenCT or USBToken support,
  use ifdef's directly in source.
- Because of above, add HAVE_PCSCLITE for winconfig.h
- Remove unnecessary includes for log.h, opensc.h and
  errors.h in libopensc sources, they're already taken
  care by internal.h.


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1406 c6295689-39f2-0310-b995-f0e70906c6a9
2003-09-03 09:28:55 +00:00
okir 2fd5b30f1a - added missing newline to error msg
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1396 c6295689-39f2-0310-b995-f0e70906c6a9
2003-08-28 12:51:33 +00:00
aet 763fc16704 Rename libopensc specific error/debug to sc_error/sc_debug
We should have done this ages ago.


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1392 c6295689-39f2-0310-b995-f0e70906c6a9
2003-08-25 14:21:18 +00:00
okir 3c88da0d81 - Do not barf on empty SEQUENCEs if all elements inside are OPTIONAL
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1386 c6295689-39f2-0310-b995-f0e70906c6a9
2003-08-21 05:39:51 +00:00
sth aecd987286 Add support for non-optional ASN.1 object that are empty
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1195 c6295689-39f2-0310-b995-f0e70906c6a9
2003-06-12 21:14:04 +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
sth 9213f6c5cc Removed some compiler warnings
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1079 c6295689-39f2-0310-b995-f0e70906c6a9
2003-04-29 09:27:36 +00:00
aj a6e7fa3af9 Nils fixed asn1 code to detect two byte "file name" versus
longer real paths.


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1077 c6295689-39f2-0310-b995-f0e70906c6a9
2003-04-28 16:29:57 +00:00
aj 1c121b1430 Only look at first byte for end of data detection.
That way not only 0,0 and ff,ff is recognized
and 0,ff,ff,ff... will not cause trouble.


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1073 c6295689-39f2-0310-b995-f0e70906c6a9
2003-04-27 15:05:03 +00:00
okir 98907b68f1 - fixed endianness problem with encoding/deconding of bit fields
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1034 c6295689-39f2-0310-b995-f0e70906c6a9
2003-04-16 20:52:26 +00:00
okir 542e12deb3 - pubkey asn.1 encoding fix
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@893 c6295689-39f2-0310-b995-f0e70906c6a9
2003-02-03 12:17:12 +00:00
okir 693c5e6b8b - do not encode zero length sequences
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@870 c6295689-39f2-0310-b995-f0e70906c6a9
2003-01-20 09:53:10 +00:00
okir 6df8dbbed3 - fixed asn1_encode_path - include length value if given
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@740 c6295689-39f2-0310-b995-f0e70906c6a9
2002-12-04 09:24:49 +00:00
okir fcfbeb1845 - When decoding Path, decode "length" value as well (if present)
- a few int -> size_t changes to suppress gcc3 warnings.


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@731 c6295689-39f2-0310-b995-f0e70906c6a9
2002-12-02 13:38:09 +00:00
jey 21a82c17b8 - Renamed read_tag to sc_asn1_read_tag and made it a
non-static function


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@679 c6295689-39f2-0310-b995-f0e70906c6a9
2002-08-21 10:02:55 +00:00
fabled 7635468ed9 - Initial support for win32
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@654 c6295689-39f2-0310-b995-f0e70906c6a9
2002-06-14 12:52:56 +00:00
aet 2b433941dd Build fix for previous commit
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@610 c6295689-39f2-0310-b995-f0e70906c6a9
2002-05-27 06:41:21 +00:00
jey 7c94d7d8d3 - Several patches to fix behaviour on 64-bit architectures (by
Jochen Friedrich)
- Fixed one bug in sc_copy_asn1_entry(), one in
  sc_pkcs15init_add_object() and one in pkcs15-crypt
  (patches also by Jochen)


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@609 c6295689-39f2-0310-b995-f0e70906c6a9
2002-05-26 12:31:23 +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
okir 79d0902155 - fix for decoding CHOICE
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@551 c6295689-39f2-0310-b995-f0e70906c6a9
2002-04-17 20:43:12 +00:00
aet 0e24215b1f Minor warning fixes
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@544 c6295689-39f2-0310-b995-f0e70906c6a9
2002-04-17 13:13:44 +00:00
okir a5dd0dbb99 - support NULL tag for encoding/decoding
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@542 c6295689-39f2-0310-b995-f0e70906c6a9
2002-04-17 12:19:57 +00:00
okir f49cb6b0f1 - implemented encoding of OBJECT IDENTIFIER
- enhanced support for encoding/decoding of CHOICE
- moved encoding/decoding of AlgorithmIdentifier to separate file,
  and added encoding/decoding of algorithm parameters


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@526 c6295689-39f2-0310-b995-f0e70906c6a9
2002-04-17 08:54:36 +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 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 2b49129311 - DER decoder now treats 0xFF tags the same way as 0x00 tags
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@448 c6295689-39f2-0310-b995-f0e70906c6a9
2002-04-04 20:38:09 +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
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 4ac49d6e88 - intermediary checkin
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@249 c6295689-39f2-0310-b995-f0e70906c6a9
2002-03-01 11:52:55 +00:00
jey 325cd8006d - small bug fixed in encode_bit_string; patch by Olaf Kirch
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@233 c6295689-39f2-0310-b995-f0e70906c6a9
2002-02-25 14:13:18 +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 20adb4b39c - continued to improve PKCS #15 generation
- fixed a few problems in sc_set_security_env
- started to implement Better (tm) object handling for
  PKCS #15 objects


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@167 c6295689-39f2-0310-b995-f0e70906c6a9
2002-01-16 23:59:18 +00:00
jey 452b9d4193 - pretty much finished the DER encoder
- added delete and create file support for 'flex cards
- PKCS #15 DF's are now stored more flexibly; this makes
  adding new types of DF's (such as PuKDF's) easier
- added 'get' and 'put' commands to opensc-explorer


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@160 c6295689-39f2-0310-b995-f0e70906c6a9
2002-01-13 23:56:13 +00:00
jey 9dc7054919 - added preliminary ASN.1 encoding support
- modified ASN.1 decoding to make it easier to
  port decoder structures to the encoder
- fixed a recently introduced bug in card driver handling
- opensc-explorer will now allow only DF's to be cd'd into


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@156 c6295689-39f2-0310-b995-f0e70906c6a9
2002-01-10 12:33:56 +00:00
jey 7ff4c4544c - added preliminary CryptoFlex 16k support
- added short names to card drivers
- moved various ISO 7816-9 functions to their correct places
- added write binary support
- renamed opensc-crypt to pkcs15-crypt
- split a part opensc-tool to pkcs15-tool


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@150 c6295689-39f2-0310-b995-f0e70906c6a9
2002-01-08 13:56:50 +00:00
jey 1a3e530f01 - finished removing sc- prefix from the .c files
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@149 c6295689-39f2-0310-b995-f0e70906c6a9
2002-01-07 18:32:13 +00:00
jey 9197babe53 - renamed sc_asn1_parse to sc_asn1_decode
- added capabilities and flags fields to struct sc_card
- added a mutex to sc_context for future use


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@148 c6295689-39f2-0310-b995-f0e70906c6a9
2002-01-07 18:23:34 +00:00
aet fb4321ce0f More size_t fixes
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@128 c6295689-39f2-0310-b995-f0e70906c6a9
2002-01-01 19:56:07 +00:00
jey 68928ae520 - changed \\e back to \e in sc_log.c
- changed function prototypes in sc-asn1.c (int --> size_t)


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@126 c6295689-39f2-0310-b995-f0e70906c6a9
2002-01-01 18:25:11 +00:00
aet 607271df53 Merges with SCIDI to help integrating build process with it
Remove some gcc specific flags from Makefile.am
Rename some header defines
size_t vs. int fixups
opensc.h: Define inline as null for other compilers than gcc, for now
Port pam_pkcs15 to compile for Solaris and HP-UX, untested
Fix compiler warnings

OpenSC now compiles cleanly for Tru64, AIX and HP-UX.

The only problem is the tools using getopt_long() (GNU extension),
to be fixed later..


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@120 c6295689-39f2-0310-b995-f0e70906c6a9
2001-12-30 21:17:34 +00:00
jey 3e96a893ec - ported certificate reading to new ASN.1 code
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@119 c6295689-39f2-0310-b995-f0e70906c6a9
2001-12-29 19:03:46 +00:00
jey ad2e34cb6c - added preliminary support for EMV cards
- changed a few function prototypes
- implemented access control lists to files
- added sc_read_record() function
- updated the NEWS file


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@111 c6295689-39f2-0310-b995-f0e70906c6a9
2001-12-29 02:07:32 +00:00
jey 2b99f2df14 - added default driver for unidentified cards
- added select_file operation in Multiflex driver
- added 'list-drivers' command to opensc-tool
- moved stuff from opensc.h to sc-internal.h
- improved locking behaviour


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@106 c6295689-39f2-0310-b995-f0e70906c6a9
2001-12-25 20:45:48 +00:00
jey c344e28a92 - added card abstraction layer support
- pretty much finished migrating to new ASN.1 code
- changed call semantics for sc_select_file()
- moved functions around


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@89 c6295689-39f2-0310-b995-f0e70906c6a9
2001-12-22 20:43:09 +00:00
jey c17ff3ebdf - continued improving ASN.1 decoding
- improved debug levels
- added some PC/SC Lite workarounds


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@87 c6295689-39f2-0310-b995-f0e70906c6a9
2001-12-21 23:34:47 +00:00
jey 41416437e5 - paving way for dynamic card modules
- fixed a few memory leaks


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@86 c6295689-39f2-0310-b995-f0e70906c6a9
2001-12-20 13:57:58 +00:00
jey 9989c11a6d - remembered ChangeLog
- moved some functions from sc.c to sc-iso7816-4.c
- added fancy colors to log output =)
- removed global sc_debug variable, moved it to sc_context
- fixed new ASN.1 code (possibly still unstable)


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@83 c6295689-39f2-0310-b995-f0e70906c6a9
2001-12-19 21:58:04 +00:00
jey 5e00917fcc - bumped version number up to 0.4.0
- improved ASN.1 decoding _lots_


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@80 c6295689-39f2-0310-b995-f0e70906c6a9
2001-12-16 18:46:32 +00:00
jey 939146ffed - changed project name to OpenSC
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@52 c6295689-39f2-0310-b995-f0e70906c6a9
2001-11-24 13:32:52 +00:00
jey 584f5e5cb8 - PAM module is semi-working now
- added sc_asn1_put_tag() and sc_restore_security_env() functions
- preliminary support for CREATE FILE and DELETE FILE commands


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@42 c6295689-39f2-0310-b995-f0e70906c6a9
2001-11-17 00:11:29 +00:00
jey 18bab373b8 - changed license to LGPL
- moved ASN.1 function definitions from sc.h to sc-asn1.h


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@36 c6295689-39f2-0310-b995-f0e70906c6a9
2001-11-06 18:34:19 +00:00
jey c57e2e266d - moved libsc to its own directory
- added non-working MIME plugin for "text/x-text-to-sign"
- added pseudo-random number generator support
- split hst-test.c into smaller files


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@31 c6295689-39f2-0310-b995-f0e70906c6a9
2001-11-01 15:43:20 +00:00