Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ubuntu 16.04 编译 jni 目录报错 #27

Closed
pan8664716 opened this issue Jul 1, 2016 · 2 comments
Closed

Ubuntu 16.04 编译 jni 目录报错 #27

pan8664716 opened this issue Jul 1, 2016 · 2 comments

Comments

@pan8664716
Copy link

首先编译了GmSSL
然后安装
然后进入jni目录 make
以下是编译信息:
star@star-aigo:~/下载/guanzhi-GmSSL-f881784/jni$ make
javac GmSSL.java
javah -jni GmSSL
gcc -shared -fPIC -Wall -I./jni/ GmSSL.c ../libcrypto.a -o libgmssl.jnilib
/usr/bin/ld: ../libcrypto.a(err.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC
../libcrypto.a: 无法添加符号: 错误的值
collect2: error: ld returned 1 exit status
Makefile:7: recipe for target 'libgmssl.jnilib' failed
make: *** [libgmssl.jnilib] Error 1

另外请问一下,通过jni调用GmSSL是否可以做到 生成密钥对 生成CSR 以及对密钥对进行操作。

谢谢。

@guanzhi
Copy link
Owner

guanzhi commented Jul 1, 2016

目前jni只在Mac编译过,并且Makefile也是针对Mac的,在Linux环境下需要修改,欢迎你提供可用的Linux下的Makefile。

jni目前的接口是支持密钥对生成的,也基本上覆盖了EVP接口的功能,因此可以生成密钥对,以及进行加密签名等操作。暂时还有没有测试的代码,因此也没有测试。

jni目前不支持CSR等证书类的操作,之后是否支持看用户是否有这方面的需求,GmSSL项目期待来自用户的反馈,例如您是个人开发者还是来自某个公司,对GmSSL做何种应用,以及对功能和接口有何种要求。

@github-actions
Copy link

Marked as stale issue. Will be closed later if no activity for a while.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants