Skip to content

Commit 210badb

Browse files
committed
Fix 32bit build
../src/cipher.c: In function ‘p11prov_cipher_update’: ../src/cipher.c:1069:54: error: passing argument 5 of ‘tls_pre_aead’ from incompatible pointer type [-Wincompatible-pointer-types] 1069 | rv = tls_pre_aead(cctx, &in, &inl, &out, &outlen); | ^~~~~~~ | | | CK_ULONG * {aka long unsigned int *} ../src/cipher.c:870:56: note: expected ‘size_t *’ {aka ‘unsigned int *’} but argument is of type ‘CK_ULONG *’ {aka ‘long unsigned int *’} 870 | unsigned char **out, size_t *outl) | ~~~~~~~~^~~~ ../src/cipher.c:1082:43: error: passing argument 3 of ‘tls_post_aead’ from incompatible pointer type [-Wincompatible-pointer-types] 1082 | rv = tls_post_aead(cctx, out, &outlen); | ^~~~~~~ | | | CK_ULONG * {aka long unsigned int *} ../src/cipher.c:909:36: note: expected ‘size_t *’ {aka ‘unsigned int *’} but argument is of type ‘CK_ULONG *’ {aka ‘long unsigned int *’} 909 | size_t *outl) | ~~~~~~~~^~~~ ../src/cipher.c:1091:54: error: passing argument 5 of ‘tls_pre_aead’ from incompatible pointer type [-Wincompatible-pointer-types] 1091 | rv = tls_pre_aead(cctx, &in, &inl, &out, &outlen); | ^~~~~~~ | | | CK_ULONG * {aka long unsigned int *} ../src/cipher.c:870:56: note: expected ‘size_t *’ {aka ‘unsigned int *’} but argument is of type ‘CK_ULONG *’ {aka ‘long unsigned int *’} 870 | unsigned char **out, size_t *outl) | ~~~~~~~~^~~~ ../src/cipher.c: In function ‘p11prov_common_set_ctx_params’: ../src/cipher.c:1479:54: error: passing argument 4 of ‘OSSL_PARAM_get_octet_string’ from incompatible pointer type [-Wincompatible-pointer-types] 1479 | p, (void **)&gcm->pIv, gcm->ulIvLen, &gcm->ulIvFixedBits); | ^~~~~~~~~~~~~~~~~~~ | | | CK_ULONG * {aka long unsigned int *} In file included from /usr/include/openssl/indicator.h:18, from /usr/include/openssl/core_dispatch.h:16, from ../src/provider.h:16, from ../src/cipher.c:5: /usr/include/openssl/params.h:138:13: note: expected ‘size_t *’ {aka ‘unsigned int *’} but argument is of type ‘CK_ULONG *’ {aka ‘long unsigned int *’} 138 | size_t *used_len); | ~~~~~~~~^~~~~~~~
1 parent c7a5c8b commit 210badb

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/cipher.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -867,7 +867,7 @@ static CK_RV tls_aead_get_data(CK_MECHANISM_PTR mech, data_buffer *explicitiv,
867867

868868
static CK_RV tls_pre_aead(struct p11prov_cipher_ctx *cctx,
869869
const unsigned char **in, size_t *inl,
870-
unsigned char **out, size_t *outl)
870+
unsigned char **out, CK_ULONG *outl)
871871
{
872872
data_buffer iv = { 0 };
873873
data_buffer tag = { 0 };
@@ -906,7 +906,7 @@ static CK_RV tls_pre_aead(struct p11prov_cipher_ctx *cctx,
906906
}
907907

908908
static CK_RV tls_post_aead(struct p11prov_cipher_ctx *cctx, unsigned char *out,
909-
size_t *outl)
909+
CK_ULONG *outl)
910910
{
911911
data_buffer explicitiv = { 0 };
912912
data_buffer tag = { 0 };
@@ -1476,7 +1476,8 @@ static int p11prov_common_set_ctx_params(void *vctx, const OSSL_PARAM params[])
14761476
}
14771477

14781478
int ret = OSSL_PARAM_get_octet_string(
1479-
p, (void **)&gcm->pIv, gcm->ulIvLen, &gcm->ulIvFixedBits);
1479+
p, (void **)&gcm->pIv, gcm->ulIvLen,
1480+
(size_t *)&gcm->ulIvFixedBits);
14801481
if (ret != RET_OSSL_OK || gcm->pIv == NULL) {
14811482
P11PROV_raise(ctx->provctx, CKR_HOST_MEMORY,
14821483
"Memory allocation failed");

0 commit comments

Comments
 (0)