/tools/apksig/src/main/java/com/android/apksig/internal/apk/v3/ |
D | V3SchemeSigner.java | 275 V3SignatureSchemeBlock.SignedData signedData = new V3SignatureSchemeBlock.SignedData(); in generateSignerBlock() local 277 signedData.certificates = encodeCertificates(signerConfig.certificates); in generateSignerBlock() 297 signedData.digests = digests; in generateSignerBlock() 298 signedData.minSdkVersion = signerConfig.minSdkVersion; in generateSignerBlock() 299 signedData.maxSdkVersion = signerConfig.maxSdkVersion; in generateSignerBlock() 300 signedData.additionalAttributes = generateAdditionalAttributes(signerConfig); in generateSignerBlock() 304 signer.signedData = encodeSignedData(signedData); in generateSignerBlock() 310 ApkSigningBlockUtils.generateSignaturesOverData(signerConfig, signer.signedData); in generateSignerBlock() 316 byte[] signedData = encodeAsLengthPrefixedElement(signer.signedData); in encodeSigner() 331 int payloadSize = signedData.length + 4 + 4 + signatures.length + publicKey.length; in encodeSigner() [all …]
|
D | V3SchemeVerifier.java | 343 ByteBuffer signedData = getLengthPrefixedSlice(signerBlock); in parseSigner() local 344 byte[] signedDataBytes = new byte[signedData.remaining()]; in parseSigner() 345 signedData.get(signedDataBytes); in parseSigner() 346 signedData.flip(); in parseSigner() 347 result.signedData = signedDataBytes; in parseSigner() 423 signedData.position(0); in parseSigner() 424 sig.update(signedData); in parseSigner() 440 signedData.position(0); in parseSigner() 441 ByteBuffer digests = getLengthPrefixedSlice(signedData); in parseSigner() 442 ByteBuffer certificates = getLengthPrefixedSlice(signedData); in parseSigner() [all …]
|
D | V3SigningCertificateLineage.java | 110 ByteBuffer signedData = getLengthPrefixedSlice(nodeBytes); in readSigningCertificateLineage() local 128 sig.update(signedData); in readSigningCertificateLineage() 136 signedData.rewind(); in readSigningCertificateLineage() 137 byte[] encodedCert = readLengthPrefixedByteArray(signedData); in readSigningCertificateLineage() 138 int signedSigAlgorithm = signedData.getInt(); in readSigningCertificateLineage()
|
/tools/apksig/src/main/java/com/android/apksig/internal/apk/v2/ |
D | V2SchemeSigner.java | 233 V2SignatureSchemeBlock.SignedData signedData = new V2SignatureSchemeBlock.SignedData(); in generateSignerBlock() local 235 signedData.certificates = encodeCertificates(signerConfig.certificates); in generateSignerBlock() 255 signedData.digests = digests; in generateSignerBlock() 256 signedData.additionalAttributes = generateAdditionalAttributes(v3SigningEnabled); in generateSignerBlock() 269 signer.signedData = in generateSignerBlock() 273 signedData.digests), in generateSignerBlock() 274 encodeAsSequenceOfLengthPrefixedElements(signedData.certificates), in generateSignerBlock() 275 signedData.additionalAttributes, in generateSignerBlock() 281 ApkSigningBlockUtils.generateSignaturesOverData(signerConfig, signer.signedData); in generateSignerBlock() 291 signer.signedData, in generateSignerBlock() [all …]
|
D | V2SchemeVerifier.java | 253 ByteBuffer signedData = ApkSigningBlockUtils.getLengthPrefixedSlice(signerBlock); in parseSigner() local 254 byte[] signedDataBytes = new byte[signedData.remaining()]; in parseSigner() 255 signedData.get(signedDataBytes); in parseSigner() 256 signedData.flip(); in parseSigner() 257 result.signedData = signedDataBytes; in parseSigner() 323 signedData.position(0); in parseSigner() 324 sig.update(signedData); in parseSigner() 340 signedData.position(0); in parseSigner() 341 ByteBuffer digests = ApkSigningBlockUtils.getLengthPrefixedSlice(signedData); in parseSigner() 342 ByteBuffer certificates = ApkSigningBlockUtils.getLengthPrefixedSlice(signedData); in parseSigner() [all …]
|
/tools/apksig/src/main/java/com/android/apksig/ |
D | SigningCertificateLineage.java | 239 ByteBuffer signedData = getLengthPrefixedSlice(signer); in readFromApkDataSource() local 241 SigningCertificateLineage lineage = readFromSignedData(signedData); in readFromApkDataSource() 269 public static SigningCertificateLineage readFromSignedData(ByteBuffer signedData) in readFromSignedData() argument 283 getLengthPrefixedSlice(signedData); in readFromSignedData() 284 getLengthPrefixedSlice(signedData); in readFromSignedData() 285 signedData.getInt(); in readFromSignedData() 286 signedData.getInt(); in readFromSignedData() 288 ByteBuffer additionalAttributes = getLengthPrefixedSlice(signedData); in readFromSignedData() 392 byte[] signedData = signedDataBuffer.array(); in spawnDescendant() 405 ApkSigningBlockUtils.generateSignaturesOverData(newSignerConfig, signedData); in spawnDescendant()
|
D | SourceStampVerifier.java | 367 ByteBuffer signedData = ApkSigningBlockUtilsLite.getLengthPrefixedSlice(signerBlock); in parseSigner() local 368 ByteBuffer digests = ApkSigningBlockUtilsLite.getLengthPrefixedSlice(signedData); in parseSigner() 369 ByteBuffer certificates = ApkSigningBlockUtilsLite.getLengthPrefixedSlice(signedData); in parseSigner()
|
/tools/apksig/src/main/java/com/android/apksig/internal/apk/v4/ |
D | V4SchemeVerifier.java | 102 final byte[] signedData = V4Signature.getSignedData(apk.size(), hashingInfo, in verify() 104 signerInfo = parseAndVerifySignatureBlock(signingInfo, signedData); in verify() 115 final byte[] signedData = V4Signature.getSignedData(apk.size(), hashingInfo, in verify() 117 result.signers.add(parseAndVerifySignatureBlock(signingInfo, signedData)); in verify() 140 final byte[] signedData) throws NoSuchAlgorithmException { in parseAndVerifySignatureBlock() argument 179 sig.update(signedData); in parseAndVerifySignatureBlock()
|
/tools/apksig/src/main/java/com/android/apksig/internal/apk/stamp/ |
D | SourceStampCertificateLineage.java | 97 ByteBuffer signedData = getLengthPrefixedSlice(nodeBytes); in readSigningCertificateLineage() local 115 sig.update(signedData); in readSigningCertificateLineage() 123 signedData.rewind(); in readSigningCertificateLineage() 124 byte[] encodedCert = readLengthPrefixedByteArray(signedData); in readSigningCertificateLineage() 125 int signedSigAlgorithm = signedData.getInt(); in readSigningCertificateLineage()
|
/tools/apksig/src/main/java/com/android/apksig/internal/apk/ |
D | ApkSigningBlockUtils.java | 990 ByteBuffer signedData = getLengthPrefixedSlice(signer); in getApkSignatureBlockSigners() local 993 getLengthPrefixedSlice(signedData); in getApkSignatureBlockSigners() 994 ByteBuffer certificatesBuffer = getLengthPrefixedSlice(signedData); in getApkSignatureBlockSigners() 1222 SignedData signedData = new SignedData(); in generatePkcs7DerEncodedMessage() local 1223 signedData.certificates = new ArrayList<>(signerCerts.size()); in generatePkcs7DerEncodedMessage() 1225 signedData.certificates.add(new Asn1OpaqueObject(cert.getEncoded())); in generatePkcs7DerEncodedMessage() 1227 signedData.version = 1; in generatePkcs7DerEncodedMessage() 1228 signedData.digestAlgorithms = Collections.singletonList(digestAlgorithmId); in generatePkcs7DerEncodedMessage() 1229 signedData.encapContentInfo = new EncapsulatedContentInfo(Pkcs7Constants.OID_DATA); in generatePkcs7DerEncodedMessage() 1231 signedData.encapContentInfo.content = data; in generatePkcs7DerEncodedMessage() [all …]
|
/tools/apksig/src/main/java/com/android/apksig/internal/apk/v1/ |
D | V1SchemeVerifier.java | 496 SignedData signedData; in verifySigBlockAgainstSigFile() local 504 signedData = in verifySigBlockAgainstSigFile() 513 if (signedData.signerInfos.isEmpty()) { in verifySigBlockAgainstSigFile() 528 Collections.singletonList(signedData.signerInfos.get(0)); in verifySigBlockAgainstSigFile() 530 unverifiedSignerInfosToTry = signedData.signerInfos; in verifySigBlockAgainstSigFile() 537 signedDataCertificates = parseCertificates(signedData.certificates); in verifySigBlockAgainstSigFile() 550 signedData, in verifySigBlockAgainstSigFile() 600 SignedData signedData, in verifySignerInfoAgainstSigFile() argument 747 if (!contentType.equals(signedData.encapContentInfo.contentType)) { in verifySignerInfoAgainstSigFile()
|