projects
/
BearSSL
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Added ChaCha20 implementation with SSE2 opcodes.
[BearSSL]
/
samples
/
client_basic.c
diff --git
a/samples/client_basic.c
b/samples/client_basic.c
index
d4f79fb
..
31a88be
100644
(file)
--- a/
samples/client_basic.c
+++ b/
samples/client_basic.c
@@
-27,6
+27,7
@@
#include <string.h>
#include <stdint.h>
#include <errno.h>
#include <string.h>
#include <stdint.h>
#include <errno.h>
+#include <signal.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <sys/types.h>
#include <sys/socket.h>
@@
-201,7
+202,7
@@
static const unsigned char TA1_EC_Q[] = {
static const br_x509_trust_anchor TAs[2] = {
{
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,
BR_X509_TA_CA,
{
BR_KEYTYPE_RSA,
@@
-212,7
+213,7
@@
static const br_x509_trust_anchor TAs[2] = {
}
},
{
}
},
{
-
(unsigned char *)TA1_DN, sizeof TA1_DN
,
+
{ (unsigned char *)TA1_DN, sizeof TA1_DN }
,
BR_X509_TA_CA,
{
BR_KEYTYPE_EC,
BR_X509_TA_CA,
{
BR_KEYTYPE_EC,
@@
-260,6
+261,11
@@
main(int argc, char *argv[])
path = "/";
}
path = "/";
}
+ /*
+ * Ignore SIGPIPE to avoid crashing in case of abrupt socket close.
+ */
+ signal(SIGPIPE, SIG_IGN);
+
/*
* Open the socket to the target server.
*/
/*
* Open the socket to the target server.
*/