Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastien Pouliot <sebastien@ximian.com>2003-03-08 03:50:07 +0300
committerSebastien Pouliot <sebastien@ximian.com>2003-03-08 03:50:07 +0300
commit9a324b18d74f32c8967d4c41a4e42bc7362d7c59 (patch)
treef56f6acaee66621aaadba075c30ea79b3f63e678 /mcs/class/Mono.Security/Mono.Security.Authenticode
parente6349ed837df620d83844e0eba9419100f3df698 (diff)
2003-03-07 Sebastien Pouliot (spouliot@videotron.ca)
* SoftwarePublisherCertificate.cs: I've no idea how it got there ? svn path=/trunk/mcs/; revision=12339
Diffstat (limited to 'mcs/class/Mono.Security/Mono.Security.Authenticode')
-rw-r--r--mcs/class/Mono.Security/Mono.Security.Authenticode/SoftwarePublisherCertificate.cs62
1 files changed, 0 insertions, 62 deletions
diff --git a/mcs/class/Mono.Security/Mono.Security.Authenticode/SoftwarePublisherCertificate.cs b/mcs/class/Mono.Security/Mono.Security.Authenticode/SoftwarePublisherCertificate.cs
deleted file mode 100644
index f7bd219bf63..00000000000
--- a/mcs/class/Mono.Security/Mono.Security.Authenticode/SoftwarePublisherCertificate.cs
+++ /dev/null
@@ -1,62 +0,0 @@
-//
-// SoftwarePublisherCertificate.cs
-// - Software Publisher Certificates Implementation
-//
-// Author:
-// Sebastien Pouliot (spouliot@motus.com)
-//
-// (C) 2003 Motus Technologies Inc. (http://www.motus.com)
-//
-
-using System;
-using System.Collections;
-using System.IO;
-using System.Security.Cryptography.X509Certificates;
-
-using Mono.Security;
-
-namespace Mono.Security.Authenticode {
-
- public class SoftwarePublisherCertificate {
-
- private PKCS7.SignedData pkcs7;
-
- public SoftwarePublisherCertificate ()
- {
- pkcs7 = new PKCS7.SignedData ();
- pkcs7.ContentInfo.ContentType = PKCS7.data;
- }
-
- public SoftwarePublisherCertificate (byte[] spc) : this ()
- {
- PKCS7.ContentInfo ci = new PKCS7.ContentInfo (spc);
- if (ci.ContentType != PKCS7.signedData)
- throw new ArgumentException ("Unsupported ContentType");
- pkcs7 = new PKCS7.SignedData (ci.Content);
- }
-
- public X509CertificateCollection Certificates {
- get { return pkcs7.Certificates; }
- }
-
- public ArrayList CRLs {
- get { return pkcs7.CRLs; }
- }
-
- public byte[] GetBytes ()
- {
- PKCS7.ContentInfo ci = new PKCS7.ContentInfo (PKCS7.signedData);
- ci.Content.Add (pkcs7.ASN1);
- return ci.GetBytes ();
- }
-
- static public SoftwarePublisherCertificate CreateFromFile (string filename)
- {
- FileStream fs = File.Open (filename, FileMode.Open, FileAccess.Read, FileShare.Read);
- byte[] data = new byte [fs.Length];
- fs.Read (data, 0, data.Length);
- fs.Close ();
- return new SoftwarePublisherCertificate (data);
- }
- }
-}