From: Dariusz Michaluk Date: Fri, 27 May 2016 13:27:46 +0000 (+0200) Subject: Remove YACA_ERROR_NOT_IMPLEMENTED X-Git-Tag: accepted/tizen/common/20160810.161523~105 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e30b55d0522b8a9d51e9ab89aae301ea3b454c45;p=platform%2Fcore%2Fsecurity%2Fyaca.git Remove YACA_ERROR_NOT_IMPLEMENTED Change-Id: If8361e25c012984d3ebfaf7ae03df5964140f230 --- diff --git a/api/yaca/yaca_error.h b/api/yaca/yaca_error.h index 17c1f30..5bcfec7 100755 --- a/api/yaca/yaca_error.h +++ b/api/yaca/yaca_error.h @@ -48,7 +48,6 @@ typedef enum { YACA_ERROR_NONE = TIZEN_ERROR_NONE, YACA_ERROR_INVALID_ARGUMENT = TIZEN_ERROR_INVALID_PARAMETER, - YACA_ERROR_NOT_IMPLEMENTED = TIZEN_ERROR_YACA | 0x01, YACA_ERROR_INTERNAL = TIZEN_ERROR_YACA | 0x02, YACA_ERROR_TOO_BIG_ARGUMENT = TIZEN_ERROR_YACA | 0x03, YACA_ERROR_OUT_OF_MEMORY = TIZEN_ERROR_YACA | 0x04, diff --git a/src/encrypt.c b/src/encrypt.c index 3d83b78..dc1a1b3 100644 --- a/src/encrypt.c +++ b/src/encrypt.c @@ -292,8 +292,9 @@ int encrypt_get_algorithm(yaca_enc_algo_e algo, ret = snprintf(cipher_name, sizeof(cipher_name), "%s", algo_name); break; case YACA_ENC_UNSAFE_SKIPJACK: + //TODO NOT_IMPLEMENTED default: - return YACA_ERROR_NOT_IMPLEMENTED; + return YACA_ERROR_INVALID_ARGUMENT; } if (ret < 0) diff --git a/src/key.c b/src/key.c index b3e2c07..a0e771a 100755 --- a/src/key.c +++ b/src/key.c @@ -530,9 +530,7 @@ int export_evp(struct yaca_key_evp_s *evp_key, case YACA_KEY_TYPE_DH_PUB: case YACA_KEY_TYPE_EC_PRIV: case YACA_KEY_TYPE_EC_PUB: - ret = YACA_ERROR_NOT_IMPLEMENTED; - goto free_bio; - + //TODO NOT_IMPLEMENTED default: ret = YACA_ERROR_INVALID_ARGUMENT; goto free_bio; @@ -560,9 +558,7 @@ int export_evp(struct yaca_key_evp_s *evp_key, case YACA_KEY_TYPE_DH_PUB: case YACA_KEY_TYPE_EC_PRIV: case YACA_KEY_TYPE_EC_PUB: - ret = YACA_ERROR_NOT_IMPLEMENTED; - goto free_bio; - + //TODO NOT_IMPLEMENTED default: ret = YACA_ERROR_INVALID_ARGUMENT; goto free_bio; @@ -945,7 +941,7 @@ API int yaca_key_import(yaca_key_h *key, case YACA_KEY_TYPE_DH_PRIV: case YACA_KEY_TYPE_EC_PUB: case YACA_KEY_TYPE_EC_PRIV: - return YACA_ERROR_NOT_IMPLEMENTED; + //TODO NOT_IMPLEMENTED default: return YACA_ERROR_INVALID_ARGUMENT; } @@ -985,8 +981,9 @@ API int yaca_key_export(const yaca_key_h key, evp_key != NULL) return export_evp(evp_key, key_file_fmt, password, data, data_len); - if (key_fmt == YACA_KEY_FORMAT_PKCS8) - return YACA_ERROR_NOT_IMPLEMENTED; + if (key_fmt == YACA_KEY_FORMAT_PKCS8) { + //TODO NOT_IMPLEMENTED + } return YACA_ERROR_INVALID_ARGUMENT; } @@ -1049,7 +1046,7 @@ API int yaca_key_gen(yaca_key_h *key, case YACA_KEY_TYPE_DH_PRIV: case YACA_KEY_TYPE_EC_PRIV: - return YACA_ERROR_NOT_IMPLEMENTED; + //TODO NOT_IMPLEMENTED default: return YACA_ERROR_INVALID_ARGUMENT; } @@ -1143,7 +1140,8 @@ API int yaca_key_derive_dh(const yaca_key_h prv_key, const yaca_key_h pub_key, yaca_key_h *sym_key) { - return YACA_ERROR_NOT_IMPLEMENTED; + //TODO NOT_IMPLEMENTED + return YACA_ERROR_INVALID_ARGUMENT; } API int yaca_key_derive_kea(const yaca_key_h prv_key, @@ -1152,7 +1150,8 @@ API int yaca_key_derive_kea(const yaca_key_h prv_key, const yaca_key_h pub_key_auth, yaca_key_h *sym_key) { - return YACA_ERROR_NOT_IMPLEMENTED; + //TODO NOT_IMPLEMENTED + return YACA_ERROR_INVALID_ARGUMENT; } API int yaca_key_derive_pbkdf2(const char *password, diff --git a/src/sign.c b/src/sign.c index 6b76062..8ed5a6b 100644 --- a/src/sign.c +++ b/src/sign.c @@ -253,7 +253,7 @@ API int yaca_sign_init(yaca_ctx_h *ctx, case YACA_KEY_TYPE_DSA_PRIV: break; case YACA_KEY_TYPE_EC_PRIV: - return YACA_ERROR_NOT_IMPLEMENTED; + //TODO NOT_IMPLEMENTED default: return YACA_ERROR_INVALID_ARGUMENT; } @@ -508,7 +508,7 @@ API int yaca_verify_init(yaca_ctx_h *ctx, case YACA_KEY_TYPE_DSA_PUB: break; case YACA_KEY_TYPE_EC_PUB: - return YACA_ERROR_NOT_IMPLEMENTED; + //TODO NOT_IMPLEMENTED default: return YACA_ERROR_INVALID_ARGUMENT; }