openssl: rsa_ossl_public_decrypt "data too large for modulus"
I am trying to cross compile openssl for linux based arm processor (MT7688). After STEP 4 , I got the following.
root@mylinkit:/tmp# ./testhttp
* Trying 151.101.88.133...
* TCP_NODELAY set
* Connected to raw.githubusercontent.com (151.101.88.133) port 443 (#0)
* ALPN, offering http/1.1
* error:04067084:rsa routines:rsa_ossl_public_decrypt:data too large for modulus
* Closing connection 0
curl_easy_perform() failed: SSL connect error
system:
name: "ubuntu"
version: 14.04.5 LTS
type: "vmware"
arhitecture:"x86_64"
mipsel-openwrt-linux-gcc:
version: 4.8.3
arhitecture: "mips"
openssl:
version: 1.1.1 pre8
libcurl:
version: 7.61.0
libcurl access https steps
STEP 1 (openssl)
CC=mipsel-openwrt-linux-gcc ./config &&\
no-asm no-async shared --prefix=/home/wei/openssl &&\
--openssldir=/home/wei/openssl-1.1.1-pre8/ssl &&\
CFLAGS="-DOPENSSL_NO_STATIC_ENGINE"
delete two "-m64" in Makefile, save exit.
make clean && make && make install
STEP 2 (libcurl)
./configure --with-ssl=/home/wei/openssl &&\
--host=mipsel-openwrt-linux CC=mipsel-openwrt-linux-gcc &&\
--with-random=/dev/urandom LDFLAGS="-lpthread -ldl"
make clean && make && make install
STEP 3
copy libcrypto.so.1.1, libssl.so.1.1, libcurl.so.4.5.0 three files to arm processor(MT7688) /usr/lib,
delete the old files and links(libcurl.so.4.3.0,libssl.so.1.0.0).
STEP 4
cross comiple testhttps.c, RUN ./testhttp on MT7668.
testhttps.c compile CMD is:
mipsel-openwrt-linux-gcc testhttps.c -o testhttp &&\
-I /home/wei/curl-7.61.0/include &&\
-lcurl -lssl -lcrypto -lpthread -ldl
or
curl -i -k https://raw.githubusercontent.com/kevinlovejia/xixi-s-garden/master/test.txt will get the same error, error:04067084:rsa routines:rsa_ossl_public_decrypt:data too large for modulus
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Comments: 19 (10 by maintainers)
Try this: