Object DigitalSignatureValidator
-
- All Implemented Interfaces:
public class DigitalSignatureValidator
Validates digital signatures. Use .validateSignature passing it a signature info.
-
-
Field Summary
Fields Modifier and Type Field Description public final static DigitalSignatureValidator
INSTANCE
-
Method Summary
Modifier and Type Method Description final static DigitalSignatureValidationResult
validateSignature(DigitalSignatureInfo digitalSignatureInfo)
Validates passed digital signature. final Single<DigitalSignatureValidationResult>
validateSignatureAsync(DigitalSignatureInfo digitalSignatureInfo)
Validates passed digital signature. final Unit
disableCertificateRevocationCheck()
Certificate revocation checks (OCSP) are by default enabled. -
-
Method Detail
-
validateSignature
@WorkerThread() final static DigitalSignatureValidationResult validateSignature(DigitalSignatureInfo digitalSignatureInfo)
Validates passed digital signature. Signature certificate is validated in according to root CA certificates passed to TrustedKeyStore. This may take a bit of time so it shouldn't be run on main thread.
- Parameters:
digitalSignatureInfo
- Digital signature from [ ]- Returns:
a DigitalSignatureValidationResult object describing the result of validation.
-
validateSignatureAsync
final Single<DigitalSignatureValidationResult> validateSignatureAsync(DigitalSignatureInfo digitalSignatureInfo)
Validates passed digital signature. Signature certificate is validated in according to root CA certificates passed to TrustedKeyStore. This may take a bit of time so it shouldn't be run on main thread. This method does not operate on any particular scheduler, so use Single.subscribeOn to offload validation to a different thread.
- Parameters:
digitalSignatureInfo
- Digital signature from [ ]- Returns:
a DigitalSignatureValidationResult object describing the result of validation.
-
disableCertificateRevocationCheck
final Unit disableCertificateRevocationCheck()
Certificate revocation checks (OCSP) are by default enabled. OCSP runs a network check to test certificates are still valid (not revoked/expired etc). If there are issues with this feature, it can be disabled with this method.
-
-
-
-