-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathsm2cert.h
42 lines (35 loc) · 911 Bytes
/
sm2cert.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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#ifndef SM2CERT_H
#define SM2CERT_H
#include "tserror.h"
#include <memory>
#include <openssl/asn1.h>
#include <openssl/conf.h>
#include <openssl/evp.h>
#include <openssl/pem.h>
#include <openssl/x509.h>
#include <openssl/x509v3.h>
#include <string>
#include <time.h>
#include <QFile>
#include <QWidget>
namespace Ui {
class Sm2Cert;
}
class Sm2Cert : public QWidget
{
Q_OBJECT
public:
explicit Sm2Cert(QWidget *parent = nullptr);
~Sm2Cert();
private slots:
void on_pushButtonGen_clicked();
private:
Ui::Sm2Cert *ui;
/* type等于1生成签名证书,等于0生成加密证书 */
std::shared_ptr<X509> genCert(int type,
std::shared_ptr<X509> midCA,
std::shared_ptr<EVP_PKEY> midcaPkey,
QString CNname,
QString days);
};
#endif // SM2CERT_H