AusweisApp2
Lade ...
Suche ...
Keine Treffer
KeyPair.h
gehe zur Dokumentation dieser Datei
1
5/*
6 * \brief Generates a new private/public key with an X509 certificate.
7 */
8
9#pragma once
10
11#include <openssl/evp.h>
12#include <openssl/x509.h>
13
14#include <QByteArray>
15#include <QSharedPointer>
16#include <QSslCertificate>
17#include <QSslKey>
18
19namespace governikus
20{
21
23{
24 private:
25 const QSslKey mKey;
26 const QSslCertificate mCertificate;
27
28 KeyPair() = default;
29 KeyPair(const QSslKey& pKey, const QSslCertificate& pCert);
30
31 static QByteArray rewriteCertificate(X509* pX509);
32 static QSharedPointer<X509> createCertificate(EVP_PKEY* pPkey);
33 static EVP_PKEY* createKey();
34
35 public:
36 static KeyPair generate();
37
38 [[nodiscard]] const QSslKey& getKey() const;
39 [[nodiscard]] const QSslCertificate& getCertificate() const;
40 [[nodiscard]] bool isValid() const;
41};
42
43
44} // namespace governikus
Definition KeyPair.h:23
const QSslKey & getKey() const
Definition KeyPair.cpp:86
static KeyPair generate()
Definition KeyPair.cpp:61
bool isValid() const
Definition KeyPair.cpp:187
const QSslCertificate & getCertificate() const
Definition KeyPair.cpp:92
Implementation of GeneralAuthenticate response APDUs.
Definition CommandApdu.h:16