Source release 14.0.0

This commit is contained in:
John W. Bruce
2018-05-16 17:35:40 -07:00
parent 31381a1311
commit 3ab70cec4e
2053 changed files with 1585838 additions and 4614 deletions

View File

@@ -8,6 +8,7 @@
#include <netdb.h>
#include <netinet/in.h>
#include <stdlib.h>
#include <string.h>
#include <sys/socket.h>
#include <unistd.h>
@@ -39,16 +40,12 @@ bool Tokenize(const std::string& source, const std::string& delim,
SSL_CTX* InitSslContext() {
OpenSSL_add_all_algorithms();
SSL_load_error_strings();
#if (OPENSSL_VERSION_NUMBER < 0x10100000L)
const SSL_METHOD* method = TLSv1_2_client_method();
#else
const SSL_METHOD* method = TLS_client_method();
#endif
SSL_CTX* ctx = SSL_CTX_new(method);
if (!ctx) LOGE("failed to create SSL context");
int ret = SSL_CTX_set_cipher_list(
ctx, "ALL:!RC4-MD5:!RC4-SHA:!ECDHE-ECDSA-RC4-SHA:!ECDHE-RSA-RC4-SHA");
if (0 != ret) LOGE("error disabling vulnerable ciphers");
if (0 == ret) LOGE("error disabling vulnerable ciphers");
return ctx;
}
@@ -323,7 +320,7 @@ int HttpSocket::Read(char* data, int len, int timeout_in_ms) {
// The connection has been closed. No more data.
break;
} else {
LOGE("recv returned %d, errno = %d", read, errno);
LOGE("recv returned %d, errno = %d = %s", read, errno, strerror(errno));
return -1;
}
}