Home C-Bits Package Documentation Project Page

Main Page   Namespace List   Compound List   File List   Compound Members   File Members  

SSLCert.h

Go to the documentation of this file.
00001 /* ====================================================================
00002  *              The CBITS Software License, Version 1.0
00003  *
00004  *               Copyright (c) 2002-2003 Bruce Lowery
00005  *                       All rights reserved
00006  *
00007  * Redistribution and use of this software, in source and binary forms, 
00008  * with or without modification, are permitted provided that the above 
00009  * copyright notice, this paragraph, and the following paragraph are 
00010  * retained in each source code file.
00011  *
00012  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
00013  * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
00014  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
00015  * DISCLAIMED.  IN NO EVENT SHALL BRUCE LOWERY OR OTHER CONTRIBUTORS 
00016  * TO THE CBITS LIBRARY BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
00017  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
00018  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
00019  * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
00020  * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
00021  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
00022  * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
00023  * SUCH DAMAGE.
00024  * ====================================================================
00025  */
00026 #ifndef __CBITS_SSLCERT_H__
00027 #define __CBITS_SSLCERT_H__
00028 
00029 // STD C++
00030 #include <string>
00031 
00032 // CBITS
00033 #include <cbits/SSLSocket.h>
00034 #include <cbits/SSLServerSocket.h>
00035 #include <cbits/SSLPeer.h>
00036 
00037 // OpenSSL
00038 #include <openssl/x509.h>
00039 
00040 #ifdef BUILD_DLL
00041 #define EXPORT __declspec(dllexport)
00042 #else
00043 #define EXPORT
00044 #endif
00045 
00046 
00047 namespace cbits {
00048 
00053 class EXPORT SSLCert
00054 {
00055 
00056 public:
00057 
00062     const std::string  getFromDate () const;
00066     const std::string  getIssuer   () const;
00070     const std::string  getSerial   () const;
00074     const std::string  getSubject  () const;
00079     const std::string  getToDate   () const;
00083     const std::string  getVersion  () const;
00087     const bool         isExpired   () const;
00092     const bool         isRevoked   () const;
00093 
00094 private:
00095     friend class SSLSocket;
00096     friend class SSLServerSocket;
00097     friend class SSLPeer;
00098 
00099     SSLCert( X509* x509 );                     // Constructor
00100     SSLCert( const SSLCert& c );               // Copy constructor
00101     ~SSLCert();                                // Destructor
00102     SSLCert& operator=( const SSLCert& c );    // Assignment
00103 
00104     X509* _x509;
00105 };
00106 
00107 };
00108 
00109 
00110 #endif
00111 
00112 /*
00113  * $Id: SSLCert.h,v 1.4 2002/10/16 22:32:44 brulow Exp $
00114  * 
00115  * History: (Add nothing manually below)
00116  * -----------------------------------------------------------------------
00117  *
00118  * $Log: SSLCert.h,v $
00119  * Revision 1.4  2002/10/16 22:32:44  brulow
00120  * Improve doc, misc
00121  *
00122  * Revision 1.3  2002/10/10 01:16:22  brulow
00123  * Improve documentation
00124  *
00125  * Revision 1.2  2002/09/27 22:04:16  brulow
00126  * Add history footer to all .h .cpp files
00127  *
00128  *
00129  */

Generated by
doxygen
Hosted by
SourceForge