Compare commits
2 Commits
master
...
fix-sanita
Author | SHA1 | Date |
---|---|---|
lda | de24e5f436 | |
lda | 102ea9409d |
|
@ -33,8 +33,7 @@
|
|||
#define CYTOPLASM_VERSION_BETA 0
|
||||
#define CYTOPLASM_VERSION_STABLE (!CYTOPLASM_VERSION_ALPHA && !CYTOPLASM_VERSION_BETA)
|
||||
|
||||
#define XSTRINGIFY(x) #x
|
||||
#define STRINGIFY(x) XSTRINGIFY(x)
|
||||
#define STRINGIFY(x) #x
|
||||
|
||||
/***
|
||||
* @Nm Cytoplasm
|
||||
|
|
|
@ -621,7 +621,7 @@ HttpParseHeaders(Stream * fp)
|
|||
|
||||
strncpy(headerValue, headerPtr, len);
|
||||
|
||||
Free(HashMapSet(headers, headerKey, headerValue));
|
||||
HashMapSet(headers, headerKey, headerValue);
|
||||
Free(headerKey);
|
||||
}
|
||||
|
||||
|
|
|
@ -71,6 +71,14 @@ TlsInitClient(int fd, const char *serverName)
|
|||
OpenSSLCookie *cookie;
|
||||
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));
|
||||
if (!cookie)
|
||||
{
|
||||
|
@ -81,14 +89,12 @@ TlsInitClient(int fd, const char *serverName)
|
|||
|
||||
cookie->method = TLS_client_method();
|
||||
cookie->ctx = SSL_CTX_new(cookie->method);
|
||||
cookie->fd = fd;
|
||||
if (!cookie->ctx)
|
||||
{
|
||||
goto error;
|
||||
}
|
||||
|
||||
cookie->ssl = SSL_new(cookie->ctx);
|
||||
SSL_set_tlsext_host_name(cookie->ssl, serverName);
|
||||
if (!cookie->ssl)
|
||||
{
|
||||
goto error;
|
||||
|
@ -289,7 +295,9 @@ TlsClose(void *cookie)
|
|||
SSL_free(ssl->ssl);
|
||||
SSL_CTX_free(ssl->ctx);
|
||||
|
||||
#if 0
|
||||
close(ssl->fd);
|
||||
#endif
|
||||
|
||||
Free(ssl);
|
||||
|
||||
|
|
Loading…
Reference in New Issue