Skip to content

Removing oscrypto lib direct dependency - #1345

Merged
mpgn merged 2 commits into
mainfrom
remove-oscrypto-dependency
Aug 8, 2026
Merged

Removing oscrypto lib direct dependency #1345
mpgn merged 2 commits into
mainfrom
remove-oscrypto-dependency

Conversation

@mpgn

@mpgn mpgn commented Aug 2, 2026

Copy link
Copy Markdown
Collaborator

Description

Removing the oscrypto lib that depend on a fork and use cryptography lib (thanks @azoxlpf for the idea)

Helped with claude max to avoid any regression

Type of change

Insert an "x" inside the brackets for relevant items (do not delete options)

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Deprecation of feature or functionality
  • This change requires a documentation update
  • This requires a third party update (such as Impacket, Dploot, lsassy, etc)
  • This PR was created with the assistance of AI (list what type of assistance, tool(s)/model(s) in the description)

Setup guide for the review

Tested against GOAD lab

Screenshots (if appropriate):

image

Checklist:

Insert an "x" inside the brackets for completed and relevant items (do not delete options)

  • I have ran Ruff against my changes (poetry: poetry run ruff check ., use --fix to automatically fix what it can)
  • I have added or updated the tests/e2e_commands.txt file if necessary (new modules or features are required to be added to the e2e tests)
  • If reliant on changes of third party dependencies, such as Impacket, dploot, lsassy, etc, I have linked the relevant PRs in those projects
  • I have linked relevant sources that describes the added technique (blog posts, documentation, etc)
  • I have performed a self-review of my own code (not an AI review)
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation (PR here: https://github.com/Pennyw0rth/NetExec-Wiki)

@NeffIsBack NeffIsBack added dependencies Pull requests that update a dependency file refactor labels Aug 2, 2026
Comment thread nxc/helpers/pfx.py
Comment thread nxc/helpers/pfx.py
Comment thread nxc/helpers/pfx.py
Comment thread nxc/helpers/pfx.py
Comment thread nxc/helpers/pfx.py
@azoxlpf

azoxlpf commented Aug 7, 2026

Copy link
Copy Markdown
Collaborator

Note: this pr overlaps with #1277: pfx_to_pem_files() there does the same PFX/PEM loading with cryptography (pkcs12.load_key_and_certificates + load_pem_x509_certificate + load_pem_private_key). Once both land we'll have two independent loaders in the same file that can drift, could we expose a single helper here (something like load_cert_and_key(pfx_data=..., pfx_pass=..., pem_cert=..., pem_key=...) returning the cryptography objects) and have both from_pfx_data/from_pem and pfx_to_pem_files build on it?

@mpgn

mpgn commented Aug 7, 2026

Copy link
Copy Markdown
Collaborator Author

Note: this pr overlaps with #1277: pfx_to_pem_files() there does the same PFX/PEM loading with cryptography (pkcs12.load_key_and_certificates + load_pem_x509_certificate + load_pem_private_key). Once both land we'll have two independent loaders in the same file that can drift, could we expose a single helper here (something like load_cert_and_key(pfx_data=..., pfx_pass=..., pem_cert=..., pem_key=...) returning the cryptography objects) and have both from_pfx_data/from_pem and pfx_to_pem_files build on it?

not an issue, this pr will be merged first :)

@mpgn
mpgn merged commit c005376 into main Aug 8, 2026
20 checks passed
@mpgn
mpgn deleted the remove-oscrypto-dependency branch August 8, 2026 09:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file refactor

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants