remove gpg signing from ant build, its in ./make-release-build now
make-release-build: strip and gpg-sign when those are available
fix getIntentFromTrustedSender() to actually use the sending packageName
It was getting the recipient's packageName, not the sender's. The Intentdoes not include the sender's packageName, that has to be fetched usingActivity.getCallingActivity().
Thanks to @grote for finding this.
make-release-build: remove faketime, it only causes problems
Its freezing forever and doesn't provide perfect timestamp reproducibility
make getIntentFromTrustedSender return null if anything goes wrong
Instead of throwing an Exception, just return null. That makes this behavemore like Activity.getIntent() and the related patterns.
move library into its own gradle-style dir
add example app
Includes this as the app icon:https://commons.wikimedia.org/wiki/File:Geogebra.svg
include signing key pin for Amnesty iilab Panic Button
exclude generated BuildConfig from jar, its unneeded and conflicts
include all static pin files in the release jar
do not include timestamp in javadoc to aid reproducibility
generate the .pom file as part of ./make-release-build
fix warnings in javadoc
make-release-build setup with ant custom rules
setup-ant: find ANDROID_HOME and Android SDK target
add more javadoc!
document how LGPL works with Java
do not put timestamps in javadoc-generated files
This aids reproducible builds: besides the timestamp, `javadoc` will createthe exact same files across different machines, java versions, etc.
implement TrustedIntents.getIntentFromTrustedSender() instance method
The idea is to mimic Activity.getIntent(), but check that the Intent isfrom a packageName that is trusted. The difference from getIntent() isthat this one throws Exceptions that must be caught.
tests: make package lists reusable by other test classes
add basic test of sending Intents with package/ComponentName set
This actually runs the Intent through startActivity(), so that method isprovided by ActivityUnitTestCase so it might not actually do anything.
split out trust check based on packageName into separate method
This allows this method to be reused, like for isSenderTrusted().
tests: use list of actually installed packages for tests
The tests includes lists of possible package names, now this creates a listfrom those lists of the packages that are actually installed. That willmake the tests run reliably on various devices and emulators.
store PackageManager in static var so it can be used in static methods
Android has some design patterns that based on static methods, likeIntent.createChooser(), that this library should mirror. In order toimplement those, they will need access to a PackageManager instance, so...
tests: get TrustedIntents instance in setUp()
Most of the tests need an instance, and it should be cleared each time.
add methods to remove Trusted Signers test if ApkSignaturePins are trusted
Since TrustedIntents is a singleton, there needs to be a way to removeitems from the list of trusted pins. Getting the instance will inherit anypins that were set in the past by a given app.
test that addTrustedSigner() will not accept ApkSignaturePin.class
addTrustedSigner() returns whether add was successful or not
At the very least, this is useful in the tests.
isReceiverTrusted() and isIntentSane() check getComponent() for packageName
The packageName can be set with setPackage(), setClassName() or setClass().
ApkSignaturePin: remove useless and unused getSHA256Fingerprint argument
getFingerprint() accesses the instance variable directly for the data.
make addTrustedSigner's argument a Class rather than ApkSignaturePin
There is no sense in anyone instantiating the class since it is in effect asingleton, and the only instance methods are for validating that thecertificate matches the fingerprint. Using a Class as an argument mirrors...
startActivity() comes from Context not Activity
Reflect this reality in TrustedIntents.startActivity()
make startActivity() handle both setPackage() and setClassName()
An Intent can be targeted using both setPackage() and setClassName().setPackage() narrows down the possible recipients to a given packageName,while setClassName() set the specific Activity in an app to send to. The...
include pin: Tor Project RSA 1024-bit signing key
include pin: Guardian Project RSA 4096-bit signing key
include pin: Guardian Project RSA 1024-bit original signing key
setup-ant: use a CURDIR variable
add missing res/ folder from test project
add script for Jenkins build
Having everything in a script makes it easier to maintain. Jenkins thenruns the ant commands itself.
script to do android ant configuration
add `ant javadoc` to generate javadoc for FDroid sources
run JUnit tests using android-junit-report to get XML output
Jenkins needs some kind of report from the JUnit tests in order to tellwhether the tests succeeded or not. android-junit-report is a library to doexactly that. With this setup, Jenkins should now successfully understand the...
link to trusted intents blog post in README
add TrustedIntents.startActivity(Intent intent) convenience method
This is another way of calling it that might make more sense to some people
isReceiverTrusted() for checking an Intent before calling startActivity()
Set up APK signature pins using addTrustedSigner() then check Intents usingcheckTrustedSigner() before using them in startActivity()/etc. This is thefirst model for how to check that the Intent is going to the right receiver
include fingerprints in ApkSignaturePins as a way to double-check
The original source that generates the ApkSignaturePin subclass can includea SHA-256 fingerprint of that certificate to, if they are unsure of theprocess of converting into a byte[][] in Java code. Then the byte[][] can...
add tests for signature equality method
finalize APK signature superclass as ApkSignaturePin
This class is used when generating a Pin against an APK signature. The pinis a subclass of info.guardianproject.trustedintents.ApkSignaturePin.
added android test project skeleton
first sketch of base classes
project skeleton
add README and LICENSE
(1-52/52) Per page: 25, 50, 100, 250
Also available in: Atom