Home
last modified time | relevance | path

Searched refs:publicKey (Results 1 – 21 of 21) sorted by relevance

/tools/apksig/src/main/java/com/android/apksig/internal/apk/v4/
DV4Signature.java74 public final byte[] publicKey; // ASN.1 DER, must match the certificate field in V4Signature.SigningInfo
79 byte[] publicKey, int signatureAlgorithmId, byte[] signature) { in SigningInfo() argument
83 this.publicKey = publicKey; in SigningInfo()
96 byte[] publicKey = readBytes(buffer); in fromByteBuffer()
99 return new SigningInfo(apkDigest, certificate, additionalData, publicKey, in fromByteBuffer()
105 this.additionalData) + bytesSize(this.publicKey) + 4/*signatureAlgorithmId*/ in toByteArray()
111 writeBytes(buffer, this.publicKey); in toByteArray()
DV4SchemeVerifier.java163 final byte[] publicKeyBytes = signingInfo.publicKey; in parseAndVerifySignatureBlock()
164 PublicKey publicKey; in parseAndVerifySignatureBlock() local
166 publicKey = KeyFactory.getInstance(keyAlgorithm).generatePublic( in parseAndVerifySignatureBlock()
175 sig.initVerify(publicKey); in parseAndVerifySignatureBlock()
DV4SchemeSigner.java188 final PublicKey publicKey = signerConfig.certificates.get(0).getPublicKey(); in generateSigningInfo() local
194 encodedCertificate, additionalData, publicKey.getEncoded(), -1, null); in generateSigningInfo()
210 encodedCertificate, additionalData, publicKey.getEncoded(), signatureAlgorithmId, in generateSigningInfo()
/tools/apksig/src/main/java/com/android/apksig/internal/apk/v3/
DV3SchemeSigner.java271 PublicKey publicKey = signerConfig.certificates.get(0).getPublicKey(); in generateSignerBlock() local
273 byte[] encodedPublicKey = encodePublicKey(publicKey); in generateSignerBlock()
308 signer.publicKey = encodedPublicKey; in generateSignerBlock()
321 byte[] publicKey = encodeAsLengthPrefixedElement(signer.publicKey); in encodeSigner()
331 int payloadSize = signedData.length + 4 + 4 + signatures.length + publicKey.length; in encodeSigner()
339 result.put(publicKey); in encodeSigner()
413 public byte[] publicKey; field in V3SchemeSigner.V3SignatureSchemeBlock.Signer
DV3SigningCertificateLineage.java122 PublicKey publicKey = lastCert.getPublicKey(); in readSigningCertificateLineage() local
124 sig.initVerify(publicKey); in readSigningCertificateLineage()
DV3SchemeVerifier.java412 PublicKey publicKey; in parseSigner() local
414 publicKey = in parseSigner()
423 sig.initVerify(publicKey); in parseSigner()
/tools/apksig/src/main/java/com/android/apksig/internal/apk/v2/
DV2SchemeSigner.java229 PublicKey publicKey = signerConfig.certificates.get(0).getPublicKey(); in generateSignerBlock() local
231 byte[] encodedPublicKey = encodePublicKey(publicKey); in generateSignerBlock()
278 signer.publicKey = encodedPublicKey; in generateSignerBlock()
294 signer.publicKey, in generateSignerBlock()
320 public byte[] publicKey; field in V2SchemeSigner.V2SignatureSchemeBlock.Signer
DV2SchemeVerifier.java308 PublicKey publicKey; in parseSigner() local
310 publicKey = in parseSigner()
319 sig.initVerify(publicKey); in parseSigner()
/tools/apksig/src/test/java/com/android/apksig/kms/
DKeyWrapper.java60 PublicKey publicKey = in wrapKeyForImport() local
68 publicKey, in wrapKeyForImport()
/tools/apksig/src/main/java/com/android/apksig/internal/apk/v1/
DV1SchemeSigner.java321 PublicKey publicKey = signerConfig.certificates.get(0).getPublicKey(); in signManifest() local
324 + publicKey.getAlgorithm().toUpperCase(Locale.US); in signManifest()
340 PublicKey publicKey = signerConfig.certificates.get(0).getPublicKey(); in getOutputEntryNames() local
343 + publicKey.getAlgorithm().toUpperCase(Locale.US); in getOutputEntryNames()
519 PublicKey publicKey = signingCert.getPublicKey(); in generateSignatureBlock() local
522 getSignerInfoSignatureAlgorithm(publicKey, digestAlgorithm, in generateSignatureBlock()
542 signature.initVerify(publicKey); in generateSignatureBlock()
DV1SchemeVerifier.java691 PublicKey publicKey = signingCertificate.getPublicKey(); in verifySignerInfoAgainstSigFile() local
693 s.initVerify(publicKey); in verifySignerInfoAgainstSigFile()
699 byte[] encodedPublicKey = ApkSigningBlockUtils.encodePublicKey(publicKey); in verifySignerInfoAgainstSigFile()
700 publicKey = KeyFactory.getInstance(publicKey.getAlgorithm()).generatePublic( in verifySignerInfoAgainstSigFile()
709 s.initVerify(publicKey); in verifySignerInfoAgainstSigFile()
/tools/apksig/src/main/java/com/android/apksig/internal/apk/
DApkSigningBlockUtils.java667 public static byte[] encodePublicKey(PublicKey publicKey) in encodePublicKey() argument
670 if ("X.509".equals(publicKey.getFormat())) { in encodePublicKey()
671 encodedPublicKey = publicKey.getEncoded(); in encodePublicKey()
673 String keyAlgorithm = publicKey.getAlgorithm(); in encodePublicKey()
724 KeyFactory.getInstance(publicKey.getAlgorithm()) in encodePublicKey()
725 .getKeySpec(publicKey, X509EncodedKeySpec.class) in encodePublicKey()
729 "Failed to obtain X.509 encoded form of public key " + publicKey in encodePublicKey()
730 + " of class " + publicKey.getClass().getName(), in encodePublicKey()
736 "Failed to obtain X.509 encoded form of public key " + publicKey in encodePublicKey()
737 + " of class " + publicKey.getClass().getName()); in encodePublicKey()
[all …]
/tools/apksig/src/main/java/com/android/apksig/internal/pkcs7/
DAlgorithmIdentifier.java81 PublicKey publicKey, DigestAlgorithm digestAlgorithm, boolean deterministicDsaSigning) in getSignerInfoSignatureAlgorithm() argument
83 String keyAlgorithm = publicKey.getAlgorithm(); in getSignerInfoSignatureAlgorithm()
/tools/apksig/src/main/java/com/android/apksig/internal/apk/stamp/
DSourceStampCertificateLineage.java109 PublicKey publicKey = lastCert.getPublicKey(); in readSigningCertificateLineage() local
111 sig.initVerify(publicKey); in readSigningCertificateLineage()
DSourceStampVerifier.java284 PublicKey publicKey = sourceStampCertificate.getPublicKey(); in verifySourceStampSignature() local
287 sig.initVerify(publicKey); in verifySourceStampSignature()
/tools/apksig/src/apksigner/java/com/android/apksigner/
DApkSignerTool.java1176 PublicKey publicKey = cert.getPublicKey(); in printCertificate() local
1177 System.out.println(name + " key algorithm: " + publicKey.getAlgorithm()); in printCertificate()
1179 if (publicKey instanceof RSAKey) { in printCertificate()
1180 keySize = ((RSAKey) publicKey).getModulus().bitLength(); in printCertificate()
1181 } else if (publicKey instanceof ECKey) { in printCertificate()
1182 keySize = ((ECKey) publicKey).getParams() in printCertificate()
1184 } else if (publicKey instanceof DSAKey) { in printCertificate()
1187 DSAParams dsaParams = ((DSAKey) publicKey).getParams(); in printCertificate()
1195 byte[] encodedKey = publicKey.getEncoded(); in printCertificate()
/tools/apksig/src/test/java/com/android/apksig/kms/aws/
DAwsTestData.java55 privateKeyNameInResources, importParameters.publicKey().asByteArray()); in importRsa2048Sha256()
/tools/apksig/src/main/java/com/android/apksig/
DDefaultApkSignerEngine.java262 PublicKey publicKey = certificates.get(0).getPublicKey(); in createV1SignerConfigs() local
279 V1SchemeSigner.getSuggestedSignatureDigestAlgorithm(publicKey, minSdkVersion); in createV1SignerConfigs()
530 PublicKey publicKey = certificates.get(0).getPublicKey(); in createSigningBlockSignerConfig() local
543 publicKey, in createSigningBlockSignerConfig()
552 publicKey, in createSigningBlockSignerConfig()
569 publicKey, mMinSdkVersion, apkSigningBlockPaddingSupported, in createSigningBlockSignerConfig()
DSigningCertificateLineage.java476 PublicKey publicKey = parent.getCertificate().getPublicKey(); in getSignatureAlgorithm() local
480 publicKey, mMinSdkVersion, false /* verityEnabled */, in getSignatureAlgorithm()
/tools/apksig/src/test/java/com/android/apksig/
DApkVerifierTest.java221 PublicKey publicKey = in testV1OneSignerSHA1withDSAAcceptedWithKeysTooLongForDigest() local
225 s.initVerify(publicKey); in testV1OneSignerSHA1withDSAAcceptedWithKeysTooLongForDigest()
255 PublicKey publicKey = in testV1OneSignerSHA224withDSAAcceptedWithKeysTooLongForDigest() local
259 s.initVerify(publicKey); in testV1OneSignerSHA224withDSAAcceptedWithKeysTooLongForDigest()
DApkSignerTest.java3794 ByteBuffer publicKey = ApkSigningBlockUtils.getLengthPrefixedSlice(signer); in getRSAPublicKeyFromSigningBlock() local
3796 Asn1BerParser.parse(publicKey, SubjectPublicKeyInfo.class); in getRSAPublicKeyFromSigningBlock()