diff options
author | Peter Dettman <peter.dettman@bouncycastle.org> | 2022-06-29 14:15:10 +0700 |
---|---|---|
committer | Peter Dettman <peter.dettman@bouncycastle.org> | 2022-06-29 14:15:10 +0700 |
commit | 435210f10fd927653ce8fbc04ec537ae5d8966b6 (patch) | |
tree | 27b6ed1c029db271c3429ac57629d7f0156c5fed /crypto/src/tsp/TimeStampTokenGenerator.cs | |
parent | Refactoring around Platform (diff) | |
download | BouncyCastle.NET-ed25519-435210f10fd927653ce8fbc04ec537ae5d8966b6.tar.xz |
Generics migration complete
Diffstat (limited to 'crypto/src/tsp/TimeStampTokenGenerator.cs')
-rw-r--r-- | crypto/src/tsp/TimeStampTokenGenerator.cs | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/crypto/src/tsp/TimeStampTokenGenerator.cs b/crypto/src/tsp/TimeStampTokenGenerator.cs index 4289d7d24..0d6d102d3 100644 --- a/crypto/src/tsp/TimeStampTokenGenerator.cs +++ b/crypto/src/tsp/TimeStampTokenGenerator.cs @@ -1,5 +1,4 @@ using System; -using System.Collections; using System.Collections.Generic; using System.IO; using System.Text; @@ -39,7 +38,7 @@ namespace Org.BouncyCastle.Tsp private IStore<X509Crl> x509Crls; private IStore<X509V2AttributeCertificate> x509AttrCerts; // TODO Port changes from bc-java - //private IDictionary otherRevoc = Platform.CreateHashtable(); + //private Dictionary<> otherRevoc = new Dictionary<>(); private SignerInfoGenerator signerInfoGenerator; IDigestFactory digestCalculator; @@ -63,22 +62,18 @@ namespace Org.BouncyCastle.Tsp { } - public TimeStampTokenGenerator( SignerInfoGenerator signerInfoGen, IDigestFactory digestCalculator, DerObjectIdentifier tsaPolicy, bool isIssuerSerialIncluded) { - this.signerInfoGenerator = signerInfoGen; this.digestCalculator = digestCalculator; this.tsaPolicyOID = tsaPolicy; if (signerInfoGenerator.certificate == null) - { throw new ArgumentException("SignerInfoGenerator must have an associated certificate"); - } X509Certificate assocCert = signerInfoGenerator.certificate; TspUtil.ValidateCertificate(assocCert); @@ -123,7 +118,6 @@ namespace Org.BouncyCastle.Tsp .WithSignedAttributeGenerator(new TableGen2(signerInfoGen, essCertID)) .Build(signerInfoGen.contentSigner, signerInfoGen.certificate); } - } catch (Exception ex) { @@ -147,17 +141,13 @@ namespace Org.BouncyCastle.Tsp { } - internal static SignerInfoGenerator makeInfoGenerator( AsymmetricKeyParameter key, X509Certificate cert, string digestOID, - Asn1.Cms.AttributeTable signedAttr, Asn1.Cms.AttributeTable unsignedAttr) { - - TspUtil.ValidateCertificate(cert); // @@ -194,7 +184,6 @@ namespace Org.BouncyCastle.Tsp // throw new TspException("Can't find a SHA-1 implementation.", e); //} - string digestName = CmsSignedHelper.Instance.GetDigestAlgName(digestOID); string signatureName = digestName + "with" + CmsSignedHelper.Instance.GetEncryptionAlgName(CmsSignedHelper.Instance.GetEncOid(key, digestOID)); |