forked from Dadoum/zsign-Windows
-
Notifications
You must be signed in to change notification settings - Fork 0
/
openssl.h
27 lines (22 loc) · 1002 Bytes
/
openssl.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#pragma once
#include "common/json.h"
bool GetCertSubjectCN(const string &strCertData, string &strSubjectCN);
bool GetCMSInfo(uint8_t *pCMSData, uint32_t uCMSLength, JValue &jvOutput);
bool GetCMSContent(const string &strCMSDataInput, string &strContentOutput);
bool GenerateCMS(const string &strSignerCertData, const string &strSignerPKeyData, const string &strCDHashData, const string &strCDHashPlist, string &strCMSOutput);
class ZSignAsset
{
public:
ZSignAsset();
public:
bool GenerateCMS(const string &strCDHashData, const string &strCDHashesPlist, const string &strCodeDirectorySlotSHA1, const string &strAltnateCodeDirectorySlot256, string &strCMSOutput);
bool Init(const string &strSignerCertFile, const string &strSignerPKeyFile, const string &strProvisionFile, const string &strEntitlementsFile, const string &strPassword);
public:
string m_strTeamId;
string m_strSubjectCN;
string m_strProvisionData;
string m_strEntitlementsData;
private:
void *m_evpPKey;
void *m_x509Cert;
};