Leaked source code of windows server 2003
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.

204 lines
4.5 KiB

  1. // V1PubKey.h: interface for the CV1PublicKey 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_V1PUBKEY_H)
  10. #define SLBCCI_V1PUBKEY_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 "slbCci.h" // for KeySpec
  18. #include "APublicKey.h"
  19. class iop::CPublicKeyBlob;
  20. namespace cci
  21. {
  22. class CV1Card;
  23. class CV1PublicKey
  24. : public CAbstractPublicKey
  25. {
  26. public:
  27. // Types
  28. // C'tors/D'tors
  29. CV1PublicKey(CV1Card const &rv1card,
  30. KeySpec ks);
  31. virtual
  32. ~CV1PublicKey() throw();
  33. // Operators
  34. // Operations
  35. void
  36. AssociateWith(KeySpec ks);
  37. virtual void
  38. CKInvisible(bool flag);
  39. virtual void
  40. CredentialID(std::string const &rstrID);
  41. virtual void
  42. Derive(bool flag);
  43. virtual void
  44. ID(std::string const &rstrID);
  45. virtual void
  46. EndDate(Date const &rdtEnd);
  47. virtual void
  48. Encrypt(bool flag);
  49. virtual void
  50. Exponent(std::string const &rstrExp);
  51. virtual void
  52. Label(std::string const &rstrLabel);
  53. virtual void
  54. Local(bool flag);
  55. static CV1PublicKey *
  56. Make(CV1Card const &rv1card,
  57. KeySpec ks);
  58. virtual void
  59. Modifiable(bool flag);
  60. virtual void
  61. Modulus(std::string const &rstrMod);
  62. virtual void
  63. StartDate(Date const &rdtStart);
  64. virtual void
  65. Subject(std::string const &rstrSubject);
  66. virtual void
  67. Verify(bool flag);
  68. virtual void
  69. VerifyRecover(bool flag);
  70. virtual void
  71. Wrap(bool flag);
  72. // Access
  73. virtual bool
  74. CKInvisible();
  75. virtual std::string
  76. CredentialID();
  77. virtual bool
  78. Derive();
  79. virtual bool
  80. Encrypt();
  81. virtual Date
  82. EndDate();
  83. virtual std::string
  84. Exponent();
  85. virtual std::string
  86. ID();
  87. virtual std::string
  88. Label();
  89. virtual bool
  90. Local();
  91. virtual bool
  92. Modifiable();
  93. virtual std::string
  94. Modulus();
  95. virtual bool
  96. Private();
  97. virtual Date
  98. StartDate();
  99. virtual std::string
  100. Subject();
  101. virtual bool
  102. Verify();
  103. virtual bool
  104. VerifyRecover();
  105. virtual bool
  106. Wrap();
  107. // Predicates
  108. protected:
  109. // Types
  110. // C'tors/D'tors
  111. // Operators
  112. // Operations
  113. virtual void
  114. DoDelete();
  115. // Access
  116. // Predicates
  117. virtual bool
  118. DoEquals(CAbstractPublicKey const &rhs) const;
  119. // Variables
  120. private:
  121. // Types
  122. // C'tors/D'tors
  123. CV1PublicKey(CAbstractPublicKey const &rhs);
  124. // not defined, copying not allowed.
  125. // Operators
  126. CAbstractPublicKey &
  127. operator=(CAbstractPublicKey const &rhs);
  128. // not defined, initialization not allowed.
  129. // Operations
  130. void
  131. Load();
  132. void
  133. Store();
  134. // Access
  135. // Predicates
  136. // Variables
  137. KeySpec m_ks;
  138. std::auto_ptr<iop::CPublicKeyBlob> m_apKeyBlob;
  139. };
  140. } // namespace cci
  141. #endif // SLBCCI_V1PUBKEY_H