Implement ECDHE-RSA key exchange.
* src/ecdh.c: New file. * src/Makefile.am (libntbtls_la_SOURCES): Add new file. * src/context.h (ecdh_context_t): New type. (_ntbtls_handshake_params_s): Use new type for 'ecdh_ctx'. * src/protocol.c (handshake_params_init): Init ECDH_CTX. (handshake_params_deinit): Deinit ECDH_CTX. (ssl_write_hello_request): Rename to write_hello_request. Change caller. * src/protocol-cli.c (write_supported_elliptic_curves_ext): Implement. (write_cli_supported_point_formats_ext): Implement. (write_client_hello): Call them. (parse_supported_point_formats_ext): Implement. (parse_server_ecdh_params): Implement. (parse_signature_algorithm): Fix debug output. (read_server_key_exchange): Improve debug output. (write_client_key_exchange): Implement ECDHE key exchange. * src/ciphersuites.c (_ntbtls_ciphersuite_list): Advertise ECDHE_RSA key exchange.
- Signed-off-by: Werner Koch <wk@gnupg.org>