]> git.pld-linux.org Git - packages/opencryptoki.git/blame - opencryptoki-ica.patch
- more notes on Corrent
[packages/opencryptoki.git] / opencryptoki-ica.patch
CommitLineData
c1baa01c
JB
1--- opencryptoki-2.2.5/usr/lib/pkcs11/ica_stdll/ica_specific.c.orig 2007-09-06 17:40:13.000000000 +0200
2+++ opencryptoki-2.2.5/usr/lib/pkcs11/ica_stdll/ica_specific.c 2008-01-13 19:31:06.979358339 +0100
3@@ -1101,27 +1101,27 @@
4 CK_RV
5 token_specific_sha_init( DIGEST_CONTEXT * ctx )
6 {
7- oc_sha1_ctx *sc;
8+ struct oc_sha_ctx *sc;
9
10 /* For the C_DigestInit, C_Digest case, we may have already
11 * created ctx->context... - KEY
12 */
13 if(ctx->context) {
14- sc = (oc_sha1_ctx *)ctx->context;
15+ sc = (struct oc_sha_ctx *)ctx->context;
16 if(sc->dev_ctx)
17 free(sc->dev_ctx);
18 free(ctx->context);
19 }
20
21 /* The caller will check to see if ctx->context == NULL */
22- ctx->context_len = sizeof(oc_sha1_ctx);
23- ctx->context = malloc(sizeof(oc_sha1_ctx));
24+ ctx->context_len = sizeof(struct oc_sha_ctx);
25+ ctx->context = malloc(sizeof(struct oc_sha_ctx));
26
27 if(ctx->context == NULL)
28 return CKR_HOST_MEMORY;
29
30 memset(ctx->context, 0, ctx->context_len);
31- sc = (oc_sha1_ctx *)ctx->context;
32+ sc = (struct oc_sha_ctx *)ctx->context;
33 sc->hash_len = SHA1_HASH_SIZE;
34 sc->message_part = SHA_MSG_PART_ONLY;
35 /* This is libica's LENGTH_SHA_CONTEXT */
36@@ -1142,7 +1142,7 @@
37 CK_ULONG in_data_len )
38 {
39 unsigned int rc, i, fill_size = 0;
40- oc_sha1_ctx *oc_sha_ctx = (oc_sha1_ctx *)ctx->context;
41+ struct oc_sha_ctx *oc_sha_ctx = (struct oc_sha_ctx *)ctx->context;
42 SHA_CONTEXT *ica_sha_ctx = (SHA_CONTEXT *)oc_sha_ctx->dev_ctx;
43
44 if( !ctx )
45@@ -1316,7 +1316,7 @@
46 CK_ULONG *out_data_len )
47 {
48 CK_RV rv = CKR_OK;
49- oc_sha1_ctx *oc_sha_ctx = (oc_sha1_ctx *)ctx->context;
50+ struct oc_sha_ctx *oc_sha_ctx = (struct oc_sha_ctx *)ctx->context;
51 int copy_len = MIN(*out_data_len, LENGTH_SHA_HASH);
52
53 if( !ctx )
This page took 0.085547 seconds and 4 git commands to generate.