openHiTLS API openHiTLS 0.1.0-Alpha1

◆ HITLS_GetSharedGroup()

int32_t HITLS_GetSharedGroup ( const HITLS_Ctx ctx,
int32_t  nmatch,
uint16_t *  groupId 
)

Obtain the supported peer group or the number of supported peer groups of the nth match.

nmatch Value range: - 1 or a positive integer This function can be called only after negotiation and can be called only by the server. If nmatch is a positive integer, check the intersection of groups on the client and server, and return the nmatch group in the intersection by groupId. If the value of nmatch is - 1, the number of intersection groups on the client and server is returned based on groupId.

参数
ctx[IN] TLS connection handle.
nmatch[IN] Sequence number of the group to be obtained, -1 Return the number of supported peer groups.
groupId[OUT] Returned result.
返回值
HITLS_SUCCESS,Obtainingthe status succeeded. For details about other error codes, see hitls_error.h.