mirror of
https://github.com/cesanta/mongoose.git
synced 2025-01-22 10:03:26 +08:00
21 lines
596 B
C
21 lines
596 B
C
|
#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
|