TDE core libraries
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.

123 lines
3.2KB

  1. /* This file is part of the KDE project
  2. *
  3. * Copyright (C) 2001-2003 George Staikos <staikos@kde.org>
  4. *
  5. * This library is free software; you can redistribute it and/or
  6. * modify it under the terms of the GNU Library General Public
  7. * License as published by the Free Software Foundation; either
  8. * version 2 of the License, or (at your option) any later version.
  9. *
  10. * This library is distributed in the hope that it will be useful,
  11. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  13. * Library General Public License for more details.
  14. *
  15. * You should have received a copy of the GNU Library General Public License
  16. * along with this library; see the file COPYING.LIB. If not, write to
  17. * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
  18. * Boston, MA 02110-1301, USA.
  19. */
  20. #ifndef _KSSLX509V3_H
  21. #define _KSSLX509V3_H
  22. #include <tqstring.h>
  23. #include <tdelibs_export.h>
  24. // ### KDE4: fix constness of methods
  25. /**
  26. * KDE X509v3 Flag Class
  27. *
  28. * This class is used to track X509v3 flags for
  29. *
  30. * @author George Staikos <staikos@kde.org>
  31. * @see KExtendedSocket, TCPSlaveBase
  32. * @short KDE SSL Class
  33. */
  34. class TDEIO_EXPORT KSSLX509V3 {
  35. friend class KSSLCertificate;
  36. friend class KSSLCertificatePrivate;
  37. public:
  38. /**
  39. * Destroy this object
  40. */
  41. ~KSSLX509V3();
  42. /**
  43. * Determine if this certificate can be used by a certificate authority
  44. * @return true if it can be used by a certificate authority
  45. */
  46. bool certTypeCA();
  47. /**
  48. * Determine if this certificate can be used by an SSL signer
  49. * @return true if it can be used by an SSL signer
  50. */
  51. bool certTypeSSLCA();
  52. /**
  53. * Determine if this certificate can be used by an S/MIME signer
  54. * @return true if it can be used by an S/MIME signer
  55. */
  56. bool certTypeEmailCA();
  57. /**
  58. * Determine if this certificate can be used by a code certificate signer
  59. * @return true if it can be used by a code certificate signer
  60. */
  61. bool certTypeCodeCA();
  62. /**
  63. * Determine if this certificate can be used by an SSL client
  64. * @return true if it can be used by an SSL client
  65. */
  66. bool certTypeSSLClient();
  67. /**
  68. * Determine if this certificate can be used by an SSL server
  69. * @return true if it can be used by an SSL server
  70. */
  71. bool certTypeSSLServer();
  72. /**
  73. * Determine if this certificate can be used by a Netscape SSL server
  74. * @return true if it can be used by a Netscape SSL server
  75. */
  76. bool certTypeNSSSLServer();
  77. /**
  78. * Determine if this certificate can be used for S/MIME
  79. * @return true if it can be used for S/MIME
  80. */
  81. bool certTypeSMIME();
  82. /**
  83. * Determine if this certificate can be used for S/MIME encryption
  84. * @return true if it can be used for S/MIME encryption
  85. */
  86. bool certTypeSMIMEEncrypt();
  87. /**
  88. * Determine if this certificate can be used for S/MIME signing
  89. * @return true if it can be used for S/MIME signing
  90. */
  91. bool certTypeSMIMESign();
  92. /**
  93. * Determine if this certificate can be used for revocation signing
  94. * @return true if it can be used for revocation signing
  95. */
  96. bool certTypeCRLSign();
  97. private:
  98. class KSSLX509V3Private;
  99. KSSLX509V3Private *d;
  100. protected:
  101. KSSLX509V3();
  102. long flags; // warning: this is only valid for up to 16 flags + 16 CA.
  103. };
  104. #endif