X-Git-Url: http://www.wagner.pp.ru/gitweb/?a=blobdiff_plain;f=gost_crypt.c;h=f9ed2cf22b0c8125252ef354b653e096476b0251;hb=e5064ca2f6ac4329865b759cce04d184b5f9ce4a;hp=d375a3dc89dd1b237900acf719f1fd371b72afd7;hpb=8bad8d38fcaf3239e7cdaf188d87ccf2e39741cd;p=openssl-gost%2Fengine.git diff --git a/gost_crypt.c b/gost_crypt.c index d375a3d..f9ed2cf 100644 --- a/gost_crypt.c +++ b/gost_crypt.c @@ -487,13 +487,13 @@ static void gost_cnt_next(void *ctx, unsigned char *iv, unsigned char *buf) int gost_cipher_do_cbc(EVP_CIPHER_CTX *ctx, unsigned char *out, const unsigned char *in, size_t inl) { + OPENSSL_assert(inl % 8 == 0); unsigned char b[8]; const unsigned char *in_ptr = in; unsigned char *out_ptr = out; int i; struct ossl_gost_cipher_ctx *c = EVP_CIPHER_CTX_get_cipher_data(ctx); unsigned char *iv = EVP_CIPHER_CTX_iv_noconst(ctx); - OPENSSL_assert(inl % 8 == 0); if (EVP_CIPHER_CTX_encrypting(ctx)) { while (inl > 0) {