Compare commits

..

11 commits

Author SHA1 Message Date
c3646294f5 Merge pull request 'Fix HTTP header leakage' (#39) from lda/Cytoplasm:fix-duplicate-leak into master
Reviewed-on: Telodendria/Cytoplasm#39
2024-07-02 11:56:18 -04:00
61b5430efe Merge pull request 'Fix TLS build issue' (#40) from lda/Cytoplasm:fix-tls into master
Reviewed-on: Telodendria/Cytoplasm#40
2024-07-02 11:55:53 -04:00
LDA
b3be10e112 [FIX] Last TLS oopsie!
We should actually consider bringing back CI when possible.
2024-06-27 16:53:56 +02:00
LDA
b284fb607a [FIX] Fix HTTP leakage 2024-06-27 16:45:32 +02:00
dd99759e39 Merge pull request 'Fix stringification.' (#37) from lda/Cytoplasm:fix-stringify into master
Reviewed-on: Telodendria/Cytoplasm#37
2024-06-24 14:19:26 -05:00
bd310e62ac Merge pull request 'Fix TLS, again...' (#38) from lda/Cytoplasm:fix-tls into master
Reviewed-on: Telodendria/Cytoplasm#38
2024-06-24 14:18:43 -05:00
LDA
d7faff734c [FIX] Actually apply serverName
As it turns out, it *was* odd. Not doing that will cause *someone* to
spend several hours fixing a SSL problem around a bridge they're making,
which needs to download media from a server and can't from *some* for an
undiscernable reason, causing said person to start going insane before
realising that Cytoplasm didn't set the server name properly.
2024-06-23 07:52:32 +02:00
LDA
5dc1ec49eb [FIX] Actually set fd.
I *should* have seen that one coming, oops!
2024-06-19 17:40:06 +02:00
LDA
eca717d90c Merge branch 'master' of https://git.telodendria.io/Telodendria/Cytoplasm into fix-tls 2024-06-19 17:39:37 +02:00
LDA
5fac67a674 [MOD] Fix stringification of version number
It just kept bothering me.
2024-06-15 13:54:49 +02:00
b6388eb7fe
[FIX] Fix issue related to TLS
The Makefile didn't properly set TLS_IMPL, effectively causing no
TLS implementation to be put in.
2023-10-03 16:56:39 +02:00
3 changed files with 5 additions and 10 deletions

View file

@ -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

View file

@ -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);
} }

View file

@ -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;