return gnutls_assert_val(GNUTLS_E_NO_CIPHER_SUITES);
}
+ /* If we didn't receive the supported_groups extension, then
+ * we should assume that SECP256R1 is supported; that is required
+ * by RFC4492, probably to allow SSLv2 hellos negotiate elliptic curve
+ * ciphersuites */
+ if (session->internals.cand_ec_group == NULL &&
+ _gnutls_extension_list_check(session, GNUTLS_EXTENSION_SUPPORTED_ECC) < 0) {
+ session->internals.cand_ec_group = _gnutls_id_to_group(DEFAULT_EC_GROUP);
+ }
+
if (session->internals.priorities->server_precedence == 0) {
for (i = 0; i < peer_clist->size; i++) {
_gnutls_debug_log("checking %.2x.%.2x (%s) for compatibility\n",
#define DEFAULT_EXPIRE_TIME 3600
#define DEFAULT_HANDSHAKE_TIMEOUT_MS 40*1000
+/* The EC group to be used when the extension
+ * supported groups/curves is not present */
+#define DEFAULT_EC_GROUP GNUTLS_GROUP_SECP256R1
+
typedef enum transport_t {
GNUTLS_STREAM,
GNUTLS_DGRAM
struct extension_entry_st *rexts;
unsigned rexts_size;
- /* In case of a client holds the extensions we sent to the peer;
- * otherwise the extensions we received from the client.
- */
-
struct {
uint16_t type;
gnutls_ext_priv_data_t priv;
bool resumed_set;
} ext_data[MAX_EXT_TYPES];
+ /* In case of a client holds the extensions we sent to the peer;
+ * otherwise the extensions we received from the client.
+ */
const struct extension_entry_st *used_exts[MAX_EXT_TYPES];
unsigned used_exts_size;