-
Notifications
You must be signed in to change notification settings - Fork 37
/
README
73 lines (50 loc) · 2.55 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
Installing wolfJSSE into Android OSP as a System Security Provider
--------------------------------------------------------------------------------
This directory contains a script and support files required when installing
wolfJSSE into an Android OSP (AOSP) source tree as a system security provider.
Files included in this directory:
jsse_install.sh - Script to install wolfSSL and wolfSSL JNI source files into
Android AOSP source tree.
wolfssl/ - Directory containing Android.mk and CleanSpec.mk files to be placed
in "<android_aosp>/external/wolfssl" directory. Used by
jsse_install.sh
wolfssljni/ - Directory containing Android.mk file to be placed in
<android_aosp>/external/wolfssljni" directory. Used by
jsse_install.sh
For instructions on installing wolfJSSE as a Android security provider, please
reference the document titled:
"Installing a JSSE Provider in Android OSP" by wolfSSL
Printing Debug Messages to Android adb logcat
--------------------------------------------------------------------------------
By default, the wolfJSSE debug logging mechanism prints debug messages using
System.out.println(). If you would rather use the android logging API, a few
minor changes can be made to the wolfJSSE source and Android.mk build file:
1. Changes to <wolfssljni>/src/java/com/wolfssl/provider/jse/WolfSSLDebug.java
a) Add an import for "import android.util.Log"
b) Add a static TAG variable to be used with the Log.*() methods, ex:
public class WolfSSLDebug {
private static final String TAG = "WolfJSSE";
...
}
c) Change the print line in WolfSSLDebug.log() to call one of the Android
log methods. For example, if using the info method:
public static void log(Class cl, String tag, String string) {
if (DEBUG) {
Log.i(TAG, tag + " : " + cl.getSimpleName() + " : " + string);
}
}
2. Changes to <wolfssljni>/platform/android_aosp/wolfssljn/Android.mk
a) Add "-llog" to LOCAL_LDFLAGS
b) Add "liblog" to LOCAL_SHARED_LIBRARIES
For example (Android.mk):
# Create wolfSSL JNI native library
...
LOCAL_LDFLAGS := -llog
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/native
LOCAL_SHARED_LIBRARIES := libwolfssl liblog
...
include $(BUILD_SHARED_LIBRARY)
Support:
--------------------------------------------------------------------------------
Please email [email protected] with any questions or inquiries.
Copyright (C) 2022 wolfSSL Inc.