diff options
Diffstat (limited to 'crypto/src/tsp/TimeStampToken.cs')
-rw-r--r-- | crypto/src/tsp/TimeStampToken.cs | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/crypto/src/tsp/TimeStampToken.cs b/crypto/src/tsp/TimeStampToken.cs index 1245589b4..9b2a7a40b 100644 --- a/crypto/src/tsp/TimeStampToken.cs +++ b/crypto/src/tsp/TimeStampToken.cs @@ -180,16 +180,12 @@ namespace Org.BouncyCastle.Tsp certID.GetHashAlgorithmName(), cert.GetEncoded()); if (!Arrays.ConstantTimeAreEqual(certID.GetCertHash(), hash)) - { throw new TspValidationException("certificate hash does not match certID hash."); - } if (certID.IssuerSerial != null) { - if (!certID.IssuerSerial.Serial.Value.Equals(cert.SerialNumber)) - { + if (!certID.IssuerSerial.Serial.HasValue(cert.SerialNumber)) throw new TspValidationException("certificate serial number does not match certID for signature."); - } GeneralName[] names = certID.IssuerSerial.Issuer.GetNames(); X509Name principal = PrincipalUtilities.GetIssuerX509Principal(cert); |