use OpenSC's hooks to wrap and unwrap SM APDUs

sm_transmit_apdu is obsolete. libnpa and OpenSC can be used in parallel
now. libnpa modifies OpenSC's card handle to add SM on the fly to any
OpenSC command. This, for example, allows PKCS#XX commands in a SM
channel established by libnpa.
This commit is contained in:
Frank Morgner
2012-12-09 23:15:51 +01:00
parent 758fe2b99f
commit e9e5c7668b
11 changed files with 432 additions and 320 deletions

View File

@@ -16,10 +16,14 @@
* You should have received a copy of the GNU General Public License along with
* ccid. If not, see <http://www.gnu.org/licenses/>.
*/
#include "scutil.h"
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include <libopensc/log.h>
#include <npa/scutil.h>
#include <stdio.h>
#include <string.h>
#include <libopensc/log.h>
int initialize(int reader_id, const char *cdriver, int verbose,
sc_context_t **ctx, sc_reader_t **reader)