diff options
-rw-r--r-- | crypto/src/tsp/TimeStampRequest.cs | 34 |
1 files changed, 7 insertions, 27 deletions
diff --git a/crypto/src/tsp/TimeStampRequest.cs b/crypto/src/tsp/TimeStampRequest.cs index b05b58c0e..2cef1ae94 100644 --- a/crypto/src/tsp/TimeStampRequest.cs +++ b/crypto/src/tsp/TimeStampRequest.cs @@ -18,13 +18,11 @@ namespace Org.BouncyCastle.Tsp : X509ExtensionBase { private TimeStampReq req; - private X509Extensions extensions; public TimeStampRequest( TimeStampReq req) { this.req = req; - this.extensions = req.Extensions; } /** @@ -148,34 +146,16 @@ namespace Org.BouncyCastle.Tsp /** * return the ASN.1 encoded representation of this object. */ - public byte[] GetEncoded() - { - return req.GetEncoded(); - } + public byte[] GetEncoded() => req.GetEncoded(); - internal X509Extensions Extensions - { - get { return req.Extensions; } - } - - public virtual bool HasExtensions - { - get { return extensions != null; } - } + internal X509Extensions Extensions => req.Extensions; - public virtual X509Extension GetExtension(DerObjectIdentifier oid) - { - return extensions == null ? null : extensions.GetExtension(oid); - } + public virtual bool HasExtensions => Extensions != null; - public virtual IList<DerObjectIdentifier> GetExtensionOids() - { - return TspUtil.GetExtensionOids(extensions); - } + public virtual X509Extension GetExtension(DerObjectIdentifier oid) => Extensions?.GetExtension(oid); - protected override X509Extensions GetX509Extensions() - { - return Extensions; - } + public virtual IList<DerObjectIdentifier> GetExtensionOids() => TspUtil.GetExtensionOids(Extensions); + + protected override X509Extensions GetX509Extensions() => Extensions; } } |