ssl stream和ssl policy对接tfe_cmsg_xx。

This commit is contained in:
zhengchao
2019-06-01 20:28:07 +08:00
committed by luqiuwen
parent 77aa3063f7
commit bc41051da2
9 changed files with 147 additions and 69 deletions

View File

@@ -75,12 +75,12 @@ int tfe_cmsg_set(struct tfe_cmsg * cmsg, enum tfe_cmsg_tlv_type type, const unsi
return 0;
}
int tfe_cmsg_get_value(struct tfe_cmsg * cmsg, enum tfe_cmsg_tlv_type type, char * out_value,
int tfe_cmsg_get_value(struct tfe_cmsg * cmsg, enum tfe_cmsg_tlv_type type, unsigned char * out_value,
size_t sz_out_value_buf, uint16_t * out_size)
{
struct tfe_cmsg_tlv *tlv;
int result = 0;
int value_length = 0;
size_t value_length = 0;
if (unlikely(type >= TFE_CMSG_TLV_NR_MAX))
{
@@ -96,7 +96,7 @@ int tfe_cmsg_get_value(struct tfe_cmsg * cmsg, enum tfe_cmsg_tlv_type type, char
}
value_length = tlv->length - sizeof(struct tfe_cmsg_tlv);
if (unlikely(sz_out_value_buf < value_length))
if (unlikely(sz_out_value_buf < value_length))
{
result = -ENOBUFS;
goto errout;