diff options
author | Peter Dettman <peter.dettman@bouncycastle.org> | 2016-04-20 19:53:12 +0700 |
---|---|---|
committer | Peter Dettman <peter.dettman@bouncycastle.org> | 2016-04-20 19:53:12 +0700 |
commit | 3bdc9101f9babcefb1e9e3b8ca6d0a6da39be568 (patch) | |
tree | 86b1b6346067dbb2995a78fbe17a4a05bcebaf99 /crypto/src | |
parent | Update Poly1305 to comply with RFC 7539 (diff) | |
download | BouncyCastle.NET-ed25519-3bdc9101f9babcefb1e9e3b8ca6d0a6da39be568.tar.xz |
Minor change to error messages
Diffstat (limited to 'crypto/src')
-rw-r--r-- | crypto/src/tsp/TimeStampRequest.cs | 22 |
1 files changed, 6 insertions, 16 deletions
diff --git a/crypto/src/tsp/TimeStampRequest.cs b/crypto/src/tsp/TimeStampRequest.cs index f54d33e04..0b41adef7 100644 --- a/crypto/src/tsp/TimeStampRequest.cs +++ b/crypto/src/tsp/TimeStampRequest.cs @@ -130,34 +130,24 @@ namespace Org.BouncyCastle.Tsp IList extensions) { if (!algorithms.Contains(this.MessageImprintAlgOid)) - { - throw new TspValidationException("request contains unknown algorithm.", PkiFailureInfo.BadAlg); - } + throw new TspValidationException("request contains unknown algorithm", PkiFailureInfo.BadAlg); - if (policies != null && this.ReqPolicy != null && !policies.Contains(this.ReqPolicy)) - { - throw new TspValidationException("request contains unknown policy.", PkiFailureInfo.UnacceptedPolicy); - } + if (policies != null && this.ReqPolicy != null && !policies.Contains(this.ReqPolicy)) + throw new TspValidationException("request contains unknown policy", PkiFailureInfo.UnacceptedPolicy); - if (this.Extensions != null && extensions != null) + if (this.Extensions != null && extensions != null) { foreach (DerObjectIdentifier oid in this.Extensions.ExtensionOids) { if (!extensions.Contains(oid.Id)) - { - throw new TspValidationException("request contains unknown extension.", - PkiFailureInfo.UnacceptedExtension); - } + throw new TspValidationException("request contains unknown extension", PkiFailureInfo.UnacceptedExtension); } } int digestLength = TspUtil.GetDigestLength(this.MessageImprintAlgOid); if (digestLength != this.GetMessageImprintDigest().Length) - { - throw new TspValidationException("imprint digest the wrong length.", - PkiFailureInfo.BadDataFormat); - } + throw new TspValidationException("imprint digest the wrong length", PkiFailureInfo.BadDataFormat); } /** |