-
Notifications
You must be signed in to change notification settings - Fork 565
Description
Steps to Reproduce
I did this under Linux but I guess it is the same under Windows:
- msbuild an Xamarin.Android project with target Debug / SignAndroidPackage
- msbuild task _CreateAndroidDebugSigningKey calls into AndroidDebugKey
- AndroidDebugKey calls keytool with something like: /usr/bin/keytool -genkeypair -alias androiddebugkey -storepass android -keypass android -keystore "..debug.keystore" -dname "CN=Android Debug,O=Android,C=US" -keyalg RSA -validity 10950
Expected Behavior
Debug APK is signed with an accepted algorithm. Refer to this page:
http://www.oracle.com/technetwork/java/javase/8u131-relnotes-3565278.html
Actual Behavior
The value "RSA" for parameter keyalg leads to a signed APK which is considered not signed right after creation. Output of:
jarsigner -verify -verbose -certs ./bin/Android/AnyCPU/Release/some-Signed.apk
shows:
Signed by "CN=Android Debug, O=Android, C=US"
Digest algorithm: SHA1
Signature algorithm: MD5withRSA (weak), 2048-bit key
WARNING: The jar will be treated as unsigned, because it is signed with a weak algorithm that is now disabled by the security property:
jdk.jar.disabledAlgorithms=MD2, MD5, RSA keySize < 1024, DSA keySize < 1024
Version Information
Tried with:
java version "1.8.0_161"
Java(TM) SE Runtime Environment (build 1.8.0_161-b12)
Java HotSpot(TM) 64-Bit Server VM (build 25.161-b12, mixed mode)
xamarin-android build version 8.3.99.19