• Home
  • Raw
  • Download

Lines Matching refs:ErrorCode

87 static ErrorCode translate_purpose(nosapp::KeyPurpose purpose, KeyPurpose *out)  in translate_purpose()
106 return ErrorCode::UNKNOWN_ERROR; in translate_purpose()
109 return ErrorCode::OK; in translate_purpose()
130 ErrorCode translate_algorithm(nosapp::Algorithm algorithm, in translate_algorithm()
150 return ErrorCode::UNKNOWN_ERROR; in translate_algorithm()
153 return ErrorCode::OK; in translate_algorithm()
172 static ErrorCode translate_block_mode(nosapp::BlockMode block_mode, in translate_block_mode()
189 return ErrorCode::UNKNOWN_ERROR; in translate_block_mode()
193 return ErrorCode::OK; in translate_block_mode()
218 static ErrorCode translate_digest(nosapp::Digest digest, in translate_digest()
244 return ErrorCode::UNKNOWN_ERROR; in translate_digest()
247 return ErrorCode::OK; in translate_digest()
270 static ErrorCode translate_padding_mode(nosapp::PaddingMode padding_mode, in translate_padding_mode()
293 return ErrorCode::UNKNOWN_ERROR; in translate_padding_mode()
296 return ErrorCode::OK; in translate_padding_mode()
315 ErrorCode translate_ec_curve(nosapp::EcCurve ec_curve, EcCurve *out) in translate_ec_curve()
331 return ErrorCode::UNKNOWN_ERROR; in translate_ec_curve()
334 return ErrorCode::OK; in translate_ec_curve()
351 static ErrorCode translate_key_blob_usage_requirements( in translate_key_blob_usage_requirements()
362 return ErrorCode::UNKNOWN_ERROR; in translate_key_blob_usage_requirements()
365 return ErrorCode::UNKNOWN_ERROR; in translate_key_blob_usage_requirements()
384 static ErrorCode translate_key_origin(nosapp::KeyOrigin key_origin, in translate_key_origin()
401 return ErrorCode::UNKNOWN_ERROR; in translate_key_origin()
404 return ErrorCode::OK; in translate_key_origin()
407 ErrorCode translate_auth_token(const HardwareAuthToken& auth_token, in translate_auth_token()
417 return ErrorCode::OK; in translate_auth_token()
434 ErrorCode key_parameter_to_pb(const KeyParameter& param, in key_parameter_to_pb()
441 return ErrorCode::INVALID_ARGUMENT; in key_parameter_to_pb()
575 return ErrorCode::OK; in key_parameter_to_pb()
578 ErrorCode pb_to_key_parameter(const nosapp::KeyParameter& param, in pb_to_key_parameter()
585 return ErrorCode::UNKNOWN_ERROR; in pb_to_key_parameter()
589 &kp->f.purpose) != ErrorCode::OK) { in pb_to_key_parameter()
590 return ErrorCode::UNKNOWN_ERROR; in pb_to_key_parameter()
595 &kp->f.algorithm) != ErrorCode::OK) { in pb_to_key_parameter()
596 return ErrorCode::UNKNOWN_ERROR; in pb_to_key_parameter()
605 &kp->f.blockMode) != ErrorCode::OK) { in pb_to_key_parameter()
606 return ErrorCode::UNKNOWN_ERROR; in pb_to_key_parameter()
612 &kp->f.digest) != ErrorCode::OK) { in pb_to_key_parameter()
613 return ErrorCode::UNKNOWN_ERROR; in pb_to_key_parameter()
619 &kp->f.paddingMode) != ErrorCode::OK) { in pb_to_key_parameter()
620 return ErrorCode::UNKNOWN_ERROR; in pb_to_key_parameter()
632 &kp->f.ecCurve) != ErrorCode::OK) { in pb_to_key_parameter()
633 return ErrorCode::UNKNOWN_ERROR; in pb_to_key_parameter()
645 &kp->f.keyBlobUsageRequirements) != ErrorCode::OK) { in pb_to_key_parameter()
646 return ErrorCode::UNKNOWN_ERROR; in pb_to_key_parameter()
702 &kp->f.origin) != ErrorCode::OK) { in pb_to_key_parameter()
703 return ErrorCode::UNKNOWN_ERROR; in pb_to_key_parameter()
752 return ErrorCode::UNKNOWN_ERROR; in pb_to_key_parameter()
756 return ErrorCode::OK; in pb_to_key_parameter()
759 ErrorCode hidl_params_to_pb(const hidl_vec<KeyParameter>& params, in hidl_params_to_pb()
764 ErrorCode error = key_parameter_to_pb(params[i], param); in hidl_params_to_pb()
765 if (error != ErrorCode::OK) { in hidl_params_to_pb()
766 return ErrorCode::INVALID_ARGUMENT; in hidl_params_to_pb()
770 return ErrorCode::OK; in hidl_params_to_pb()
773 ErrorCode hidl_params_to_map(const hidl_vec<KeyParameter>& params, in hidl_params_to_map()
779 return ErrorCode::INVALID_ARGUMENT; in hidl_params_to_map()
790 return ErrorCode::INVALID_ARGUMENT; in hidl_params_to_map()
809 return ErrorCode::INVALID_ARGUMENT; in hidl_params_to_map()
814 return ErrorCode::OK; in hidl_params_to_map()
817 ErrorCode map_params_to_pb(const tag_map_t& params, in map_params_to_pb()
823 ErrorCode error = key_parameter_to_pb(pt, param); in map_params_to_pb()
824 if (error != ErrorCode::OK) { in map_params_to_pb()
830 return ErrorCode::OK; in map_params_to_pb()
833 ErrorCode pb_to_hidl_params(const nosapp::KeyParameters& pbParams, in pb_to_hidl_params()
841 ErrorCode error = pb_to_key_parameter(param, &kp); in pb_to_hidl_params()
842 if (error != ErrorCode::OK) { in pb_to_hidl_params()
843 return ErrorCode::UNKNOWN_ERROR; in pb_to_hidl_params()
850 return ErrorCode::OK; in pb_to_hidl_params()
853 ErrorCode translate_error_code(nosapp::ErrorCode error_code) in translate_error_code()
856 case nosapp::ErrorCode::OK: in translate_error_code()
857 return ErrorCode::OK; in translate_error_code()
858 case nosapp::ErrorCode::ROOT_OF_TRUST_ALREADY_SET: in translate_error_code()
859 return ErrorCode::ROOT_OF_TRUST_ALREADY_SET; in translate_error_code()
860 case nosapp::ErrorCode::UNSUPPORTED_PURPOSE: in translate_error_code()
861 return ErrorCode::UNSUPPORTED_PURPOSE; in translate_error_code()
862 case nosapp::ErrorCode::INCOMPATIBLE_PURPOSE: in translate_error_code()
863 return ErrorCode::INCOMPATIBLE_PURPOSE; in translate_error_code()
864 case nosapp::ErrorCode::UNSUPPORTED_ALGORITHM: in translate_error_code()
865 return ErrorCode::UNSUPPORTED_ALGORITHM; in translate_error_code()
866 case nosapp::ErrorCode::INCOMPATIBLE_ALGORITHM: in translate_error_code()
867 return ErrorCode::INCOMPATIBLE_ALGORITHM; in translate_error_code()
868 case nosapp::ErrorCode::UNSUPPORTED_KEY_SIZE: in translate_error_code()
869 return ErrorCode::UNSUPPORTED_KEY_SIZE; in translate_error_code()
870 case nosapp::ErrorCode::UNSUPPORTED_BLOCK_MODE: in translate_error_code()
871 return ErrorCode::UNSUPPORTED_BLOCK_MODE; in translate_error_code()
872 case nosapp::ErrorCode::INCOMPATIBLE_BLOCK_MODE: in translate_error_code()
873 return ErrorCode::INCOMPATIBLE_BLOCK_MODE; in translate_error_code()
874 case nosapp::ErrorCode::UNSUPPORTED_MAC_LENGTH: in translate_error_code()
875 return ErrorCode::UNSUPPORTED_MAC_LENGTH; in translate_error_code()
876 case nosapp::ErrorCode::UNSUPPORTED_PADDING_MODE: in translate_error_code()
877 return ErrorCode::UNSUPPORTED_PADDING_MODE; in translate_error_code()
878 case nosapp::ErrorCode::INCOMPATIBLE_PADDING_MODE: in translate_error_code()
879 return ErrorCode::INCOMPATIBLE_PADDING_MODE; in translate_error_code()
880 case nosapp::ErrorCode::UNSUPPORTED_DIGEST: in translate_error_code()
881 return ErrorCode::UNSUPPORTED_DIGEST; in translate_error_code()
882 case nosapp::ErrorCode::INCOMPATIBLE_DIGEST: in translate_error_code()
883 return ErrorCode::INCOMPATIBLE_DIGEST; in translate_error_code()
884 case nosapp::ErrorCode::INVALID_EXPIRATION_TIME: in translate_error_code()
885 return ErrorCode::INVALID_EXPIRATION_TIME; in translate_error_code()
886 case nosapp::ErrorCode::INVALID_USER_ID: in translate_error_code()
887 return ErrorCode::INVALID_USER_ID; in translate_error_code()
888 case nosapp::ErrorCode::INVALID_AUTHORIZATION_TIMEOUT: in translate_error_code()
889 return ErrorCode::INVALID_AUTHORIZATION_TIMEOUT; in translate_error_code()
890 case nosapp::ErrorCode::UNSUPPORTED_KEY_FORMAT: in translate_error_code()
891 return ErrorCode::UNSUPPORTED_KEY_FORMAT; in translate_error_code()
892 case nosapp::ErrorCode::INCOMPATIBLE_KEY_FORMAT: in translate_error_code()
893 return ErrorCode::INCOMPATIBLE_KEY_FORMAT; in translate_error_code()
894 case nosapp::ErrorCode::UNSUPPORTED_KEY_ENCRYPTION_ALGORITHM: in translate_error_code()
895 return ErrorCode::UNSUPPORTED_KEY_ENCRYPTION_ALGORITHM; in translate_error_code()
896 case nosapp::ErrorCode::UNSUPPORTED_KEY_VERIFICATION_ALGORITHM: in translate_error_code()
897 return ErrorCode::UNSUPPORTED_KEY_VERIFICATION_ALGORITHM; in translate_error_code()
898 case nosapp::ErrorCode::INVALID_INPUT_LENGTH: in translate_error_code()
899 return ErrorCode::INVALID_INPUT_LENGTH; in translate_error_code()
900 case nosapp::ErrorCode::KEY_EXPORT_OPTIONS_INVALID: in translate_error_code()
901 return ErrorCode::KEY_EXPORT_OPTIONS_INVALID; in translate_error_code()
902 case nosapp::ErrorCode::DELEGATION_NOT_ALLOWED: in translate_error_code()
903 return ErrorCode::DELEGATION_NOT_ALLOWED; in translate_error_code()
904 case nosapp::ErrorCode::KEY_NOT_YET_VALID: in translate_error_code()
905 return ErrorCode::KEY_NOT_YET_VALID; in translate_error_code()
906 case nosapp::ErrorCode::KEY_EXPIRED: in translate_error_code()
907 return ErrorCode::KEY_EXPIRED; in translate_error_code()
908 case nosapp::ErrorCode::KEY_USER_NOT_AUTHENTICATED: in translate_error_code()
909 return ErrorCode::KEY_USER_NOT_AUTHENTICATED; in translate_error_code()
910 case nosapp::ErrorCode::OUTPUT_PARAMETER_NULL: in translate_error_code()
911 return ErrorCode::OUTPUT_PARAMETER_NULL; in translate_error_code()
912 case nosapp::ErrorCode::INVALID_OPERATION_HANDLE: in translate_error_code()
913 return ErrorCode::INVALID_OPERATION_HANDLE; in translate_error_code()
914 case nosapp::ErrorCode::INSUFFICIENT_BUFFER_SPACE: in translate_error_code()
915 return ErrorCode::INSUFFICIENT_BUFFER_SPACE; in translate_error_code()
916 case nosapp::ErrorCode::VERIFICATION_FAILED: in translate_error_code()
917 return ErrorCode::VERIFICATION_FAILED; in translate_error_code()
918 case nosapp::ErrorCode::TOO_MANY_OPERATIONS: in translate_error_code()
919 return ErrorCode::TOO_MANY_OPERATIONS; in translate_error_code()
920 case nosapp::ErrorCode::UNEXPECTED_NULL_POINTER: in translate_error_code()
921 return ErrorCode::UNEXPECTED_NULL_POINTER; in translate_error_code()
922 case nosapp::ErrorCode::INVALID_KEY_BLOB: in translate_error_code()
923 return ErrorCode::INVALID_KEY_BLOB; in translate_error_code()
924 case nosapp::ErrorCode::IMPORTED_KEY_NOT_ENCRYPTED: in translate_error_code()
925 return ErrorCode::IMPORTED_KEY_NOT_ENCRYPTED; in translate_error_code()
926 case nosapp::ErrorCode::IMPORTED_KEY_DECRYPTION_FAILED: in translate_error_code()
927 return ErrorCode::IMPORTED_KEY_DECRYPTION_FAILED; in translate_error_code()
928 case nosapp::ErrorCode::IMPORTED_KEY_NOT_SIGNED: in translate_error_code()
929 return ErrorCode::IMPORTED_KEY_NOT_SIGNED; in translate_error_code()
930 case nosapp::ErrorCode::IMPORTED_KEY_VERIFICATION_FAILED: in translate_error_code()
931 return ErrorCode::IMPORTED_KEY_VERIFICATION_FAILED; in translate_error_code()
932 case nosapp::ErrorCode::INVALID_ARGUMENT: in translate_error_code()
933 return ErrorCode::INVALID_ARGUMENT; in translate_error_code()
934 case nosapp::ErrorCode::UNSUPPORTED_TAG: in translate_error_code()
935 return ErrorCode::UNSUPPORTED_TAG; in translate_error_code()
936 case nosapp::ErrorCode::INVALID_TAG: in translate_error_code()
937 return ErrorCode::INVALID_TAG; in translate_error_code()
938 case nosapp::ErrorCode::MEMORY_ALLOCATION_FAILED: in translate_error_code()
939 return ErrorCode::MEMORY_ALLOCATION_FAILED; in translate_error_code()
940 case nosapp::ErrorCode::IMPORT_PARAMETER_MISMATCH: in translate_error_code()
941 return ErrorCode::IMPORT_PARAMETER_MISMATCH; in translate_error_code()
942 case nosapp::ErrorCode::SECURE_HW_ACCESS_DENIED: in translate_error_code()
943 return ErrorCode::SECURE_HW_ACCESS_DENIED; in translate_error_code()
944 case nosapp::ErrorCode::OPERATION_CANCELLED: in translate_error_code()
945 return ErrorCode::OPERATION_CANCELLED; in translate_error_code()
946 case nosapp::ErrorCode::CONCURRENT_ACCESS_CONFLICT: in translate_error_code()
947 return ErrorCode::CONCURRENT_ACCESS_CONFLICT; in translate_error_code()
948 case nosapp::ErrorCode::SECURE_HW_BUSY: in translate_error_code()
949 return ErrorCode::SECURE_HW_BUSY; in translate_error_code()
950 case nosapp::ErrorCode::SECURE_HW_COMMUNICATION_FAILED: in translate_error_code()
951 return ErrorCode::SECURE_HW_COMMUNICATION_FAILED; in translate_error_code()
952 case nosapp::ErrorCode::UNSUPPORTED_EC_FIELD: in translate_error_code()
953 return ErrorCode::UNSUPPORTED_EC_FIELD; in translate_error_code()
954 case nosapp::ErrorCode::MISSING_NONCE: in translate_error_code()
955 return ErrorCode::MISSING_NONCE; in translate_error_code()
956 case nosapp::ErrorCode::INVALID_NONCE: in translate_error_code()
957 return ErrorCode::INVALID_NONCE; in translate_error_code()
958 case nosapp::ErrorCode::MISSING_MAC_LENGTH: in translate_error_code()
959 return ErrorCode::MISSING_MAC_LENGTH; in translate_error_code()
960 case nosapp::ErrorCode::KEY_RATE_LIMIT_EXCEEDED: in translate_error_code()
961 return ErrorCode::KEY_RATE_LIMIT_EXCEEDED; in translate_error_code()
962 case nosapp::ErrorCode::CALLER_NONCE_PROHIBITED: in translate_error_code()
963 return ErrorCode::CALLER_NONCE_PROHIBITED; in translate_error_code()
964 case nosapp::ErrorCode::KEY_MAX_OPS_EXCEEDED: in translate_error_code()
965 return ErrorCode::KEY_MAX_OPS_EXCEEDED; in translate_error_code()
966 case nosapp::ErrorCode::INVALID_MAC_LENGTH: in translate_error_code()
967 return ErrorCode::INVALID_MAC_LENGTH; in translate_error_code()
968 case nosapp::ErrorCode::MISSING_MIN_MAC_LENGTH: in translate_error_code()
969 return ErrorCode::MISSING_MIN_MAC_LENGTH; in translate_error_code()
970 case nosapp::ErrorCode::UNSUPPORTED_MIN_MAC_LENGTH: in translate_error_code()
971 return ErrorCode::UNSUPPORTED_MIN_MAC_LENGTH; in translate_error_code()
972 case nosapp::ErrorCode::UNSUPPORTED_KDF: in translate_error_code()
973 return ErrorCode::UNSUPPORTED_KDF; in translate_error_code()
974 case nosapp::ErrorCode::UNSUPPORTED_EC_CURVE: in translate_error_code()
975 return ErrorCode::UNSUPPORTED_EC_CURVE; in translate_error_code()
976 case nosapp::ErrorCode::KEY_REQUIRES_UPGRADE: in translate_error_code()
977 return ErrorCode::KEY_REQUIRES_UPGRADE; in translate_error_code()
978 case nosapp::ErrorCode::ATTESTATION_CHALLENGE_MISSING: in translate_error_code()
979 return ErrorCode::ATTESTATION_CHALLENGE_MISSING; in translate_error_code()
980 case nosapp::ErrorCode::KEYMASTER_NOT_CONFIGURED: in translate_error_code()
981 return ErrorCode::KEYMASTER_NOT_CONFIGURED; in translate_error_code()
982 case nosapp::ErrorCode::ATTESTATION_APPLICATION_ID_MISSING: in translate_error_code()
983 return ErrorCode::ATTESTATION_APPLICATION_ID_MISSING; in translate_error_code()
984 case nosapp::ErrorCode::CANNOT_ATTEST_IDS: in translate_error_code()
985 return ErrorCode::CANNOT_ATTEST_IDS; in translate_error_code()
986 case nosapp::ErrorCode::UNIMPLEMENTED: in translate_error_code()
987 return ErrorCode::UNIMPLEMENTED; in translate_error_code()
988 case nosapp::ErrorCode::VERSION_MISMATCH: in translate_error_code()
989 return ErrorCode::VERSION_MISMATCH; in translate_error_code()
990 case nosapp::ErrorCode::ROLLBACK_RESISTANCE_UNAVAILABLE: in translate_error_code()
991 return ErrorCode::ROLLBACK_RESISTANCE_UNAVAILABLE; in translate_error_code()
992 case nosapp::ErrorCode::HARDWARE_TYPE_UNAVAILABLE: in translate_error_code()
993 return ErrorCode::HARDWARE_TYPE_UNAVAILABLE; in translate_error_code()
994 case nosapp::ErrorCode::PROOF_OF_PRESENCE_REQUIRED: in translate_error_code()
995 return ErrorCode::PROOF_OF_PRESENCE_REQUIRED; in translate_error_code()
996 case nosapp::ErrorCode::CONCURRENT_PROOF_OF_PRESENCE_REQUESTED: in translate_error_code()
997 return ErrorCode::CONCURRENT_PROOF_OF_PRESENCE_REQUESTED; in translate_error_code()
998 case nosapp::ErrorCode::UNKNOWN_ERROR: in translate_error_code()
999 return ErrorCode::UNKNOWN_ERROR; in translate_error_code()
1000 case nosapp::ErrorCode::NO_USER_CONFIRMATION: in translate_error_code()
1001 return ErrorCode::NO_USER_CONFIRMATION; in translate_error_code()
1004 case nosapp::ErrorCode::INVALID_DEVICE_IDS: in translate_error_code()
1005 case nosapp::ErrorCode::PRODUCTION_MODE_PROVISIONING: in translate_error_code()
1006 case nosapp::ErrorCode::ErrorCode_INT_MIN_SENTINEL_DO_NOT_USE_: in translate_error_code()
1007 case nosapp::ErrorCode::ErrorCode_INT_MAX_SENTINEL_DO_NOT_USE_: in translate_error_code()
1010 return ErrorCode::UNKNOWN_ERROR; in translate_error_code()