tfSslEcSetSupportedCurves

Jump to: navigation, search

Table of Contents >> SSL Programmer's Reference


#include <trsocket.h>


int tfSslEcSetSupportedCurves (
int sessionId,
ttUser16Bit curveArray[],
int curveArraySize
);


Function Description

Call this function to change the list of named elliptic curves to support for a certain session. For a client session, the list is sent in the ClientHello message. For a server session, the list is compared against the peer's list. If the user does not call this function, the default list is used. For a discussion of named elliptic curves in TLS/SSL, please refer to RFC 8422, section 5.1.1, Supported Elliptic Curves Extension.

Default list of named curves proposed (in order of preference)

  • TM_SSL_EC_CURVE_SECP521R1
  • TM_SSL_EC_CURVE_SECP384R1
  • TM_SSL_EC_CURVE_SECP256R1
  • TM_SSL_EC_CURVE_SECP224R1
  • TM_SSL_EC_CURVE_SECP192R1


Parameters

  • sessionId
    The session handle returned from tfSslNewSession().
  • curveArray
    The array of named curves to allow, from most to least preferred:
TM_SSL_EC_CURVE_SECP192R1
TM_SSL_EC_CURVE_SECP224R1
TM_SSL_EC_CURVE_SECP256R1
TM_SSL_EC_CURVE_SECP384R1
TM_SSL_EC_CURVE_SECP521R1
  • curveArraySize
    The number of curves in the array. This will be limited to TM_SSL_EC_NUM_SUPPORTED_CURVES (5, unless you define the macro in trsystem.h).


Returns

  • TM_ENOERROR
    Success.
  • TM_EINVAL
    Invalid named curve specified.


Table of Contents >> SSL Programmer's Reference