#include <string.h>
#include <stdint.h>
#include <errno.h>
+#include <signal.h>
#include <sys/types.h>
#include <sys/socket.h>
static const br_x509_trust_anchor TAs[2] = {
{
- (unsigned char *)TA0_DN, sizeof TA0_DN,
+ { (unsigned char *)TA0_DN, sizeof TA0_DN },
BR_X509_TA_CA,
{
BR_KEYTYPE_RSA,
}
},
{
- (unsigned char *)TA1_DN, sizeof TA1_DN,
+ { (unsigned char *)TA1_DN, sizeof TA1_DN },
BR_X509_TA_CA,
{
BR_KEYTYPE_EC,
path = "/";
}
+ /*
+ * Ignore SIGPIPE to avoid crashing in case of abrupt socket close.
+ */
+ signal(SIGPIPE, SIG_IGN);
+
/*
* Open the socket to the target server.
*/