Merge "Adjust naming convention to API." into tizen
authorKrzysztof Jackiewicz <k.jackiewicz@samsung.com>
Fri, 8 Jul 2016 13:45:00 +0000 (06:45 -0700)
committerGerrit Code Review <gerrit@review.vlan103.tizen.org>
Fri, 8 Jul 2016 13:45:00 +0000 (06:45 -0700)
api/yaca/yaca_crypto.h
api/yaca/yaca_types.h
src/crypto.c
src/sign.c

index 20cae17..9ee5ed7 100644 (file)
@@ -66,12 +66,9 @@ int yaca_initialize(void);
  *
  * @since_tizen 3.0
  *
- * @return #YACA_ERROR_NONE on success
- * @retval #YACA_ERROR_NONE Successful
- *
  * @see yaca_initialize()
  */
-int yaca_cleanup(void);
+void yaca_cleanup(void);
 
 /**
  * @brief  Allocates the memory.
index 4508c8d..655879e 100644 (file)
@@ -389,7 +389,11 @@ typedef enum {
  * @see #yaca_padding_e
  */
 typedef enum {
-       /** Padding. Property type is #yaca_padding_e. */
+       /**
+        * Padding for the sign/verify operation. Property type is #yaca_padding_e.
+        *
+        * This property can be set at the latest before the *_finalize() call.
+        */
        YACA_PROPERTY_PADDING,
 
        /** GCM Additional Authentication Data. Property type is a buffer (e.g. char*) */
index 2714120..32f1d70 100644 (file)
@@ -157,11 +157,11 @@ exit:
        return ret;
 }
 
-API int yaca_cleanup(void)
+API void yaca_cleanup(void)
 {
        /* calling cleanup twice on the same thread is a NOP */
        if (!current_thread_initialized)
-               return YACA_ERROR_NONE;
+               return;
 
        /* per thread cleanup */
        ERR_remove_thread_state(NULL);
@@ -190,8 +190,6 @@ API int yaca_cleanup(void)
                current_thread_initialized = false;
        }
        pthread_mutex_unlock(&init_mutex);
-
-       return YACA_ERROR_NONE;
 }
 
 API int yaca_malloc(size_t size, void **memory)
index a159e50..58b6d03 100644 (file)
@@ -586,7 +586,7 @@ API int yaca_verify_finalize(yaca_context_h ctx,
        if (ret == 1)
                return YACA_ERROR_NONE;
 
-       if (ret == YACA_ERROR_NONE) {
+       if (ret == 0) {
                ERROR_CLEAR();
                return YACA_ERROR_DATA_MISMATCH;
        }