diff --git a/BUILD.gn b/BUILD.gn index 70eb2187f72f0e2faadb48b4a99204692e3c0db3..88cd30b1d66fb8710ccda7a48ee39204dc40af78 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -209,12 +209,6 @@ ohos_static_library("websockets") { "//third_party/libwebsockets/lib/roles/ws", "//third_party/libwebsockets/lib/roles/ws/ext", "//third_party/libwebsockets/lib/roles/raw-file", - - ################################################# - "//third_party/openssl/include/openssl", - "//third_party/openssl/crypto/evp", - "//third_party/glib/glib", - "//third_party/glib", ] if (target_os == "ios") { @@ -244,11 +238,12 @@ ohos_static_library("websockets") { "-pipe", ] - deps = [ - "//third_party/openssl:libcrypto_shared", - "//third_party/openssl:libssl_shared", + external_deps = [ + "glib:glib", + "openssl:libcrypto_shared", + "openssl:libssl_shared", + "zlib:libz", ] - external_deps = [ "zlib:libz" ] public_configs = [ ":websockets_public_config" ] } diff --git a/bundle.json b/bundle.json index 06afa3b26399a6af60aa981a193a55151da3cd7f..255dace3f9dcba162f0be29de288a27f9d77d491 100644 --- a/bundle.json +++ b/bundle.json @@ -19,10 +19,12 @@ "rom": "319KB", "ram": "13865KB", "deps": { - "components": [ "zlib" ], - "third_party": [ - "openssl" - ] + "components": [ + "glib", + "openssl", + "zlib" + ], + "third_party": [] }, "build": { "sub_component": [], diff --git a/include/libwebsockets.h b/include/libwebsockets.h index 7454828a4b29abb17129d049aff9dc2a22c65b76..c5f07518ecb8db912aa20a70584d06686a58618e 100644 --- a/include/libwebsockets.h +++ b/include/libwebsockets.h @@ -301,9 +301,9 @@ typedef int suseconds_t; #endif #else -#include +#include "ssl.h" #if !defined(LWS_WITH_MBEDTLS) -#include +#include "err.h" #endif #endif #endif /* not USE_WOLFSSL */ diff --git a/lib/tls/private-lib-tls.h b/lib/tls/private-lib-tls.h index 28203c58a2163083513bc172402fcf837a9c8f67..ed1ebe581029763757e82018de101d7542febd83 100644 --- a/lib/tls/private-lib-tls.h +++ b/lib/tls/private-lib-tls.h @@ -66,36 +66,22 @@ #include #include #include "ssl.h" /* wrapper !!!! */ - #else /* not esp32 */ - #if defined(LWS_WITH_MBEDTLS) - #include - #include - #include - #include - #include - #include - #include - #if defined(LWS_AMAZON_LINUX) - #include "ssl.h" /* wrapper !!!! */ #else - #include "openssl/ssl.h" /* wrapper !!!! */ - #endif - #else - #include - #include - #include - #include - #include - #include - #include - #include + #include "ssl.h" + #include "evp.h" + #include "err.h" + #include "md5.h" + #include "sha.h" + #include "rsa.h" + #include "bn.h" + #include "aes.h" #ifdef LWS_HAVE_OPENSSL_ECDH_H - #include + #include "ecdh.h" #endif #if !defined(LWS_HAVE_EVP_MD_CTX_free) && !defined(USE_WOLFSSL) #define EVP_MD_CTX_free EVP_MD_CTX_destroy #endif - #include + #include "x509v3.h" #endif /* not mbedtls */ #if defined(OPENSSL_VERSION_NUMBER) #if (OPENSSL_VERSION_NUMBER < 0x0009080afL)