Hello Eric,

Issue with cmake build has been resolved. You can find more details in https://www.wolfssl.com/forums/post6258.html#p6258.

thanks for your support.

2

(7 replies, posted in wolfSSL)

Hello David,

Thanks for the hint. I have check out the master branch and then i could able to test the AES GCM streaming algorithm successfully.

Thank you!

3

(7 replies, posted in wolfSSL)

Hello Hayden,

Thanks for the fix. I have integrated your PR patch into my application. Then i added the below lines in my application CMakeLists.txt.

set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DWOLFSSL_AESGCM_STREAM")

After that, I could notice that "WOLFSSL_AESGCM_STREAM" is defined in "wolfssl/options.h". But now it ends up with the below error.

Now the question is do we need to configure explicitly some other macros to eliminate the error? Also attached the generated "wolfssl/options.h"

[build] lib/libwolfssl.a(aes.c.o):external/wolfssl_4_8_0_stable/wolfcrypt/src/aes.c:6864: more undefined references to `GHASH_ONE_BLOCK' follow
[build] lib/libwolfssl.a(aes.c.o): In function `GHASH_FINAL':
external/wolfssl_4_8_0_stable/wolfcrypt/src/aes.c:6867: undefined reference to `FlattenSzInBits'
external/wolfssl_4_8_0_stable/wolfcrypt/src/aes.c:6867: undefined reference to `FlattenSzInBits'
external/wolfssl_4_8_0_stable/wolfcrypt/src/aes.c:6867: undefined reference to `GHASH_ONE_BLOCK'
[build] collect2: error: ld returned 1 exit status
[build] [56/67] Linking C executable external/wolfssl_4_8_0_stable/examples/benchmark/tls_bench
[build] FAILED: external/wolfssl_4_8_0_stable/examples/benchmark/tls_bench
[build] : && ccache
[build] lib/libwolfssl.a(aes.c.o): In function `GHASH_INIT':
external/wolfssl_4_8_0_stable/wolfcrypt/src/aes.c:6736: undefined reference to `GHASH_INIT_EXTRA'
[build] lib/libwolfssl.a(aes.c.o): In function `GHASH_UPDATE':
external/wolfssl_4_8_0_stable/wolfcrypt/src/aes.c:6769: undefined reference to `GHASH_ONE_BLOCK'
external/wolfssl_4_8_0_stable/wolfcrypt/src/aes.c:6783: undefined reference to `GHASH_ONE_BLOCK'
external/wolfssl_4_8_0_stable/wolfcrypt/src/aes.c:6798: undefined reference to `GHASH_ONE_BLOCK'
external/wolfssl_4_8_0_stable/wolfcrypt/src/aes.c:6818: undefined reference to `GHASH_ONE_BLOCK'
external/wolfssl_4_8_0_stable/wolfcrypt/src/aes.c:6832: undefined reference to `GHASH_ONE_BLOCK'
external/wolfssl_4_8_0_stable/wolfcrypt/src/aes.c:6864: more undefined references to `GHASH_ONE_BLOCK' follow
[build] lib/libwolfssl.a(aes.c.o): In function `GHASH_FINAL':
external/wolfssl_4_8_0_stable/wolfcrypt/src/aes.c:6867: undefined reference to `FlattenSzInBits'
external/wolfssl_4_8_0_stable/wolfcrypt/src/aes.c:6867: undefined reference to `FlattenSzInBits'
external/wolfssl_4_8_0_stable/wolfcrypt/src/aes.c:6867: undefined reference to `GHASH_ONE_BLOCK'
[build] collect2: error: ld returned 1 exit status

Thank you!

4

(7 replies, posted in wolfSSL)

Hello David,

If "HAVE_AESGCM" and "WOLFSSL_AESGCM_STREAM" is not defined then we might end up with declaration error. I checked in my application that "WOLFSSL_USER_SETTINGS" is not defined anywhere, so the "wolfssl/options.h" should be included in wolfcrypt/test/test.c. I have attached the wolfssl/options.h file again and I hope you can able to see it.

As i don't know where to enable AES GCM stream in "CMakeLists.txt", i tried the below workaround.
1. Configured the wolfssl with the option as "./configure --enable-aesgcm-stream
2. Replace the "wolfssl\options.h" and "cyassl\options.h" in my application with the above configured one.
3. If we try to build via "CMakeLists.txt" in my application, then the "wolfssl\options.h" will be overwritten. To avoid overwriting, i have commented out the "# Generate user options header" in CMakeLists.txt (line no: 1353 to 1414).

In addition, after configuration, i have removed the "WOLFSSL_BASE64_ENCODE" and "HAVE_WC_INTROSPECTION" in "wolfssl\options.h" as i was getting the below linker error.

external/wolfssl_4_8_0_stable/CMakeFiles/unit_test.dir/examples/server/server.c.o: In function `server_test':
external/wolfssl_4_8_0_stable/examples/server/server.c:1828: undefined reference to `wolfSSL_configure_args'
external/wolfssl_4_8_0_stable/examples/server/server.c:1845: undefined reference to `wolfSSL_global_cflags'
external/wolfssl_4_8_0_stable/CMakeFiles/unit_test.dir/examples/client/client.c.o: In function `client_test':
external/wolfssl_4_8_0_stable/examples/client/client.c:2299: undefined reference to `wolfSSL_configure_args'
external/wolfssl_4_8_0_stable/examples/client/client.c:2316: undefined reference to `wolfSSL_global_cflags'

Does the above workaround will have any impacts?

Thank you!

5

(7 replies, posted in wolfSSL)

Hello,

I have integrated the wolfssl library version "4_8_0_stable" into my application and configured the wolfssl with the option as "./configure --enable-aesgcm-stream". After configuring, i could notice that the macro "WOLFSSL_AESGCM_STREAM" is defined in  "wolfssl\options.h" file. I'm trying to build the wolfssl into my application using the "CMakeLists.txt". As part of the build, "wolfcrypt/test/test.c" file is getting compiled and ends with the below linker error.

wolfssl_4_8_0_stable/wolfcrypt/test/test.c:10130: undefined reference to `wc_AesGcmEncryptInit'
external/wolfssl_4_8_0_stable/wolfcrypt/test/test.c:10133: undefined reference to `wc_AesGcmEncryptUpdate'
external/wolfssl_4_8_0_stable/wolfcrypt/test/test.c:10136: undefined reference to `wc_AesGcmEncryptFinal'
external/wolfssl_4_8_0_stable/wolfcrypt/test/test.c:10145: undefined reference to `wc_AesGcmDecryptInit'
external/wolfssl_4_8_0_stable/wolfcrypt/test/test.c:10148: undefined reference to `wc_AesGcmDecryptUpdate'
external/wolfssl_4_8_0_stable/wolfcrypt/test/test.c:10151: undefined reference to `wc_AesGcmDecryptFinal'
external/wolfssl_4_8_0_stable/wolfcrypt/test/test.c:10160: undefined reference to `wc_AesGcmEncryptInit'
external/wolfssl_4_8_0_stable/wolfcrypt/test/test.c:10168: undefined reference to `wc_AesGcmEncryptUpdate'
external/wolfssl_4_8_0_stable/wolfcrypt/test/test.c:10176: undefined reference to `wc_AesGcmEncryptUpdate'
external/wolfssl_4_8_0_stable/wolfcrypt/test/test.c:10181: undefined reference to `wc_AesGcmEncryptFinal'
external/wolfssl_4_8_0_stable/wolfcrypt/test/test.c:10192: undefined reference to `wc_AesGcmDecryptInit'
external/wolfssl_4_8_0_stable/wolfcrypt/test/test.c:10200: undefined reference to `wc_AesGcmDecryptUpdate'
external/wolfssl_4_8_0_stable/wolfcrypt/test/test.c:10208: undefined reference to `wc_AesGcmDecryptUpdate'
external/wolfssl_4_8_0_stable/wolfcrypt/test/test.c:10213: undefined reference to `wc_AesGcmDecryptFinal'

Have attached the file "wolfssl\options.h" for reference. Someone could please help me in resolving this error.

Thank you!

Hello,

I have integrated the wolfssl library version "4_8_0_stable" into my application and configured the wolfssl with the option as "./configure --enable-aesgcm-stream". After configuring, i could notice that the macro "WOLFSSL_AESGCM_STREAM" is defined in  "wolfssl\options.h" file. I'm trying to build the wolfssl into my application using the "CMakeLists.txt". As part of the build, "wolfcrypt/test/test.c" file is getting compiled and ends with the below linker error.

wolfssl_4_8_0_stable/wolfcrypt/test/test.c:10130: undefined reference to `wc_AesGcmEncryptInit'
external/wolfssl_4_8_0_stable/wolfcrypt/test/test.c:10133: undefined reference to `wc_AesGcmEncryptUpdate'
external/wolfssl_4_8_0_stable/wolfcrypt/test/test.c:10136: undefined reference to `wc_AesGcmEncryptFinal'
external/wolfssl_4_8_0_stable/wolfcrypt/test/test.c:10145: undefined reference to `wc_AesGcmDecryptInit'
external/wolfssl_4_8_0_stable/wolfcrypt/test/test.c:10148: undefined reference to `wc_AesGcmDecryptUpdate'
external/wolfssl_4_8_0_stable/wolfcrypt/test/test.c:10151: undefined reference to `wc_AesGcmDecryptFinal'
external/wolfssl_4_8_0_stable/wolfcrypt/test/test.c:10160: undefined reference to `wc_AesGcmEncryptInit'
external/wolfssl_4_8_0_stable/wolfcrypt/test/test.c:10168: undefined reference to `wc_AesGcmEncryptUpdate'
external/wolfssl_4_8_0_stable/wolfcrypt/test/test.c:10176: undefined reference to `wc_AesGcmEncryptUpdate'
external/wolfssl_4_8_0_stable/wolfcrypt/test/test.c:10181: undefined reference to `wc_AesGcmEncryptFinal'
external/wolfssl_4_8_0_stable/wolfcrypt/test/test.c:10192: undefined reference to `wc_AesGcmDecryptInit'
external/wolfssl_4_8_0_stable/wolfcrypt/test/test.c:10200: undefined reference to `wc_AesGcmDecryptUpdate'
external/wolfssl_4_8_0_stable/wolfcrypt/test/test.c:10208: undefined reference to `wc_AesGcmDecryptUpdate'
external/wolfssl_4_8_0_stable/wolfcrypt/test/test.c:10213: undefined reference to `wc_AesGcmDecryptFinal'

Have attached the file "wolfssl\options.h" for reference. Someone could please help me in resolving this error.

Thanks!