summary refs log tree commit diff
path: root/crypto/src/x509/X509V2AttributeCertificateGenerator.cs
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/src/x509/X509V2AttributeCertificateGenerator.cs')
-rw-r--r--crypto/src/x509/X509V2AttributeCertificateGenerator.cs54
1 files changed, 1 insertions, 53 deletions
diff --git a/crypto/src/x509/X509V2AttributeCertificateGenerator.cs b/crypto/src/x509/X509V2AttributeCertificateGenerator.cs
index f49eea63f..643604181 100644
--- a/crypto/src/x509/X509V2AttributeCertificateGenerator.cs
+++ b/crypto/src/x509/X509V2AttributeCertificateGenerator.cs
@@ -4,9 +4,7 @@ using System.Collections;
 using Org.BouncyCastle.Asn1;
 using Org.BouncyCastle.Asn1.X509;
 using Org.BouncyCastle.Crypto;
-using Org.BouncyCastle.Crypto.Operators;
 using Org.BouncyCastle.Math;
-using Org.BouncyCastle.Security;
 using Org.BouncyCastle.Security.Certificates;
 using Org.BouncyCastle.Utilities;
 
@@ -17,10 +15,7 @@ namespace Org.BouncyCastle.X509
 	{
 		private readonly X509ExtensionsGenerator extGenerator = new X509ExtensionsGenerator();
 
-		private V2AttributeCertificateInfoGenerator	acInfoGen;
-		private DerObjectIdentifier sigOID;
-		private AlgorithmIdentifier sigAlgId;
-		private string signatureAlgorithm;
+		private V2AttributeCertificateInfoGenerator acInfoGen;
 
 		public X509V2AttributeCertificateGenerator()
 		{
@@ -67,31 +62,6 @@ namespace Org.BouncyCastle.X509
 			acInfoGen.SetEndDate(new DerGeneralizedTime(date));
 		}
 
-        /// <summary>
-        /// Set the signature algorithm. This can be either a name or an OID, names
-        /// are treated as case insensitive.
-        /// </summary>
-        /// <param name="signatureAlgorithm">The algorithm name.</param>
-        [Obsolete("Not needed if Generate used with an ISignatureFactory")]
-        public void SetSignatureAlgorithm(
-			string signatureAlgorithm)
-		{
-			this.signatureAlgorithm = signatureAlgorithm;
-
-			try
-			{
-				sigOID = X509Utilities.GetAlgorithmOid(signatureAlgorithm);
-			}
-			catch (Exception)
-			{
-				throw new ArgumentException("Unknown signature type requested");
-			}
-
-			sigAlgId = X509Utilities.GetSigAlgID(sigOID, signatureAlgorithm);
-
-			acInfoGen.SetSignature(sigAlgId);
-		}
-
 		/// <summary>Add an attribute.</summary>
 		public void AddAttribute(
 			X509Attribute attribute)
@@ -130,28 +100,6 @@ namespace Org.BouncyCastle.X509
 		}
 
         /// <summary>
-        /// Generate an X509 certificate, based on the current issuer and subject.
-        /// </summary>
-        [Obsolete("Use Generate with an ISignatureFactory")]
-        public IX509AttributeCertificate Generate(
-			AsymmetricKeyParameter privateKey)
-		{
-			return Generate(privateKey, null);
-		}
-
-        /// <summary>
-        /// Generate an X509 certificate, based on the current issuer and subject,
-        /// using the supplied source of randomness, if required.
-        /// </summary>
-        [Obsolete("Use Generate with an ISignatureFactory")]
-        public IX509AttributeCertificate Generate(
-			AsymmetricKeyParameter	privateKey,
-			SecureRandom			random)
-        {
-            return Generate(new Asn1SignatureFactory(signatureAlgorithm, privateKey, random));
-        }
-
-        /// <summary>
         /// Generate a new X.509 Attribute Certificate using the passed in SignatureCalculator.
         /// </summary>
         /// <param name="signatureCalculatorFactory">A signature calculator factory with the necessary algorithm details.</param>