Skip to content

Commit

Permalink
fix: fix build break when using openssl3
Browse files Browse the repository at this point in the history
Signed-off-by: Hosung Kim [email protected]
  • Loading branch information
hs0225 committed Jul 19, 2023
1 parent 3a5d0c8 commit 4b16e70
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 7 deletions.
4 changes: 2 additions & 2 deletions deps/node/src/node_crypto.cc
Original file line number Diff line number Diff line change
Expand Up @@ -4579,11 +4579,11 @@ static unsigned int GetBytesOfRS(const ManagedEVPPKey& pkey) {
int bits, base_id = EVP_PKEY_base_id(pkey.get());

if (base_id == EVP_PKEY_DSA) {
DSA* dsa_key = EVP_PKEY_get0_DSA(pkey.get());
const DSA* dsa_key = EVP_PKEY_get0_DSA(pkey.get());
// Both r and s are computed mod q, so their width is limited by that of q.
bits = BN_num_bits(DSA_get0_q(dsa_key));
} else if (base_id == EVP_PKEY_EC) {
EC_KEY* ec_key = EVP_PKEY_get0_EC_KEY(pkey.get());
const EC_KEY* ec_key = EVP_PKEY_get0_EC_KEY(pkey.get());
const EC_GROUP* ec_group = EC_KEY_get0_group(ec_key);
bits = EC_GROUP_order_bits(ec_group);
} else {
Expand Down
20 changes: 15 additions & 5 deletions packaging/lwnode.spec
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,24 @@ BuildRequires: pkgconfig(glib-2.0)
BuildRequires: nghttp2-devel
BuildRequires: pkgconfig(libcares)

%if (0%{?tizen_version_major} >= 6)
%if (0%{?tizen_version_major} >= 8)
BuildRequires: pkgconfig(openssl3)
%endif

%if (0%{?tizen_version_major} == 7 || 0%{?tizen_version_major} == 6)
BuildRequires: pkgconfig(openssl1.1)
%else
%if (0%{?tizen_version_major} == 5) && (0%{?tizen_version_minor} == 5)
%endif

%if (0%{?tizen_version_major} == 5)
%if (0%{?tizen_version_minor} >= 5)
BuildRequires: pkgconfig(openssl1.1)
%else
%else
BuildRequires: pkgconfig(openssl)
%endif
%endif

%if (0%{?tizen_version_major} < 5)
BuildRequires: pkgconfig(openssl)
%endif
%endif

%if 0%{?asan} == 1
Expand Down

0 comments on commit 4b16e70

Please sign in to comment.