11#include <QCryptographicHash>
13#include <openssl/evp.h>
30 static const QMap<char, ProtocolType> cProtocol;
31 static const QMap<char, KeyAgreementType> cKeyAgreement;
32 static const QMap<char, MappingType> cMapping;
33 static const QMap<char, CipherType> cCipher;
34 static const QMap<char, SignatureType> cSignature;
35 static const QMap<char, std::optional<QCryptographicHash::Algorithm>> cHashAlgorithm;
36 static const QMap<char, std::optional<QCryptographicHash::Algorithm>> cRsaHashAlgorithm;
40 ProtocolType mProtocol;
41 KeyAgreementType mKeyAgreement;
45 std::optional<QCryptographicHash::Algorithm> mHashAlgorithm;
48 explicit SecurityProtocol(
const Oid& pOid);
50 [[nodiscard]]
const Oid&
getOid()
const;
51 [[nodiscard]] ProtocolType getProtocol()
const;
52 [[nodiscard]] KeyAgreementType getKeyAgreement()
const;
53 [[nodiscard]] MappingType getMapping()
const;
54 [[nodiscard]]
const EVP_CIPHER* getCipher()
const;
55 [[nodiscard]]
const char* getCipherString()
const;
56 [[nodiscard]]
int getKeySize()
const;
57 [[nodiscard]] SignatureType getSignature()
const;
60 bool operator==(
const SecurityProtocol& pOther)
const;
64inline QDebug
operator<<(QDebug pDbg,
const SecurityProtocol& pProtocol)
66 QDebugStateSaver saver(pDbg);
67 pDbg.nospace() << QByteArray(pProtocol.getOid());
#define defineEnumType(enumName,...)
Definition EnumHelper.h:90
Implementation of GeneralAuthenticate response APDUs.
Definition CommandApdu.h:16
UNDEFINED
Definition SecurityProtocol.h:22
ECDH AES_128_CBC
Definition SecurityProtocol.h:24
ECDH DES3_CBC
Definition SecurityProtocol.h:24
DH
Definition SecurityProtocol.h:22
ECDH AES_192_CBC
Definition SecurityProtocol.h:24
QCryptographicHash::Algorithm getHashAlgorithm() const
Definition CVCertificateBody.cpp:142
SIGNATURE * mSignature
Definition CVCertificate.h:48
QDebug operator<<(QDebug pDbg, const CommandApdu &pCommandApdu)
Definition CommandApdu.h:94
bool operator==(const CommandApdu &pLeft, const CommandApdu &pRight)
Definition CommandApdu.h:105