New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update crypt module: Fix for LibreSSL #1439

Merged
merged 2 commits into from Dec 2, 2017

Conversation

Projects
None yet
3 participants
@culb
Contributor

culb commented Sep 24, 2017

Update the crypt module when LibreSSL is being used

culb added some commits Sep 24, 2017

Update crypt module: Fix for LibreSSL
Update the crypt module when LibreSSL is being used
Merge pull request #1 from culb/zncculb
Update crypt module: Fix for LibreSSL
@codecov

This comment has been minimized.

Show comment
Hide comment
@codecov

codecov bot Sep 24, 2017

Codecov Report

Merging #1439 into master will decrease coverage by 0.02%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1439      +/-   ##
==========================================
- Coverage   35.44%   35.41%   -0.03%     
==========================================
  Files         126      126              
  Lines       30616    30616              
  Branches     4729     4729              
==========================================
- Hits        10851    10842       -9     
- Misses      19202    19210       +8     
- Partials      563      564       +1
Impacted Files Coverage Δ
modules/crypt.cpp 60.11% <ø> (ø) ⬆️
src/HTTPSock.cpp 40.12% <0%> (-0.61%) ⬇️
src/FileUtils.cpp 47.05% <0%> (-0.5%) ⬇️
src/Utils.cpp 60.47% <0%> (-0.37%) ⬇️
src/ZNCString.cpp 78.48% <0%> (-0.1%) ⬇️
src/Csocket.cpp 41.59% <0%> (-0.06%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 448f020...ce2d1c0. Read the comment docs.

codecov bot commented Sep 24, 2017

Codecov Report

Merging #1439 into master will decrease coverage by 0.02%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1439      +/-   ##
==========================================
- Coverage   35.44%   35.41%   -0.03%     
==========================================
  Files         126      126              
  Lines       30616    30616              
  Branches     4729     4729              
==========================================
- Hits        10851    10842       -9     
- Misses      19202    19210       +8     
- Partials      563      564       +1
Impacted Files Coverage Δ
modules/crypt.cpp 60.11% <ø> (ø) ⬆️
src/HTTPSock.cpp 40.12% <0%> (-0.61%) ⬇️
src/FileUtils.cpp 47.05% <0%> (-0.5%) ⬇️
src/Utils.cpp 60.47% <0%> (-0.37%) ⬇️
src/ZNCString.cpp 78.48% <0%> (-0.1%) ⬇️
src/Csocket.cpp 41.59% <0%> (-0.06%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 448f020...ce2d1c0. Read the comment docs.

@DarthGandalf

This comment has been minimized.

Show comment
Hide comment
@DarthGandalf

DarthGandalf Oct 15, 2017

Member

What was broken? Can we have a CI which tests on libressl?

Member

DarthGandalf commented Oct 15, 2017

What was broken? Can we have a CI which tests on libressl?

@fred0r

This comment has been minimized.

Show comment
Hide comment
@fred0r

fred0r Nov 11, 2017

Just tried to compile ZNC 1.7.x-git-831-82d3242 on OpenBSD 6.2 and its 'default OpenSSL' LibreSSL 2.6.3

Building module crypt...
crypt.cpp: In member function 'bool CCryptMod::DH1080_gen()':
crypt.cpp:117:64: error: 'DH_set0_pqg' was not declared in this scope
!DH_set0_pqg(m_pDH.get(), bPrime, nullptr, bGen) ||
^
crypt.cpp:126:57: error: 'DH_get0_key' was not declared in this scope
DH_get0_key(m_pDH.get(), &bPubKey, &bPrivKey);
^
crypt.cpp: In member function 'bool CCryptMod::DH1080_comp(CString&, CString&)':
crypt.cpp:156:68: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if ((len = DH_compute_key(key, bOtherPubKey, m_pDH.get())) == -1) {
^
gmake[1]: *** [Makefile:133: crypt.o] Error 1
gmake: *** [Makefile:121: modules] Error 2

Here's the config.log:
https://gist.github.com/fred0r/b6a078fb090b00474c2923ed4b76640d

config.status:
https://gist.github.com/fred0r/7a3e667a5e0824ce9e54f2d1efd64883

fred0r commented Nov 11, 2017

Just tried to compile ZNC 1.7.x-git-831-82d3242 on OpenBSD 6.2 and its 'default OpenSSL' LibreSSL 2.6.3

Building module crypt...
crypt.cpp: In member function 'bool CCryptMod::DH1080_gen()':
crypt.cpp:117:64: error: 'DH_set0_pqg' was not declared in this scope
!DH_set0_pqg(m_pDH.get(), bPrime, nullptr, bGen) ||
^
crypt.cpp:126:57: error: 'DH_get0_key' was not declared in this scope
DH_get0_key(m_pDH.get(), &bPubKey, &bPrivKey);
^
crypt.cpp: In member function 'bool CCryptMod::DH1080_comp(CString&, CString&)':
crypt.cpp:156:68: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if ((len = DH_compute_key(key, bOtherPubKey, m_pDH.get())) == -1) {
^
gmake[1]: *** [Makefile:133: crypt.o] Error 1
gmake: *** [Makefile:121: modules] Error 2

Here's the config.log:
https://gist.github.com/fred0r/b6a078fb090b00474c2923ed4b76640d

config.status:
https://gist.github.com/fred0r/7a3e667a5e0824ce9e54f2d1efd64883

@DarthGandalf DarthGandalf merged commit 23c78dc into znc:master Dec 2, 2017

3 of 5 checks passed

codecov/project 35.41% (-0.03%) compared to 448f020
Details
continuous-integration/appveyor/pr AppVeyor build failed
Details
codecov/patch Coverage not affected when comparing 448f020...ce2d1c0
Details
continuous-integration/jenkins/pr-merge This commit looks good
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@fred0r

This comment has been minimized.

Show comment
Hide comment
@fred0r

fred0r Dec 3, 2017

for me it compiles now on openbsd 6.2 - but it still spits out this warning:

Building module crypt...
crypt.cpp: In member function 'bool CCryptMod::DH1080_comp(CString&, CString&)':
crypt.cpp:156:68: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
         if ((len = DH_compute_key(key, bOtherPubKey, m_pDH.get())) == -1) {
                                                                    ^

fred0r commented Dec 3, 2017

for me it compiles now on openbsd 6.2 - but it still spits out this warning:

Building module crypt...
crypt.cpp: In member function 'bool CCryptMod::DH1080_comp(CString&, CString&)':
crypt.cpp:156:68: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
         if ((len = DH_compute_key(key, bOtherPubKey, m_pDH.get())) == -1) {
                                                                    ^
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment