2

为了在android上使用支持fips的openssl库(在我的例子中是libcrypto.a),我需要在my.so(JNI代码)中链接构建的libcrypto.a。根据openssl fips 2.0 用户手册,应该使用fipsld 来验证和生成hmac 签名。我目前正在使用“ndk-build”链接 libcrypto.a 并生成 my.so,我的问题是,如何将 fipsld 集成到我的 Android.mk 中?

如果使用 Android.mk / ndk-build 很难,我会​​改用 arm-eabi-gcc 链接 libcrypto.a 并创建 my.so。使用 fipsld 的 gcc 方式记录在 openssl fips 用户手册中。任何人都可以为我提供一个构建 .so 链接 .a for android 的示例集(配置/Makefile)的链接。

谢谢

4

1 回答 1

1

无需使用 fipsld,使用构建 fips openssl 共享库

make fips shared --with-fipsdir=xxxxx

并用于ndk-build通过符号链接 libcrypto.so 链接到 libcrypto.so.1.0.0。

于 2012-07-11T14:14:11.700 回答