From cf3404fcc77aaf592c95326cbdd25612a8af6878 Mon Sep 17 00:00:00 2001 From: Matt Caswell Date: Mon, 25 Apr 2016 13:56:44 +0100 Subject: Change the return type of EVP_EncodeUpdate Previously EVP_EncodeUpdate returned a void. However there are a couple of error conditions that can occur. Therefore the return type has been changed to an int, with 0 indicating error and 1 indicating success. Reviewed-by: Rich Salz --- doc/crypto/EVP_EncodeInit.pod | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'doc') diff --git a/doc/crypto/EVP_EncodeInit.pod b/doc/crypto/EVP_EncodeInit.pod index f65322617d..4f62e71ec6 100644 --- a/doc/crypto/EVP_EncodeInit.pod +++ b/doc/crypto/EVP_EncodeInit.pod @@ -15,8 +15,8 @@ routines void EVP_ENCODE_CTX_free(EVP_ENCODE_CTX *ctx); int EVP_ENCODE_CTX_num(EVP_ENCODE_CTX *ctx); void EVP_EncodeInit(EVP_ENCODE_CTX *ctx); - void EVP_EncodeUpdate(EVP_ENCODE_CTX *ctx, unsigned char *out, int *outl, - const unsigned char *in, int inl); + int EVP_EncodeUpdate(EVP_ENCODE_CTX *ctx, unsigned char *out, int *outl, + const unsigned char *in, int inl); void EVP_EncodeFinal(EVP_ENCODE_CTX *ctx, unsigned char *out, int *outl); int EVP_EncodeBlock(unsigned char *t, const unsigned char *f, int n); @@ -66,7 +66,8 @@ any remainder). This gives the number of blocks of data that will be processed. Ensure the output buffer contains 65 bytes of storage for each block, plus an additional byte for a NUL terminator. EVP_EncodeUpdate() may be called repeatedly to process large amounts of input data. In the event of an error -EVP_EncodeUpdate() will set B<*outl> to 0. +EVP_EncodeUpdate() will set B<*outl> to 0 and return 0. On success 1 wil be +returned. EVP_EncodeFinal() must be called at the end of an encoding operation. It will process any partial block of data remaining in the B object. The output @@ -129,6 +130,8 @@ object or NULL on error. EVP_ENCODE_CTX_num() returns the number of bytes pending encoding or decoding in B. +EVP_EncodeUpdate() returns 0 on error or 1 on success. + EVP_EncodeBlock() returns the number of bytes encoded excluding the NUL terminator. -- cgit v1.2.3