Home | History | Annotate | Download | only in apk

Lines Matching refs:Signature

42 import java.security.Signature;
66 * APK Signature Scheme v2 verifier.
74 * JAR signature scheme but also with APK Signature Scheme v2 or newer. This attribute
75 * facilitates v2 signature stripping detection.
77 * <p>The attribute contains a comma-separated set of signature scheme IDs.
83 * Returns {@code true} if the provided APK contains an APK Signature Scheme V2 signature.
85 * <p><b>NOTE: This method does not verify the signature.</b>
97 * Verifies APK Signature Scheme v2 signatures of the provided APK and returns the certificates
100 * @throws SignatureNotFoundException if the APK is not signed using APK Signature Scheme v2.
101 * @throws SecurityException if a APK Signature Scheme v2 signature of this APK does not verify.
112 * Verifies APK Signature Scheme v2 signatures of the provided APK and returns the certificates
115 * @throws SignatureNotFoundException if the APK is not signed using APK Signature Scheme v2.
116 * @throws SecurityException if an APK Signature Scheme v2 signature of this APK does not
127 * APK Signature Scheme v2 block and additional information relevant to verifying the signatures
131 /** Contents of APK Signature Scheme v2 block. */
161 * Returns the APK Signature Scheme v2 block contained in the provided APK file and the
164 * @throws SignatureNotFoundException if the APK is not signed using APK Signature Scheme v2.
184 // Find the APK Signature Scheme v2 Block inside the APK Signing Block.
196 * Verifies the contents of the provided APK file against the provided APK Signature Scheme v2
199 * @param signatureInfo APK Signature Scheme v2 Block and information relevant for verifying it
267 ByteBuffer signature = getLengthPrefixedSlice(signatures);
268 if (signature.remaining() < 8) {
269 throw new SecurityException("Signature record too short");
271 int sigAlgorithm = signature.getInt();
279 bestSigAlgorithmSignatureBytes = readLengthPrefixedByteArray(signature);
283 "Failed to parse signature record #" + signatureCount,
305 Signature sig = Signature.getInstance(jcaSignatureAlgorithm);
315 "Failed to verify " + jcaSignatureAlgorithm + " signature", e);
318 throw new SecurityException(jcaSignatureAlgorithm + " signature did not verify");
321 // Signature over signedData has verified.
347 "Signature algorithms don't match between digests and signatures records");
382 signature record");
674 "Unknown signature algorithm: 0x"
717 "Unknown signature algorithm: 0x"
747 "Unknown signature algorithm: 0x"
950 "No APK Signature Scheme v2 block in APK Signing Block");