AusweisApp2
 Alle Klassen Namensbereiche Dateien Funktionen Variablen Typdefinitionen Aufzählungen Aufzählungswerte Propertys Freundbeziehungen Makrodefinitionen
ChipAuthenticationInfo.h
gehe zur Dokumentation dieser Datei
1 
7 #pragma once
8 
9 
10 #include "SecurityInfo.h"
11 
12 
13 namespace governikus
14 {
15 
16 
29 {
30  ASN1_OBJECT* mProtocol;
31  ASN1_INTEGER* mVersion;
32  ASN1_INTEGER* mKeyId;
33 };
34 DECLARE_ASN1_FUNCTIONS(chipauthenticationinfo_st)
35 
36 
37 /*
38  * Wrapper for structure chipauthenticationinfo_st.
39  */
41  : public SecurityInfo
42 {
43  const QSharedPointer<const chipauthenticationinfo_st> mDelegate;
44 
45  ChipAuthenticationInfo(const QSharedPointer<const chipauthenticationinfo_st>& pDelegate);
46 
47  ASN1_OBJECT* getProtocolObjectIdentifier() const override;
48 
49  static bool acceptsProtocol(const ASN1_OBJECT* pObjectIdentifier);
50 
51  public:
52  static QSharedPointer<ChipAuthenticationInfo> decode(const QByteArray& pBytes)
53  {
54  if (const auto& delegate = decodeObject<chipauthenticationinfo_st>(pBytes))
55  {
56  if (ChipAuthenticationInfo::acceptsProtocol(delegate->mProtocol))
57  {
58  return QSharedPointer<ChipAuthenticationInfo>(new ChipAuthenticationInfo(delegate));
59  }
60  }
61  return QSharedPointer<ChipAuthenticationInfo>();
62  }
63 
64 
65  QByteArray getVersion() const;
66  QByteArray getKeyId() const;
67 };
68 
69 
70 template<>
71 chipauthenticationinfo_st* decodeAsn1Object<chipauthenticationinfo_st>(chipauthenticationinfo_st** pObject, const unsigned char** pData, long pDataLen);
72 
73 
74 template<>
75 void freeAsn1Object<chipauthenticationinfo_st>(chipauthenticationinfo_st* pObject);
76 
77 
78 } // namespace governikus
Definition: ChipAuthenticationInfo.h:28
Definition: SecurityInfo.h:46
static QSharedPointer< ChipAuthenticationInfo > decode(const QByteArray &pBytes)
Definition: ChipAuthenticationInfo.h:52
ASN1_INTEGER * mKeyId
Definition: ChipAuthenticationInfo.h:32
void freeAsn1Object< chipauthenticationinfo_st >(chipauthenticationinfo_st *pObject)
ASN1_OBJECT * mProtocol
Definition: ChipAuthenticationInfo.h:30
chipauthenticationinfo_st * decodeAsn1Object< chipauthenticationinfo_st >(chipauthenticationinfo_st **pObject, const unsigned char **pData, long pDataLen)
ASN1_INTEGER * mVersion
Definition: ChipAuthenticationInfo.h:31
Definition: ChipAuthenticationInfo.h:40