mirror of
https://github.com/cesanta/mongoose.git
synced 2026-11-24 20:21:49 +00:00
Split TLS files and introduce MG_ENABLE_CUSTOM_TLS
This commit is contained in:
1 parent
84f3fb0ba5
commit
755bf3c412
13 files changed
+496
-445
No files matched your search
@@ -0,0 +1,20 @@
|
||||
#include "tls.h"
|
||||
|
||||
#if !MG_ENABLE_MBEDTLS && !MG_ENABLE_OPENSSL && !MG_ENABLE_CUSTOM_TLS
|
||||
void mg_tls_init(struct mg_connection *c, struct mg_tls_opts *opts) {
|
||||
(void) opts;
|
||||
mg_error(c, "TLS is not enabled");
|
||||
}
|
||||
void mg_tls_handshake(struct mg_connection *c) {
|
||||
(void) c;
|
||||
}
|
||||
void mg_tls_free(struct mg_connection *c) {
|
||||
(void) c;
|
||||
}
|
||||
long mg_tls_recv(struct mg_connection *c, void *buf, size_t len) {
|
||||
return c == NULL || buf == NULL || len == 0 ? 0 : -1;
|
||||
}
|
||||
long mg_tls_send(struct mg_connection *c, const void *buf, size_t len) {
|
||||
return c == NULL || buf == NULL || len == 0 ? 0 : -1;
|
||||
}
|
||||
#endif
|
||||
Reference in new issue
Block a user