diff options
author | Peter Dettman <peter.dettman@bouncycastle.org> | 2024-06-12 18:09:06 +0700 |
---|---|---|
committer | Peter Dettman <peter.dettman@bouncycastle.org> | 2024-06-12 18:09:06 +0700 |
commit | daec40507f75c8bbe80f54e25338d31a2b411e39 (patch) | |
tree | f336873fdf0be8476dc45de28a30dda37976bd43 /crypto/src/asn1/x509 | |
parent | Dilithium SampleInBall change and KATs updated (diff) | |
download | BouncyCastle.NET-ed25519-daec40507f75c8bbe80f54e25338d31a2b411e39.tar.xz |
DerInteger constants for small values
Diffstat (limited to 'crypto/src/asn1/x509')
7 files changed, 7 insertions, 7 deletions
diff --git a/crypto/src/asn1/x509/AttributeCertificateInfo.cs b/crypto/src/asn1/x509/AttributeCertificateInfo.cs index dde432ee6..d5e65323f 100644 --- a/crypto/src/asn1/x509/AttributeCertificateInfo.cs +++ b/crypto/src/asn1/x509/AttributeCertificateInfo.cs @@ -56,7 +56,7 @@ namespace Org.BouncyCastle.Asn1.X509 } else { - this.version = new DerInteger(0); + this.version = DerInteger.Zero; start = 0; } diff --git a/crypto/src/asn1/x509/TBSCertList.cs b/crypto/src/asn1/x509/TBSCertList.cs index fb8a9907c..8fa1e9822 100644 --- a/crypto/src/asn1/x509/TBSCertList.cs +++ b/crypto/src/asn1/x509/TBSCertList.cs @@ -174,7 +174,7 @@ namespace Org.BouncyCastle.Asn1.X509 } else { - version = new DerInteger(0); + version = DerInteger.Zero; } signature = AlgorithmIdentifier.GetInstance(seq[seqPos++]); diff --git a/crypto/src/asn1/x509/TBSCertificateStructure.cs b/crypto/src/asn1/x509/TBSCertificateStructure.cs index e41224f4a..e1daef3ff 100644 --- a/crypto/src/asn1/x509/TBSCertificateStructure.cs +++ b/crypto/src/asn1/x509/TBSCertificateStructure.cs @@ -69,7 +69,7 @@ namespace Org.BouncyCastle.Asn1.X509 else { seqStart = -1; // field 0 is missing! - version = new DerInteger(0); + version = DerInteger.Zero; } bool isV1 = false; diff --git a/crypto/src/asn1/x509/V1TBSCertificateGenerator.cs b/crypto/src/asn1/x509/V1TBSCertificateGenerator.cs index 7c191b263..5d9bdb72a 100644 --- a/crypto/src/asn1/x509/V1TBSCertificateGenerator.cs +++ b/crypto/src/asn1/x509/V1TBSCertificateGenerator.cs @@ -19,7 +19,7 @@ namespace Org.BouncyCastle.Asn1.X509 */ public class V1TbsCertificateGenerator { - internal DerTaggedObject version = new DerTaggedObject(0, new DerInteger(0)); + internal DerTaggedObject version = new DerTaggedObject(0, DerInteger.Zero); internal DerInteger serialNumber; internal AlgorithmIdentifier signature; internal X509Name issuer; diff --git a/crypto/src/asn1/x509/V2AttributeCertificateInfoGenerator.cs b/crypto/src/asn1/x509/V2AttributeCertificateInfoGenerator.cs index c78c966b0..86d396e30 100644 --- a/crypto/src/asn1/x509/V2AttributeCertificateInfoGenerator.cs +++ b/crypto/src/asn1/x509/V2AttributeCertificateInfoGenerator.cs @@ -36,7 +36,7 @@ namespace Org.BouncyCastle.Asn1.X509 public V2AttributeCertificateInfoGenerator() { - this.version = new DerInteger(1); + this.version = DerInteger.One; attributes = new Asn1EncodableVector(); } diff --git a/crypto/src/asn1/x509/V2TBSCertListGenerator.cs b/crypto/src/asn1/x509/V2TBSCertListGenerator.cs index d744ed664..fb568f21c 100644 --- a/crypto/src/asn1/x509/V2TBSCertListGenerator.cs +++ b/crypto/src/asn1/x509/V2TBSCertListGenerator.cs @@ -29,7 +29,7 @@ namespace Org.BouncyCastle.Asn1.X509 */ public class V2TbsCertListGenerator { - private DerInteger version = new DerInteger(1); + private DerInteger version = DerInteger.One; private AlgorithmIdentifier signature; private X509Name issuer; private Time thisUpdate, nextUpdate; diff --git a/crypto/src/asn1/x509/V3TBSCertificateGenerator.cs b/crypto/src/asn1/x509/V3TBSCertificateGenerator.cs index f58e4a7ab..465f17e57 100644 --- a/crypto/src/asn1/x509/V3TBSCertificateGenerator.cs +++ b/crypto/src/asn1/x509/V3TBSCertificateGenerator.cs @@ -22,7 +22,7 @@ namespace Org.BouncyCastle.Asn1.X509 */ public class V3TbsCertificateGenerator { - internal DerTaggedObject version = new DerTaggedObject(0, new DerInteger(2)); + internal DerTaggedObject version = new DerTaggedObject(0, DerInteger.Two); internal DerInteger serialNumber; internal AlgorithmIdentifier signature; internal X509Name issuer; |