conexus logo

certificate.h

Go to the documentation of this file.
00001 /***************************************************************************
00002  *   Copyright (C) 2007 by Rick L. Vinyard, Jr.                            *
00003  *   rvinyard@cs.nmsu.edu                                                  *
00004  *                                                                         *
00005  *   This file is part of the conexus library.                             *
00006  *                                                                         *
00007  *   The conexus library is free software; you can redistribute it and/or  *
00008  *   modify it under the terms of the GNU General Public License           *
00009  *   version 3 as published by the Free Software Foundation.               *
00010  *                                                                         *
00011  *   The conexus library is distributed in the hope that it will be        *
00012  *   useful, but WITHOUT ANY WARRANTY; without even the implied warranty   *
00013  *   of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU   *
00014  *   General Public License for more details.                              *
00015  *                                                                         *
00016  *   You should have received a copy of the GNU General Public License     *
00017  *   along with this software. If not see <http://www.gnu.org/licenses/>.  *
00018  ***************************************************************************/
00019 #ifndef CONEXUSNSSCERTIFICATE_H
00020 #define CONEXUSNSSCERTIFICATE_H
00021 
00022 #include <string>
00023 
00024 #include <cert.h>
00025 #include <certt.h>
00026 
00027 #include <conexus/pointer.h>
00028 #include <conexus-nss/enums.h>
00029 
00030 namespace Conexus
00031 {
00032 
00033   namespace NSS
00034   {
00035 
00036 
00040     class Certificate
00041     {
00042       public:
00043         typedef ConexusPointer<Certificate> pointer;
00044 
00045       protected:
00046         Certificate(CERTCertificate* cobj=NULL);
00047 
00048       public:
00049 
00050         static pointer create( CERTCertificate* cobj = NULL );
00051 
00052         static pointer create( const std::string& nickname, void* wincx=NULL);
00053 
00054         ~Certificate();
00055 
00056         bool verify_name( const std::string& hostname );
00057 
00058         CERT_VALIDITY check_time_validity( int64_t time, bool allow_override );
00059 
00060         bool ca_names_in_chain( CERTDistNames* ca_names );
00061 
00062         KEA kea();
00063 
00064         SSLKEAType nss_kea();
00065 
00066         operator bool();
00067 
00068         void set_cobj( CERTCertificate* cobj );
00069         
00070         CERTCertificate* cobj();
00071 
00072       protected:
00073         CERTCertificate* m_cobj;
00074     };
00075 
00076   }
00077 
00078 }
00079 
00080 #endif

Generated on Wed Jul 8 15:50:07 2009 for conexus by doxygen 1.5.8