mirror of
https://github.com/openharmony/security_deviceauth.git
synced 2026-07-21 03:15:26 -04:00
fix code check issue in deviceauth_lite 1.0
Signed-off-by: winnieHu <huyu35@huawei.com>
This commit is contained in:
Executable → Regular
-2
@@ -16,8 +16,6 @@
|
||||
#ifndef __BASE_H__
|
||||
#define __BASE_H__
|
||||
|
||||
#define _HC_DEBUF_ 1
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#ifdef _HC_DEBUG_
|
||||
|
||||
@@ -186,7 +186,7 @@ int32_t sign(struct hc_key_alias *key_alias, const struct uint8_buff *message, s
|
||||
*
|
||||
* @param service_id: the service ID
|
||||
* @param hc_auth_id: the auth ID
|
||||
* @param user_type:
|
||||
* @param user_type: accessor:0 controller:1
|
||||
* @param message: the message to verify
|
||||
* @param signature: signature to compare
|
||||
* @return 0 -- success, others -- failed
|
||||
@@ -199,7 +199,7 @@ int32_t verify(struct hc_key_alias *key_alias, const int32_t user_type, const st
|
||||
*
|
||||
* @param service_id: the service ID
|
||||
* @param hc_auth_id: the auth ID
|
||||
* @param user_type:
|
||||
* @param user_type: accessor:0 controller:1
|
||||
* @param message: the message to verify
|
||||
* @param public_key: the public key
|
||||
* @param signature: signature to compare
|
||||
@@ -260,7 +260,7 @@ int32_t compute_hkdf(struct var_buffer *shared_secret, struct hc_salt *salt, cha
|
||||
*
|
||||
* @param key: encrypt key
|
||||
* @param plain: data to be encrypted
|
||||
* @param aad:
|
||||
* @param aad: aad for encrypt
|
||||
* @param out_cipher: encrypted data
|
||||
* @return 0 -- success, others -- failed
|
||||
*/
|
||||
@@ -272,7 +272,7 @@ int32_t aes_gcm_encrypt(struct var_buffer *key, const struct uint8_buff *plain,
|
||||
*
|
||||
* @param key: encrypt key
|
||||
* @param cipher: data to be decrypted
|
||||
* @param aad:
|
||||
* @param aad: aad for encrypt
|
||||
* @param out_plain: edecrypted data
|
||||
* @return 0 -- success, others -- failed
|
||||
*/
|
||||
|
||||
Executable → Regular
+1
-1
@@ -16,8 +16,8 @@
|
||||
#ifndef __STS_CLIENT_H__
|
||||
#define __STS_CLIENT_H__
|
||||
|
||||
#include "key_agreement_server.h"
|
||||
#include <stdint.h>
|
||||
#include "key_agreement_server.h"
|
||||
#include "base.h"
|
||||
#include "hichain.h"
|
||||
#include "sts_server.h"
|
||||
|
||||
Executable → Regular
+12
-12
@@ -321,7 +321,7 @@ static int32_t get_operation_from_sts(void *payload)
|
||||
#endif /* _CUT_XXX_ */
|
||||
|
||||
/* function macro which is not called in functions */
|
||||
#define CUT_EMPTY_FUNC(d_name) \
|
||||
#define CUT_EMPTY_FUNC(d_name, handle, nav, receive) \
|
||||
{ \
|
||||
LOGE("Receive %s message, but do not support %s", d_name, d_name); \
|
||||
(void)handle; \
|
||||
@@ -352,7 +352,7 @@ static int32_t proc_pake_request_message(struct hichain *handle, struct header_a
|
||||
return ret;
|
||||
}
|
||||
#else /* _CUT_XXX_ */
|
||||
CUT_EMPTY_FUNC("pake request");
|
||||
CUT_EMPTY_FUNC("pake request", handle, nav, receive);
|
||||
#endif /* _CUT_XXX_ */
|
||||
|
||||
static int32_t proc_pake_response_message(struct hichain *handle, struct header_analysis *nav,
|
||||
@@ -376,7 +376,7 @@ static int32_t proc_pake_response_message(struct hichain *handle, struct header_
|
||||
return ret;
|
||||
}
|
||||
#else /* _CUT_XXX_ */
|
||||
CUT_EMPTY_FUNC("pake response");
|
||||
CUT_EMPTY_FUNC("pake response", handle, nav, receive);
|
||||
#endif /* _CUT_XXX_ */
|
||||
|
||||
static int32_t proc_exchange_request_message(struct hichain *handle, struct header_analysis *nav,
|
||||
@@ -391,7 +391,7 @@ static int32_t proc_exchange_request_message(struct hichain *handle, struct head
|
||||
return ret;
|
||||
}
|
||||
#else /* _CUT_XXX_ */
|
||||
CUT_EMPTY_FUNC("exchange request");
|
||||
CUT_EMPTY_FUNC("exchange request", handle, nav, receive);
|
||||
#endif /* _CUT_XXX_ */
|
||||
|
||||
static int32_t proc_exchange_response_message(struct hichain *handle, struct header_analysis *nav,
|
||||
@@ -408,7 +408,7 @@ static int32_t proc_exchange_response_message(struct hichain *handle, struct hea
|
||||
return ret;
|
||||
}
|
||||
#else /* _CUT_XXX_ */
|
||||
CUT_EMPTY_FUNC("exchange response");
|
||||
CUT_EMPTY_FUNC("exchange response", handle, nav, receive);
|
||||
#endif /* _CUT_XXX_ */
|
||||
|
||||
static int32_t proc_sts_request_message(struct hichain *handle, struct header_analysis *nav,
|
||||
@@ -432,7 +432,7 @@ static int32_t proc_sts_request_message(struct hichain *handle, struct header_an
|
||||
return ret;
|
||||
}
|
||||
#else /* _CUT_XXX_ */
|
||||
CUT_EMPTY_FUNC("sts request");
|
||||
CUT_EMPTY_FUNC("sts request", handle, nav, receive);
|
||||
#endif /* _CUT_XXX_ */
|
||||
|
||||
static int32_t proc_sts_response_message(struct hichain *handle, struct header_analysis *nav,
|
||||
@@ -455,7 +455,7 @@ static int32_t proc_sts_response_message(struct hichain *handle, struct header_a
|
||||
return ret;
|
||||
}
|
||||
#else /* _CUT_XXX_ */
|
||||
CUT_EMPTY_FUNC("sts request");
|
||||
CUT_EMPTY_FUNC("sts request", handle, nav, receive);
|
||||
#endif /* _CUT_XXX_ */
|
||||
|
||||
static int32_t proc_add_request_message(struct hichain *handle, struct header_analysis *nav,
|
||||
@@ -471,7 +471,7 @@ static int32_t proc_add_request_message(struct hichain *handle, struct header_an
|
||||
return ret;
|
||||
}
|
||||
#else /* _CUT_XXX_ */
|
||||
CUT_EMPTY_FUNC("add auth info request");
|
||||
CUT_EMPTY_FUNC("add auth info request", handle, nav, receive);
|
||||
#endif /* _CUT_XXX_ */
|
||||
|
||||
static int32_t proc_remove_request_message(struct hichain *handle, struct header_analysis *nav,
|
||||
@@ -486,7 +486,7 @@ static int32_t proc_remove_request_message(struct hichain *handle, struct header
|
||||
return ret;
|
||||
}
|
||||
#else /* _CUT_XXX_ */
|
||||
CUT_EMPTY_FUNC("remove auth info request");
|
||||
CUT_EMPTY_FUNC("remove auth info request", handle, nav, receive);
|
||||
#endif /* _CUT_XXX_ */
|
||||
|
||||
static int32_t proc_add_response_message(struct hichain *handle, struct header_analysis *nav,
|
||||
@@ -505,7 +505,7 @@ static int32_t proc_add_response_message(struct hichain *handle, struct header_a
|
||||
return HC_OK;
|
||||
}
|
||||
#else /* _CUT_XXX_ */
|
||||
CUT_EMPTY_FUNC("add auth info response");
|
||||
CUT_EMPTY_FUNC("add auth info response", handle, nav, receive);
|
||||
#endif /* _CUT_XXX_ */
|
||||
|
||||
static int32_t proc_remove_response_message(struct hichain *handle, struct header_analysis *nav,
|
||||
@@ -524,7 +524,7 @@ static int32_t proc_remove_response_message(struct hichain *handle, struct heade
|
||||
return HC_OK;
|
||||
}
|
||||
#else /* _CUT_XXX_ */
|
||||
CUT_EMPTY_FUNC("remove auth info response");
|
||||
CUT_EMPTY_FUNC("remove auth info response", handle, nav, receive);
|
||||
#endif /* _CUT_XXX_ */
|
||||
|
||||
static int32_t proc_sec_clone_request_message(struct hichain *handle, struct header_analysis *nav,
|
||||
@@ -544,7 +544,7 @@ static int32_t proc_sec_clone_request_message(struct hichain *handle, struct hea
|
||||
return ret;
|
||||
}
|
||||
#else /* _SUPPORT_SEC_ */
|
||||
CUT_EMPTY_FUNC("sec clone request");
|
||||
CUT_EMPTY_FUNC("sec clone request", handle, nav, receive);
|
||||
#endif /* _SUPPORT_SEC_ */
|
||||
|
||||
static int32_t proc_inform_message(struct hichain *handle, struct header_analysis *nav, struct message *receive,
|
||||
|
||||
Reference in New Issue
Block a user