/*
- * Copyright (c) 2017-2020 Samsung Electronics Co., Ltd. All rights reserved
+ * Copyright (c) 2017 - 2024 Samsung Electronics Co., Ltd. All rights reserved
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
static const int GENERIC_REASON_MAX = 99;
-#define ERRORDESCRIBE(name) case name: return #name
-const char *ckm_debug_translate_error(int err)
-{
- switch (err) {
- ERRORDESCRIBE(CKM_API_SUCCESS);
- ERRORDESCRIBE(CKM_API_ERROR_INPUT_PARAM);
- ERRORDESCRIBE(CKM_API_ERROR_OUT_OF_MEMORY);
- ERRORDESCRIBE(CKM_API_ERROR_SERVER_ERROR);
- ERRORDESCRIBE(CKM_API_ERROR_AUTHENTICATION_FAILED);
- ERRORDESCRIBE(CKM_API_ERROR_VERIFICATION_FAILED);
- default: return "Error not defined";
- }
-}
-#undef ERRORDESCRIBE
-
void errorDump()
{
auto bio = uptr<BIO_free_all>(BIO_new(BIO_s_mem()));