Android 上适用于 Apache Harmony 的 OpenSSL
我偶然发现了这个文件 “org_apache_harmony_xnet_provider_jsse_NativeCrypto.cpp”中 Android 的 libcore。
我了解到这个文件似乎是 Apache Harmony 的 JNI 包装器 提供程序用于调用引擎盖下的 openssl 引擎来执行某些操作 其功能包括 ssl、签名验证和摘要 计算。
有人可以帮我澄清以下内容:
1)我想添加一些 printf 语句并在“adb logcat”命令。我尝试在这里和那里添加 printf...在哪里/如何 这些文件被编译了吗?提供了一个 sub.mk(make 文件) 沿着,但谁叫这个呢?
添加 printf 语句后,我刚刚做了一个 android“make”但是 最终我再也没有机会看到这些。我现在该怎么办?
2)Apache使用的openssl的JNI包装器是否仅用于这三个 我说的功能还是还有更多?
如果我必须允许我的应用程序使用 ssl,我是否还必须扩展它 JNI 包装器允许它调用其他算法/函数等(例如 RSA)
提前致谢
I happened to chance upon the file
"org_apache_harmony_xnet_provider_jsse_NativeCrypto.cpp" in the
libcore of android.
I learn that this file seems to be the JNI wrapper that Apache Harmony
provider uses to call the under the hood openssl engine for some of
its functionality like ssl, signature verification and digest
calculation.
Can somebody clarify the following for me:
1) I want to add a few printf statements and see it on the "adb
logcat" command. I tried adding printf here and there... Where/how are
these files getting compiled? There is a sub.mk(make file) provided
along, but who calls this?
After I added the printf statements, I just did an android "make" but
in the end I never get to see these. How do I go about now?
2)Is JNI wrapper for openssl used by Apache only for the three
functionality I said or are there more?
If I have to allow my Apps to use ssl, do I also have to extend this
JNI wrapper to allow it to call other algorithms/functions etc(for eg.
RSA)
Thanks in advance
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
1.
构建:我在顶层执行“mmm -j14 dalvik libcore snod”。您可以进行完全重建,但仅重建您需要的部分会更快。
日志记录:我使用 LOGE("hello %s", "world")。这些东西出现在“adb logcat”中。
2.
我们使用 OpenSSL(通过 NativeCrypto.cpp)和 BouncyCastle 来实现加密内容。您可以使用 java.* API 来请求您想要的算法。
1.
building: i do "mmm -j14 dalvik libcore snod" at the top level. you can do a full rebuild, but it's quicker to just rebuild the bits you need.
logging: i use LOGE("hello %s", "world"). this stuff shows up in "adb logcat".
2.
we use both OpenSSL (via NativeCrypto.cpp) and BouncyCastle to implement the crypto stuff. you can use the java.* APIs to ask for the algorithm you want.