Skip to content
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

Fix build with LibreSSL 2.7 #4210

Closed
wants to merge 4 commits into from
Closed

Fix build with LibreSSL 2.7 #4210

wants to merge 4 commits into from

Conversation

Sp1l
Copy link
Contributor

@Sp1l Sp1l commented Apr 29, 2018

For readability of the block I duplicated the version stuff in src/_cffi_src/openssl/cryptography.py.
The rest are small changes for things that LibreSSL has not added from the 1.1.0 branch.

Tested with

  • OpenSSL 1.1.0h
  • LibreSSL 2.7.2
    on 2.1.4 version

Signed-off-by: Bernard Spil brnrd@FreeBSD.org

Tested with
  - OpenSSL 1.1.0h
  - LibreSSL 2.7.2
on 2.1.4 version

Signed-off-by: Bernard Spil <brnrd@FreeBSD.org>
@alex
Copy link
Member

alex commented Apr 29, 2018

Looks like there are some pep8 issues with line length, can you take a look at fixing those?

Thanks for working on this!

@Sp1l
Copy link
Contributor Author

Sp1l commented Apr 30, 2018

Yeah, noticed the line lenght issues that in the CI logs. Will update the pull-request.

Signed-off-by: Bernard Spil <brnrd@FreeBSD.org>
@Sp1l
Copy link
Contributor Author

Sp1l commented Apr 30, 2018

Don't think I caused this 🎲

Processing c:\jenkins\workspace\4210-64rvgrj46en7div@4\cryptography\vectors
Collecting coverage==4.3.4
  Could not find a version that satisfies the requirement coverage==4.3.4 (from versions: )
No matching distribution found for coverage==4.3.4

ERROR: could not install deps [coverage==4.3.4,

@alex
Copy link
Member

alex commented Apr 30, 2018

No, you didn't. Grrr, it's a flake, I've restarted the build.

@alex
Copy link
Member

alex commented Apr 30, 2018

pypa/pip#5345 is an issue that I believe describes what happened here

@alex
Copy link
Member

alex commented Apr 30, 2018

Ok, jenkins is green now.

@reaperhulk reaperhulk mentioned this pull request Apr 30, 2018
@Sp1l
Copy link
Contributor Author

Sp1l commented Apr 30, 2018

Do check what I've done, please. I do a lot of C #ifdef-fing in a lot of projects but this Python cffi stuff is definitely not my expertise 😆

@mjb2010
Copy link

mjb2010 commented May 1, 2018

FWIW, I successfully tested these patches on FreeBSD 11-STABLE/armv6, like this:

# cd /usr/ports/security/py27-cryptography
# fetch https://patch-diff.githubusercontent.com/raw/pyca/cryptography/pull/4210.diff
# mkdir files && sed 's/^--- a/--- ./' 4210.diff > files/patch-4210
# make

There were no errors in the build. This was just patching against version 2.1.4. (And of course LibreSSL is enabled via the necessary entries in /etc/make.conf.)

HTH

Signed-off-by: Bernard Spil <brnrd@FreeBSD.org>
@Sp1l
Copy link
Contributor Author

Sp1l commented May 13, 2018

Result of make test with patched 2.1.4 on FreeBSD 11.1-p9 with LibreSSL 2.7.3
make-test.log

I was able to build master/fix-libressl27 branch without any 'implicit declaration' errors. make test failed as it wanted to install things in /usr/local as non-root.

@Vintodrimmer
Copy link

Good day,

Cryptography builds without errors with LibreSSL 2.7.3.

@simlu
Copy link

simlu commented May 28, 2018

When is this being merged? Thanks!

@reaperhulk
Copy link
Member

We won't be merging support until it works across all our supported versions of OpenSSL. This patch does not. #4234 extends this work but the approach used there is too complex to maintain going forward so the author is trying to come up with a simpler way to do it. So we have no timeline for merge because we don't have a mergeable patch at the moment, sorry.

I'm actually going to go ahead and close this PR since other PRs have taken up the work, but Bernard feel free to open a new PR if you want to!

@reaperhulk reaperhulk closed this May 28, 2018
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 9, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

6 participants