AusweisApp2
Lade ...
Suche ...
Keine Treffer
ChipAuthenticationInfo.h
gehe zur Dokumentation dieser Datei
1
7#pragma once
8
9
10#include "SecurityInfo.h"
11
12
13namespace governikus
14{
15
28{
29 ASN1_OBJECT* mProtocol;
30 ASN1_INTEGER* mVersion;
31 ASN1_INTEGER* mKeyId;
32};
33DECLARE_ASN1_FUNCTIONS(chipauthenticationinfo_st)
34
35
36/*
37 * Wrapper for structure chipauthenticationinfo_st.
38 */
40 : public SecurityInfo
41{
42 friend class QSharedPointer<ChipAuthenticationInfo>;
43
44 const QSharedPointer<const chipauthenticationinfo_st> mDelegate;
45
46 explicit ChipAuthenticationInfo(const QSharedPointer<const chipauthenticationinfo_st>& pDelegate);
47 [[nodiscard]] ASN1_OBJECT* getProtocolObjectIdentifier() const override;
48 static bool acceptsProtocol(const ASN1_OBJECT* pObjectIdentifier);
49
50 public:
51 static QSharedPointer<ChipAuthenticationInfo> decode(const QByteArray& pBytes)
52 {
53 if (const auto& delegate = decodeObject<chipauthenticationinfo_st>(pBytes, false))
54 {
55 if (ChipAuthenticationInfo::acceptsProtocol(delegate->mProtocol))
56 {
57 return QSharedPointer<ChipAuthenticationInfo>::create(delegate);
58 }
59 }
60 return QSharedPointer<ChipAuthenticationInfo>();
61 }
62
63
64 [[nodiscard]] QByteArray getVersion() const;
65 [[nodiscard]] QByteArray getKeyId() const;
66};
67
68
69template<>
71
72
73template<>
75
76
77} // namespace governikus
Definition: ChipAuthenticationInfo.h:41
static QSharedPointer< ChipAuthenticationInfo > decode(const QByteArray &pBytes)
Definition: ChipAuthenticationInfo.h:51
Definition: SecurityInfo.h:46
Implementation of ActivationContext for Intent based activation on Android systems.
Definition: ActivationContext.h:15
chipauthenticationinfo_st * decodeAsn1Object< chipauthenticationinfo_st >(chipauthenticationinfo_st **pObject, const unsigned char **pData, long pDataLen)
void freeAsn1Object< chipauthenticationinfo_st >(chipauthenticationinfo_st *pObject)
Definition: ChipAuthenticationInfo.h:28
ASN1_OBJECT * mProtocol
Definition: ChipAuthenticationInfo.h:29
ASN1_INTEGER * mKeyId
Definition: ChipAuthenticationInfo.h:31
ASN1_INTEGER * mVersion
Definition: ChipAuthenticationInfo.h:30