public async Task <PublicKeyCheckResult> Check(SystemX509.X509Certificate2 certificate)
        {
            var publicKeyPem = certificate.GetPemPublicKey();
            var checkResult  = await _remmeKeyStorage.Check(publicKeyPem);

            var certHashBytes = Encoding.UTF8.GetBytes(certificate.ToPemString().Sha512Digest().BytesToHexString());

            var currentUtcTime = DateTime.UtcNow;

            checkResult.IsValid = checkResult != null &&
                                  !checkResult.IsRevoked &&
                                  certHashBytes.BytesToHexString() == checkResult.EntityHash &&
                                  currentUtcTime >= checkResult.ValidFromUtc &&
                                  currentUtcTime < checkResult.ValidToUtc;

            return(checkResult);
        }