NEW: totally updated the cFlags now supports more ciphers and key gen
This commit is contained in:
parent
cfa892c8f6
commit
ff2b314b53
|
@ -3,6 +3,14 @@ WolfSSL Source Notes
|
|||
====================
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
C Code Notes
|
||||
============
|
||||
|
||||
wolfcrypt (all the c files)
|
||||
----------------------------
|
||||
|
||||
|
|
|
@ -0,0 +1,52 @@
|
|||
==========================
|
||||
Weekly Progress 2019-03-01
|
||||
==========================
|
||||
|
||||
WORKING
|
||||
=======
|
||||
|
||||
* adding crypto functionality
|
||||
- adding tests
|
||||
|
||||
|
||||
NOTES
|
||||
=====
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
ISSUES
|
||||
======
|
||||
|
||||
|
||||
MakeRsaKey : Feature not compiled in
|
||||
------------------------------------
|
||||
|
||||
MakeRsaKey()
|
||||
https://www.wolfssl.com/doxygen/group__RSA.html#ga3f89eea8d56ae352730ffd49ec2fd68e
|
||||
|
||||
#ifdef WOLFSSL_KEY_GEN
|
||||
|
||||
|
||||
E/AndroidRuntime: FATAL EXCEPTION: main
|
||||
Process: io.malloc.ccc.android.mytest, PID: 24791
|
||||
com.wolfssl.wolfcrypt.WolfCryptException: Feature not compiled in
|
||||
at com.wolfssl.wolfcrypt.Rsa.MakeRsaKey(Native Method)
|
||||
at com.wolfssl.wolfcrypt.Rsa.makeKey(Rsa.java:135)
|
||||
at io.malloc.ccc.android.nc.RsaTest.testEncDec(RsaTest.java:41)
|
||||
at io.malloc.ccc.android.ui.MainActivity$1.onClick(MainActivity.java:40)
|
||||
at android.view.View.performClick(View.java:5637)
|
||||
at android.view.View$PerformClick.run(View.java:22429)
|
||||
at android.os.Handler.handleCallback(Handler.java:751)
|
||||
at android.os.Handler.dispatchMessage(Handler.java:95)
|
||||
at android.os.Looper.loop(Looper.java:154)
|
||||
at android.app.ActivityThread.main(ActivityThread.java:6119)
|
||||
at java.lang.reflect.Method.invoke(Native Method)
|
||||
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:886)
|
||||
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:776)
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
// include this at the top, for shared libraries
|
||||
// include ':wolfssl-lib'
|
||||
include ':wolfssl-lib'
|
||||
// include ':wolfssl-jni'
|
||||
include ':ccc-jni'
|
||||
|
|
|
@ -17,15 +17,23 @@ android {
|
|||
arguments '-DANDROID_PLATFORM=android-23',
|
||||
'-DANDROID_TOOLCHAIN=clang'
|
||||
// Sets optional flags for the C compiler.
|
||||
// Some defines are located here:
|
||||
// https://www.wolfssl.com/docs/wolfssl-manual/ch2/
|
||||
// Others were found in the source code, for example "#ifndef WOLFCRYPT_ONLY" in internal.c
|
||||
cFlags \
|
||||
'-D_POSIX_THREADS', '-DNDEBUG',
|
||||
'-DPERSIST_SESSION_CACHE', '-DPERSIST_CERT_CACHE', '-DATOMIC_USER',
|
||||
'-DHAVE_PK_CALLBACKS', '-DNO_DSA',
|
||||
'-DNO_MD4', '-DNO_HC128', '-DNO_RABBIT',
|
||||
'-DHAVE_OCSP', '-DHAVE_CRL', '-DWOLFSSL_JNI', '-DHAVE_DH',
|
||||
'-Wall'
|
||||
// explicitly build libs
|
||||
//targets 'wolfssl'
|
||||
'-DWOLFCRYPT_ONLY',
|
||||
'-DNO_DSA', '-DNO_MD4', '-DHAVE_CURVE25519',
|
||||
'-DHAVE_ED25519', '-DHAVE_ECC', '-DHAVE_POLY1305',
|
||||
'-DHAVE_CHACHA', '-DHAVE_CAMELLIA', '-DHAVE_AESGCM',
|
||||
'-DHAVE_AESCCM', '-DWOLFSSL_SHA512', '-DWOLFSSL_RIPEMD',
|
||||
'-DWOLFSSL_KEY_GEN', '-DHAVE_HC128'
|
||||
|
||||
|
||||
// ARMv8 hardware acceleration
|
||||
// '-DWOLFSSL_ARMASM'
|
||||
|
||||
// x86
|
||||
// '-DWOLFSSL_AESNI'
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -0,0 +1,57 @@
|
|||
apply plugin: 'com.android.library'
|
||||
|
||||
android {
|
||||
compileSdkVersion 28
|
||||
// a default can be used, but it is good practice to explicitly select build tools
|
||||
buildToolsVersion '28.0.3'
|
||||
|
||||
defaultConfig {
|
||||
// applicationId 'xyz.nc.android.wc'
|
||||
minSdkVersion 23
|
||||
targetSdkVersion 28
|
||||
versionCode 1
|
||||
versionName '1.0'
|
||||
|
||||
externalNativeBuild {
|
||||
cmake {
|
||||
arguments '-DANDROID_PLATFORM=android-23',
|
||||
'-DANDROID_TOOLCHAIN=clang'
|
||||
// Sets optional flags for the C compiler.
|
||||
// Some defines are located here:
|
||||
// https://www.wolfssl.com/docs/wolfssl-manual/ch2/
|
||||
// Others were found in the source code, for example "#ifndef WOLFCRYPT_ONLY" in internal.c
|
||||
cFlags \
|
||||
'-DWOLFCRYPT_ONLY',
|
||||
'-DNO_DSA', '-DNO_MD4', '-DHAVE_CURVE25519',
|
||||
'-DHAVE_ED25519', '-DHAVE_ECC', '-DHAVE_POLY1305',
|
||||
'-DHAVE_CHACHA', '-DHAVE_CAMELLIA', '-DHAVE_AESGCM',
|
||||
'-DHAVE_AESCCM', '-DWOLFSSL_SHA512', '-DWOLFSSL_RIPEMD',
|
||||
'-DWOLFSSL_KEY_GEN', '-DHAVE_HC128'
|
||||
|
||||
|
||||
// ARMv8 hardware acceleration
|
||||
// '-DWOLFSSL_ARMASM'
|
||||
|
||||
// x86
|
||||
// '-DWOLFSSL_AESNI'
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
flavorDimensions "arch"
|
||||
productFlavors {
|
||||
arm8 {
|
||||
dimension "arch"
|
||||
}
|
||||
x86 {
|
||||
dimension "arch"
|
||||
}
|
||||
}
|
||||
|
||||
externalNativeBuild {
|
||||
cmake {
|
||||
path 'CMakeLists.txt'
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue