Lines Matching refs:ErrorCode
213 static ErrorCode status_to_error_code(uint32_t status) in status_to_error_code()
217 return ErrorCode::OK; in status_to_error_code()
220 return ErrorCode::INVALID_ARGUMENT; in status_to_error_code()
223 return ErrorCode::UNKNOWN_ERROR; in status_to_error_code()
226 return ErrorCode::INSUFFICIENT_BUFFER_SPACE; in status_to_error_code()
229 return ErrorCode::SECURE_HW_COMMUNICATION_FAILED; in status_to_error_code()
233 return ErrorCode::UNKNOWN_ERROR; in status_to_error_code()
254 const ErrorCode error_code = translate_error_code(response.error_code()); \
260 if (error_code != ErrorCode::OK) { \
269 const ErrorCode error_code = translate_error_code(response.error_code()); \
276 if (error_code != ErrorCode::OK) { \
286 const ErrorCode error_code = translate_error_code(response.error_code()); \
294 if (error_code != ErrorCode::OK) { \
345 ErrorCode ec = translate_error_code(response.error_code()); in getHmacSharingParameters()
347 if (ec != ErrorCode::OK) { in getHmacSharingParameters()
361 _hidl_cb(ErrorCode::UNKNOWN_ERROR, HmacSharingParameters()); in getHmacSharingParameters()
370 _hidl_cb(ErrorCode::UNKNOWN_ERROR, HmacSharingParameters()); in getHmacSharingParameters()
403 ErrorCode ec = translate_error_code(response.error_code()); in computeSharedHmac()
405 if (ec != ErrorCode::OK) { in computeSharedHmac()
430 _hidl_cb(ErrorCode::UNIMPLEMENTED, VerificationToken()); in verifyAuthorization()
435 Return<ErrorCode> KeymasterDevice::addRngEntropy(const hidl_vec<uint8_t>& data) in addRngEntropy()
439 if (!data.size()) return ErrorCode::OK; in addRngEntropy()
452 return ErrorCode::OK; in addRngEntropy()
467 keyParams, request.mutable_params()) != ErrorCode::OK) { in generateKey()
468 _hidl_cb(ErrorCode::INVALID_ARGUMENT, blob, characteristics); in generateKey()
525 ErrorCode error; in importKey()
530 if (error != ErrorCode::OK) { in importKey()
552 if (error != ErrorCode::OK) { in importKey()
559 _hidl_cb(ErrorCode::OK, blob, characteristics); in importKey()
581 ErrorCode error_code = export_key_der(response, &der); in exportKey()
582 if (error_code != ErrorCode::OK) { in exportKey()
649 if (hidl_params_to_map(attestParams, &attest_tag_map) != ErrorCode::OK) { in attestKey()
650 _hidl_cb(ErrorCode::INVALID_ARGUMENT, hidl_vec<hidl_vec<uint8_t> >{}); in attestKey()
655 _hidl_cb(ErrorCode::ATTESTATION_APPLICATION_ID_MISSING, in attestKey()
689 &attest_tag_map) != ErrorCode::OK) { in attestKey()
690 _hidl_cb(ErrorCode::INVALID_ARGUMENT, hidl_vec<hidl_vec<uint8_t> >{}); in attestKey()
719 _hidl_cb(ErrorCode::UNKNOWN_ERROR, hidl_vec<hidl_vec<uint8_t> >{}); in attestKey()
724 attestParams, startRequest.mutable_params()) != ErrorCode::OK) { in attestKey()
725 _hidl_cb(ErrorCode::INVALID_ARGUMENT, hidl_vec<hidl_vec<uint8_t> >{}); in attestKey()
757 attestParams, continueRequest.mutable_params()) != ErrorCode::OK) { in attestKey()
759 _hidl_cb(ErrorCode::INVALID_ARGUMENT, hidl_vec<hidl_vec<uint8_t> >{}); in attestKey()
791 _hidl_cb(ErrorCode::UNKNOWN_ERROR, hidl_vec<hidl_vec<uint8_t> >{}); in attestKey()
805 _hidl_cb(ErrorCode::UNKNOWN_ERROR, hidl_vec<hidl_vec<uint8_t> >{}); in attestKey()
909 _hidl_cb(ErrorCode::OK, chain); in attestKey()
929 upgradeParams, request.mutable_params()) != ErrorCode::OK) { in upgradeKey()
930 _hidl_cb(ErrorCode::INVALID_ARGUMENT, blob); in upgradeKey()
945 Return<ErrorCode> KeymasterDevice::deleteKey(const hidl_vec<uint8_t>& keyBlob) in deleteKey()
959 Return<ErrorCode> KeymasterDevice::deleteAllKeys() in deleteAllKeys()
971 Return<ErrorCode> KeymasterDevice::destroyAttestationIds() in destroyAttestationIds()
999 authToken, request.mutable_auth_token()) != ErrorCode::OK) { in begin()
1000 _hidl_cb(ErrorCode::INVALID_ARGUMENT, params, in begin()
1005 inParams, request.mutable_params()) != ErrorCode::OK) { in begin()
1006 _hidl_cb(ErrorCode::INVALID_ARGUMENT, params, in begin()
1011 if (hidl_params_to_map(inParams, &tag_map) != ErrorCode::OK) { in begin()
1012 _hidl_cb(ErrorCode::INVALID_ARGUMENT, params, in begin()
1022 ErrorCode::OK) { in begin()
1023 if (this->abort(response.handle().handle()) != ErrorCode::OK) { in begin()
1027 _hidl_cb(ErrorCode::INVALID_ARGUMENT, params, in begin()
1031 ErrorCode error_code = buffer_begin(response.handle().handle(), algorithm); in begin()
1032 if (error_code != ErrorCode::OK) { in begin()
1033 if (this->abort(response.handle().handle()) != ErrorCode::OK) { in begin()
1037 _hidl_cb(ErrorCode::UNKNOWN_ERROR, params, in begin()
1065 ErrorCode error_code; in update()
1067 if (error_code != ErrorCode::OK) { in update()
1074 if (error_code != ErrorCode::OK) { in update()
1086 inParams, request.mutable_params()) != ErrorCode::OK) { in update()
1087 _hidl_cb(ErrorCode::INVALID_ARGUMENT, 0, params, output); in update()
1093 authToken, request.mutable_auth_token()) != ErrorCode::OK) { in update()
1094 _hidl_cb(ErrorCode::INVALID_ARGUMENT, 0, params, output); in update()
1103 if (buffer_advance(operationHandle, response.consumed()) != ErrorCode::OK) { in update()
1104 _hidl_cb(ErrorCode::UNKNOWN_ERROR, 0, params, output); in update()
1123 _hidl_cb(ErrorCode::OK, consumed, params, output); in update()
1141 ErrorCode error_code; in finish()
1152 ErrorCode error, uint32_t input_consumed, in finish()
1156 if (error == ErrorCode::OK) { in finish()
1168 if (error_code != ErrorCode::OK) { in finish()
1177 if (error_code != ErrorCode::OK) { in finish()
1187 input_params, request.mutable_params()) != ErrorCode::OK) { in finish()
1188 _hidl_cb(ErrorCode::INVALID_ARGUMENT, params, output); in finish()
1196 authToken, request.mutable_auth_token()) != ErrorCode::OK) { in finish()
1197 _hidl_cb(ErrorCode::INVALID_ARGUMENT, params, output); in finish()
1215 _hidl_cb(ErrorCode::OK, params, output); in finish()
1219 Return<ErrorCode> KeymasterDevice::abort(uint64_t operationHandle) in abort()
1230 return ErrorCode::OK; in abort()
1244 ErrorCode error; in importWrappedKey()
1249 _hidl_cb(ErrorCode::INVALID_ARGUMENT, hidl_vec<uint8_t>{}, in importWrappedKey()
1256 if (error != ErrorCode::OK) { in importWrappedKey()
1279 if (error != ErrorCode::OK) { in importWrappedKey()
1287 _hidl_cb(ErrorCode::OK, blob, characteristics); in importWrappedKey()
1292 Return<ErrorCode> KeymasterDevice::SendSystemVersionInfo() const { in SendSystemVersionInfo()
1301 return ErrorCode::OK; in SendSystemVersionInfo()
1304 Return<ErrorCode> KeymasterDevice::GetBootInfo() { in GetBootInfo()
1314 return ErrorCode::OK; in GetBootInfo()