Skip to content

Commit 9afc880

Browse files
author
xuzhou
committed
去除默认的BC加密算法,兼容Android P+
1 parent 75ecd61 commit 9afc880

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

app/src/main/java/org/littleshoot/proxy/mitm/CertificateHelper.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -255,10 +255,8 @@ private static X509Certificate signCertificate(
255255
X509v3CertificateBuilder certificateBuilder,
256256
PrivateKey signedWithPrivateKey) throws OperatorCreationException,
257257
CertificateException {
258-
ContentSigner signer = new JcaContentSignerBuilder(SIGNATURE_ALGORITHM)
259-
.setProvider(PROVIDER_NAME).build(signedWithPrivateKey);
260-
return new JcaX509CertificateConverter().setProvider(
261-
PROVIDER_NAME).getCertificate(certificateBuilder.build(signer));
258+
ContentSigner signer = new JcaContentSignerBuilder(SIGNATURE_ALGORITHM).build(signedWithPrivateKey);
259+
return new JcaX509CertificateConverter().getCertificate(certificateBuilder.build(signer));
262260
}
263261

264262
public static TrustManager[] getTrustManagers(KeyStore keyStore)

0 commit comments

Comments
 (0)