6 #include <boost/filesystem.hpp> 11 kFirstKnown = kED25519,
15 kLastKnown = kRSA4096,
19 inline std::ostream& operator<<(std::ostream& os,
const KeyType kt) {
22 case KeyType::kRSA2048:
25 case KeyType::kRSA3072:
28 case KeyType::kRSA4096:
31 case KeyType::kED25519:
38 os <<
'"' << kt_str <<
'"';
42 inline std::istream& operator>>(std::istream& is, KeyType& kt) {
47 if (kt_str ==
"\"RSA2048\"") {
48 kt = KeyType::kRSA2048;
49 }
else if (kt_str ==
"\"RSA3072\"") {
50 kt = KeyType::kRSA3072;
51 }
else if (kt_str ==
"\"RSA4096\"") {
52 kt = KeyType::kRSA4096;
53 }
else if (kt_str ==
"\"ED25519\"") {
54 kt = KeyType::kED25519;
56 kt = KeyType::kUnknown;
88 RunningMode RunningModeFromString(
const std::string& mode);
89 std::string StringFromRunningMode(
RunningMode mode);
91 enum class CryptoSource { kFile = 0, kPkcs11 };
93 inline std::ostream& operator<<(std::ostream& os, CryptoSource cs) {
96 case CryptoSource::kFile:
99 case CryptoSource::kPkcs11:
106 os <<
'"' << cs_str <<
'"';
113 using UpdateRequestId = std::string;
117 Json::Value toJson();
118 static Package fromJson(
const std::string& );
167 typedef std::pair<UpdateResultCode, std::string> InstallOutcome;
175 std::string result_text;
176 Json::Value toJson()
const;
177 bool isSuccess()
const {
180 InstallOutcome toOutcome()
const;
182 static OperationResult fromOutcome(
const std::string&
id,
const InstallOutcome& outcome);
Partition creation failed.
Package installation failed.
Only accept an existing campaign.
Download any available updates and then shut down.
Only reject an existing campaign.
Dependency failure during package install, upgrade, or removal.
SWM Internal integrity error.
RunningMode
Execution mode to run aktualizr in.
Software package not found.
The module loader could not flash its managed module.
Only check for an existing campaign related to the device.
Updating process in progress.
UpdateResultCode
Result of an update.
Partition deletion failed.
User declined the update.
Software was blacklisted.
Tried to downgrade to older version.
Operation has already been processed.
Completely manual operation.
Partition patching failed.
Update image integrity has been compromised.
Operation executed successfully.
Install any available updates and then shut down.