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.

196 lines
4.4 KiB

  1. // V2PubKey.h: interface for the CV2PublicKey class.
  2. //
  3. // (c) Copyright Schlumberger Technology Corp., unpublished work, created
  4. // 1999. This computer program includes Confidential, Proprietary
  5. // Information and is a Trade Secret of Schlumberger Technology Corp. All
  6. // use, disclosure, and/or reproduction is prohibited unless authorized
  7. // in writing. All Rights Reserved.
  8. //////////////////////////////////////////////////////////////////////
  9. #if !defined(SLBCCI_V2PUBKEY_H)
  10. #define SLBCCI_V2PUBKEY_H
  11. // Note: This file should only be included by the CCI, not directly
  12. // by the client.
  13. #include <string>
  14. #include <vector>
  15. #include <memory> // for auto_ptr
  16. #include <slbRCObj.h>
  17. #include "APublicKey.h"
  18. #include "slbarch.h"
  19. namespace cci
  20. {
  21. class CV2Card;
  22. class CPubKeyInfoRecord;
  23. class CV2PublicKey
  24. : public CAbstractPublicKey
  25. {
  26. public:
  27. // Types
  28. // C'tors/D'tors
  29. CV2PublicKey(CV2Card const &rv2card,
  30. ObjectAccess oa);
  31. CV2PublicKey(CV2Card const &rv2card,
  32. SymbolID sidHandle,
  33. ObjectAccess oa);
  34. virtual
  35. ~CV2PublicKey() throw();
  36. // Operators
  37. // Operations
  38. virtual void
  39. CKInvisible(bool flag);
  40. virtual void
  41. CredentialID(std::string const &rstrID);
  42. virtual void
  43. Derive(bool flag);
  44. virtual void
  45. ID(std::string const &rstrID);
  46. virtual void
  47. EndDate(Date const &rdtEnd);
  48. virtual void
  49. Encrypt(bool flag);
  50. virtual void
  51. Exponent(std::string const &rstrExp);
  52. virtual void
  53. Label(std::string const &rstrLabel);
  54. virtual void
  55. Local(bool flag);
  56. static CV2PublicKey *
  57. Make(CV2Card const &rv2card,
  58. SymbolID sidHandle,
  59. ObjectAccess oa);
  60. virtual void
  61. Modifiable(bool flag);
  62. virtual void
  63. Modulus(std::string const &rstrMod);
  64. virtual void
  65. StartDate(Date const &rdtStart);
  66. virtual void
  67. Subject(std::string const &rstrSubject);
  68. virtual void
  69. Verify(bool flag);
  70. virtual void
  71. VerifyRecover(bool flag);
  72. virtual void
  73. Wrap(bool flag);
  74. // Access
  75. virtual bool
  76. CKInvisible();
  77. virtual std::string
  78. CredentialID();
  79. virtual SymbolID
  80. Handle() const;
  81. virtual bool
  82. Derive();
  83. virtual bool
  84. Encrypt();
  85. virtual Date
  86. EndDate();
  87. virtual std::string
  88. Exponent();
  89. virtual std::string
  90. ID();
  91. virtual std::string
  92. Label();
  93. virtual bool
  94. Local();
  95. virtual bool
  96. Modifiable();
  97. virtual std::string
  98. Modulus();
  99. virtual bool
  100. Private();
  101. virtual Date
  102. StartDate();
  103. virtual std::string
  104. Subject();
  105. virtual bool
  106. Verify();
  107. virtual bool
  108. VerifyRecover();
  109. virtual bool
  110. Wrap();
  111. // Predicates
  112. protected:
  113. // Types
  114. // C'tors/D'tors
  115. // Operators
  116. // Operations
  117. virtual void
  118. DoDelete();
  119. // Access
  120. // Predicates
  121. virtual bool
  122. DoEquals(CAbstractPublicKey const &rhs) const;
  123. // Variables
  124. private:
  125. // Types
  126. // C'tors/D'tors
  127. CV2PublicKey(CAbstractPublicKey const &rhs);
  128. // not defined, copying not allowed.
  129. // Operators
  130. CAbstractPublicKey &
  131. operator=(CAbstractPublicKey const &rhs);
  132. // not defined, initialization not allowed.
  133. // Operations
  134. void
  135. Setup(CV2Card const &rv2card);
  136. // Access
  137. // Predicates
  138. // Variables
  139. SymbolID m_sidHandle;
  140. std::auto_ptr<CPubKeyInfoRecord> m_apcir;
  141. };
  142. } // namespace cci
  143. #endif // SLBCCI_V2PUBKEY_H