Home
last modified time | relevance | path

Searched refs:appInstallMetadata (Results 1 – 17 of 17) sorted by relevance

/aosp14/frameworks/base/core/tests/coretests/src/android/content/integrity/
H A DCompoundFormulaTest.java102 AppInstallMetadata appInstallMetadata = in testFormulaMatches_notFalse_true() local
109 assertThat(compoundFormula.matches(appInstallMetadata)).isTrue(); in testFormulaMatches_notFalse_true()
114 AppInstallMetadata appInstallMetadata = in testFormulaMatches_notTrue_false() local
129 AppInstallMetadata appInstallMetadata = in testFormulaMatches_trueAndTrue_true() local
143 AppInstallMetadata appInstallMetadata = in testFormulaMatches_trueAndFalse_false() local
156 AppInstallMetadata appInstallMetadata = in testFormulaMatches_falseAndTrue_false() local
169 AppInstallMetadata appInstallMetadata = in testFormulaMatches_falseAndFalse_false() local
182 AppInstallMetadata appInstallMetadata = in testFormulaMatches_trueOrTrue_true() local
195 AppInstallMetadata appInstallMetadata = in testFormulaMatches_trueOrFalse_true() local
208 AppInstallMetadata appInstallMetadata = in testFormulaMatches_falseOrTrue_true() local
[all …]
H A DInstallerAllowedByManifestFormulaTest.java40 AppInstallMetadata appInstallMetadata = getAppInstallMetadataBuilder() in testFormulaMatches_installerAndCertBothInManifest() local
48 assertThat(FORMULA.matches(appInstallMetadata)).isTrue(); in testFormulaMatches_installerAndCertBothInManifest()
53 AppInstallMetadata appInstallMetadata = getAppInstallMetadataBuilder() in testFormulaMatches_installerAndCertDoesNotMatchInManifest() local
61 assertThat(FORMULA.matches(appInstallMetadata)).isFalse(); in testFormulaMatches_installerAndCertDoesNotMatchInManifest()
66 AppInstallMetadata appInstallMetadata = getAppInstallMetadataBuilder() in testFormulaMatches_installerNotInManifest() local
74 assertThat(FORMULA.matches(appInstallMetadata)).isFalse(); in testFormulaMatches_installerNotInManifest()
79 AppInstallMetadata appInstallMetadata = getAppInstallMetadataBuilder() in testFormulaMatches_certificateDoesNotMatchManifest() local
87 assertThat(FORMULA.matches(appInstallMetadata)).isFalse(); in testFormulaMatches_certificateDoesNotMatchManifest()
92 AppInstallMetadata appInstallMetadata = getAppInstallMetadataBuilder() in testFormulaMatches_emptyManifest() local
97 assertThat(FORMULA.matches(appInstallMetadata)).isTrue(); in testFormulaMatches_emptyManifest()
[all …]
H A DAtomicFormulaTest.java252 AppInstallMetadata appInstallMetadata = in testFormulaMatches_string_packageNameFormula_true() local
264 AppInstallMetadata appInstallMetadata = in testFormulaMatches_string_packageNameFormula_false() local
275 AppInstallMetadata appInstallMetadata = in testFormulaMatches_string_multipleAppCertificates_true() local
289 AppInstallMetadata appInstallMetadata = in testFormulaMatches_string_multipleAppCertificates_false() local
303 AppInstallMetadata appInstallMetadata = in testFormulaMatches_string_multipleAppCertificateLineage_true() local
317 AppInstallMetadata appInstallMetadata = in testFormulaMatches_string_multipleAppCertificateLineage_false() local
331 AppInstallMetadata appInstallMetadata = in testFormulaMatches_string_multipleInstallerCertificates_true() local
346 AppInstallMetadata appInstallMetadata = in testFormulaMatches_string_multipleInstallerCertificates_false() local
428 AppInstallMetadata appInstallMetadata = in testFormulaMatches_long_eq_true() local
439 AppInstallMetadata appInstallMetadata = in testFormulaMatches_long_eq_false() local
[all …]
/aosp14/frameworks/base/core/java/android/content/integrity/
H A DInstallerAllowedByManifestFormula.java62 public boolean matches(AppInstallMetadata appInstallMetadata) { in matches() argument
64 appInstallMetadata.getAllowedInstallersAndCertificates(); in matches()
67 appInstallMetadata, allowedInstallersAndCertificates); in matches()
86 AppInstallMetadata appInstallMetadata, in installerInAllowedInstallersFromManifest() argument
88 String installerPackage = appInstallMetadata.getInstallerName(); in installerInAllowedInstallersFromManifest()
97 return appInstallMetadata.getInstallerCertificates() in installerInAllowedInstallersFromManifest()
100 .get(appInstallMetadata.getInstallerName())); in installerInAllowedInstallersFromManifest()
H A DAtomicFormula.java211 public boolean matches(AppInstallMetadata appInstallMetadata) { in matches() argument
303 return appInstallMetadata.getVersionCode(); in getLongMetadataValue()
417 public boolean matches(AppInstallMetadata appInstallMetadata) { in matches() argument
488 AppInstallMetadata appInstallMetadata, int key) { in getMetadataValue() argument
493 return appInstallMetadata.getAppCertificates(); in getMetadataValue()
495 return appInstallMetadata.getInstallerCertificates(); in getMetadataValue()
501 return appInstallMetadata.getAppCertificateLineage(); in getMetadataValue()
592 public boolean matches(AppInstallMetadata appInstallMetadata) { in matches() argument
658 AppInstallMetadata appInstallMetadata, int key) { in getBooleanMetadataValue() argument
661 return appInstallMetadata.isPreInstalled(); in getBooleanMetadataValue()
[all …]
H A DCompoundFormula.java119 public boolean matches(AppInstallMetadata appInstallMetadata) { in matches() argument
122 return !getFormulas().get(0).matches(appInstallMetadata); in matches()
125 .allMatch(formula -> formula.matches(appInstallMetadata)); in matches()
128 .anyMatch(formula -> formula.matches(appInstallMetadata)); in matches()
H A DIntegrityFormula.java189 public abstract boolean matches(AppInstallMetadata appInstallMetadata); in matches() argument
/aosp14/frameworks/base/services/tests/servicestests/src/com/android/server/integrity/parser/
H A DRuleIndexingControllerTest.java53 AppInstallMetadata appInstallMetadata = in verifyIndexRangeSearchIsCorrect() local
61 indexingController.identifyRulesToEvaluate(appInstallMetadata); in verifyIndexRangeSearchIsCorrect()
76 AppInstallMetadata appInstallMetadata = in verifyIndexRangeSearchIsCorrect_multipleAppCertificates() local
84 indexingController.identifyRulesToEvaluate(appInstallMetadata); in verifyIndexRangeSearchIsCorrect_multipleAppCertificates()
100 AppInstallMetadata appInstallMetadata = in verifyIndexRangeSearchIsCorrect_keysInFirstAndLastBlock() local
108 indexingController.identifyRulesToEvaluate(appInstallMetadata); in verifyIndexRangeSearchIsCorrect_keysInFirstAndLastBlock()
123 AppInstallMetadata appInstallMetadata = in verifyIndexRangeSearchIsCorrect_keysMatchWithValues() local
131 indexingController.identifyRulesToEvaluate(appInstallMetadata); in verifyIndexRangeSearchIsCorrect_keysMatchWithValues()
156 AppInstallMetadata appInstallMetadata = in verifyIndexRangeSearchIsCorrect_noIndexesAvailable() local
164 indexingController.identifyRulesToEvaluate(appInstallMetadata); in verifyIndexRangeSearchIsCorrect_noIndexesAvailable()
/aosp14/frameworks/base/services/core/java/com/android/server/integrity/engine/
H A DRuleEvaluationEngine.java67 AppInstallMetadata appInstallMetadata) { in evaluate() argument
68 List<Rule> rules = loadRules(appInstallMetadata); in evaluate()
69 return RuleEvaluator.evaluateRules(rules, appInstallMetadata); in evaluate()
72 private List<Rule> loadRules(AppInstallMetadata appInstallMetadata) { in loadRules() argument
79 return mIntegrityFileManager.readRules(appInstallMetadata); in loadRules()
H A DRuleEvaluator.java50 List<Rule> rules, AppInstallMetadata appInstallMetadata) { in evaluateRules() argument
55 .filter(rule -> rule.getFormula().matches(appInstallMetadata)) in evaluateRules()
/aosp14/frameworks/base/services/tests/servicestests/src/com/android/server/integrity/
H A DAppIntegrityManagerServiceImplTest.java327 assertEquals(PACKAGE_NAME, appInstallMetadata.getPackageName()); in handleBroadcast_correctArgs()
331 assertEquals(VERSION_CODE, appInstallMetadata.getVersionCode()); in handleBroadcast_correctArgs()
332 assertFalse(appInstallMetadata.isPreInstalled()); in handleBroadcast_correctArgs()
334 assertFalse(appInstallMetadata.isStampPresent()); in handleBroadcast_correctArgs()
335 assertFalse(appInstallMetadata.isStampVerified()); in handleBroadcast_correctArgs()
336 assertFalse(appInstallMetadata.isStampTrusted()); in handleBroadcast_correctArgs()
337 assertNull(appInstallMetadata.getStampCertificateHash()); in handleBroadcast_correctArgs()
365 assertThat(appInstallMetadata.getAppCertificates()) in handleBroadcast_correctArgs_multipleCerts()
388 assertTrue(appInstallMetadata.isStampPresent()); in handleBroadcast_correctArgs_sourceStamp()
389 assertTrue(appInstallMetadata.isStampVerified()); in handleBroadcast_correctArgs_sourceStamp()
[all …]
H A DIntegrityFileManagerTest.java141 AppInstallMetadata appInstallMetadata = in testGetRules() local
151 List<Rule> rulesFetched = mIntegrityFileManager.readRules(appInstallMetadata); in testGetRules()
183 AppInstallMetadata appInstallMetadata = in testGetRules_indexedForManyRules() local
194 List<Rule> rulesFetched = mIntegrityFileManager.readRules(appInstallMetadata); in testGetRules_indexedForManyRules()
/aosp14/frameworks/base/services/core/java/com/android/server/integrity/parser/
H A DRuleIndexingController.java58 public List<RuleIndexRange> identifyRulesToEvaluate(AppInstallMetadata appInstallMetadata) { in identifyRulesToEvaluate() argument
64 sPackageNameBasedIndexes, appInstallMetadata.getPackageName())); in identifyRulesToEvaluate()
67 for (String appCertificate : appInstallMetadata.getAppCertificates()) { in identifyRulesToEvaluate()
/aosp14/frameworks/base/services/core/java/com/android/server/integrity/
H A DAppIntegrityManagerServiceImpl.java329 AppInstallMetadata appInstallMetadata = builder.build(); in handleIntegrityVerification() local
335 + appInstallMetadata in handleIntegrityVerification()
339 IntegrityCheckResult result = mEvaluationEngine.evaluate(appInstallMetadata); in handleIntegrityVerification()
352 appInstallMetadata.getVersionCode(), in handleIntegrityVerification()
504 private void extractSourceStamp(Uri dataUri, AppInstallMetadata.Builder appInstallMetadata) { in extractSourceStamp() argument
526 appInstallMetadata.setIsStampPresent(sourceStampVerificationResult.isPresent()); in extractSourceStamp()
527 appInstallMetadata.setIsStampVerified(sourceStampVerificationResult.isVerified()); in extractSourceStamp()
529 appInstallMetadata.setIsStampTrusted(sourceStampVerificationResult.isVerified()); in extractSourceStamp()
537 appInstallMetadata.setStampCertificateHash(getHexDigest(certificateDigest)); in extractSourceStamp()
H A DIntegrityFileManager.java153 public List<Rule> readRules(@Nullable AppInstallMetadata appInstallMetadata) in readRules() argument
158 if (appInstallMetadata != null) { in readRules()
161 mRuleIndexingController.identifyRulesToEvaluate(appInstallMetadata); in readRules()
/aosp14/frameworks/base/services/tests/servicestests/src/com/android/server/integrity/serializer/
H A DRuleIndexingDetailsIdentifierTest.java298 public boolean matches(AppInstallMetadata appInstallMetadata) { in getInvalidFormula() argument
H A DRuleBinarySerializerTest.java868 public boolean matches(AppInstallMetadata appInstallMetadata) { in getInvalidFormula() argument