context creation info add ecdh_curve
[platform/upstream/libwebsockets.git] / lib / ssl.c
index ac3ad2e..719f4bf 100644 (file)
--- a/lib/ssl.c
+++ b/lib/ssl.c
@@ -144,6 +144,9 @@ lws_context_ssl_init_ecdh_curve(struct lws_context_creation_info *info,
        int ecdh_nid;
        const char *ecdh_curve = "prime256v1";
 
+       if (info->ecdh_curve)
+               ecdh_curve = info->ecdh_curve;
+
        ecdh_nid = OBJ_sn2nid(ecdh_curve);
        if (NID_undef == ecdh_nid) {
                lwsl_err("SSL: Unknown curve name '%s'", ecdh_curve);