TFE适配MAAT4,编译表只注册一次
This commit is contained in:
@@ -2219,6 +2219,39 @@ uint64_t ssl_stream_get_policy_id(struct ssl_stream *upstream)
|
||||
return policy_id;
|
||||
}
|
||||
|
||||
int ssl_stream_get_decrypted_profile_id(struct ssl_stream *upstream)
|
||||
{
|
||||
uint16_t out_size;
|
||||
int profile_id = 0;
|
||||
struct tfe_cmsg *cmsg = tfe_stream_get0_cmsg(upstream->tcp_stream);
|
||||
int ret = tfe_cmsg_get_value(cmsg, TFE_CMSG_DECRYPTION_PROFILE_ID, (unsigned char *)profile_id, sizeof(profile_id), &out_size);
|
||||
assert(ret == 0);
|
||||
|
||||
return profile_id;
|
||||
}
|
||||
|
||||
int ssl_stream_get_trusted_keyring_profile_id(struct ssl_stream *upstream)
|
||||
{
|
||||
uint16_t out_size;
|
||||
int keyring_id = 0;
|
||||
struct tfe_cmsg *cmsg = tfe_stream_get0_cmsg(upstream->tcp_stream);
|
||||
int ret = tfe_cmsg_get_value(cmsg, TFE_CMSG_KEYRING_FOR_TRUSTED_ID, (unsigned char *)keyring_id, sizeof(keyring_id), &out_size);
|
||||
assert(ret == 0);
|
||||
|
||||
return keyring_id;
|
||||
}
|
||||
|
||||
int ssl_stream_get_untrusted_keyring_profile_id(struct ssl_stream *upstream)
|
||||
{
|
||||
uint16_t out_size;
|
||||
int keyring_id = 0;
|
||||
struct tfe_cmsg *cmsg = tfe_stream_get0_cmsg(upstream->tcp_stream);
|
||||
int ret = tfe_cmsg_get_value(cmsg, TFE_CMSG_KEYRING_FOR_UNTRUSTED, (unsigned char *)keyring_id, sizeof(keyring_id), &out_size);
|
||||
assert(ret == 0);
|
||||
|
||||
return keyring_id;
|
||||
}
|
||||
|
||||
int ssl_stream_get_string_opt(struct ssl_stream *upstream, enum SSL_STREAM_OPT opt_type, char* in_buff, size_t sz)
|
||||
{
|
||||
const char* sni=upstream->up_parts.client_hello->sni?upstream->up_parts.client_hello->sni:"null";
|
||||
|
||||
Reference in New Issue
Block a user