#include <string.h>
#include <stdint.h>
#include <errno.h>
+#include <signal.h>
#include <sys/types.h>
#include <sys/socket.h>
case BR_SSLKEYX_ECDHE_RSA:
if (pc->sk->key_type == BR_KEYTYPE_RSA) {
choices->cipher_suite = st[u][0];
+ if (cc->eng.session.version < BR_TLS12) {
+ hash_id = 0;
+ }
choices->hash_id = hash_id;
goto choose_ok;
}
case BR_SSLKEYX_ECDHE_ECDSA:
if (pc->sk->key_type == BR_KEYTYPE_EC) {
choices->cipher_suite = st[u][0];
+ if (cc->eng.session.version < BR_TLS12) {
+ hash_id = br_sha1_ID;
+ }
choices->hash_id = hash_id;
goto choose_ok;
}
br_ssl_engine_set_buffer(&cc.eng, iobuf, iobuf_len, bidi);
+ /*
+ * We need to ignore SIGPIPE.
+ */
+ signal(SIGPIPE, SIG_IGN);
+
/*
* Open the server socket.
*/