mirror of
https://github.com/chris2511/xca.git
synced 2026-09-12 19:51:05 +05:00
When XCA started in 2002, there were no C++ initializers. Drop explicit initializers from the constructors. - Fix indentations of section declarators. - Replace NULL by nullptr when feasible. - Sort private section: properties first, then methods.
43 lines
928 B
C++
43 lines
928 B
C++
/* vi: set sw=4 ts=4:
|
|
*
|
|
* Copyright (C) 2001 - 2020 Christian Hohnstaedt.
|
|
*
|
|
* All rights reserved.
|
|
*/
|
|
|
|
#ifndef __PKI_PKCS7_H
|
|
#define __PKI_PKCS7_H
|
|
|
|
#include <QString>
|
|
#include "pki_multi.h"
|
|
|
|
#include <openssl/pkcs7.h>
|
|
|
|
class pki_x509;
|
|
|
|
class pki_pkcs7: public pki_multi
|
|
{
|
|
Q_OBJECT
|
|
|
|
friend class pki_x509;
|
|
|
|
protected:
|
|
PKCS7 *p7{};
|
|
void signBio(pki_x509 *crt, BIO *bio);
|
|
void encryptBio(pki_x509 *crt, BIO *bio);
|
|
void append_certs(PKCS7 *myp7, const QString &name);
|
|
|
|
public:
|
|
pki_pkcs7(const QString &name = QString());
|
|
virtual ~pki_pkcs7();
|
|
|
|
void signFile(pki_x509 *crt, const QString &filename);
|
|
void signCert(pki_x509 *crt, pki_x509 *contCert);
|
|
void encryptFile(pki_x509 *crt, const QString &filename);
|
|
void writeP7(XFile &file, bool PEM);
|
|
void fromPEM_BIO(BIO *bio, const QString &name);
|
|
void fromPEMbyteArray(const QByteArray &, const QString &);
|
|
void fload(const QString &name);
|
|
};
|
|
#endif
|