Ticket #128 (new enhancement)

Opened 2 years ago

Last modified 23 months ago

Patch: PIV Card update patch

Reported by: harningt Owned by: opensc-devel@…
Priority: normal Milestone: 0.11.5
Component: opensc Version: 0.11.1
Severity: normal Keywords: patch, piv
Cc:

Description

Attached is a gzipped patch that updates the PIV card support to work with the final-state PIV cards.

Some new files were also added in refactoring some potentially common code.

compression.c/h -- Abstract compression utility, currently supports zlib & gzip format compression methods. One of the methods permits decompression into a buffer the exact size that it needs via 'malloc'/realloc. p15card-helper.c/h -- Utility to help emulate non-filesystem cards These utilities helped in breaking down PIV support requirements so that debugging was simpler.

Attachments

piv_update.patch.gz (11.9 kB) - added by harningt 2 years ago.
new_piv.patch (54.8 kB) - added by harningt 23 months ago.
New PIV patch, resolves some compile problems

Change History

Changed 2 years ago by harningt

Changed 23 months ago by harningt

Attached is a new update to the patch, it accounts for the location of 'malloc' on OSX (stdlib.h, not malloc.h) and cleans up one of the 'hacks' that I had in place.

The data cache is now properly used by pkcs15-piv in cooperation with the p15card-helper utility.

Previously a buffer of 8k was allocated for each cert for the PKCS15 data check, now the cache is used directly for the data.

NOTE: Personalization is ignored by my update. pkcs15-piv does not allow accessing PubKeys?, since they are only accessible at personalization. Disabling access to PubKeys? also enabled pkcs11 to work properly with it, since when PubKeys? are non-existent, certs are used.. otherwise an attempt to read the PubKey? will fail and the cert is ignored.

Changed 23 months ago by harningt

NOTE: The recent update to apdu.c's chaining breaks PIV card support, so you will need to revert that change in order for PIV cards to work.

Changed 23 months ago by harningt

New PIV patch, resolves some compile problems

Note: See TracTickets for help on using tickets.