Home
last modified time | relevance | path

Searched refs:ResponseCode (Results 1 – 21 of 21) sorted by relevance

/system/security/keystore/
Duser_state.cpp88 ResponseCode UserState::initialize(const android::String8& pw) { in initialize()
90 return ResponseCode::SYSTEM_ERROR; in initialize()
92 ResponseCode response = writeMasterKey(pw); in initialize()
93 if (response != ResponseCode::NO_ERROR) { in initialize()
97 return ResponseCode::NO_ERROR; in initialize()
100 ResponseCode UserState::copyMasterKey(LockedUserState<UserState>* src) { in copyMasterKey()
102 return ResponseCode::SYSTEM_ERROR; in copyMasterKey()
105 return ResponseCode::SYSTEM_ERROR; in copyMasterKey()
112 ResponseCode UserState::copyMasterKeyFile(LockedUserState<UserState>* src) { in copyMasterKeyFile()
118 return ResponseCode::SYSTEM_ERROR; in copyMasterKeyFile()
[all …]
Dblob.cpp88 ResponseCode AES_gcm_encrypt(const uint8_t* in, uint8_t* out, size_t len, in AES_gcm_encrypt()
110 return ResponseCode::SYSTEM_ERROR; in AES_gcm_encrypt()
116 return ResponseCode::NO_ERROR; in AES_gcm_encrypt()
124 ResponseCode AES_gcm_decrypt(const uint8_t* in, uint8_t* out, size_t len, in AES_gcm_decrypt()
146 return ResponseCode::VALUE_CORRUPTED; in AES_gcm_decrypt()
152 return ResponseCode::VALUE_CORRUPTED; in AES_gcm_decrypt()
157 return ResponseCode::NO_ERROR; in AES_gcm_decrypt()
318 static ResponseCode writeBlob(const std::string& filename, Blob blob, blobv3* rawBlob, in writeBlob()
328 return ResponseCode::LOCKED; in writeBlob()
334 return ResponseCode::SYSTEM_ERROR; in writeBlob()
[all …]
DKeyStore.cpp72 ResponseCode KeyStore::initialize() { in initialize()
78 return ResponseCode::NO_ERROR; in initialize()
81 ResponseCode KeyStore::initializeUser(const android::String8& pw, uid_t userId) { in initializeUser()
86 ResponseCode KeyStore::copyMasterKey(uid_t srcUser, uid_t dstUser) { in copyMasterKey()
92 ResponseCode KeyStore::writeMasterKey(const android::String8& pw, uid_t userId) { in writeMasterKey()
97 ResponseCode KeyStore::readMasterKey(const android::String8& pw, uid_t userId) { in readMasterKey()
149 ResponseCode rc; in resetUser()
155 if (rc != ResponseCode::NO_ERROR) { in resetUser()
165 ResponseCode rc; in resetUser()
170 case ResponseCode::SYSTEM_ERROR: in resetUser()
[all …]
Dkey_store_service.cpp65 using ConfirmationResponseCode = android::hardware::confirmationui::V1_0::ResponseCode;
91 return {ResponseCode::NO_ERROR, diff_secs < kIdRotationPeriod}; in hadFactoryResetSinceIdRotation()
96 return {ResponseCode::SYSTEM_ERROR, false /* don't care */}; in hadFactoryResetSinceIdRotation()
102 return {ResponseCode::SYSTEM_ERROR, false /* don't care */}; in hadFactoryResetSinceIdRotation()
107 return {ResponseCode::SYSTEM_ERROR, false /* don't care */}; in hadFactoryResetSinceIdRotation()
110 return {ResponseCode::NO_ERROR, true}; in hadFactoryResetSinceIdRotation()
143 return ResponseCode::NO_ERROR; in updateParamsForAttestation()
151 *aidl_return = static_cast<int32_t>(ResponseCode::PERMISSION_DENIED); in getState()
164 static_cast<int32_t>(ResponseCode::PERMISSION_DENIED)); in get()
168 ResponseCode rc; in get()
[all …]
DKeyStore.h100 ResponseCode initialize();
104 ResponseCode initializeUser(const android::String8& pw, uid_t userId);
106 ResponseCode copyMasterKey(uid_t srcUser, uid_t dstUser);
107 ResponseCode writeMasterKey(const android::String8& pw, uid_t userId);
108 ResponseCode readMasterKey(const android::String8& pw, uid_t userId);
123 std::tuple<ResponseCode, Blob, Blob> get(const LockedKeyBlobEntry& blobfile);
124 ResponseCode put(const LockedKeyBlobEntry& blobfile, Blob keyBlob, Blob characteristicsBlob);
125 ResponseCode del(const LockedKeyBlobEntry& blobfile);
131 ResponseCode importKey(const uint8_t* key, size_t keyLen, const LockedKeyBlobEntry& blobfile,
136 std::tuple<ResponseCode, Blob, Blob, LockedKeyBlobEntry>
Duser_state.h63 ResponseCode initialize(const android::String8& pw);
65 ResponseCode copyMasterKey(LockedUserState<UserState>* src);
66 ResponseCode copyMasterKeyFile(LockedUserState<UserState>* src);
67 ResponseCode writeMasterKey(const android::String8& pw);
68 ResponseCode readMasterKey(const android::String8& pw);
Dblob.h159 ResponseCode readBlob(const std::string& filename, const std::vector<uint8_t>& aes_key,
264 static std::tuple<ResponseCode, std::list<LockedKeyBlobEntry>>
269 ResponseCode writeBlobs(Blob keyBlob, Blob characteristicsBlob,
271 std::tuple<ResponseCode, Blob, Blob> readBlobs(const std::vector<uint8_t>& aes_key,
273 ResponseCode deleteBlobs() const;
Dkeystore_client_impl.cpp194 if (!binder_result.isOk()) return ResponseCode::SYSTEM_ERROR; in addRandomNumberGeneratorEntropy()
216 if (!binder_result.isOk()) return ResponseCode::SYSTEM_ERROR; in generateKey()
242 if (!binder_result.isOk()) return ResponseCode::SYSTEM_ERROR; in getKeyCharacteristics()
271 if (!binder_result.isOk()) return ResponseCode::SYSTEM_ERROR; in importKey()
296 if (!binder_result.isOk()) return ResponseCode::SYSTEM_ERROR; in exportKey()
313 if (!binder_result.isOk()) return ResponseCode::SYSTEM_ERROR; in deleteKey()
320 if (!binder_result.isOk()) return ResponseCode::SYSTEM_ERROR; in deleteAllKeys()
337 if (!binder_result.isOk()) return ResponseCode::SYSTEM_ERROR; in beginOperation()
367 if (!binder_result.isOk()) return ResponseCode::SYSTEM_ERROR; in updateOperation()
399 if (!binder_result.isOk()) return ResponseCode::SYSTEM_ERROR; in finishOperation()
[all …]
Dkeymaster_worker.cpp90 ResponseCode rc; in upgradeKeyBlob()
97 if (rc != ResponseCode::NO_ERROR) { in upgradeKeyBlob()
160 rc = ResponseCode::SYSTEM_ERROR; in createKeyCharacteristicsCache()
175 return rc = ResponseCode::SYSTEM_ERROR, result; in createKeyCharacteristicsCache()
199 error = ResponseCode::SYSTEM_ERROR; in createKeyCharacteristicsCache()
281 rc = ResponseCode::NO_ERROR; in getAuthToken()
293 : KeyStoreServiceReturnCode(ResponseCode::OP_AUTH_NEEDED); in getAuthToken()
379 if (!authRc.isOk() && authRc != ResponseCode::OP_AUTH_NEEDED) { in begin()
440 return worker_cb(operationFailed(ResponseCode::SYSTEM_ERROR)); in begin()
453 return worker_cb(operationFailed(ResponseCode::SYSTEM_ERROR)); in begin()
[all …]
Dconfirmation_manager.h38 using ConfirmationResponseCode = android::hardware::confirmationui::V1_0::ResponseCode;
Dconfirmationui_rate_limiting.h30 using ConfirmationResponseCode = android::hardware::confirmationui::V1_0::ResponseCode;
Dkeystore_cli_v2.cpp48 using ConfirmationResponseCode = android::hardware::confirmationui::V1_0::ResponseCode;
/system/security/keystore/include/keystore/
Dkeystore_return_types.h47 KeyStoreServiceReturnCode(const ResponseCode& errorCode) : errorCode_(int32_t(errorCode)) {} in KeyStoreServiceReturnCode()
57 inline KeyStoreServiceReturnCode& operator=(const ResponseCode& errorCode) {
66 return errorCode_ == static_cast<int32_t>(ResponseCode::NO_ERROR) || in isOk()
71 if (!errorCode_) return static_cast<int32_t>(ResponseCode::NO_ERROR /* 1 */); in getErrorCode()
74 inline bool operator==(const ResponseCode& rhs) const {
75 return (rhs == ResponseCode::NO_ERROR &&
81 errorCode_ == static_cast<int32_t>(ResponseCode::NO_ERROR)) ||
84 inline bool operator!=(const ResponseCode& rhs) const { return !(*this == rhs); }
91 inline bool operator==(const ResponseCode& lhs, const KeyStoreServiceReturnCode& rhs) {
97 inline bool operator!=(const ResponseCode& lhs, const KeyStoreServiceReturnCode& rhs) {
[all …]
Dkeystore.h30 enum class ResponseCode : int32_t { enum
/system/netd/server/
DNdcDispatcher.cpp57 cli->sendMsg(ResponseCode::OperationFailed, errMsg, addErrno); \
66 cli->sendMsg(ResponseCode::OperationFailed, errMsg, addErrno); \
73 using netdutils::ResponseCode;
169 cli->sendMsg(ResponseCode::CommandSyntaxError, "Missing argument", false); in runCommand()
179 cli->sendMsg(ResponseCode::OperationFailed, "Failed to get interface list", true); in runCommand()
183 cli->sendMsg(ResponseCode::InterfaceListResult, iface.c_str(), false); in runCommand()
186 cli->sendMsg(ResponseCode::CommandOkay, "Interface list completed", false); in runCommand()
193 cli->sendMsg(ResponseCode::CommandSyntaxError, "Missing argument", false); in runCommand()
203 cli->sendMsg(ResponseCode::OperationFailed, "Interface not found", true); in runCommand()
213 cli->sendMsg(ResponseCode::InterfaceGetCfgResult, msg.c_str(), false); in runCommand()
[all …]
DMDnsSdListener.cpp50 using android::netdutils::ResponseCode;
80 cli->sendMsg(ResponseCode::CommandParameterError, in discover()
93 cli->sendMsg(ResponseCode::CommandParameterError, in discover()
99 cli->sendMsg(ResponseCode::CommandOkay, "Discover operation started", false); in discover()
112 context->mListener->sendBroadcast(ResponseCode::ServiceDiscoveryFailed, msg, false); in MDnsSdListenerDiscoverCallback()
122 respCode = ResponseCode::ServiceDiscoveryServiceAdded; in MDnsSdListenerDiscoverCallback()
128 respCode = ResponseCode::ServiceDiscoveryServiceRemoved; in MDnsSdListenerDiscoverCallback()
141 cli->sendMsg(ResponseCode::CommandParameterError, msg, false); in stop()
149 cli->sendMsg(ResponseCode::CommandParameterError, "Unknown requestId", false); in stop()
157 cli->sendMsg(ResponseCode::CommandOkay, msg, false); in stop()
[all …]
/system/netd/resolv/
DDnsProxyListener.cpp68 using netdutils::ResponseCode;
101 cli->sendMsg(ResponseCode::OperationFailed, msg, false); in tryThreadOrError()
668 mClient->sendBinaryMsg(ResponseCode::DnsProxyOperationFailed, &rv, sizeof(rv)); in run()
670 bool success = !mClient->sendCode(ResponseCode::DnsProxyQueryResult); in run()
716 cli->sendMsg(ResponseCode::CommandParameterError, msg, false); in runCommand()
923 sendCodeAndBe32(cli, ResponseCode::DnsProxyQueryResult, -EINVAL); in runCommand()
931 sendCodeAndBe32(cli, ResponseCode::DnsProxyQueryResult, -EINVAL); in runCommand()
943 return sendCodeAndBe32(cli, ResponseCode::DnsProxyQueryResult, netcontext.app_netid) ? 0 : -1; in runCommand()
959 cli->sendMsg(ResponseCode::CommandParameterError, msg, false); in runCommand()
1055 success = mClient->sendCode(ResponseCode::DnsProxyQueryResult) == 0; in run()
[all …]
Dresolver_test.cpp83 using android::netdutils::ResponseCode;
3464 EXPECT_EQ(ResponseCode::DnsProxyQueryResult, readResponseCode(fd)); in TEST_F()
/system/netd/libnetdutils/include/netdutils/
DResponseCode.h23 class ResponseCode {
/system/security/keystore/tests/
Dconfirmationui_invocation_test.cpp31 using ConfirmationResponseCode = android::hardware::confirmationui::V1_0::ResponseCode;
/system/netd/client/
DNetdClient.cpp45 using android::netdutils::ResponseCode;
531 if (responseCode != ResponseCode::DnsProxyQueryResult) { in getNetworkForDnsInternal()