Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Code Not Running #4

Open
toppylawz opened this issue Apr 13, 2021 · 1 comment
Open

Code Not Running #4

toppylawz opened this issue Apr 13, 2021 · 1 comment

Comments

@toppylawz
Copy link

pressing gcc -Wall openssl_aes.c -lcrypto
it showed the following error:
openssl_aes.c: In function ‘aes_encrypt’: openssl_aes.c:49:22: error: ‘AES_BLOCK_SIZE’ undeclared (first use in this function) int c_len = *len + AES_BLOCK_SIZE, f_len = 0; ^~~~~~~~~~~~~~ openssl_aes.c:49:22: note: each undeclared identifier is reported only once for each function it appears in openssl_aes.c: In function ‘main’: openssl_aes.c:87:18: error: storage size of ‘en’ isn’t known EVP_CIPHER_CTX en, de; ^~ openssl_aes.c:87:22: error: storage size of ‘de’ isn’t known EVP_CIPHER_CTX en, de; ^~ openssl_aes.c:87:22: warning: unused variable ‘de’ [-Wunused-variable] openssl_aes.c:87:18: warning: unused variable ‘en’ [-Wunused-variable] EVP_CIPHER_CTX en, de;

@keineahnung2345
Copy link
Contributor

You have to add #include <openssl/aes.h>. And if you are using Openssl 1.1.1, please try #5.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants