home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2009 February / PCWFEB09.iso / Software / Linux / SLAX 6.0.8 / slax-6.0.8.iso / slax / base / 006-devel.lzm / usr / include / ksslx509v3.h < prev    next >
Encoding:
C/C++ Source or Header  |  2005-10-10  |  3.2 KB  |  123 lines

  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.  
  21. #ifndef _KSSLX509V3_H
  22. #define _KSSLX509V3_H
  23.  
  24. #include <qstring.h>
  25.  
  26. #include <kdelibs_export.h>
  27.  
  28. // ### KDE4: fix constness of methods
  29. /**
  30.  * KDE X509v3 Flag Class
  31.  *
  32.  * This class is used to track X509v3 flags for 
  33.  *
  34.  * @author George Staikos <staikos@kde.org>
  35.  * @see KExtendedSocket, TCPSlaveBase
  36.  * @short KDE SSL Class
  37.  */
  38. class KIO_EXPORT KSSLX509V3 {
  39. friend class KSSLCertificate;
  40. friend class KSSLCertificatePrivate;
  41. public:
  42.     /**
  43.      *  Destroy this object
  44.      */
  45.     ~KSSLX509V3();
  46.  
  47.     /**
  48.      *  Determine if this certificate can be used by a certificate authority
  49.      *  @return true if it can be used by a certificate authority
  50.      */
  51.     bool certTypeCA();
  52.  
  53.     /**
  54.      *  Determine if this certificate can be used by an SSL signer
  55.      *  @return true if it can be used by an SSL signer
  56.      */
  57.     bool certTypeSSLCA();
  58.  
  59.     /**
  60.      *  Determine if this certificate can be used by an S/MIME signer
  61.      *  @return true if it can be used by an S/MIME signer
  62.      */
  63.     bool certTypeEmailCA();
  64.  
  65.     /**
  66.      *  Determine if this certificate can be used by a code certificate signer
  67.      *  @return true if it can be used by a code certificate signer
  68.      */
  69.     bool certTypeCodeCA();
  70.  
  71.     /**
  72.      *  Determine if this certificate can be used by an SSL client
  73.      *  @return true if it can be used by an SSL client
  74.      */
  75.     bool certTypeSSLClient();
  76.  
  77.     /**
  78.      *  Determine if this certificate can be used by an SSL server
  79.      *  @return true if it can be used by an SSL server
  80.      */
  81.     bool certTypeSSLServer();
  82.  
  83.     /**
  84.      *  Determine if this certificate can be used by a Netscape SSL server
  85.      *  @return true if it can be used by a Netscape SSL server
  86.      */
  87.     bool certTypeNSSSLServer();
  88.  
  89.     /**
  90.      *  Determine if this certificate can be used for S/MIME
  91.      *  @return true if it can be used for S/MIME
  92.      */
  93.     bool certTypeSMIME();
  94.  
  95.     /**
  96.      *  Determine if this certificate can be used for S/MIME encryption
  97.      *  @return true if it can be used for S/MIME encryption
  98.      */
  99.     bool certTypeSMIMEEncrypt();
  100.  
  101.     /**
  102.      *  Determine if this certificate can be used for S/MIME signing
  103.      *  @return true if it can be used for S/MIME signing
  104.      */
  105.     bool certTypeSMIMESign();
  106.  
  107.     /**
  108.      *  Determine if this certificate can be used for revocation signing
  109.      *  @return true if it can be used for revocation signing
  110.      */
  111.     bool certTypeCRLSign();
  112.  
  113. private:
  114.     class KSSLX509V3Private;
  115.     KSSLX509V3Private *d;
  116.  
  117. protected:
  118.     KSSLX509V3();
  119.     long flags;  // warning: this is only valid for up to 16 flags + 16 CA.
  120. };
  121.  
  122. #endif
  123.