
NPort 5000 Series User Manual
152
3.
The OpenSSL needs to be configured before executing the “make” command.
NOTE
The <openssl-arm> and <ssl-arm> are the folders that were created in the previous instruction. The
cross-compiler toolchain "arm-linux-gnueabihf-" is used for the Moxa UC-serial computer.
$ cd openssl
$ setarch i386 ./config no-asm no-shared enable-ssl3 enable-ssl3-method
enable-tls1_3 --prefix=<openssl-arm> --openssldir=<ssl-arm> --cross-compile-
prefix=arm-linux-gnueabihf-
4.
Next, make and install the OpenSSL:
$ make
$ make install_sw
Finally, the headers and libraries will be constructed in the following hierarchy:
openssl-arm
├──
bin
├──
include
└──
lib
├──
engines
├──
libcrypto.a
├──
libssl.a
└──
pkgconfig
The following command is to build npreal2d with secure mode:
$ arm-linux-gnueabihf-gcc -c ${CFLAGS} -DNO_INIT -DSSL_ON -DOPENSSL_NO_KRB5
npreal2d.c -I/home/user/openssl-lib/openssl-arm/include
If polling mode is preferred, change “${CFLAGS}” to “-DOFFLINE_POLLING”.
$ arm-linux-gnueabihf-gcc npreal2d.o -o npreal2d -lssl -lcrypto -ldl -lpthread -
L/home/user/openssl-lib/openssl-arm/lib/ -I/home/user/openssl-lib/openssl-
arm/include
The npreal2d binary will be generated.
NOTE
Only the npreal2d requires OpenSSL library; other binaries should follow Section “Manually build the Real
TTY driver with a cross-compiler”.
NOTE
The secure mode is supported only if the NPort 6000 enables it. Please refer to NPort 6000 Series User
Manual to configure secure mode in the NPort 6000.