コード例 #1
0
        private bool IsSerialMatch(X509Certificate2 certificate, Cert certInfo)
        {
            var    issuerSerial = certInfo.IssuerSerial.X509SerialNumber;
            string certInfoSerialNumberHex;

            try
            {
                certInfoSerialNumberHex = ConvertHelper.BigIntegerToHex(issuerSerial);
            }
            catch (FormatException)
            {
                certInfoSerialNumberHex = issuerSerial;
            }
            return(certificate.SerialNumber == certInfoSerialNumberHex);
        }