Statistics
| Branch: | Tag: | Revision:

trustedintents / test / src @ master

Name Size Revision Age Author Comment
  com 01534004 over 3 years Hans-Christoph Steiner include fingerprints in ApkSignaturePins as a w...
  info 1bafa22f over 3 years Hans-Christoph Steiner tests: make package lists reusable by other tes...

Latest revisions

# Date Author Comment
1bafa22f 07/30/2014 10:41 pm Hans-Christoph Steiner

tests: make package lists reusable by other test classes

43e05883 07/30/2014 10:27 pm Hans-Christoph Steiner

add basic test of sending Intents with package/ComponentName set

This actually runs the Intent through startActivity(), so that method is
provided by ActivityUnitTestCase so it might not actually do anything.

d293996c 07/30/2014 08:03 pm Hans-Christoph Steiner

tests: use list of actually installed packages for tests

The tests includes lists of possible package names, now this creates a list
from those lists of the packages that are actually installed. That will
make the tests run reliably on various devices and emulators.

ab803404 07/18/2014 04:05 am Hans-Christoph Steiner

tests: get TrustedIntents instance in setUp()

Most of the tests need an instance, and it should be cleared each time.

b876bccb 07/18/2014 04:05 am Hans-Christoph Steiner

add methods to remove Trusted Signers test if ApkSignaturePins are trusted

Since TrustedIntents is a singleton, there needs to be a way to remove
items from the list of trusted pins. Getting the instance will inherit any
pins that were set in the past by a given app.

1d5606ab 07/18/2014 04:05 am Hans-Christoph Steiner

test that addTrustedSigner() will not accept ApkSignaturePin.class

aeb2e7e5 07/18/2014 04:05 am Hans-Christoph Steiner

addTrustedSigner() returns whether add was successful or not

At the very least, this is useful in the tests.

76c3ca66 07/18/2014 04:05 am Hans-Christoph Steiner

isReceiverTrusted() and isIntentSane() check getComponent() for packageName

The packageName can be set with setPackage(), setClassName() or setClass().

  • getPackage() returns what is set by setPackage()
  • getComponent() returns what is set by setClassName() and setClass()
3c4d3da0 07/18/2014 04:05 am Hans-Christoph Steiner

make addTrustedSigner's argument a Class rather than ApkSignaturePin

There is no sense in anyone instantiating the class since it is in effect a
singleton, and the only instance methods are for validating that the
certificate matches the fingerprint. Using a Class as an argument mirrors...

89f16a42 06/24/2014 08:36 pm Hans-Christoph Steiner

isReceiverTrusted() for checking an Intent before calling startActivity()

Set up APK signature pins using addTrustedSigner() then check Intents using
checkTrustedSigner() before using them in startActivity()/etc. This is the
first model for how to check that the Intent is going to the right receiver

View revisions

Also available in: Atom