mirror of
https://github.com/cesanta/mongoose.git
synced 2026-11-19 19:40:56 +00:00
Remove TLS custom_init() API
This commit is contained in:
1 parent
3f5fd89fd7
commit
aa6d8b4662
5 files changed
-18
No files matched your search
@@ -3780,10 +3780,6 @@ void mg_tls_init(struct mg_connection *c, struct mg_tls_opts *opts) {
|
|||||||
if (tls == NULL) {
|
if (tls == NULL) {
|
||||||
mg_error(c, "TLS OOM");
|
mg_error(c, "TLS OOM");
|
||||||
goto fail;
|
goto fail;
|
||||||
} else if (opts->custom_init != NULL &&
|
|
||||||
opts->custom_init(c, opts, tls) != 0) {
|
|
||||||
mg_error(c, "TLS custom init failed");
|
|
||||||
goto fail;
|
|
||||||
}
|
}
|
||||||
LOG(LL_DEBUG, ("%lu Setting TLS, CA: %s, CRL: %s, cert: %s, key: %s", c->id,
|
LOG(LL_DEBUG, ("%lu Setting TLS, CA: %s, CRL: %s, cert: %s, key: %s", c->id,
|
||||||
ca, crl, cert, certkey));
|
ca, crl, cert, certkey));
|
||||||
@@ -3949,10 +3945,6 @@ void mg_tls_init(struct mg_connection *c, struct mg_tls_opts *opts) {
|
|||||||
if (tls == NULL) {
|
if (tls == NULL) {
|
||||||
mg_error(c, "TLS OOM");
|
mg_error(c, "TLS OOM");
|
||||||
goto fail;
|
goto fail;
|
||||||
} else if (opts->custom_init != NULL &&
|
|
||||||
opts->custom_init(c, opts, tls) != 0) {
|
|
||||||
mg_error(c, "TLS custom init failed");
|
|
||||||
goto fail;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!s_initialised) {
|
if (!s_initialised) {
|
||||||
|
|||||||
@@ -930,7 +930,6 @@ struct mg_tls_opts {
|
|||||||
const char *certkey; // Certificate key
|
const char *certkey; // Certificate key
|
||||||
const char *ciphers; // Cipher list
|
const char *ciphers; // Cipher list
|
||||||
struct mg_str srvname; // If not empty, enables server name verification
|
struct mg_str srvname; // If not empty, enables server name verification
|
||||||
int (*custom_init)(struct mg_connection *, struct mg_tls_opts *, void *tls);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
void mg_tls_init(struct mg_connection *, struct mg_tls_opts *);
|
void mg_tls_init(struct mg_connection *, struct mg_tls_opts *);
|
||||||
|
|||||||
@@ -11,7 +11,6 @@ struct mg_tls_opts {
|
|||||||
const char *certkey; // Certificate key
|
const char *certkey; // Certificate key
|
||||||
const char *ciphers; // Cipher list
|
const char *ciphers; // Cipher list
|
||||||
struct mg_str srvname; // If not empty, enables server name verification
|
struct mg_str srvname; // If not empty, enables server name verification
|
||||||
int (*custom_init)(struct mg_connection *, struct mg_tls_opts *, void *tls);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
void mg_tls_init(struct mg_connection *, struct mg_tls_opts *);
|
void mg_tls_init(struct mg_connection *, struct mg_tls_opts *);
|
||||||
|
|||||||
@@ -58,10 +58,6 @@ void mg_tls_init(struct mg_connection *c, struct mg_tls_opts *opts) {
|
|||||||
if (tls == NULL) {
|
if (tls == NULL) {
|
||||||
mg_error(c, "TLS OOM");
|
mg_error(c, "TLS OOM");
|
||||||
goto fail;
|
goto fail;
|
||||||
} else if (opts->custom_init != NULL &&
|
|
||||||
opts->custom_init(c, opts, tls) != 0) {
|
|
||||||
mg_error(c, "TLS custom init failed");
|
|
||||||
goto fail;
|
|
||||||
}
|
}
|
||||||
LOG(LL_DEBUG, ("%lu Setting TLS, CA: %s, CRL: %s, cert: %s, key: %s", c->id,
|
LOG(LL_DEBUG, ("%lu Setting TLS, CA: %s, CRL: %s, cert: %s, key: %s", c->id,
|
||||||
ca, crl, cert, certkey));
|
ca, crl, cert, certkey));
|
||||||
|
|||||||
@@ -28,10 +28,6 @@ void mg_tls_init(struct mg_connection *c, struct mg_tls_opts *opts) {
|
|||||||
if (tls == NULL) {
|
if (tls == NULL) {
|
||||||
mg_error(c, "TLS OOM");
|
mg_error(c, "TLS OOM");
|
||||||
goto fail;
|
goto fail;
|
||||||
} else if (opts->custom_init != NULL &&
|
|
||||||
opts->custom_init(c, opts, tls) != 0) {
|
|
||||||
mg_error(c, "TLS custom init failed");
|
|
||||||
goto fail;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!s_initialised) {
|
if (!s_initialised) {
|
||||||
|
|||||||
Reference in new issue
Block a user