cryptography is a package which provides cryptographic recipes and primitives to
Python developers. Our goal is for it to be your "cryptographic standard
library". It supports Python 3.6+ and PyPy3 7.2+.
cryptography includes both high level recipes and low level interfaces to common
cryptographic algorithms such as symmetric ciphers, message digests, and key
derivation functions.
NOTE: If this package has multiple flavors (see below), then use one of them instead of the name specified above. NOTE: This is a Python port. Instead of py312-cryptography listed in the above command, you can pick from the names under the Packages section.
===> The following configuration options are available for py312-cryptography-50.0.1_1,1:
SSH=off: SSH protocol support
===> Use 'make config' to modify these settings
Reason:
Modern py-cryptography uses rust. In order to still support the Tier-2
architectures without rust support, a new default-version was added:
PYCRYPTOGRAPHY
it allows for the values 'rust' and 'legacy'.
The default is 'rust' on all platforms supporting this.
Note: users that are relying on the 'legacy' version will also take care
of using a non-base OpenSSL in the future.
Port Moves
port moved here from devel/py-types-cryptography on 2025-08-12 REASON: Remove obsoleted port. The cryptography package includes type annotations or type stubs since version 3.4.4. Use security/py-cryptography instead
Number of commits found: 121 (showing only 100 on this page) #
security/py-cryptography: Fix stage QA errors with py-maturin 1.12.0+
* If built with py-maturin 1.12.0+ following stage QA errors are emitted:
[...]
====> Running Q/A tests (stage-qa)
Error: Python package installs top-level 'docs/' directory in site-packages
Error: Location: lib/python3.11/site-packages/docs
[...]
Error: Python package installs top-level 'tests/' directory in site-packages
Error: Location: lib/python3.11/site-packages/tests
[...]
* This is because older versions of py-maturin didn't install these
stray files due to an bug with the "include" pattern in
"pyproject.toml". With version 1.12.0, these files are now installed.
Approved by: portmgr (build fix blanket)
security/py-cryptography: Convert to PATCH_SITES
*/*: remove STRIP_CMD calls in rust based ports
This is not needed after bc4fedc1fec0d359365c04d43be9e32bf101a50e
PR: 246993
Differential Revision: https://reviews.freebsd.org/D46503
security/py-cryptography*: Update to 41.0.3
This patch combines the efforts from the people invloved in the PR.
I just do the integrating and testing.
PR: 254853
Approved by: tcberner (portmgr)
Sponsored by: The FreeBSD Foundation
all: remove explicit versions in USES=python for "3.x+"
The logic in USES=python will automatically convert this to 3.8+ by
itself.
Adjust two ports that only had Python 3.7 mentioned but build fine
on Python 3.8 too.
finance/quickfix: mark BROKEN with PYTHON
libtool: compile: c++ -DHAVE_CONFIG_H -I. -I../.. -I -I. -I.. -I../.. -I../C++
-DLIBICONV_PLUG -DPYTHON_MAJOR_VERSION=3 -Wno-unused-variable
-Wno-maybe-uninitialized -O2 -pipe -DLIBICONV_PLUG -fstack-protector-strong
-fno-strict-aliasing -DLIBICONV_PLUG -Wall -ansi
-Wno-unused-command-line-argument -Wpointer-arith -Wwrite-strings
-Wno-overloaded-virtual -Wno-deprecated-declarations -Wno-deprecated -std=c++0x
-MT _quickfix_la-QuickfixPython.lo -MD -MP -MF
.deps/_quickfix_la-QuickfixPython.Tpo -c QuickfixPython.cpp -fPIC -DPIC -o
.libs/_quickfix_la-QuickfixPython.o
warning: unknown warning option '-Wno-maybe-uninitialized'; did you mean
'-Wno-uninitialized'? [-Wunknown-warning-option]
QuickfixPython.cpp:175:11: fatal error: 'Python.h' file not found
^~~~~~~~~~
1 warning and 1 error generated.
Reviewed by: portmgr, vishwin, yuri
Differential Revision: <https://reviews.freebsd.org/D40568>
security/py-cryptography: Fix with LibreSSL 3.7
LibreSSL 3.7 introduced a few EVP_* functions, so remove the dummy
replacements from the patch.
Approved by: portmgr (just-fix-it), tcberner (mentor, implicit)
security/py-cryptography: Fix runtime /w libressl
When built with LibreSSL, a few symbols were missing, so consumers
failed at runtime.
PR: 269705
Approved by: sunpoet (maintainer, timeout)
Approved by: tcberner (mentor, implicit: libressl)
Differential Revision: https://reviews.freebsd.org/D38765
security/py-cryptography: revert Update to 38.0.1
This reverts commit f5711e95bcd17b154bdd697cb3f1650a788fdf3c.
Revert due to multiple breakage reports.
Remove WWW entries moved into port Makefiles
Commit b7f05445c00f has added WWW entries to port Makefiles based on
WWW: lines in pkg-descr files.
This commit removes the WWW: lines of moved-over URLs from these
pkg-descr files.
Approved by: portmgr (tcberner)
Add WWW entries to port Makefiles
It has been common practice to have one or more URLs at the end of the
ports' pkg-descr files, one per line and prefixed with "WWW:". These
URLs should point at a project website or other relevant resources.
Access to these URLs required processing of the pkg-descr files, and
they have often become stale over time. If more than one such URL was
present in a pkg-descr file, only the first one was tarnsfered into
the port INDEX, but for many ports only the last line did contain the
port specific URL to further information.
There have been several proposals to make a project URL available as
a macro in the ports' Makefiles, over time.
(Only the first 15 lines of the commit message are shown above )
security: remove 'Created by' lines
A big Thank You to the original contributors of these ports:
* <ports@c0decafe.net>
* Aaron Dalton <aaron@FreeBSD.org>
* Adam Weinberger <adamw@FreeBSD.org>
* Ade Lovett <ade@FreeBSD.org>
* Aldis Berjoza <aldis@bsdroot.lv>
* Alex Dupre <ale@FreeBSD.org>
* Alex Kapranoff <kappa@rambler-co.ru>
* Alex Samorukov <samm@freebsd.org>
* Alexander Botero-Lowry <alex@foxybanana.com>
* Alexander Kriventsov <avk@vl.ru>
* Alexander Leidinger <netchild@FreeBSD.org>
(Only the first 15 lines of the commit message are shown above )
security/py-cryptography: fix build on FreeBSD 11
The LibreSSL 3.3.2+ patch does not and was never intended to apply
with older py-cryptography 2.9.2 that we offer for FreeBSD 11 using
base OpenSSL. For now, make the LibreSSL 3.3.2+ patch conditional
on SSL_DEFAULT=libressl* until FreeBSD 11 goes EOL.
Reported by: dvl
Fixes: 6f05c9c07cff security/py-cryptography: fix build with LibreSSL 3.3.2+
Pointy hat to: vishwin
Approved by: koobs (maintainer, implicit), fluffly (mentor, implicit)
PR: 255241
security/py-cryptography: fix build with LibreSSL 3.3.2+
Merged upstream as https://github.com/pyca/cryptography/pull/5988
and backported to this version.
Approved by: koobs (maintainer), fluffy (mentor)
PR: 255241
security/py-openssl: unbreak run for consumers
Partially revert r566075 to previous py-openssl release only for
${OSVERSION} < 1200085 and base OpenSSL 1.0.2 with PORTEPOCH bump
This step is needed because since 20.0 release py-openssl have dropped off
support
for openssl < 1.1.0 which still in base fo FreeBSD 11.4+ branch
Due to dependency on recent cryptography, bump py-cryptography to 3.3.2 release
under same conditions as py-openssl. 3.3.2 was last release which not requred
Rust to build
With hat: ports-secteam
Pointy hat to: sbz (for skip dependencies verification and no reaction to
complains)
Reported by: many via ML
security/py-cryptography: Update to 2.9.2 [2]
- Remove patch-PR4855, upstreamed [1]
- Remove asn1crypto, no longer an install_requires (RUN_DEPENDS) [1]
- Add workaround for OpenSSL 1.0.2u/t when building for FreeBSD
11.3-STABLE and 11.4-RELEASE/STABLE. [2]
Changelog:
https://github.com/pyca/cryptography/blob/2.9.2/CHANGELOG.rst
HUGE thank you to Kai for running through extensive QA and producing the
final changeset.
PR: 245929
Submitted by: Daniel <daniel.engberg.lists pyret.net> [1]
Submitted by: kai [2]
MFH: No (backward incompatiblities, substantial dependents count)
security/py-cryptography: Update to 2.3
This version update fixes builds with libressl >= 2.7.
Builds with openssl-devel are broken due to an underlying lang/python* port
issue [1].
Changelog:
https://github.com/pyca/cryptography/blob/2.3/CHANGELOG.rst
[1] https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=229223
PR: 226906
Submitted by: Charli Li <ml+freebsd vishwin info>
Reported by: many
MFH: 2018Q3 (fixes package build, security fix)
Security: 9e2d0dcf-9926-11e8-a92d-0050562a4d7b
Corrected shared library names that got the .abi3 suffix for python-36 and up
after devel/py-cffi upgrade to 1.11.2
This is the followup for the r457997 commit that updated devel/py-cffi to
1.11.2.
As it turned out, the shared object names built by py-cffi has changed in python
36.
Dependent ports can choose between installing such shared object as part of
their plist, or
generating them in the runtime and placing them into ~/.cache/{port-name}/ The
former ones,
that include the shared objects in their plist, got affected.
4 of the ports were failing explicitly in their py36 flavor during the strip
phase.
The other 6 were either missing strip entirely, or performed the strip operation
without
using explicit shared object names. These 6 ports didn't trigger any build
errors, and were
failing silently during the runtime, making the problem very hard to detect.
Precisely, .abi3 suffix is now added for the py36 flavor of relevant ports.
Here are the 10 ports that got affected and are now corrected:
databases/py-psycopg2cffi devel/py-pygit2 devel/py-xattr devel/py-pyopencl
devel/py-atomiclong
multimedia/py-librtmp net/py-nnpy security/py-bcrypt security/py-cryptography
security/py-pynacl
All of them got the * in the stripped shared object name, and a PORTREVISION
bump.
Convert Python ports to FLAVORS.
Ports using USE_PYTHON=distutils are now flavored. They will
automatically get flavors (py27, py34, py35, py36) depending on what
versions they support.
There is also a USE_PYTHON=flavors for ports that do not use distutils
but need FLAVORS to be set. A USE_PYTHON=noflavors can be set if
using distutils but flavors are not wanted.
A new USE_PYTHON=optsuffix that will add PYTHON_PKGNAMESUFFIX has been
added to cope with Python ports that did not have the Python
PKGNAMEPREFIX but are flavored.
USES=python now also exports a PY_FLAVOR variable that contains the
(Only the first 15 lines of the commit message are shown above )
[NEW] security/py3-cryptography: Create Python 3.x version of port
The latest www/py-requests update [1] unbundled its dependencies, now
requiring chardet, idna, urllib3 and certifi from ports.
www/py3-requests port was not tested during QA, which would have highlighted
the need for many new py3-* ports (and their dependencies).
This change creates one of those ports.
[1] https://svnweb.freebsd.org/changeset/ports/442565
PR: 219833
Update to 1.7.2 and fix building with libressl-devel
PR: 216825
Approved by: maintainer (timeout), swills (mentor)
Differential Revision: https://reviews.freebsd.org/D9711