I have cross-compiled openssl-1.0.2k on ubuntu before and used the following script to implement it: #./config --prefix=/opt/openssl --cross-compile-prefix=arm-linux-gnueabihf- no-asm shared
sed -i "s/ -m64//g" Makefile
make
make install
After much exploration, I finally found the reason: Configure should be used to configure the target platform! The new compilation script is as follows:
./Configure --prefix=/opt/openssl --cross-compile-prefix=arm-linux-gnueabihf- no-asm shared linux-armv4 make make install
Because it is an arm device, the target platform is configured here as linux-armv4. The compilation method for other platforms is similar. Use ./Configure --help to display all supported platforms.
In addition, when specifying the arm platform, the unsupported m64 option will not appear in the Makefile, so there is no need to delete it.
After using the new compilation method, both gmssl and openssl-1.1.1 can work normally on arm devices.
GmSSL-Go is the Go language interface bindingof the GmSSL library.
Provides functions such as cryptographic algorithms, X.509 certificates, SSL protocols, and Engine for Go language applications.GmSSL-Go uses CGO to encapsulate the high-level interface of GmSSL as a Go language component. It is a lightweight middle layer loosely coupled with the GmSSL library. All cryptographic functions are provided by the underlying GmSSL library provided.
Why use GmSSL-GoAlthough the official library of Go language provides commonly used cryptographic algorithm packages and SSL protocol packages, there are also some third-party pure Go languages Cryptocurrency library, integrating GmSSL-Go in the project still has many irreplaceable advantages: GmSSL-Go provides complete and rich support for national encryption algorithms, certificates and SSL protocols through the underlying GmSSL library.
GmSSL-Go can provide system security, availability and password compliance through Engine objects that meet domestic hardware cryptographic devices such as U-shields and PCI-E encryption cards that meet national cryptographic standards.
GmSSL-Go uses the CGO method to call the cryptographic algorithm implementation of the GmSSL library. Compared with the pure Go language implementation, it has performance advantages in cryptographic algorithms. Please refer to the GmSSL Benchmark.
The functions and performance of GmSSL-Go have been continuously improved with the upgrade of GmSSL.
The above is the detailed content of golang gmssl fails to compile. For more information, please follow other related articles on the PHP Chinese website!