• Home
  • Raw
  • Download

Lines Matching refs:ResponseCode

88 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()
339 if (rc != ResponseCode::NO_ERROR) return rc; in writeBlob()
348 return ResponseCode::SYSTEM_ERROR; in writeBlob()
353 return ResponseCode::SYSTEM_ERROR; in writeBlob()
358 return ResponseCode::SYSTEM_ERROR; in writeBlob()
360 return ResponseCode::NO_ERROR; in writeBlob()
363 ResponseCode LockedKeyBlobEntry::writeBlobs(Blob keyBlob, Blob characteristicsBlob, in writeBlobs()
367 return ResponseCode::SYSTEM_ERROR; in writeBlobs()
369 ResponseCode rc; in writeBlobs()
373 if (rc != ResponseCode::NO_ERROR) { in writeBlobs()
386 ResponseCode Blob::readBlob(const std::string& filename, const std::vector<uint8_t>& aes_key, in readBlob()
388 ResponseCode rc; in readBlob()
394 return (errno == ENOENT) ? ResponseCode::KEY_NOT_FOUND : ResponseCode::SYSTEM_ERROR; in readBlob()
400 return ResponseCode::SYSTEM_ERROR; in readBlob()
404 return ResponseCode::VALUE_CORRUPTED; in readBlob()
410 return ResponseCode::LOCKED; in readBlob()
412 if (state == STATE_UNINITIALIZED) return ResponseCode::UNINITIALIZED; in readBlob()
415 if (fileLength < offsetof(blobv3, value)) return ResponseCode::VALUE_CORRUPTED; in readBlob()
423 if (rc != ResponseCode::NO_ERROR) { in readBlob()
428 (rc == ResponseCode::VALUE_CORRUPTED)) { in readBlob()
429 return ResponseCode::KEY_PERMANENTLY_INVALIDATED; in readBlob()
438 if (encryptedLength < 0) return ResponseCode::VALUE_CORRUPTED; in readBlob()
442 return ResponseCode::VALUE_CORRUPTED; in readBlob()
455 return ResponseCode::VALUE_CORRUPTED; in readBlob()
465 return ResponseCode::VALUE_CORRUPTED; in readBlob()
474 return ResponseCode::NO_ERROR; in readBlob()
477 std::tuple<ResponseCode, Blob, Blob>
479 std::tuple<ResponseCode, Blob, Blob> result; in readBlobs()
481 if (entry_ == nullptr) return rc = ResponseCode::SYSTEM_ERROR, result; in readBlobs()
484 if (rc != ResponseCode::NO_ERROR && rc != ResponseCode::UNINITIALIZED) { in readBlobs()
494 ResponseCode LockedKeyBlobEntry::deleteBlobs() const { in deleteBlobs()
495 if (entry_ == nullptr) return ResponseCode::NO_ERROR; in deleteBlobs()
498 ResponseCode rc1 = (unlink(entry_->getKeyBlobPath().c_str()) && errno != ENOENT) in deleteBlobs()
499 ? ResponseCode::SYSTEM_ERROR in deleteBlobs()
500 : ResponseCode::NO_ERROR; in deleteBlobs()
501 if (rc1 != ResponseCode::NO_ERROR) { in deleteBlobs()
504 ResponseCode rc2 = (unlink(entry_->getCharacteristicsBlobPath().c_str()) && errno != ENOENT) in deleteBlobs()
505 ? ResponseCode::SYSTEM_ERROR in deleteBlobs()
506 : ResponseCode::NO_ERROR; in deleteBlobs()
507 if (rc2 != ResponseCode::NO_ERROR) { in deleteBlobs()
512 if (rc1 != ResponseCode::NO_ERROR) return rc1; in deleteBlobs()
727 std::tuple<ResponseCode, std::list<LockedKeyBlobEntry>>
742 return std::tuple<ResponseCode, std::list<LockedKeyBlobEntry>&&>{ResponseCode::SYSTEM_ERROR, in list()
771 return std::tuple<ResponseCode, std::list<LockedKeyBlobEntry>&&>{ResponseCode::NO_ERROR, in list()