-
Notifications
You must be signed in to change notification settings - Fork 37
Open
Labels
O-AndroidWork related to the Android verifier implementationWork related to the Android verifier implementationenhancementNew feature or requestNew feature or request
Description
I found https cost more time on rust than java, then I found function verifyCertificateChain cost most time
CertificateVerifier.kt
Log.d(TAG, "verifyCertificateChain PKIXBuilderParameters start")
val parameters = PKIXBuilderParameters(keystore, null)
Log.d(TAG, "verifyCertificateChain PKIXBuilderParameters end")
it cost 200ms every request
If change it, we can save time
var trustAnchors = HashSet<TrustAnchor>()
validChain.forEach {
trustAnchors.add(TrustAnchor(it, null));
}
var pkixParameters = PKIXParameters(trustAnchors)
pkixParameters.certPathCheckers = listOf(revocationChecker)
pkixParameters.isRevocationEnabled = false
validator.validate(certFactory.generateCertPath(validChain), pkixParameters)
I have already try and it did work, so can we do this?
Metadata
Metadata
Assignees
Labels
O-AndroidWork related to the Android verifier implementationWork related to the Android verifier implementationenhancementNew feature or requestNew feature or request