Home
last modified time | relevance | path

Searched refs:ApkSigningBlockUtils (Results 1 – 19 of 19) sorted by relevance

/tools/apksig/src/main/java/com/android/apksig/internal/apk/v2/
DV2SchemeVerifier.java24 import com.android.apksig.internal.apk.ApkSigningBlockUtils;
89 public static ApkSigningBlockUtils.Result verify( in verify()
98 ApkSigningBlockUtils.SignatureNotFoundException { in verify()
99 ApkSigningBlockUtils.Result result = new ApkSigningBlockUtils.Result( in verify()
100 ApkSigningBlockUtils.VERSION_APK_SIGNATURE_SCHEME_V2); in verify()
102 ApkSigningBlockUtils.findSignature(apk, zipSections, in verify()
144 ApkSigningBlockUtils.Result result) in verify()
158 ApkSigningBlockUtils.verifyIntegrity( in verify()
184 ApkSigningBlockUtils.Result result) throws NoSuchAlgorithmException { in parseSigners()
187 signers = ApkSigningBlockUtils.getLengthPrefixedSlice(apkSignatureSchemeV2Block); in parseSigners()
[all …]
DV2SchemeSigner.java20 import static com.android.apksig.internal.apk.ApkSigningBlockUtils.encodeAsSequenceOfLengthPrefixed…
21 import static com.android.apksig.internal.apk.ApkSigningBlockUtils.encodeAsSequenceOfLengthPrefixed…
22 import static com.android.apksig.internal.apk.ApkSigningBlockUtils.encodeCertificates;
23 import static com.android.apksig.internal.apk.ApkSigningBlockUtils.encodePublicKey;
25 import com.android.apksig.internal.apk.ApkSigningBlockUtils;
26 import com.android.apksig.internal.apk.ApkSigningBlockUtils.SignerConfig;
146 public static ApkSigningBlockUtils.SigningSchemeBlockAndDigests
159 public static ApkSigningBlockUtils.SigningSchemeBlockAndDigests
171 ApkSigningBlockUtils.computeContentDigests( in generateApkSignatureSchemeV2Block()
173 return new ApkSigningBlockUtils.SigningSchemeBlockAndDigests( in generateApkSignatureSchemeV2Block()
[all …]
/tools/apksig/src/main/java/com/android/apksig/internal/apk/v3/
DV3SchemeVerifier.java19 import static com.android.apksig.internal.apk.ApkSigningBlockUtils.getLengthPrefixedSlice;
20 import static com.android.apksig.internal.apk.ApkSigningBlockUtils.readLengthPrefixedByteArray;
26 import com.android.apksig.internal.apk.ApkSigningBlockUtils;
27 import com.android.apksig.internal.apk.ApkSigningBlockUtils.SignatureNotFoundException;
75 private final ApkSigningBlockUtils.Result mResult;
90 ApkSigningBlockUtils.Result result, in V3SchemeVerifier()
131 public static ApkSigningBlockUtils.Result verify( in verify()
154 public ApkSigningBlockUtils.Result verify() in verify()
162 ApkSigningBlockUtils.findSignature(mApk, mZipSections, mBlockId, mResult); in verify()
177 ApkSigningBlockUtils.verifyIntegrity(mExecutor, beforeApkSigningBlock, centralDir, eocd, in verify()
[all …]
DV3SchemeSigner.java19 import static com.android.apksig.internal.apk.ApkSigningBlockUtils.encodeAsLengthPrefixedElement;
20 import static com.android.apksig.internal.apk.ApkSigningBlockUtils.encodeAsSequenceOfLengthPrefixed…
21 import static com.android.apksig.internal.apk.ApkSigningBlockUtils.encodeAsSequenceOfLengthPrefixed…
22 import static com.android.apksig.internal.apk.ApkSigningBlockUtils.encodeCertificates;
23 import static com.android.apksig.internal.apk.ApkSigningBlockUtils.encodePublicKey;
26 import com.android.apksig.internal.apk.ApkSigningBlockUtils;
27 import com.android.apksig.internal.apk.ApkSigningBlockUtils.SigningSchemeBlockAndDigests;
28 import com.android.apksig.internal.apk.ApkSigningBlockUtils.SignerConfig;
231 ApkSigningBlockUtils.computeContentDigests( in generateApkSignatureSchemeV3BlockAndDigests()
310 ApkSigningBlockUtils.generateSignaturesOverData(signerConfig, signer.signedData); in generateSignerBlock()
DV3SigningCertificateLineage.java19 import static com.android.apksig.internal.apk.ApkSigningBlockUtils.encodeAsLengthPrefixedElement;
20 import static com.android.apksig.internal.apk.ApkSigningBlockUtils.encodeAsSequenceOfLengthPrefixed…
21 import static com.android.apksig.internal.apk.ApkSigningBlockUtils.getLengthPrefixedSlice;
22 import static com.android.apksig.internal.apk.ApkSigningBlockUtils.readLengthPrefixedByteArray;
25 import com.android.apksig.internal.apk.ApkSigningBlockUtils;
84 ApkSigningBlockUtils.checkByteOrderLittleEndian(inputBytes); in readSigningCertificateLineage()
/tools/apksig/src/main/java/com/android/apksig/
DApkVerifier.java23 import static com.android.apksig.internal.apk.ApkSigningBlockUtils.VERSION_APK_SIGNATURE_SCHEME_V2;
24 import static com.android.apksig.internal.apk.ApkSigningBlockUtils.VERSION_APK_SIGNATURE_SCHEME_V3;
25 import static com.android.apksig.internal.apk.ApkSigningBlockUtils.VERSION_JAR_SIGNATURE_SCHEME;
33 import com.android.apksig.internal.apk.ApkSigningBlockUtils;
91 ApkSigningBlockUtils.VERSION_APK_SIGNATURE_SCHEME_V2, "APK Signature Scheme v2"); in loadSupportedApkSigSchemeNames()
93 ApkSigningBlockUtils.VERSION_APK_SIGNATURE_SCHEME_V3, "APK Signature Scheme v3"); in loadSupportedApkSigSchemeNames()
211 ApkSigningBlockUtils.Result v31Result = new V3SchemeVerifier.Builder(apk, in verify()
218 foundApkSigSchemeIds.add(ApkSigningBlockUtils.VERSION_APK_SIGNATURE_SCHEME_V31); in verify()
223 ApkSigningBlockUtils.VERSION_APK_SIGNATURE_SCHEME_V31, in verify()
225 } catch (ApkSigningBlockUtils.SignatureNotFoundException ignored) { in verify()
[all …]
DDefaultApkSignerEngine.java21 import static com.android.apksig.internal.apk.ApkSigningBlockUtils.VERITY_PADDING_BLOCK_ID;
22 import static com.android.apksig.internal.apk.ApkSigningBlockUtils.VERSION_APK_SIGNATURE_SCHEME_V2;
23 import static com.android.apksig.internal.apk.ApkSigningBlockUtils.VERSION_APK_SIGNATURE_SCHEME_V3;
24 import static com.android.apksig.internal.apk.ApkSigningBlockUtils.VERSION_JAR_SIGNATURE_SCHEME;
30 import com.android.apksig.internal.apk.ApkSigningBlockUtils;
306 private List<ApkSigningBlockUtils.SignerConfig> createV2SignerConfigs( in createV2SignerConfigs()
312 List<ApkSigningBlockUtils.SignerConfig> signerConfig = new ArrayList<>(); in createV2SignerConfigs()
332 ApkSigningBlockUtils.VERSION_APK_SIGNATURE_SCHEME_V2)); in createV2SignerConfigs()
337 ApkSigningBlockUtils.VERSION_APK_SIGNATURE_SCHEME_V2); in createV2SignerConfigs()
347 private List<ApkSigningBlockUtils.SignerConfig> processV3Configs( in processV3Configs()
[all …]
DSigningCertificateLineage.java19 import static com.android.apksig.internal.apk.ApkSigningBlockUtils.getLengthPrefixedSlice;
23 import com.android.apksig.internal.apk.ApkSigningBlockUtils;
203 ApkSigningBlockUtils.Result result = new ApkSigningBlockUtils.Result( in readFromApkDataSource()
204 ApkSigningBlockUtils.VERSION_APK_SIGNATURE_SCHEME_V31); in readFromApkDataSource()
206 ApkSigningBlockUtils.findSignature(apk, zipSections, in readFromApkDataSource()
209 catch (ApkSigningBlockUtils.SignatureNotFoundException ignored) { in readFromApkDataSource()
213 ApkSigningBlockUtils.Result result = new ApkSigningBlockUtils.Result( in readFromApkDataSource()
214 ApkSigningBlockUtils.VERSION_APK_SIGNATURE_SCHEME_V3); in readFromApkDataSource()
216 ApkSigningBlockUtils.findSignature(apk, zipSections, in readFromApkDataSource()
219 catch (ApkSigningBlockUtils.SignatureNotFoundException ignored) { in readFromApkDataSource()
[all …]
/tools/apksig/src/main/java/com/android/apksig/internal/apk/v4/
DV4SchemeSigner.java19 import static com.android.apksig.internal.apk.ApkSigningBlockUtils.encodeCertificates;
24 import com.android.apksig.internal.apk.ApkSigningBlockUtils;
74 final public ApkSigningBlockUtils.SignerConfig v4Config;
75 final public ApkSigningBlockUtils.SignerConfig v41Config;
77 public SignerConfig(List<ApkSigningBlockUtils.SignerConfig> v4Configs, in SignerConfig()
78 List<ApkSigningBlockUtils.SignerConfig> v41Configs) throws InvalidKeyException { in SignerConfig()
143 ApkSigningBlockUtils.VerityTreeAndDigest verityContentDigestInfo = in generateV4Signature()
144 ApkSigningBlockUtils.computeChunkVerityTreeAndDigest(apkContent); in generateV4Signature()
170 ApkSigningBlockUtils.SignerConfig signerConfig, in generateSigningInfo()
196 ApkSigningBlockUtils.generateSignaturesOverData(signerConfig, data); in generateSigningInfo()
[all …]
DV4SchemeVerifier.java19 import static com.android.apksig.internal.apk.ApkSigningBlockUtils.toHex;
23 import com.android.apksig.internal.apk.ApkSigningBlockUtils;
68 public static ApkSigningBlockUtils.Result verify(DataSource apk, File v4SignatureFile) in verify()
77 final ApkSigningBlockUtils.Result result = new ApkSigningBlockUtils.Result( in verify()
78 ApkSigningBlockUtils.VERSION_APK_SIGNATURE_SCHEME_V4); in verify()
97 final ApkSigningBlockUtils.Result.SignerInfo signerInfo; in verify()
138 private static ApkSigningBlockUtils.Result.SignerInfo parseAndVerifySignatureBlock( in parseAndVerifySignatureBlock()
141 final ApkSigningBlockUtils.Result.SignerInfo result = in parseAndVerifySignatureBlock()
142 new ApkSigningBlockUtils.Result.SignerInfo(); in parseAndVerifySignatureBlock()
148 new ApkSigningBlockUtils.Result.SignerInfo.Signature(sigAlgorithmId, sigBytes)); in parseAndVerifySignatureBlock()
[all …]
/tools/apksig/src/main/java/com/android/apksig/internal/apk/stamp/
DV1SourceStampVerifier.java18 import static com.android.apksig.internal.apk.ApkSigningBlockUtils.encodeAsSequenceOfLengthPrefixed…
24 import com.android.apksig.internal.apk.ApkSigningBlockUtils;
64 public static ApkSigningBlockUtils.Result verify( in verify()
72 ApkSigningBlockUtils.SignatureNotFoundException { in verify()
73 ApkSigningBlockUtils.Result result = in verify()
74 new ApkSigningBlockUtils.Result(ApkSigningBlockUtils.VERSION_SOURCE_STAMP); in verify()
76 ApkSigningBlockUtils.findSignature( in verify()
101 ApkSigningBlockUtils.Result result) in verify()
103 ApkSigningBlockUtils.Result.SignerInfo signerInfo = in verify()
104 new ApkSigningBlockUtils.Result.SignerInfo(); in verify()
[all …]
DV2SourceStampSigner.java19 import static com.android.apksig.internal.apk.ApkSigningBlockUtils.VERSION_APK_SIGNATURE_SCHEME_V2;
20 import static com.android.apksig.internal.apk.ApkSigningBlockUtils.VERSION_APK_SIGNATURE_SCHEME_V3;
21 import static com.android.apksig.internal.apk.ApkSigningBlockUtils.VERSION_JAR_SIGNATURE_SCHEME;
22 import static com.android.apksig.internal.apk.ApkSigningBlockUtils.encodeAsLengthPrefixedElement;
23 import static com.android.apksig.internal.apk.ApkSigningBlockUtils.encodeAsSequenceOfLengthPrefixed…
24 import static com.android.apksig.internal.apk.ApkSigningBlockUtils.encodeAsSequenceOfLengthPrefixed…
27 import com.android.apksig.internal.apk.ApkSigningBlockUtils;
28 import com.android.apksig.internal.apk.ApkSigningBlockUtils.SignerConfig;
108 ApkSigningBlockUtils.generateSignaturesOverData(sourceStampSignerConfig, in generateSourceStampBlock()
167 ApkSigningBlockUtils.generateSignaturesOverData( in getSignedDigestsFor()
DV1SourceStampSigner.java19 import static com.android.apksig.internal.apk.ApkSigningBlockUtils.encodeAsLengthPrefixedElement;
20 import static com.android.apksig.internal.apk.ApkSigningBlockUtils.encodeAsSequenceOfLengthPrefixed…
21 import static com.android.apksig.internal.apk.ApkSigningBlockUtils.encodeAsSequenceOfLengthPrefixed…
23 import com.android.apksig.internal.apk.ApkSigningBlockUtils;
24 import com.android.apksig.internal.apk.ApkSigningBlockUtils.SignerConfig;
83 ApkSigningBlockUtils.generateSignaturesOverData( in generateSourceStampBlock()
/tools/apksig/src/test/java/com/android/apksig/
DApkSignerTest.java33 import com.android.apksig.internal.apk.ApkSigningBlockUtils;
1176 signedApk, ApkSigningBlockUtils.VERSION_APK_SIGNATURE_SCHEME_V2); in testPublicKeyHasPositiveModulusAfterSigning()
1182 signedApk, ApkSigningBlockUtils.VERSION_APK_SIGNATURE_SCHEME_V3); in testPublicKeyHasPositiveModulusAfterSigning()
1336 ApkSigningBlockUtils.Result result = in testSignApk_stampBlock_noStampGenerated()
1337 new ApkSigningBlockUtils.Result(ApkSigningBlockUtils.VERSION_SOURCE_STAMP); in testSignApk_stampBlock_noStampGenerated()
1339 ApkSigningBlockUtils.SignatureNotFoundException.class, in testSignApk_stampBlock_noStampGenerated()
1341 ApkSigningBlockUtils.findSignature( in testSignApk_stampBlock_noStampGenerated()
1344 ApkSigningBlockUtils.VERSION_SOURCE_STAMP, in testSignApk_stampBlock_noStampGenerated()
2096 ApkSigningBlockUtils.getApkSignatureBlocks(apkSigningBlock.getContents()); in assertSigningBlockContains()
2275 case ApkSigningBlockUtils.VERSION_APK_SIGNATURE_SCHEME_V2: in getRSAPublicKeyFromSigningBlock()
[all …]
DSigningCertificateLineageTest.java27 import com.android.apksig.internal.apk.ApkSigningBlockUtils;
279 ByteBuffer attribute = ApkSigningBlockUtils.getLengthPrefixedSlice(v3SignerAttribute); in testLineageFromV3SignerAttribute()
/tools/apksig/src/test/java/com/android/apksig/internal/apk/
DApkSigningBlockUtilsTest.java76 ApkSigningBlockUtils.computeOneMbChunkContentDigests( in testNewVersionMatchesOld()
79 ApkSigningBlockUtils.computeOneMbChunkContentDigests( in testNewVersionMatchesOld()
93 ApkSigningBlockUtils.computeOneMbChunkContentDigests( in testMultithreadedVersionMatchesSinglethreaded()
97 ApkSigningBlockUtils.computeOneMbChunkContentDigests( in testMultithreadedVersionMatchesSinglethreaded()
/tools/apksig/src/main/java/com/android/apksig/internal/apk/v1/
DV1SchemeSigner.java25 import com.android.apksig.internal.apk.ApkSigningBlockUtils;
551 return ApkSigningBlockUtils.generatePkcs7DerEncodedMessage( in generateSignatureBlock()
DV1SchemeVerifier.java30 import com.android.apksig.internal.apk.ApkSigningBlockUtils;
699 byte[] encodedPublicKey = ApkSigningBlockUtils.encodePublicKey(publicKey); in verifySignerInfoAgainstSigFile()
/tools/apksig/src/main/java/com/android/apksig/internal/apk/
DApkSigningBlockUtils.java89 public class ApkSigningBlockUtils { class