raservice.h

来自「完成数字证书加密」· C头文件 代码 · 共 71 行

H
71
字号
#ifndef _RASERVICE_H_#define _RASERVICE_H_/******************************************************************** * *	RFC2314 *	PKCS #10: Certification Request Syntax *	Version 1.5 * *******************************************************************/#include <openssl/evp.h>#include <openssl/x509.h>#include <openssl/x509v3.h>#include <openssl/pem.h>#include "NggObject.h"using namespace std;// typedef struct {	char *CountryName;	char *StateName;	char *CityName;	char *OrganizationName;	char *UnitName;	char *CommonName;	char *EmailAdd;	char *PKey;	long notBefore;	long notAfter;} CertReqInfo;class RAService {//	public:		X509_REQ *m_req;	private:		EVP_PKEY *m_pkey;		//	public:		RAService();		~RAService();		// Generate certificate request		int GenerateCertReq(X509_REQ *req, CertReqInfo *pCertReqInfo, EVP_PKEY *pkey);		// Sign certificate request		int SignCertReq(X509_REQ *req);/*		string parseXML(string xml="", string type="get", string keyword="", string value="");		string locateInXML(NggObject* object, string type, string keyword, string value);*/			private:		// Get public key from certificate request		int CertReq_get_pubkey(X509_REQ *req, EVP_PKEY *pkey);		// Get attribute from certificate request		int CertReq_get_attr_by_NID(const X509_REQ *req, int nid, int lastpos, int *attr);		};#endif /* _RASERVICE_H_ */

⌨️ 快捷键说明

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