You are not logged in. Please login or register.
Active topics Unanswered topics
Welcome to the wolfSSL Forums!
Please post questions or comments you have about wolfSSL products here. It is helpful to be as descriptive as possible when asking your questions.
References
Stable Releases - download stable product releases.
Development Branch - latest development branch on GitHub.
wolfSSL Manual - wolfSSL (formerly CyaSSL) product manual and API reference.
Search options
Never mind...I found excellent examples in your documentation. I thought the API was the only doc, then I found manual.
Resolved by changing the compiler to gcc-8
I have two Arm based Linux boxes now that open up a socket and talk to one another. Data that passes back and forth is JSON and audio.
I would like to encrypt these streams using wolfSSL and a "shared key", no certificate. So simply take a buffer on one side encrypt it and decrypt the buffer on the other side.
The "shared key" is simply entered manually on both boxes.
Could someone point me to some sample code that would get me started?
It does not seem to work:
This works:
./configure --host=arm-linux-gnueabihf CC="/usr/bin/arm-linux-gnueabihf-gcc-4.7" CFLAGS="-mcpu=cortex-a9 -mtune=cortex-a9 -march=armv7-a -mvectorize-with-neon-quad -mfpu=neon -mfloat-abi=hard -Wno-write-strings -Wno-deprecated" LDFLAGS="--sysroot=/home/jps/Development/Platypus/common-deb7/rootfs_of_arm"
But this does not:
./configure --host=arm-linux-gnueabihf --with-sysroot="/home/jps/Development/Platypus/common-deb7/rootfs_of_arm/" CC="/usr/bin/arm-linux-gnueabihf-gcc-4.7" CFLAGS="-mcpu=cortex-a9 -mtune=cortex-a9 -march=armv7-a -mvectorize-with-neon-quad -mfpu=neon -mfloat-abi=hard -Wno-write-strings -Wno-deprecated"
Why is that?
I did use --with-sysroot here is my ./configure statement:
./configure --host=arm-linux-gnueabihf --with-sysroot='/home/jps/Development/Platypus/common-deb7/rootfs_of_arm/' CC=/usr/bin/arm-linux-gnueabihf-gcc-4.7 CFLAGS="-mcpu=cortex-a9 -mtune=cortex-a9 -march=armv7-a -mvectorize-with-neon-quad -mfpu=neon -mfloat-abi=hard -Wno-write-strings -Wno-deprecated" LDFLAGS='--sysroot=/home/jps/Development/Platypus/common-deb7/rootfs_of_arm'
One of the things I do not understand is why do I need to have both --with-sysroot and LDFLAGS='--sysroot=/home/jps/Development/Platypus/common-deb7/rootfs_of_arm' for ./configure to work.
./configure seems to work ok but when I do a make I get the following error:
jps@twud:~/Downloads/WolfSSL/wolfssl-4.4.0$ make
make -j5 all-am
make[1]: Entering directory '/home/jps/Downloads/WolfSSL/wolfssl-4.4.0'
CC wolfcrypt/benchmark/benchmark.o
CC wolfcrypt/src/src_libwolfssl_la-hmac.lo
CC wolfcrypt/src/src_libwolfssl_la-hash.lo
CC wolfcrypt/src/src_libwolfssl_la-cpuid.lo
CC wolfcrypt/src/src_libwolfssl_la-random.lo
CC wolfcrypt/src/src_libwolfssl_la-rsa.lo
CC wolfcrypt/src/src_libwolfssl_la-sha256.lo
CC wolfcrypt/src/src_libwolfssl_la-aes.lo
CC wolfcrypt/src/src_libwolfssl_la-sha.lo
CC wolfcrypt/src/src_libwolfssl_la-sha512.lo
CC wolfcrypt/src/src_libwolfssl_la-logging.lo
CC wolfcrypt/src/src_libwolfssl_la-wc_port.lo
CC wolfcrypt/src/src_libwolfssl_la-error.lo
CC wolfcrypt/src/src_libwolfssl_la-wc_encrypt.lo
CC wolfcrypt/src/src_libwolfssl_la-signature.lo
CC wolfcrypt/src/src_libwolfssl_la-wolfmath.lo
CC wolfcrypt/src/src_libwolfssl_la-memory.lo
CC wolfcrypt/src/src_libwolfssl_la-dh.lo
CC wolfcrypt/src/src_libwolfssl_la-coding.lo
CC wolfcrypt/src/src_libwolfssl_la-asn.lo
CC wolfcrypt/src/src_libwolfssl_la-poly1305.lo
CC wolfcrypt/src/src_libwolfssl_la-md5.lo
CC wolfcrypt/src/src_libwolfssl_la-chacha.lo
CC wolfcrypt/src/src_libwolfssl_la-chacha20_poly1305.lo
CC wolfcrypt/src/src_libwolfssl_la-integer.lo
CC wolfcrypt/src/src_libwolfssl_la-ecc.lo
CC src/libwolfssl_la-internal.lo
CC src/libwolfssl_la-wolfio.lo
CC src/libwolfssl_la-keys.lo
CC src/libwolfssl_la-ssl.lo
CC src/libwolfssl_la-tls.lo
CC wolfcrypt/test/test.o
CC examples/benchmark/tls_bench.o
CC examples/client/client.o
CC examples/echoclient/echoclient.o
CC examples/echoserver/echoserver.o
CC examples/server/server.o
CC wolfcrypt/test/testsuite_testsuite_test-test.o
CC examples/client/testsuite_testsuite_test-client.o
CC examples/echoclient/testsuite_testsuite_test-echoclient.o
CC examples/echoserver/testsuite_testsuite_test-echoserver.o
CC examples/server/testsuite_testsuite_test-server.o
CC testsuite/testsuite_test-testsuite.o
CC tests/unit_test-unit.o
CC tests/unit_test-api.o
CC tests/unit_test-suites.o
CC tests/unit_test-hash.o
CC tests/unit_test-srp.o
CC examples/client/tests_unit_test-client.o
CCLD src/libwolfssl.la
CC examples/server/tests_unit_test-server.o
CCLD examples/benchmark/tls_bench
CCLD wolfcrypt/test/testwolfcrypt
CCLD examples/client/client
CCLD wolfcrypt/benchmark/benchmark
CCLD examples/echoclient/echoclient
examples/client/client.o: In function `tcp_select_ex':
client.c:(.text+0x27e): undefined reference to `__fdelt_chk'
client.c:(.text+0x2b8): undefined reference to `__fdelt_chk'
client.c:(.text+0x2f2): undefined reference to `__fdelt_chk'
client.c:(.text+0x30a): undefined reference to `__fdelt_chk'
collect2: error: ld returned 1 exit status
CCLD examples/echoserver/echoserver
Makefile:3807: recipe for target 'examples/client/client' failed
make[1]: *** [examples/client/client] Error 1
make[1]: *** Waiting for unfinished jobs....
make[1]: Leaving directory '/home/jps/Downloads/WolfSSL/wolfssl-4.4.0'
Makefile:3195: recipe for target 'all' failed
make: *** [all] Error 2
jps@twud:~/Downloads/WolfSSL/wolfssl-4.4.0$
OK got it to do ./configure with using this command:
./configure --host=arm-linux-gnueabihf CC=/usr/bin/arm-linux-gnueabihf-gcc-4.7 CFLAGS="-mcpu=cortex-a9 -mtune=cortex-a9 -march=armv7-a -mvectorize-with-neon-quad -mfpu=neon -mfloat-abi=hard -Wno-write-strings -Wno-deprecated" LDFLAGS='--sysroot=/home/jps/Development/Platypus/Z2-R2/../common-deb7/rootfs_of_arm'
Setting the sysroot seemed to be the key.
I have tried:
./configure --host=arm-linux-gnueabihf CC=/usr/bin/arm-linux-gnueabihf-gcc-4.7 CFLAGS="-mcpu=cortex-a9 -mtune=cortex-a9 -march=armv7-a -mvectorize-with-neon-quad -mfpu=neon -mfloat-abi=hard -Wno-write-strings -Wno-deprecated"
And got the same results.
But now I see in the log file this message:
configure:3648: checking whether the C compiler works
configure:3670: /usr/bin/arm-linux-gnueabihf-gcc-4.7 -mcpu=cortex-a9 -mtune=cortex-a9 -march=armv7-a -mvectorize-with-neon-quad -mfpu=neon -mfloat-abi=hard -Wno-write-strings -Wno-deprecated conftest.c >&5
/usr/lib/gcc-cross/arm-linux-gnueabihf/4.7/../../../../arm-linux-gnueabihf/bin/ld: cannot find crt1.o: No such file or directory
/usr/lib/gcc-cross/arm-linux-gnueabihf/4.7/../../../../arm-linux-gnueabihf/bin/ld: cannot find crti.o: No such file or directory
collect2: error: ld returned 1 exit status
configure:3674: $? = 1
configure:3712: result: no
So how do I tell it where to find crt1.o for the arm? I tried:
LDFLAGS="-L/home/jps/Development/Platypus/common-deb7/rootfs_of_arm/usr/lib/arm-linux-gnueabihf/"
but it still looked in (according to log):
/usr/lib/gcc-cross/arm-linux-gnueabihf/4.7/../../../../arm-linux-gnueabihf/bin/ld
I am cross compiling on a Intel based Linux Ubuntu system for a Arm iMX6.
And I am having the most basic error on building.
On autoconfigure I do this:
./configure CC=/usr/bin/arm-linux-gnueabihf-gcc-4.7
And I get this:
checking for gcc... /usr/bin/arm-linux-gnueabihf-gcc-4.7
checking whether the C compiler works... no
configure: error: in `/home/jps/Downloads/WolfSSL/wolfssl-4.4.0':
configure: error: C compiler cannot create executables
See `config.log' for more details
That is is the compiler I use for all of the product code we write so I know it works.
No information in config.log
please help
Posts found: 9
Generated in 0.017 seconds (95% PHP - 5% DB) with 5 queries