Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

95 lines
3.2 KiB

  1. // ACert.cpp -- CAbstractCertificate class definition
  2. // (c) Copyright Schlumberger Technology Corp., unpublished work, created
  3. // 1999. This computer program includes Confidential, Proprietary
  4. // Information and is a Trade Secret of Schlumberger Technology Corp. All
  5. // use, disclosure, and/or reproduction is prohibited unless authorized
  6. // in writing. All Rights Reserved.
  7. #include <algorithm>
  8. #include <functional>
  9. #include "cciCert.h"
  10. #include "cciCont.h"
  11. #include "AKeyPair.h"
  12. #include "TransactionWrap.h"
  13. #include "AContHelp.h"
  14. using namespace std;
  15. using namespace cci;
  16. /////////////////////////// LOCAL/HELPER /////////////////////////////////
  17. /////////////////////////// PUBLIC /////////////////////////////////
  18. // Types
  19. // C'tors/D'tors
  20. CAbstractCertificate::~CAbstractCertificate()
  21. {}
  22. // Operators
  23. bool
  24. CAbstractCertificate::operator==(CAbstractCertificate const &rhs) const
  25. {
  26. CTransactionWrap wrap(m_hcard);
  27. CTransactionWrap rhswrap(rhs.m_hcard);
  28. return CProtectableCrypt::operator==(rhs) &&
  29. DoEquals(rhs);
  30. }
  31. bool
  32. CAbstractCertificate::operator!=(CAbstractCertificate const &rhs) const
  33. {
  34. return !(*this == rhs);
  35. }
  36. // Operations
  37. void
  38. CAbstractCertificate::Delete()
  39. {
  40. CTransactionWrap wrap(m_hcard);
  41. // Remove any references to this object from the container
  42. vector<CContainer> vCont(m_hcard->EnumContainers());
  43. for_each(vCont.begin(), vCont.end(),
  44. EraseFromContainer<CCertificate, CAbstractKeyPair>(CCertificate(this),
  45. CAbstractKeyPair::Certificate,
  46. CAbstractKeyPair::Certificate));
  47. DoDelete();
  48. }
  49. // Access
  50. // Predicates
  51. // Static Variables
  52. /////////////////////////// PROTECTED /////////////////////////////////
  53. // C'tors/D'tors
  54. CAbstractCertificate::CAbstractCertificate(CAbstractCard const &racard,
  55. ObjectAccess oa,
  56. bool fAlwaysZip)
  57. : slbRefCnt::RCObject(),
  58. CAbstractZipValue(racard, oa, fAlwaysZip)
  59. {}
  60. // Operators
  61. // Operations
  62. // Access
  63. // Predicates
  64. // Static Variables
  65. /////////////////////////// PRIVATE /////////////////////////////////
  66. // C'tors/D'tors
  67. // Operators
  68. // Operations
  69. // Access
  70. // Predicates
  71. // Static Variables