2733N/APatch developed in-house. Solaris-specific; not suitable for upstream.
4002N/A if (ctx->cipher->flags & EVP_CIPH_FLAG_CUSTOM_CIPHER) {
4002N/A ret = M_do_cipher(ctx, out, NULL, 0);
4002N/A b = ctx->cipher->block_size;
4002N/A OPENSSL_assert(b <= sizeof ctx->buf);
4002N/A if (ctx->flags & EVP_CIPH_NO_PADDING) {
4002N/A EVPerr(EVP_F_EVP_ENCRYPTFINAL_EX,
4002N/A EVP_R_DATA_NOT_MULTIPLE_OF_BLOCK_LENGTH);
4002N/A+ if (ctx->cipher->cleanup) {
4002N/A+ ctx->cipher->cleanup(ctx);
4002N/A int EVP_DecryptFinal_ex(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl)
4002N/A if (ctx->cipher->flags & EVP_CIPH_FLAG_CUSTOM_CIPHER) {
4002N/A i = M_do_cipher(ctx, out, NULL, 0);
4002N/A b = ctx->cipher->block_size;
4002N/A EVPerr(EVP_F_EVP_DECRYPTFINAL_EX,
4002N/A EVP_R_DATA_NOT_MULTIPLE_OF_BLOCK_LENGTH);
4002N/A if (ctx->buf_len || !ctx->final_used) {
4002N/A if (ctx->buf_len || !ctx->final_used) {
4002N/A EVPerr(EVP_F_EVP_DECRYPTFINAL_EX, EVP_R_WRONG_FINAL_BLOCK_LENGTH);
4002N/A OPENSSL_assert(b <= sizeof ctx->final);
4002N/A if (n == 0 || n > (int)b) {
4002N/A EVPerr(EVP_F_EVP_DECRYPTFINAL_EX, EVP_R_BAD_DECRYPT);
4002N/A if (ctx->final[--b] != n) {
4002N/A if (ctx->final[--b] != n) {
4002N/A EVPerr(EVP_F_EVP_DECRYPTFINAL_EX, EVP_R_BAD_DECRYPT);
4002N/A n = ctx->cipher->block_size - n;
4002N/A+ if (ctx->cipher->cleanup) {
4002N/A+ ctx->cipher->cleanup(ctx);
2733N/A void EVP_CIPHER_CTX_free(EVP_CIPHER_CTX *ctx)