📄 raservice.h
字号:
#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 + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -