EVP_CIPHER_CTX array not compiling

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

I have a problem with converting my C++ library into OpenSSL v1.1.0.

I'm using CentOS 7 and OpenSSL v1.1.0.
When I'm trying to use EVP_CIPHER_CTX as an array, my code does not compile.
I understand that this is caused by making the structures opaque.

The problem is this line

OTEXT_AES_KEY_INIT(ctx + i, pBufIdx);
The operation ctx+i is not compiling. The error I'm receiving is :

invalid use of incomplete type struct evp_cipher_ctx_st.

static void InitAESKey(AES_KEY_CTX* ctx, BYTE* keybytes, int numkeys)
        {
                BYTE* pBufIdx = keybytes;
                for (int i = 0; i < numkeys; i++)
                {
                        OTEXT_AES_KEY_INIT(ctx + i, pBufIdx);
                        pBufIdx += AES_KEY_BYTES;
                }
        }
While OTEXT_AES_KEY_INIT is macro defined like this:

#define AES_KEY_CTX EVP_CIPHER_CTX
#define OTEXT_AES_KEY_INIT(ctx, buf) { \
        EVP_CIPHER_CTX_init(ctx); \
        EVP_EncryptInit_ex(ctx, EVP_aes_128_ecb(), NULL, buf, ZERO_IV); \
        }


​What I'm doing wrong?


--
Lior           Koskas
Software Engineer
-- 
openssl-users mailing list
To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-users

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux