forked from Telodendria/Cytoplasm
Compare commits
11 commits
b9dc169917
...
c3646294f5
Author | SHA1 | Date | |
---|---|---|---|
c3646294f5 | |||
61b5430efe | |||
|
b3be10e112 | ||
|
b284fb607a | ||
dd99759e39 | |||
bd310e62ac | |||
|
d7faff734c | ||
|
5dc1ec49eb | ||
|
eca717d90c | ||
|
5fac67a674 | ||
b6388eb7fe |
3 changed files with 5 additions and 10 deletions
|
@ -33,7 +33,8 @@
|
||||||
#define CYTOPLASM_VERSION_BETA 0
|
#define CYTOPLASM_VERSION_BETA 0
|
||||||
#define CYTOPLASM_VERSION_STABLE (!CYTOPLASM_VERSION_ALPHA && !CYTOPLASM_VERSION_BETA)
|
#define CYTOPLASM_VERSION_STABLE (!CYTOPLASM_VERSION_ALPHA && !CYTOPLASM_VERSION_BETA)
|
||||||
|
|
||||||
#define STRINGIFY(x) #x
|
#define XSTRINGIFY(x) #x
|
||||||
|
#define STRINGIFY(x) XSTRINGIFY(x)
|
||||||
|
|
||||||
/***
|
/***
|
||||||
* @Nm Cytoplasm
|
* @Nm Cytoplasm
|
||||||
|
|
|
@ -621,7 +621,7 @@ HttpParseHeaders(Stream * fp)
|
||||||
|
|
||||||
strncpy(headerValue, headerPtr, len);
|
strncpy(headerValue, headerPtr, len);
|
||||||
|
|
||||||
HashMapSet(headers, headerKey, headerValue);
|
Free(HashMapSet(headers, headerKey, headerValue));
|
||||||
Free(headerKey);
|
Free(headerKey);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -71,14 +71,6 @@ TlsInitClient(int fd, const char *serverName)
|
||||||
OpenSSLCookie *cookie;
|
OpenSSLCookie *cookie;
|
||||||
char errorStr[256];
|
char errorStr[256];
|
||||||
|
|
||||||
/*
|
|
||||||
* TODO: Seems odd that this isn't needed to make the
|
|
||||||
* connection... we should figure out how to verify the
|
|
||||||
* certificate matches the server we think we're
|
|
||||||
* connecting to.
|
|
||||||
*/
|
|
||||||
(void) serverName;
|
|
||||||
|
|
||||||
cookie = Malloc(sizeof(OpenSSLCookie));
|
cookie = Malloc(sizeof(OpenSSLCookie));
|
||||||
if (!cookie)
|
if (!cookie)
|
||||||
{
|
{
|
||||||
|
@ -89,12 +81,14 @@ TlsInitClient(int fd, const char *serverName)
|
||||||
|
|
||||||
cookie->method = TLS_client_method();
|
cookie->method = TLS_client_method();
|
||||||
cookie->ctx = SSL_CTX_new(cookie->method);
|
cookie->ctx = SSL_CTX_new(cookie->method);
|
||||||
|
cookie->fd = fd;
|
||||||
if (!cookie->ctx)
|
if (!cookie->ctx)
|
||||||
{
|
{
|
||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
|
|
||||||
cookie->ssl = SSL_new(cookie->ctx);
|
cookie->ssl = SSL_new(cookie->ctx);
|
||||||
|
SSL_set_tlsext_host_name(cookie->ssl, serverName);
|
||||||
if (!cookie->ssl)
|
if (!cookie->ssl)
|
||||||
{
|
{
|
||||||
goto error;
|
goto error;
|
||||||
|
|
Loading…
Reference in a new issue