LeviLamina
Loading...
Searching...
No Matches
Certificate.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/deps/certificates/UnverifiedCertificate.h"
7
8// auto generated forward declare list
9// clang-format off
11class WebToken;
12namespace Json { class Value; }
13// clang-format on
14
15class Certificate {
16public:
17 // member variables
18 // NOLINTBEGIN
19 ::UnverifiedCertificate mUnverifiedCertificate;
20 ::std::unique_ptr<::Certificate> mParentCertificate;
21 bool mIsValid;
22 bool mIsSelfSigned;
23 // NOLINTEND
24
25#ifdef LL_PLAT_S
26#else // LL_PLAT_C
27public:
28 // prevent constructor by default
29 Certificate& operator=(Certificate const&);
30 Certificate();
31
32#endif
33public:
34 // member functions
35 // NOLINTBEGIN
36#ifdef LL_PLAT_C
37 MCAPI Certificate(::Certificate const& other);
38
39 MCAPI void addToEnd(::Certificate const& certificate);
40#endif
41
42 MCAPI int64 getExpirationDate() const;
43
44 MCAPI ::std::string getIdentityPublicKey() const;
45
46 MCAPI int64 getNotBeforeDate() const;
47
48#ifdef LL_PLAT_C
49 MCAPI ::Certificate& getRootParentCertificate();
50#endif
51
52 MCAPI bool validate(int64 currentTime, bool isSelfSigned, bool checkExpired);
53
54 MCAPI ~Certificate();
55 // NOLINTEND
56
57public:
58 // static functions
59 // NOLINTBEGIN
60#ifdef LL_PLAT_C
61 MCAPI static ::std::unique_ptr<::Certificate> addAuthorityToCertificate(
62 ::PrivateKeyManager const& signer,
63 int64 notBeforeDate,
64 int64 expirationDate,
65 ::std::string const& identityPublicKey,
66 ::std::unique_ptr<::Certificate> certificate
67 );
68
69 MCAPI static ::std::unique_ptr<::WebToken> createWebToken(
70 ::PrivateKeyManager const& signer,
71 int64 notBeforeDate,
72 int64 expirationDate,
73 ::std::string const& identityPublicKey,
74 bool isCertificateAuthority,
75 ::Json::Value const* extraData
76 );
77
78 MCAPI static ::std::unique_ptr<::Certificate> createWrappedCertificate(
79 ::PrivateKeyManager const& signer,
80 int64 notBeforeDate,
81 int64 expirationDate,
82 ::std::string const& identityPublicKey,
83 bool isCertificateAuthority,
84 ::Json::Value const* extraData,
85 ::std::unique_ptr<::Certificate> parentCertificate
86 );
87#endif
88 // NOLINTEND
89
90public:
91 // constructor thunks
92 // NOLINTBEGIN
93#ifdef LL_PLAT_C
94 MCAPI void* $ctor(::Certificate const& other);
95#endif
96 // NOLINTEND
97
98public:
99 // destructor thunk
100 // NOLINTBEGIN
101 MCAPI void $dtor();
102 // NOLINTEND
103};
Definition Value.h:16
Definition PrivateKeyManager.h:9
Definition UnverifiedCertificate.h:14
Definition WebToken.h:16