Bugfixes:

- ssc is a BIGNUM, since its size can be up to 16 bytes (not 16 bits as before)
- protected le is now encoded as octet string (not as unsigned integer anymore)
- sc_format_asn1_entry was fet with wrong pointers (lebuf instead of *lebuf
  and formatted_data instead of *formatted_data

Added some debug output.


git-svn-id: https://vsmartcard.svn.sourceforge.net/svnroot/vsmartcard@60 96b47cad-a561-4643-ad3b-153ac7d7599c
This commit is contained in:
frankmorgner
2010-04-11 20:31:28 +00:00
parent c8cd403ee9
commit 90efc82314
4 changed files with 155 additions and 102 deletions

View File

@@ -28,6 +28,12 @@ pace_sm_ctx_create(int protocol, const BUF_MEM *key_mac,
if (!out)
return NULL;
out->ssc = BN_new();
if (!out->ssc) {
free(out);
return NULL;
}
out->key_enc = key_enc;
out->key_mac = key_mac;
out->protocol = protocol;
@@ -40,6 +46,8 @@ void
pace_sm_ctx_free(struct pace_sm_ctx *ctx)
{
if (ctx) {
if (ctx->ssc)
BN_clear_free(ctx->ssc);
free(ctx);
}
}