Mono.Tools.CertificateManager.Add C# (CSharp) Method

Add() static private method

static private Add ( ObjectType type, X509Store store, string file, string password, bool verbose ) : void
type ObjectType
store X509Store
file string
password string
verbose bool
return void
		static void Add (ObjectType type, X509Store store, string file, string password, bool verbose) 
		{
			switch (type) {
				case ObjectType.Certificate:
					X509CertificateCollection coll = LoadCertificates (file, password, verbose);
					foreach (X509Certificate x509 in coll) {
						store.Import (x509);
					}
					Console.WriteLine ("{0} certificate(s) added to store {1}.", 
						coll.Count, store.Name);
					break;
				case ObjectType.CRL:
					ArrayList list = LoadCRLs (file);
					foreach (X509Crl crl in list) {
						store.Import (crl);
					}
					Console.WriteLine ("{0} CRL(s) added to store {1}.", 
						list.Count, store.Name);
					break;
				default:
					throw new NotSupportedException (type.ToString ());
			}
		}