leenjewel / openssl_for_ios_and_android

OpenSSL Library for iOS and Android
921 stars 318 forks source link

Ubuntu 15.04下报错 #13

Open jiek233 opened 7 years ago

jiek233 commented 7 years ago

Configured for linux64-mips64. ./build-openssl4android.sh: 行 56: /home/public/user/openssl/tools/armeabi-android-toolchain/bin/make: cannot execute binary file: 可执行文件格式错误 感觉快要成功了。。。希望能帮下忙,谢谢

jiek233 commented 7 years ago

openssl版本是1.1.0c,ndk是14b

leenjewel commented 7 years ago

你 Linux 系统的版本? 32 or 64 ?什么发行版?

--coding:uft-8 --

class Leen(Object): def init(self): self.NAME = "李寅" self.MSN = "leenjewel@hotmail.com" self.EMAIL = "leenjewel@gmail.com" self.GitHub = "https://github.com/leenjewel" self.Blog = "http://leenjewel.github.io" self.QQ = 99603265

2017-07-17 16:34 GMT+08:00 jiek233 notifications@github.com:

Configured for linux64-mips64. ./build-openssl4android.sh: 行 56: /home/public/user/openssl/ tools/armeabi-android-toolchain/bin/make: cannot execute binary file: 可执行文件格式错误 感觉快要成功了。。。希望能帮下忙,谢谢

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/leenjewel/openssl_for_ios_and_android/issues/13, or mute the thread https://github.com/notifications/unsubscribe-auth/AAHaT0XoGaWrDhV0yfArGRT_xSTQ4_2Pks5sOxyBgaJpZM4OZrZF .

jiek233 commented 7 years ago

是64位,貌似是LTS版

leenjewel commented 7 years ago

从报错信息看说的是 /home/public/user/openssl/tools/armeabi-android-toolchain/bin/make 这个命令,或者说这个二进制可执行文件无法被你的操作系统所识别

--coding:uft-8 --

class Leen(Object): def init(self): self.NAME = "李寅" self.MSN = "leenjewel@hotmail.com" self.EMAIL = "leenjewel@gmail.com" self.GitHub = "https://github.com/leenjewel" self.Blog = "http://leenjewel.github.io" self.QQ = 99603265

2017-07-17 16:44 GMT+08:00 jiek233 notifications@github.com:

是64位,貌似是LTS版

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/leenjewel/openssl_for_ios_and_android/issues/13#issuecomment-315697769, or mute the thread https://github.com/notifications/unsubscribe-auth/AAHaT7k-EqXR9t5ALVwLWbp8TBJvrbgTks5sOx7zgaJpZM4OZrZF .

jiek233 commented 7 years ago

我找了下,发现没有这个文件,/home/public/user/openssl/tools/armeabi-android-toolchain/bin/make,所以很疑惑

leenjewel commented 7 years ago

你是 cd 到构建脚本所在目录并且把下载好的 openssl 文件也放在同目录下面执行的脚本命令么?

--coding:uft-8 --

class Leen(Object): def init(self): self.NAME = "李寅" self.MSN = "leenjewel@hotmail.com" self.EMAIL = "leenjewel@gmail.com" self.GitHub = "https://github.com/leenjewel" self.Blog = "http://leenjewel.github.io" self.QQ = 99603265

2017-07-17 16:48 GMT+08:00 jiek233 notifications@github.com:

我找了下,发现没有这个文件,/home/public/user/openssl/tools/armeabi- android-toolchain/bin/make,所以很疑惑

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/leenjewel/openssl_for_ios_and_android/issues/13#issuecomment-315698620, or mute the thread https://github.com/notifications/unsubscribe-auth/AAHaT7X2eHp2wr97m7SC7KopFSGfxiSjks5sOx_3gaJpZM4OZrZF .

jiek233 commented 7 years ago

不是,是build-openssl4android这个脚本下载的,我只改了其中LIB_NAME="openssl-1.1.0c"

leenjewel commented 7 years ago

_shared.sh 脚本里面你看看,会根据你 NDK 的路径来查找并部署编译环境,可能是这块儿执行的时候出了问题导致的

--coding:uft-8 --

class Leen(Object): def init(self): self.NAME = "李寅" self.MSN = "leenjewel@hotmail.com" self.EMAIL = "leenjewel@gmail.com" self.GitHub = "https://github.com/leenjewel" self.Blog = "http://leenjewel.github.io" self.QQ = 99603265

2017-07-17 16:58 GMT+08:00 jiek233 notifications@github.com:

不是,是build-openssl4android这个脚本下载的,我只改了其中LIB_NAME="openssl-1.1.0c"

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/leenjewel/openssl_for_ios_and_android/issues/13#issuecomment-315700481, or mute the thread https://github.com/notifications/unsubscribe-auth/AAHaT7rGJBtTm3KP_rMONWAn_VkWKJArks5sOyIagaJpZM4OZrZF .

jiek233 commented 7 years ago

您的脚本,我只改了这一处,还有就是执行的时候我是用的bash ./build-openssl4android 因为直接用sh出错了

leenjewel commented 7 years ago

_shard.sh 可能也需要修改,里面有些变量是需要配置的,具体你看看,关于 NDK 路径和 Android 版本的

--coding:uft-8 --

class Leen(Object): def init(self): self.NAME = "李寅" self.MSN = "leenjewel@hotmail.com" self.EMAIL = "leenjewel@gmail.com" self.GitHub = "https://github.com/leenjewel" self.Blog = "http://leenjewel.github.io" self.QQ = 99603265

2017-07-17 17:08 GMT+08:00 jiek233 notifications@github.com:

您的脚本,我只改了这一处,还有就是执行的时候我是用的bash ./build-openssl4android 因为直接用sh出错了

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/leenjewel/openssl_for_ios_and_android/issues/13#issuecomment-315702614, or mute the thread https://github.com/notifications/unsubscribe-auth/AAHaT2invKMmfYmNuYsorCxJeF442-e-ks5sOyScgaJpZM4OZrZF .

jiek233 commented 7 years ago

好的,非常感谢,我再试试

jiek233 commented 7 years ago

需要在配置一遍pathy吗?

leenjewel commented 7 years ago

那些都走的是环境变量

--coding:uft-8 --

class Leen(Object): def init(self): self.NAME = "李寅" self.MSN = "leenjewel@hotmail.com" self.EMAIL = "leenjewel@gmail.com" self.GitHub = "https://github.com/leenjewel" self.Blog = "http://leenjewel.github.io" self.QQ = 99603265

2017-07-17 17:28 GMT+08:00 jiek233 notifications@github.com:

需要在配置一遍pathy吗?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/leenjewel/openssl_for_ios_and_android/issues/13#issuecomment-315707050, or mute the thread https://github.com/notifications/unsubscribe-auth/AAHaT4WzpPQ30iW6Rc5Uw7xzeJfJ9e3Hks5sOylZgaJpZM4OZrZF .

jiek233 commented 7 years ago

可否帮一个忙,我试了很久,用openssl加密socket通信,使用JNI,可以一直失败,可以帮忙写一个Demo?md5使用JNI我调用时没有问题,就是在加密socket通信时报错,我参考的c代码是周立发的c Demo,我注意到那个是07年的代码了,但是网上我又找不到其他的关于openssl加密socket的代码。非常感谢

leenjewel commented 7 years ago

你是想通过什么方式来加密 Socket 通信数据呢?

jiek233 commented 7 years ago

通过使用公钥和私钥,openssl生成的,c代码我跑了一下,跑起来了,就是jni一直失败,c代码是这里的http://www.linuxidc.com/Linux/2011-04/34523.htm 非常感谢

jiek233 commented 7 years ago

大神?