diff --git a/include/libwebsockets/lws-secure-streams-policy.h b/include/libwebsockets/lws-secure-streams-policy.h index 863140d74..067b4b65d 100644 --- a/include/libwebsockets/lws-secure-streams-policy.h +++ b/include/libwebsockets/lws-secure-streams-policy.h @@ -51,32 +51,6 @@ typedef int (*plugin_auth_status_cb)(struct lws_ss_handle *ss, int status); * has the LWSSSPOLF_NAILED_UP flag. */ -#if defined(LWS_WITH_SSPLUGINS) -typedef struct lws_ss_plugin { - struct lws_ss_plugin *next; - const char *name; /**< auth plugin name */ - size_t alloc; /**< size of private allocation */ - - int (*create)(struct lws_ss_handle *ss, void *info, - plugin_auth_status_cb status); - /**< called when the auth plugin is instantiated - and bound to the secure stream. status is - called back with advisory information about - the authenticated stream state as it - proceeds */ - int (*destroy)(struct lws_ss_handle *ss); - /**< called when the related secure stream is - being destroyed, and anything the auth - plugin is doing should also be destroyed */ - int (*munge)(struct lws_ss_handle *ss, char *path, - size_t path_len); - /**< if the plugin needs to munge transactions - that have metadata outside the payload (eg, - add http headers) this callback will give - it the opportunity to do so */ -} lws_ss_plugin_t; -#endif - /* the public, const metrics policy definition */ typedef struct lws_metric_policy { @@ -331,12 +305,6 @@ typedef struct lws_ss_policy { /* details for non-http related protocols... */ } u; -#if defined(LWS_WITH_SSPLUGINS) - const - struct lws_ss_plugin *plugins[2]; /**< NULL or auth plugin */ - const void *plugins_info[2]; /**< plugin-specific data */ -#endif - #if defined(LWS_WITH_SECURE_STREAMS_AUTH_SIGV4) /* directly point to the metadata name, no need to expand */ const char *aws_region; diff --git a/lib/core/context.c b/lib/core/context.c index 2994d1eca..6e52c48f5 100644 --- a/lib/core/context.c +++ b/lib/core/context.c @@ -849,9 +849,6 @@ lws_create_context(const struct lws_context_creation_info *info) #if !defined(LWS_WITH_SECURE_STREAMS_STATIC_POLICY_ONLY) context->pss_policies_json = info->pss_policies_json; #endif -#if defined(LWS_WITH_SSPLUGINS) - context->pss_plugins = info->pss_plugins; -#endif #endif /* if he gave us names, set the uid / gid */ diff --git a/lib/secure-streams/policy-json.c b/lib/secure-streams/policy-json.c index cf742a2a5..94f6ee61b 100644 --- a/lib/secure-streams/policy-json.c +++ b/lib/secure-streams/policy-json.c @@ -305,9 +305,6 @@ static signed char lws_ss_policy_parser_cb(struct lejp_ctx *ctx, char reason) { struct policy_cb_args *a = (struct policy_cb_args *)ctx->user; -#if defined(LWS_WITH_SSPLUGINS) - const lws_ss_plugin_t **pin; -#endif char **pp, dotstar[32], *q; lws_ss_trust_store_t *ts; lws_ss_metadata_t *pmd; @@ -701,29 +698,8 @@ lws_ss_policy_parser_cb(struct lejp_ctx *ctx, char reason) pp = (char **)&a->curr[LTY_POLICY].p->payload_fmt; goto string2; - case LSSPPT_PLUGINS: -#if defined(LWS_WITH_SSPLUGINS) - pin = a->context->pss_plugins; - if (a->count == - (int)LWS_ARRAY_SIZE(a->curr[LTY_POLICY].p->plugins)) { - lwsl_err("%s: too many plugins\n", __func__); - - goto oom; - } - if (!pin) - break; - while (*pin) { - if (!strncmp((*pin)->name, ctx->buf, ctx->npos)) { - a->curr[LTY_POLICY].p->plugins[a->count++] = *pin; - return 0; - } - pin++; - } - lwsl_err("%s: unknown plugin\n", __func__); - goto oom; -#else + case LSSPPT_PLUGINS: /* deprecated */ break; -#endif case LSSPPT_TLS: if (reason == LEJPCB_VAL_TRUE) diff --git a/lib/secure-streams/private-lib-secure-streams.h b/lib/secure-streams/private-lib-secure-streams.h index a75b7ff40..59ff57023 100644 --- a/lib/secure-streams/private-lib-secure-streams.h +++ b/lib/secure-streams/private-lib-secure-streams.h @@ -80,11 +80,6 @@ typedef struct lws_ss_handle { struct lws_sss_proxy_conn *conn_if_sspc_onw; -#if defined(LWS_WITH_SSPLUGINS) - void *nauthi; /**< the nauth plugin instance data */ - void *sauthi; /**< the sauth plugin instance data */ -#endif - lws_ss_metadata_t *metadata; #if defined(LWS_WITH_SS_DIRECT_PROTOCOL_STR) lws_ss_metadata_t *instant_metadata; /**< for set instant metadata */ diff --git a/lib/secure-streams/secure-streams.c b/lib/secure-streams/secure-streams.c index b905e7d64..dc153bf62 100644 --- a/lib/secure-streams/secure-streams.c +++ b/lib/secure-streams/secure-streams.c @@ -845,11 +845,6 @@ _lws_ss_client_connect(lws_ss_handle_t *h, int is_retry, void *conn_if_sspc_onw) i.pwsi = &h->wsi; -#if defined(LWS_WITH_SSPLUGINS) - if (h->policy->plugins[0] && h->policy->plugins[0]->munge) - h->policy->plugins[0]->munge(h, path, h->context->max_http_header_data); -#endif - lwsl_info("%s: connecting %s, '%s' '%s' %s\n", __func__, i.method, i.alpn, i.address, i.path); @@ -1009,22 +1004,14 @@ lws_ss_create(struct lws_context *context, int tsi, const lws_ss_info_t *ssi, * We overallocate and point to things in the overallocation... * * 1) the user_alloc from the stream info - * 2) network auth plugin instantiation data - * 3) stream auth plugin instantiation data - * 4) as many metadata pointer structs as the policy tells - * 5) the streamtype name (length is not aligned) + * 2) as many metadata pointer structs as the policy tells + * 3) the streamtype name (length is not aligned) * * ... when we come to destroy it, just one free to do. */ size = sizeof(*h) + ssi->user_alloc + (ssi->streamtype ? strlen(ssi->streamtype): 0) + 1; -#if defined(LWS_WITH_SSPLUGINS) - if (pol->plugins[0]) - size += pol->plugins[0]->alloc; - if (pol->plugins[1]) - size += pol->plugins[1]->alloc; -#endif size += pol->metadata_count * sizeof(lws_ss_metadata_t); h = lws_zalloc(size, __func__); @@ -1074,17 +1061,6 @@ lws_ss_create(struct lws_context *context, int tsi, const lws_ss_info_t *ssi, p += ssi->user_alloc; -#if defined(LWS_WITH_SSPLUGINS) - if (pol->plugins[0]) { - h->nauthi = p; - p += pol->plugins[0]->alloc; - } - if (pol->plugins[1]) { - h->sauthi = p; - p += pol->plugins[1]->alloc; - } -#endif - if (pol->metadata_count) { h->metadata = (lws_ss_metadata_t *)p; p += pol->metadata_count * sizeof(lws_ss_metadata_t);