⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 cisocadoc.h

📁 cisoca_for_mysql 编码
💻 H
字号:
/* ====================================================================
 * The Ciso Software License, Version 1.0
 *
 * Copyright (c) 2003-2004 The Chinese Infomation security organization.  
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 *
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 *
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in
 *    the documentation and/or other materials provided with the
 *    distribution.
 *
 * 3. The end-user documentation included with the redistribution,
 *    if any, must include the following acknowledgment:
 *       "This product includes software developed by the
 *        Ciso(Chinese Infomation Security Organization) Software 
 *        (http://www.infosecurity.org.cn/)."
 *    Alternately, this acknowledgment may appear in the software itself,
 *    if and wherever such third-party acknowledgments normally appear.
 */

#if !defined(AFX_CESCADOC_H__4441DB3F_2A0A_42C1_91BE_115EA14441B0__INCLUDED_)
#define AFX_CESCADOC_H__4441DB3F_2A0A_42C1_91BE_115EA14441B0__INCLUDED_

#include "CACore.h"
#include "ColHeader.h"
#include "mysql.h"

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#define CONFIG_FILE		".\\conf\\ca.conf"		// CA配置文件

#define CA_DATABASE		"cmc"					// CA数据库文件位置
#define TB_NAME			"userinfo"				// CA信息数据库

#define CA_CONF_DIR     "..\\conf"
#define CA_CERT_DIR		".\\CACert"					// CA证书目录
#define USER_CERT_DIR	".\\UserCert"				// 用户证书目录
#define CA_SN_DIR       ".\\CACert\\serial.txt"		// 证书序列号
#define CA_CERTIFICATE  ".\\CACert\\RootCert.crt"   // CA证书
#define CA_PRIVATE_KEY  ".\\CACert\\RootKey.pem"    // CA私钥
#define MAX_CONF_BUF 256
#define WANT_TO_SHOW_VALID_CERT   0x00
#define WANT_TO_SHOW_REVOKE_CERT  0x01
#define WANT_TO_GENERATE_CRL      0x02
#include "PropertyFile.h"

//class CPropertyFile;

class CUserInfo;

class CCisoCADoc : public CDocument
{
protected: // create from serialization only
	CCisoCADoc();
	DECLARE_DYNCREATE(CCisoCADoc)

// Attributes
public:
	// 
	BOOL isInit;
	// CA核心对象
	CCACore    m_CaCore;
	//
	// 表头栏对象与配置文件对象 
	//
	CColHeader m_ColHeader;
	CPropertyFile *m_pConF;

	// 数据库变量

	// 连接对象
	//_ConnectionPtr m_pConn;
	MYSQL *m_pMySQL;
	CString user;
	CString pwd;
	// 记录集对象
	//_RecordsetPtr  m_pSet;
	// 连接字符串
	// CString        m_ConnStr;
// Operations
public:

// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CCisoCADoc)
	public:
	virtual BOOL OnNewDocument();
	virtual void Serialize(CArchive& ar);
	//}}AFX_VIRTUAL

// Implementation
public:
	int UpdateCertState(CStringList *pList);
	void ClearAllData();
	//
	// 插入记录
	//
	int InsertDB(CUserInfo *pUI);
	// 
	// 查询数据库
	//
	int SelectDB(int want,CListCtrl *pList);
	// 
	// 连接数据库
	//
	BOOL ConnectDB();

	virtual ~CCisoCADoc();
#ifdef _DEBUG
	virtual void AssertValid() const;
	virtual void Dump(CDumpContext& dc) const;
#endif

protected:
	void CheckFileSize(unsigned int size);
	void CheckDir();
// Generated message map functions
protected:
	//{{AFX_MSG(CCisoCADoc)
		// NOTE - the ClassWizard will add and remove member functions here.
		//    DO NOT EDIT what you see in these blocks of generated code !
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
};

/////////////////////////////////////////////////////////////////////////////

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_CESCADOC_H__4441DB3F_2A0A_42C1_91BE_115EA14441B0__INCLUDED_)

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -