From 9c6880706476c6066b9aa2ce82c159d64c8766c6 Mon Sep 17 00:00:00 2001 From: Peter Dettman Date: Sat, 10 Aug 2019 00:18:03 +0700 Subject: Add and use IntValueExact properties --- crypto/src/ocsp/BasicOCSPResp.cs | 2 +- crypto/src/ocsp/OCSPReq.cs | 2 +- crypto/src/ocsp/OCSPResp.cs | 2 +- crypto/src/ocsp/RespData.cs | 2 +- crypto/src/ocsp/RevokedStatus.cs | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) (limited to 'crypto/src/ocsp') diff --git a/crypto/src/ocsp/BasicOCSPResp.cs b/crypto/src/ocsp/BasicOCSPResp.cs index 63ab8921e..e79d556bd 100644 --- a/crypto/src/ocsp/BasicOCSPResp.cs +++ b/crypto/src/ocsp/BasicOCSPResp.cs @@ -54,7 +54,7 @@ namespace Org.BouncyCastle.Ocsp public int Version { - get { return data.Version.Value.IntValue + 1; } + get { return data.Version.IntValueExact + 1; } } public RespID ResponderId diff --git a/crypto/src/ocsp/OCSPReq.cs b/crypto/src/ocsp/OCSPReq.cs index 0cd95c6d6..5408f068f 100644 --- a/crypto/src/ocsp/OCSPReq.cs +++ b/crypto/src/ocsp/OCSPReq.cs @@ -103,7 +103,7 @@ namespace Org.BouncyCastle.Ocsp public int Version { - get { return req.TbsRequest.Version.Value.IntValue + 1; } + get { return req.TbsRequest.Version.IntValueExact + 1; } } public GeneralName RequestorName diff --git a/crypto/src/ocsp/OCSPResp.cs b/crypto/src/ocsp/OCSPResp.cs index dc99c6a9a..1e65b2f7a 100644 --- a/crypto/src/ocsp/OCSPResp.cs +++ b/crypto/src/ocsp/OCSPResp.cs @@ -43,7 +43,7 @@ namespace Org.BouncyCastle.Ocsp public int Status { - get { return this.resp.ResponseStatus.Value.IntValue; } + get { return this.resp.ResponseStatus.IntValueExact; } } public object GetResponseObject() diff --git a/crypto/src/ocsp/RespData.cs b/crypto/src/ocsp/RespData.cs index 105726ca7..7ec0e4b68 100644 --- a/crypto/src/ocsp/RespData.cs +++ b/crypto/src/ocsp/RespData.cs @@ -21,7 +21,7 @@ namespace Org.BouncyCastle.Ocsp public int Version { - get { return data.Version.Value.IntValue + 1; } + get { return data.Version.IntValueExact + 1; } } public RespID GetResponderId() diff --git a/crypto/src/ocsp/RevokedStatus.cs b/crypto/src/ocsp/RevokedStatus.cs index 6e5ad1b26..edbeb57da 100644 --- a/crypto/src/ocsp/RevokedStatus.cs +++ b/crypto/src/ocsp/RevokedStatus.cs @@ -51,7 +51,7 @@ namespace Org.BouncyCastle.Ocsp throw new InvalidOperationException("attempt to get a reason where none is available"); } - return info.RevocationReason.Value.IntValue; + return info.RevocationReason.IntValueExact; } } } -- cgit 1.4.1