Pkcs7Recipient.cs 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. //
  2. // Pkcs7Recipient.cs - System.Security.Cryptography.Pkcs.Pkcs7Recipient
  3. //
  4. // Author:
  5. // Sebastien Pouliot ([email protected])
  6. //
  7. // (C) 2003 Motus Technologies Inc. (http://www.motus.com)
  8. //
  9. #if NET_1_2
  10. using System;
  11. using System.Collections;
  12. using System.Security.Cryptography.X509Certificates;
  13. namespace System.Security.Cryptography.Pkcs {
  14. public class Pkcs7Recipient {
  15. private SubjectIdentifierType _recipient;
  16. private X509CertificateEx _certificate;
  17. // constructor
  18. public Pkcs7Recipient (SubjectIdentifierType recipientIdentifierType, X509CertificateEx certificate)
  19. {
  20. if (certificate == null)
  21. throw new ArgumentNullException ("certificate");
  22. if (recipientIdentifierType == SubjectIdentifierType.Unknown)
  23. _recipient = SubjectIdentifierType.IssuerAndSerialNumber;
  24. else
  25. _recipient = recipientIdentifierType;
  26. _certificate = certificate;
  27. }
  28. // properties
  29. public X509CertificateEx Certificate {
  30. get { return _certificate; }
  31. }
  32. public SubjectIdentifierType RecipientIdentifierType {
  33. get { return _recipient; }
  34. }
  35. }
  36. }
  37. #endif