From ba0d04a986db21c1a0777f6df58413dbe8711a29 Mon Sep 17 00:00:00 2001 From: "Dr. Stephen Henson" Date: Fri, 26 May 2006 12:24:49 +0000 Subject: [PATCH] Update pkeyutl to use size_t for pkey functions. --- apps/pkeyutl.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/apps/pkeyutl.c b/apps/pkeyutl.c index 4b19a3fb30..a3ac23c2d8 100644 --- a/apps/pkeyutl.c +++ b/apps/pkeyutl.c @@ -80,8 +80,8 @@ static int setup_peer(BIO *err, EVP_PKEY_CTX *ctx, int peerform, const char *file); static int do_keyop(EVP_PKEY_CTX *ctx, int pkey_op, - unsigned char *out, int *poutlen, - unsigned char *in, int inlen); + unsigned char *out, size_t *poutlen, + unsigned char *in, size_t inlen); int MAIN(int argc, char **); @@ -337,7 +337,7 @@ int MAIN(int argc, char **argv) } else { - rv = do_keyop(ctx, pkey_op, NULL, &buf_outlen, + rv = do_keyop(ctx, pkey_op, NULL, (size_t *)&buf_outlen, buf_in, buf_inlen); if (rv > 0) { @@ -346,7 +346,7 @@ int MAIN(int argc, char **argv) rv = -1; else rv = do_keyop(ctx, pkey_op, - buf_out, &buf_outlen, + buf_out, (size_t *)&buf_outlen, buf_in, buf_inlen); } } @@ -536,30 +536,30 @@ static int setup_peer(BIO *err, EVP_PKEY_CTX *ctx, int peerform, } static int do_keyop(EVP_PKEY_CTX *ctx, int pkey_op, - unsigned char *out, int *poutlen, - unsigned char *in, int inlen) + unsigned char *out, size_t *poutlen, + unsigned char *in, size_t inlen) { int rv; switch(pkey_op) { case EVP_PKEY_OP_VERIFYRECOVER: - rv = EVP_PKEY_verify_recover(ctx, out, (unsigned int *)poutlen, in, inlen); + rv = EVP_PKEY_verify_recover(ctx, out, poutlen, in, inlen); break; case EVP_PKEY_OP_SIGN: - rv = EVP_PKEY_sign(ctx, out, (unsigned int *)poutlen, in, inlen); + rv = EVP_PKEY_sign(ctx, out, poutlen, in, inlen); break; case EVP_PKEY_OP_ENCRYPT: - rv = EVP_PKEY_encrypt(ctx, out, (unsigned int *)poutlen, in, inlen); + rv = EVP_PKEY_encrypt(ctx, out, poutlen, in, inlen); break; case EVP_PKEY_OP_DECRYPT: - rv = EVP_PKEY_decrypt(ctx, out, (unsigned int *)poutlen, in, inlen); + rv = EVP_PKEY_decrypt(ctx, out, poutlen, in, inlen); break; case EVP_PKEY_OP_DERIVE: - rv = EVP_PKEY_derive(ctx, out, (unsigned int *)poutlen); + rv = EVP_PKEY_derive(ctx, out, poutlen); break; } -- 2.25.1