oscrypto: Openssl version not detected in current oscrypto version (pypi)
Hi,
first of all thank you for your work!
We are currently encountering the Error:
oscrypto.errors.LibraryNotFoundError: Error detecting the version of libcrypto
See: https://github.com/mpgn/CrackMapExec/issues/108
I saw you already fixed that in d5f3437ed24257895ae1edd9e503cfb352e635a8, but as this is not released to pypi our Tool does not fully work. Would it be possible to release a bug-fix version to pypi?
About this issue
- Original URL
- State: open
- Created 3 years ago
- Reactions: 84
- Comments: 55 (6 by maintainers)
Commits related to this issue
- Workaround for https://github.com/wbond/oscrypto/issues/78 — committed to privat-eco/pyas2-lib by privat-eco 3 years ago
- Workaround for https://github.com/wbond/oscrypto/issues/78 — committed to privat-eco/pyas2-lib by privat-eco 3 years ago
- Temporarily lock version of oscrypto until bug fixed https://github.com/wbond/oscrypto/issues/78 — committed to nsmithuk/local-kms by nsmithuk 3 years ago
- Supply Docker images on ECR * Try AWS integration * Test * Use latest orb * Test push * ECR Login * Login to ECR * Validated permissions * Temporarily lock version of oscrypto un... — committed to nsmithuk/local-kms by nsmithuk 3 years ago
- Update pyproject.toml to fix issue #2286 Fixed a bug in oscrypto where the regex would fail to recognize the right version of SSL due to insufficient check on multiple digits. However the owner of ... — committed to Sp00kyB00k/Mobile-Security-Framework-MobSF by Sp00kyB00k 3 years ago
- https://github.com/wbond/oscrypto/issues/78#issuecomment-1757552649 Signed-off-by: John Andersen <johnandersenpdx@gmail.com> — committed to johnandersen777/scitt-api-emulator by pdxjohnny 3 years ago
- https://github.com/wbond/oscrypto/issues/78#issuecomment-1757552649 Signed-off-by: John Andersen <johnandersenpdx@gmail.com> — committed to johnandersen777/scitt-api-emulator by pdxjohnny 3 years ago
- Changed way to represent revision of oscrypto package https://github.com/wbond/oscrypto/issues/78#issuecomment-1766710774 — committed to cameronSMN/pipelinewise-target-snowflake by cameronSMN 3 years ago
- Avoid module-level imports of oscrypt Many dependents of minikerberos don't need `PKINIT`, so it makes sense to import `oscrypt` only when needed. Especially because `oscrypt<=1.3.0` does not work wh... — committed to AdrianVollmer/minikerberos by AdrianVollmer 3 years ago
- RDP: Lock oscrypto version Oscrypto has not yet releasedawith fix to this https://github.com/wbond/oscrypto/issues/78 so we need to lock the oscrypto version until the fix is released. PR #3958 — committed to guardicore/monkey by shreyamalviya 3 years ago
- RDP: Lock oscrypto version Oscrypto has not yet releasedawith fix to this https://github.com/wbond/oscrypto/issues/78 so we need to lock the oscrypto version until the fix is released. PR #3958 — committed to guardicore/monkey by shreyamalviya 3 years ago
- oscrypto: https://github.com/wbond/oscrypto/issues/78 — committed to pentoo/pentoo-overlay by blshkv 3 years ago
- deps: pin oscrypto to a git ref The certvalidator harness is broken on OpenSSL 3+, per https://github.com/wbond/oscrypto/issues/78. Signed-off-by: William Woodruff <william@trailofbits.com> — committed to C2SP/x509-limbo by woodruffw 2 years ago
- deps: pin oscrypto to a git ref (#381) The certvalidator harness is broken on OpenSSL 3+, per https://github.com/wbond/oscrypto/issues/78. Signed-off-by: William Woodruff <william@trailofbits.com... — committed to C2SP/x509-limbo by woodruffw 2 years ago
- fix: Moved to newer pyproject.toml and explicitely pinned a oscrypto revision, to keep boto3 running https://github.com/wbond/oscrypto/issues/78#issuecomment-1754169413 — committed to pgruener/erpnext_email_marketing by pgruener 2 years ago
- Switch to ubuntu-22.04 for CI tests An issue with oscrypto means it currently does not work on 24.04. Ref: https://github.com/wbond/oscrypto/issues/78#issuecomment-2565688091 — committed to bellingcat/auto-archiver by pjrobertson 2 years ago
- Switch to ubuntu-22.04 for CI tests An issue with oscrypto means it currently does not work on 24.04. Ref: https://github.com/wbond/oscrypto/issues/78#issuecomment-2565688091 — committed to bellingcat/auto-archiver by pjrobertson 2 years ago
- Switch to ubuntu-22.04 for CI tests An issue with oscrypto means it currently does not work on 24.04. Ref: https://github.com/wbond/oscrypto/issues/78#issuecomment-2565688091 — committed to bellingcat/auto-archiver by pjrobertson 2 years ago
- Switch to ubuntu-22.04 for CI tests An issue with oscrypto means it currently does not work on 24.04. Ref: https://github.com/wbond/oscrypto/issues/78#issuecomment-2565688091 — committed to bellingcat/auto-archiver by pjrobertson 2 years ago
- Switch to ubuntu-22.04 for CI tests An issue with oscrypto means it currently does not work on 24.04. Ref: https://github.com/wbond/oscrypto/issues/78#issuecomment-2565688091 — committed to bellingcat/auto-archiver by pjrobertson 2 years ago
Last night and this morning I merged in the bugs fixes for asn1crypto. Next is to decide on the version and cut a release, followed by a release of oscrypto.
Maybe sometime tomorrow or over the weekend is my hunch.
Considering none of you support any of the work I do for free out of my own good will, but apparently depend on it for your job/business/product, you literally are entitled to nothing.
Complaining at me about how I spend my free time, or how I decide to prioritize my open source work will not result in me neglecting the other parts of my life for your sake.
I guess I just used up my open source energy for the day. Back to work!
+1 for a bugfix release v1.3.1
Snowflake which is a $50,000,000,000 company should be paying you something, since their tool requires your good graces. IMO.
I read through literally every comment here and saw zero complaining about how you spend your free time or how you prioritize your open source work. I see lots of thanks and one comment (my own) suggesting a better way to handle this kind of bug in the future. Even if you (IMO incorrectly) think this is users being ungrateful, just compare the amount of time you’re likely to deal with comments and issues about this to the time a bugfix release would have taken. Just to prove I’m not ungrateful for your work, I just sent you $20. (Big spender, I know.)
+1 for a new release, this is a dependency of snowflake-connector-python, so I imagine many folks are impacted and pinning their OpenSSL version. Thanks for your time and care, we appreciate it!
This is the sort of bug that should have resulted in a cherry-picked bugfix release months ago when it was discovered. This kind of fix shouldn’t wait on features. Everything that depends on oscrypto is actively broken once a user upgrades openssl.
For those too impatient, like myself… in my pyproject.toml I added in:
And now we’re all systems go. Thanks for taking the time to create this @wbond !
Having a bugfix release would be much appreciated we are seeing this issue on AWS Ubuntu AMIs after issuing system updates, I can imagine that there are a few less than happy AI developers out there struggling to work their way back to this issue.
@squarooticus It was you telling me that I should have cut a release instead of worry about features. In fact the dependency I spoke of is not a feature but a regression.
I appreciate your token of goodwill. I am hoping to have this sorted soon.
We are seeing the same issue too. The OpenSSL version we are using happens to be 3.0.10. Would really appreciate it to have a new release. Thanks!
PSA: snowflake-connector-python 3.4.0 has been released: https://github.com/snowflakedb/snowflake-connector-python/releases/tag/v3.4.0.
We hit the same issue with
pthon:3.9-slimupdated OpenSSL +snowflake-connector-python. It surprises me how big company’s product relies so much on ppl’s self-owned open-source project, but there’s not much help coming from their side. https://github.com/snowflakedb/snowpark-python/issues/992 I’ll not say pushing owner for a new release is ideal, it’s an open source community, let’s just wait for it. For now I think just stick with the git rev solution should be enough. Thanks.This is the line I added to my requirements.txt:
git+https://github.com/wbond/oscrypto.git@d5f3437which replaced this line:oscrypto==1.2.1I also had to add “git” to my Dockerfile, because I was not installing git before:
apt-get install -y gitAs the developer of cryptolyzer (free software), which depends on oscrypto indirectly (certvalidator), I would highly appreciate it if you could release the fix for the issue.
Installed it directly with
pip install -I git+https://github.com/wbond/oscrypto.gitI believe the version should be updatedIt looks like the fix is merged. When will this be released? @wbond ?
https://github.com/wbond/oscrypto/pull/76
The reason I haven’t pushed a new release is that I’m planning a new release of asn1crypto also and this library depends on that, so I’d like to do both releases at the same time.
That release it blocked on two things:
No, this is a free-time project for me. The commit is there, so it is certainly possible to use most Python packaging tools to grab the sha of the commit.
Unsurprisingly, Snowflake chose to move away from this lib instead: https://github.com/snowflakedb/snowflake-connector-python/blob/main/DESCRIPTION.md
Python debian based docker images have been updated from debian bullseye to debian bookworm during the last days. Not only the openssl version has been updated, causing this issue with the lib, the whole base system was upgraded also.
Anyone having issues using python or python-slim images, could change the image definition to use the bullseye version in the meantime: python:3.X-bullseye, python:3.X-slim-bullseye, etc.
The bullseye image versions are the ones used until the new debían bookworm was published some days ago; we can keep using them until the final fix was ready to be published, without any rush.
Same issue here with oscrypto 1.3.0 and OpenSSL 3.0.11
The same
OpenSSL 3.0.10 1 Aug 2023doesn’t match to regex\b(\d\.\d\.\d[a-z]*)\bin_openssl/_libcrypto_cffi.py. Last\dshould be\d+or at least\d\d?I guess.@wbond Are there any news when the next release is planned? I am dependent on this issue with newest Ubuntu 24.04 which comes with OpenSSL 3.0.13 and I would appreciate this fix released soon.
Thanks, and I appreciate your work!
I’ve spent most of the day updating our internal applications that use snowflake-connector. My fixes follow along the lines of what has been suggested, above.
If you’re using Docker to build your app, you can include a pip install of the ocscrypo package prior to snowflake-connector, and it’ll assume the dependency has already been met:
RUN pip install git+https://github.com/wbond/oscrypto.git@1547f535001ba568b239b8797465536759c742a3If you need to embed it into a requirements.txt file, you can add the following line:
git+https://github.com/wbond/oscrypto.git@1547f535001ba568b239b8797465536759c742a3any chance for a new release so that installations from pypi will include fixes such as this?
I manually edited the file and changed the last
\din regex to\d+and it worked. Note that this is a temp solution. We need to upgrade the package when a new release is available.Any updates here ?
Let me add a workaround for a case when a system has no git (and it can’t be installed):
@vermavikrant Yes, the problem is due to a conflict with the
ocryptolibrary and theopensslprogram version3.0.>=10on your machine.snowflake-connector-pythonjust happens to use theocryptolibrary. The way to solve this problem is by either:1.1.1. Run$openssl versionto verify which version of openssl you are using.Or
ocryptolibrary - by pointing to the commit that includes the bug fix as mentioned above, until the patch is released.@wbond Thank you for this library. I’m pretty sure this and/or asn1crypto are dependencies in just about all of my projects (several personal projects and two not-yet-profitable commercial projects), but I never notice until I have to really dig in to something that I rarely have to think about. So I just signed up for a monthly sponsorship; it’s not much right now but I hope that it serves as a reminder that I appreciate you thinking about crypto so that I don’t have to.
This issue started making my GitHub Actions workflow fail, I guess because it’s using Ubuntu 24.04 now which has the newer OpenSSL version. Thanks to https://github.com/wbond/oscrypto/issues/78#issuecomment-1756322845 I added a step to include installing from the commit in the workflow file.
Same problem with
OpenSSL 3.0.15 3 Sep 2024.@wbond is there anything we can help make this pypi release happen?
Try downgrading the openssl version. Here is an idea of what your Dockerfile might look like
@wbond Thank you very much for the update. We really appreciate your work 🙏🏼. I’d happily volunteer to assist you on this project.
@vermavikrant I picked the latest just in case the recent commits fixed other problems I might encounter in the upcoming weeks before a release happens.
If installing via setuptools.setup, then the following line should work
"oscrypto @ git+https://github.com/wbond/oscrypto.git@d5f3437"I also had to install git into Dockerfile and Jenkinsfile, as stated above.apt-get update && apt-get install -y git@mwisconsin wondering why your commit hash is different? Was the fix not in d5f3437 ?
Thank you!
Any update on when this will be released?