4298d77379
The new curve is not enabled by default. As EC_GROUP/EC_POINT is a bit too complex for X25519, this introduces an SSL_ECDH_METHOD abstraction which wraps just the raw ECDH operation. It also tidies up some of the curve code which kept converting back and force between NIDs and curve IDs. Now everything transits as curve IDs except for API entry points (SSL_set1_curves) which take NIDs. Those convert immediately and act on curve IDs from then on. Note that, like the Go implementation, this slightly tweaks the order of operations. The client sees the server public key before sending its own. To keep the abstraction simple, SSL_ECDH_METHOD expects to generate a keypair before consuming the peer's public key. Instead, the client handshake stashes the serialized peer public value and defers parsing it until it comes time to send ClientKeyExchange. (This is analogous to what it was doing before where it stashed the parsed peer public value instead.) It still uses TLS 1.2 terminology everywhere, but this abstraction should also be compatible with TLS 1.3 which unifies (EC)DH-style key exchanges. (Accordingly, this abstraction intentionally does not handle parsing the ClientKeyExchange/ServerKeyExchange framing or attempt to handle asynchronous plain RSA or the authentication bits.) BUG=571231 Change-Id: Iba09dddee5bcdfeb2b70185308e8ab0632717932 Reviewed-on: https://boringssl-review.googlesource.com/6780 Reviewed-by: Adam Langley <agl@google.com>
54 lines
694 B
CMake
54 lines
694 B
CMake
include_directories(../include)
|
|
|
|
add_subdirectory(pqueue)
|
|
|
|
add_library(
|
|
ssl
|
|
|
|
custom_extensions.c
|
|
d1_both.c
|
|
d1_clnt.c
|
|
d1_lib.c
|
|
d1_meth.c
|
|
d1_pkt.c
|
|
d1_srtp.c
|
|
d1_srvr.c
|
|
dtls_record.c
|
|
s3_both.c
|
|
s3_clnt.c
|
|
s3_enc.c
|
|
s3_lib.c
|
|
s3_meth.c
|
|
s3_pkt.c
|
|
s3_srvr.c
|
|
ssl_aead_ctx.c
|
|
ssl_asn1.c
|
|
ssl_buffer.c
|
|
ssl_cert.c
|
|
ssl_cipher.c
|
|
ssl_ecdh.c
|
|
ssl_file.c
|
|
ssl_lib.c
|
|
ssl_rsa.c
|
|
ssl_session.c
|
|
ssl_stat.c
|
|
t1_enc.c
|
|
t1_lib.c
|
|
tls_record.c
|
|
|
|
$<TARGET_OBJECTS:pqueue>
|
|
)
|
|
|
|
target_link_libraries(ssl crypto)
|
|
|
|
add_executable(
|
|
ssl_test
|
|
|
|
ssl_test.cc
|
|
|
|
$<TARGET_OBJECTS:test_support>
|
|
)
|
|
|
|
target_link_libraries(ssl_test ssl crypto)
|
|
add_dependencies(all_tests ssl_test)
|