Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: pyca/cryptography
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 3.1.1
Choose a base ref
...
head repository: pyca/cryptography
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 3.2
Choose a head ref

Commits on Aug 27, 2020

  1. Copy the full SHA
    c2624de View commit details
  2. Copy the full SHA
    761e9aa View commit details
  3. Copy the full SHA
    b31ecb0 View commit details

Commits on Aug 28, 2020

  1. Copy the full SHA
    1fd7cac View commit details
  2. Break users on OpenSSL 1.0.2 (#5438)

    fixes #5432
    alex authored Aug 28, 2020
    Copy the full SHA
    8bc6920 View commit details

Commits on Aug 29, 2020

  1. Copy the full SHA
    31a5da7 View commit details
  2. Copy the full SHA
    63dfc57 View commit details

Commits on Sep 1, 2020

  1. Add a missing space to py35 deprecation warning (#5448)

    This fixes a typo that's been introduced in #5387.
    webknjaz authored Sep 1, 2020
    Copy the full SHA
    d9f182d View commit details
  2. re-add a few engine bindings for advanced users (#5449)

    * re-add a few engine bindings for advanced users
    
    For users who are capable of compiling cryptography against custom
    openssl and properly using these functions this hopefully allows
    PKCS11 usage through OpenSSL engines.
    
    * forgot to save my buffer
    reaperhulk authored Sep 1, 2020
    Copy the full SHA
    ad05ebb View commit details

Commits on Sep 5, 2020

  1. Copy the full SHA
    3367c18 View commit details

Commits on Sep 14, 2020

  1. Copy the full SHA
    bfe7b45 View commit details
  2. allow bytes-like for padding (#5462)

    this doesn't improve efficiency in any way (copies galore!), but it does
    make it consistent between a cipher context and a padding context
    reaperhulk authored Sep 14, 2020
    Copy the full SHA
    1a9e2e1 View commit details
  3. add pkcs7/smime bindings (#5458)

    * add pkcs7/smime bindings
    
    * Update src/_cffi_src/openssl/pkcs7.py
    
    Co-authored-by: Alex Gaynor <alex.gaynor@gmail.com>
    
    * Update src/_cffi_src/openssl/pkcs7.py
    
    Co-authored-by: Alex Gaynor <alex.gaynor@gmail.com>
    
    Co-authored-by: Alex Gaynor <alex.gaynor@gmail.com>
    reaperhulk and alex authored Sep 14, 2020
    Copy the full SHA
    6d3644f View commit details
  4. Copy the full SHA
    00ba159 View commit details

Commits on Sep 15, 2020

  1. add prelim python 3.9 CI (#5466)

    * add prelim python 3.9 CI
    
    * do we need v2?
    reaperhulk authored Sep 15, 2020
    Copy the full SHA
    c61f24b View commit details

Commits on Sep 19, 2020

  1. smime signer support (#5465)

    * smime signer support
    
    * fix ed25519 check
    
    * change some wording
    
    * python 2.7...
    
    * review feedback
    
    * s/secure/signed
    
    * do some verification in the tests
    
    * review feedback
    
    * doc return value
    reaperhulk authored Sep 19, 2020
    Copy the full SHA
    20c0388 View commit details

Commits on Sep 20, 2020

  1. Remove bindings docs (#5469)

    alex authored Sep 20, 2020
    Copy the full SHA
    0b35c5d View commit details

Commits on Sep 21, 2020

  1. Copy the full SHA
    d473130 View commit details

Commits on Sep 22, 2020

  1. Copy the full SHA
    e11ed9b View commit details
  2. Copy the full SHA
    3268a91 View commit details

Commits on Oct 2, 2020

  1. Update windows CI for new GHA syntax (#5477)

    * Update windows CI for new GHA syntax
    
    * Update ci.yml
    
    * Update ci.yml
    
    * Update ci.yml
    
    * Update ci.yml
    alex authored Oct 2, 2020
    Copy the full SHA
    9daa295 View commit details

Commits on Oct 3, 2020

  1. Update wheel builder for new GHA syntax (#5478)

    * Update wheel builder for new GHA syntax
    
    * Update wheel-builder.yml
    
    * Update wheel-builder.yml
    alex authored Oct 3, 2020
    Copy the full SHA
    cd6f6b0 View commit details

Commits on Oct 7, 2020

  1. Copy the full SHA
    e74895b View commit details

Commits on Oct 17, 2020

  1. fixed twisted tests (#5489)

    alex authored Oct 17, 2020
    Copy the full SHA
    27026d3 View commit details

Commits on Oct 19, 2020

  1. Copy the full SHA
    ca62246 View commit details

Commits on Oct 25, 2020

  1. migrate smime builder to pkcs7 module and rename (#5496)

    * migrate smime builder to pkcs7 module and rename
    
    * missed a rename
    reaperhulk authored Oct 25, 2020
    Copy the full SHA
    5edf5b8 View commit details
  2. PKCS7SignatureBuilder now supports three serializations (#5497)

    * PKCS7SignatureBuilder now supports three serializations
    
    PEM, DER, and SMIME. SMIME embeds the S/MIME headers and has the
    detached signature concept.
    
    * thanks libre
    reaperhulk authored Oct 25, 2020
    Copy the full SHA
    95c4f68 View commit details
  3. allow additional certificates to be added to a pkcs7 (#5498)

    * allow additional certificates to be added to a pkcs7
    
    * be more verbose about what these additional certs might be used for
    
    * missing test
    reaperhulk authored Oct 25, 2020
    Copy the full SHA
    085d1e4 View commit details
  4. Copy the full SHA
    836a92a View commit details
  5. Copy the full SHA
    611c4a3 View commit details
  6. Copy the full SHA
    52a0e44 View commit details
  7. Bump actions/upload-artifact from v1 to v2.2.0 (#5502)

    Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from v1 to v2.2.0.
    - [Release notes](https://github.com/actions/upload-artifact/releases)
    - [Commits](actions/upload-artifact@v1...27bce4e)
    
    Signed-off-by: dependabot[bot] <support@github.com>
    
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    dependabot[bot] authored Oct 25, 2020
    Copy the full SHA
    08a97cc View commit details
  8. Copy the full SHA
    8be1d4b View commit details
  9. make the regexes for branches more strict (#5504)

    We don't want them to build when dependabot makes a branch like
    dependabot/github_actions/actions/upload-artifact-v2.2.0.
    reaperhulk authored Oct 25, 2020
    Copy the full SHA
    ada53e7 View commit details
  10. Copy the full SHA
    bf4b962 View commit details

Commits on Oct 26, 2020

  1. move blinding to __init__ on both RSA public and private (#5506)

    * move blinding to __init__ on both RSA public and private
    
    * change signature to guarantee this test is testing what we think
    reaperhulk authored Oct 26, 2020
    Copy the full SHA
    cf9bd6a View commit details
  2. 18
    Copy the full SHA
    58494b4 View commit details
  3. 3.2 release (#5508)

    reaperhulk authored Oct 26, 2020
    Copy the full SHA
    c9e6522 View commit details
Showing with 1,306 additions and 342 deletions.
  1. +6 −0 .github/dependabot.yml
  2. +11 −9 .github/workflows/ci.yml
  3. +8 −7 .github/workflows/wheel-builder.yml
  4. +13 −17 .travis.yml
  5. +1 −1 .travis/downstream.d/twisted.sh
  6. +0 −18 .travis/downstream.d/urllib3.sh
  7. +24 −0 CHANGELOG.rst
  8. +1 −1 docs/development/c-bindings.rst
  9. +2 −2 docs/development/custom-vectors/secp256k1/verify_secp256k1.py
  10. +5 −1 docs/development/test-vectors.rst
  11. +13 −0 docs/faq.rst
  12. +0 −2 docs/fernet.rst
  13. +0 −22 docs/hazmat/bindings/index.rst
  14. +0 −47 docs/hazmat/bindings/openssl.rst
  15. +4 −12 docs/hazmat/primitives/asymmetric/dh.rst
  16. +2 −4 docs/hazmat/primitives/asymmetric/dsa.rst
  17. +10 −20 docs/hazmat/primitives/asymmetric/ec.rst
  18. +2 −6 docs/hazmat/primitives/asymmetric/rsa.rst
  19. +152 −10 docs/hazmat/primitives/asymmetric/serialization.rst
  20. +0 −2 docs/hazmat/primitives/asymmetric/utils.rst
  21. +0 −3 docs/hazmat/primitives/asymmetric/x25519.rst
  22. +0 −3 docs/hazmat/primitives/asymmetric/x448.rst
  23. +1 −2 docs/hazmat/primitives/cryptographic-hashes.rst
  24. +0 −32 docs/hazmat/primitives/key-derivation-functions.rst
  25. +2 −3 docs/hazmat/primitives/mac/cmac.rst
  26. +2 −3 docs/hazmat/primitives/mac/hmac.rst
  27. +2 −1 docs/hazmat/primitives/padding.rst
  28. +6 −14 docs/hazmat/primitives/symmetric-encryption.rst
  29. +3 −5 docs/hazmat/primitives/twofactor.rst
  30. +0 −1 docs/index.rst
  31. +2 −1 docs/installation.rst
  32. +1 −0 docs/spelling_wordlist.txt
  33. +6 −9 docs/x509/ocsp.rst
  34. +12 −28 docs/x509/reference.rst
  35. +2 −5 docs/x509/tutorial.rst
  36. +15 −0 src/_cffi_src/openssl/engine.py
  37. +14 −0 src/_cffi_src/openssl/pkcs7.py
  38. +1 −1 src/cryptography/__about__.py
  39. +1 −1 src/cryptography/__init__.py
  40. +80 −3 src/cryptography/hazmat/backends/openssl/backend.py
  41. +1 −1 src/cryptography/hazmat/backends/openssl/ciphers.py
  42. +21 −17 src/cryptography/hazmat/backends/openssl/rsa.py
  43. +4 −0 src/cryptography/hazmat/bindings/openssl/_conditional.py
  44. +17 −6 src/cryptography/hazmat/bindings/openssl/binding.py
  45. +4 −4 src/cryptography/hazmat/primitives/padding.py
  46. +1 −0 src/cryptography/hazmat/primitives/serialization/base.py
  47. +115 −0 src/cryptography/hazmat/primitives/serialization/pkcs7.py
  48. +12 −0 tests/hazmat/bindings/test_openssl.py
  49. +9 −0 tests/hazmat/primitives/test_ciphers.py
  50. +24 −0 tests/hazmat/primitives/test_padding.py
  51. +596 −0 tests/hazmat/primitives/test_pkcs7.py
  52. +11 −13 tests/hazmat/primitives/test_rsa.py
  53. +2 −0 tox.ini
  54. +1 −1 vectors/cryptography_vectors/__about__.py
  55. +1 −1 vectors/cryptography_vectors/ciphers/Blowfish/bf-cbc.txt
  56. +1 −1 vectors/cryptography_vectors/ciphers/Blowfish/bf-cfb.txt
  57. +1 −1 vectors/cryptography_vectors/ciphers/Blowfish/bf-ecb.txt
  58. +1 −1 vectors/cryptography_vectors/ciphers/Blowfish/bf-ofb.txt
  59. +28 −0 vectors/cryptography_vectors/x509/custom/ca/rsa_ca.pem
  60. +52 −0 vectors/cryptography_vectors/x509/custom/ca/rsa_key.pem
6 changes: 6 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"
20 changes: 11 additions & 9 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -17,12 +17,12 @@ jobs:
PYTHON:
- {VERSION: "2.7", TOXENV: "py27", EXTRA_CFLAGS: ""}
- {VERSION: "3.5", TOXENV: "py35", EXTRA_CFLAGS: ""}
- {VERSION: "3.8", TOXENV: "py38", EXTRA_CFLAGS: "-DUSE_OSRANDOM_RNG_FOR_TESTING"}
- {VERSION: "3.9", TOXENV: "py39", EXTRA_CFLAGS: "-DUSE_OSRANDOM_RNG_FOR_TESTING"}
name: "Python ${{ matrix.PYTHON.VERSION }} on macOS"
steps:
- uses: actions/checkout@master
- uses: actions/checkout@v2
- name: Setup python
uses: actions/setup-python@v1
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.PYTHON.VERSION }}

@@ -62,12 +62,13 @@ jobs:
- {VERSION: "3.5", TOXENV: "py35", MSVC_VERSION: "2019", CL_FLAGS: ""}
- {VERSION: "3.6", TOXENV: "py36", MSVC_VERSION: "2019", CL_FLAGS: ""}
- {VERSION: "3.7", TOXENV: "py37", MSVC_VERSION: "2019", CL_FLAGS: ""}
- {VERSION: "3.8", TOXENV: "py38", MSVC_VERSION: "2019", CL_FLAGS: "/D USE_OSRANDOM_RNG_FOR_TESTING"}
- {VERSION: "3.8", TOXENV: "py38", MSVC_VERSION: "2019", CL_FLAGS: ""}
- {VERSION: "3.9", TOXENV: "py39", MSVC_VERSION: "2019", CL_FLAGS: "/D USE_OSRANDOM_RNG_FOR_TESTING"}
name: "Python ${{ matrix.PYTHON.VERSION }} on ${{ matrix.WINDOWS.WINDOWS }}"
steps:
- uses: actions/checkout@master
- uses: actions/checkout@v2
- name: Setup python
uses: actions/setup-python@v1
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.PYTHON.VERSION }}
architecture: ${{ matrix.WINDOWS.ARCH }}
@@ -83,11 +84,12 @@ jobs:
- name: Download OpenSSL
run: |
python .github/workflows/download_openssl.py windows openssl-${{ matrix.WINDOWS.WINDOWS }}-${{ matrix.PYTHON.MSVC_VERSION }}
echo "::set-env name=INCLUDE::C:/openssl-${{ matrix.WINDOWS.WINDOWS }}-${{ matrix.PYTHON.MSVC_VERSION }}/include;%INCLUDE%"
echo "::set-env name=LIB::C:/openssl-${{ matrix.WINDOWS.WINDOWS }}-${{ matrix.PYTHON.MSVC_VERSION }}/lib;%LIB%"
echo "::set-env name=CL::${{ matrix.PYTHON.CL_FLAGS }}"
echo "INCLUDE=C:/openssl-${{ matrix.WINDOWS.WINDOWS }}-${{ matrix.PYTHON.MSVC_VERSION }}/include;$INCLUDE" >> $GITHUB_ENV
echo "LIB=C:/openssl-${{ matrix.WINDOWS.WINDOWS }}-${{ matrix.PYTHON.MSVC_VERSION }}/lib;$LIB" >> $GITHUB_ENV
echo "CL=${{ matrix.PYTHON.CL_FLAGS }}" >> $GITHUB_ENV
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
shell: bash
- run: git clone https://github.com/google/wycheproof

- run: tox -r -- --color=yes --wycheproof-root=wycheproof
15 changes: 8 additions & 7 deletions .github/workflows/wheel-builder.yml
Original file line number Diff line number Diff line change
@@ -47,7 +47,7 @@ jobs:
.venv/bin/python -c "from cryptography.hazmat.backends.openssl.backend import backend;print('Loaded: ' + backend.openssl_version_text());print('Linked Against: ' + backend._ffi.string(backend._lib.OPENSSL_VERSION_TEXT).decode('ascii'))"
- run: mkdir cryptography-wheelhouse
- run: mv wheelhouse/cryptography*.whl cryptography-wheelhouse/
- uses: actions/upload-artifact@v1
- uses: actions/upload-artifact@v2.2.0
with:
name: "cryptography-${{ github.event.inputs.version }}-${{ matrix.MANYLINUX.NAME }}-${{ matrix.PYTHON }}"
path: cryptography-wheelhouse/
@@ -67,7 +67,7 @@ jobs:
BIN_PATH: '/Library/Frameworks/Python.framework/Versions/3.8/bin/python3'
name: "${{ matrix.PYTHON.VERSION }} ABI ${{ matrix.PYTHON.ABI_VERSION }} macOS"
steps:
- uses: actions/checkout@master
- uses: actions/checkout@v2
- run: |
curl "$PYTHON_DOWNLOAD_URL" -o python.pkg
sudo installer -pkg python.pkg -target /
@@ -101,7 +101,7 @@ jobs:
- run: mkdir cryptography-wheelhouse
- run: mv wheelhouse/cryptography*.whl cryptography-wheelhouse/
- uses: actions/upload-artifact@v1
- uses: actions/upload-artifact@v2.2.0
with:
name: "cryptography-${{ github.event.inputs.version }}-macOS-${{ matrix.PYTHON.ABI_VERSION }}"
path: cryptography-wheelhouse/
@@ -122,7 +122,7 @@ jobs:
- {VERSION: "3.8", MSVC_VERSION: "2019", "USE_ABI3": "true", "ABI_VERSION": "cp36"}
name: "${{ matrix.PYTHON.VERSION }} ${{ matrix.WINDOWS.WINDOWS }} ${{ matrix.PYTHON.ABI_VERSION }}"
steps:
- uses: actions/checkout@master
- uses: actions/checkout@v2
- name: Setup python
uses: actions/setup-python@v2
with:
@@ -139,10 +139,11 @@ jobs:
- name: Download OpenSSL
run: |
python .github/workflows/download_openssl.py windows openssl-${{ matrix.WINDOWS.WINDOWS }}-${{ matrix.PYTHON.MSVC_VERSION }}
echo "::set-env name=INCLUDE::C:/openssl-${{ matrix.WINDOWS.WINDOWS }}-${{ matrix.PYTHON.MSVC_VERSION }}/include;%INCLUDE%"
echo "::set-env name=LIB::C:/openssl-${{ matrix.WINDOWS.WINDOWS }}-${{ matrix.PYTHON.MSVC_VERSION }}/lib;%LIB%"
echo "INCLUDE=C:/openssl-${{ matrix.WINDOWS.WINDOWS }}-${{ matrix.PYTHON.MSVC_VERSION }}/include;$INCLUDE" >> $GITHUB_ENV
echo "LIB=C:/openssl-${{ matrix.WINDOWS.WINDOWS }}-${{ matrix.PYTHON.MSVC_VERSION }}/lib;$LIB" >> $GITHUB_ENV
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
shell: bash

- run: python -m pip install -U pip wheel cffi six ipaddress "enum34; python_version < '3'"
- run: pip download cryptography==${{ github.event.inputs.version }} --no-deps --no-binary cryptography && tar zxvf cryptography*.tar.gz && mkdir wheelhouse
@@ -158,7 +159,7 @@ jobs:
- run: mkdir cryptography-wheelhouse
- run: move wheelhouse\cryptography*.whl cryptography-wheelhouse\
- uses: actions/upload-artifact@v1
- uses: actions/upload-artifact@v2.2.0
with:
name: "cryptography-${{ github.event.inputs.version }}-${{ matrix.WINDOWS.WINDOWS }}-${{ matrix.PYTHON.VERSION }}-${{ matrix.PYTHON.ABI_VERSION}}"
path: cryptography-wheelhouse\
30 changes: 13 additions & 17 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -13,8 +13,8 @@ cache:
branches:
only:
- master
- /\d+\.\d+\.x/
- /\d+\.\d+(\.\d+)?/
- /^\d+\.\d+\.x$/
- /^\d+\.\d+(\.\d+)?$/

matrix:
include:
@@ -23,6 +23,8 @@ matrix:
# Setting 'python' is just to make travis's UI a bit prettier
- python: 3.6
env: TOXENV=py36
- python: 3.9-dev
env: TOXENV=py39
# Travis lists available Pythons (including PyPy) by arch and distro here:
# https://docs.travis-ci.com/user/languages/python/#python-versions
- python: pypy2.7-7.3.1
@@ -38,21 +40,21 @@ matrix:
- python: 3.8
env: TOXENV=py38 OPENSSL=1.1.0l
- python: 2.7
env: TOXENV=py27 OPENSSL=1.1.1g
env: TOXENV=py27 OPENSSL=1.1.1h
- python: 3.8
env: TOXENV=py38 OPENSSL=1.1.1g
env: TOXENV=py38 OPENSSL=1.1.1h
- python: 3.8
env: TOXENV=py38 OPENSSL=1.1.1g OPENSSL_CONFIG_FLAGS="no-engine no-rc2 no-srtp no-ct"
env: TOXENV=py38 OPENSSL=1.1.1h OPENSSL_CONFIG_FLAGS="no-engine no-rc2 no-srtp no-ct"
- python: 3.8
env: TOXENV=py38-ssh OPENSSL=1.1.1g
env: TOXENV=py38-ssh OPENSSL=1.1.1h
- python: 3.8
env: TOXENV=py38 LIBRESSL=2.9.2
- python: 3.8
env: TOXENV=py38 LIBRESSL=3.0.2
- python: 3.8
env: TOXENV=py38 LIBRESSL=3.1.4
- python: 3.8
env: TOXENV=py38 LIBRESSL=3.2.0
env: TOXENV=py38 LIBRESSL=3.2.2

- python: 2.7
services: docker
@@ -104,7 +106,7 @@ matrix:
env: TOXENV=py38 DOCKER=pyca/cryptography-runner-alpine:latest

- python: 3.8
env: TOXENV=docs OPENSSL=1.1.1g
env: TOXENV=docs OPENSSL=1.1.1h
addons:
apt:
packages:
@@ -117,11 +119,9 @@ matrix:
- python: 3.8
env: DOWNSTREAM=pyopenssl
- python: 3.7
env: DOWNSTREAM=twisted OPENSSL=1.1.1g
# Temporary disabled until
# https://github.com/paramiko/paramiko/pull/1723 is merged
# - python: 2.7
# env: DOWNSTREAM=paramiko
env: DOWNSTREAM=twisted OPENSSL=1.1.1h
- python: 3.7
env: DOWNSTREAM=paramiko
- python: 3.7
env: DOWNSTREAM=aws-encryption-sdk
- python: 3.7
@@ -132,10 +132,6 @@ matrix:
env: DOWNSTREAM=certbot
- python: 3.8
env: DOWNSTREAM=certbot-josepy
- python: 3.8
env: DOWNSTREAM=urllib3
# Tests hang when run under bionic/focal
dist: xenial

install:
- ./.travis/install.sh
2 changes: 1 addition & 1 deletion .travis/downstream.d/twisted.sh
Original file line number Diff line number Diff line change
@@ -5,7 +5,7 @@ case "${1}" in
git clone --depth=1 https://github.com/twisted/twisted
cd twisted
git rev-parse HEAD
pip install ".[tls,conch,http2]"
pip install ".[all_non_platform]"
;;
run)
cd twisted
18 changes: 0 additions & 18 deletions .travis/downstream.d/urllib3.sh

This file was deleted.

24 changes: 24 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,30 @@
Changelog
=========

.. _v3-2:

3.2 - 2020-10-25
~~~~~~~~~~~~~~~~

* **SECURITY ISSUE:** Attempted to make RSA PKCS#1v1.5 decryption more constant
time, to protect against Bleichenbacher vulnerabilities. Due to limitations
imposed by our API, we cannot completely mitigate this vulnerability and a
future release will contain a new API which is designed to be resilient to
these for contexts where it is required. Credit to **Hubert Kario** for
reporting the issue. *CVE-2020-25659*
* Support for OpenSSL 1.0.2 has been removed. Users on older version of OpenSSL
will need to upgrade.
* Added basic support for PKCS7 signing (including SMIME) via
:class:`~cryptography.hazmat.primitives.serialization.pkcs7.PKCS7SignatureBuilder`.

.. _v3-1-1:

3.1.1 - 2020-09-22
~~~~~~~~~~~~~~~~~~

* Updated Windows, macOS, and ``manylinux`` wheels to be compiled with
OpenSSL 1.1.1h.

.. _v3-1:

3.1 - 2020-08-26
2 changes: 1 addition & 1 deletion docs/development/c-bindings.rst
Original file line number Diff line number Diff line change
@@ -5,7 +5,7 @@ C bindings are bindings to C libraries, using cffi_ whenever possible.

.. _cffi: https://cffi.readthedocs.io

Bindings live in :py:mod:`cryptography.hazmat.bindings`.
Bindings live in ``cryptography.hazmat.bindings``.

When modifying the bindings you will need to recompile the C extensions to
test the changes. This can be accomplished with ``pip install -e .`` in the
4 changes: 2 additions & 2 deletions docs/development/custom-vectors/secp256k1/verify_secp256k1.py
Original file line number Diff line number Diff line change
@@ -35,12 +35,12 @@ def verify_one_vector(vector):
signature, ec.ECDSA(CRYPTOGRAPHY_HASH_TYPES[digest_algorithm]())
)
verifier.update(message)
return verifier.verify()
verifier.verify()


def verify_vectors(vectors):
for vector in vectors:
assert verify_one_vector(vector)
verify_one_vector(vector)


vector_path = os.path.join("asymmetric", "ECDSA", "SECP256K1", "SigGen.txt")
6 changes: 5 additions & 1 deletion docs/development/test-vectors.rst
Original file line number Diff line number Diff line change
@@ -109,6 +109,8 @@ Custom asymmetric vectors
* ``x509/custom/ca/ca_key.pem`` - An unencrypted PCKS8 ``secp256r1`` key. It is
the private key for the certificate ``x509/custom/ca/ca.pem``. This key is
encoded in several of the PKCS12 custom vectors.
* ``x509/custom/ca/rsa_key.pem`` - An unencrypted PCKS8 4096 bit RSA key. It is
the private key for the certificate ``x509/custom/ca/rsa_ca.pem``.
* ``asymmetric/EC/compressed_points.txt`` - Contains compressed public points
generated using OpenSSL.
* ``asymmetric/X448/x448-pkcs8-enc.pem`` and
@@ -414,6 +416,8 @@ Custom X.509 Vectors
* ``rsa_pss.pem`` - A certificate with an RSA PSS signature.
* ``root-ed448.pem`` - An ``ed448`` self-signed CA certificate
using ``ed448-pkcs8.pem`` as key.
* ``ca/rsa_ca.pem`` - A self-signed RSA certificate with ``basicConstraints``
set to true. Its private key is ``ca/rsa_key.pem``.

Custom X.509 Request Vectors
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -731,7 +735,7 @@ header format (substituting the correct information):
.. _`IETF`: https://www.ietf.org/
.. _`Project Wycheproof`: https://github.com/google/wycheproof
.. _`NIST CAVP`: https://csrc.nist.gov/projects/cryptographic-algorithm-validation-program
.. _`Bruce Schneier's vectors`: https://www.schneier.com/code/vectors.txt
.. _`Bruce Schneier's vectors`: https://www.schneier.com/wp-content/uploads/2015/12/vectors-2.txt
.. _`Camellia page`: https://info.isl.ntt.co.jp/crypt/eng/camellia/
.. _`CRYPTREC`: https://www.cryptrec.go.jp
.. _`OpenSSL's test vectors`: https://github.com/openssl/openssl/blob/97cf1f6c2854a3a955fd7dd3a1f113deba00c9ef/crypto/evp/evptests.txt#L232
13 changes: 13 additions & 0 deletions docs/faq.rst
Original file line number Diff line number Diff line change
@@ -109,6 +109,19 @@ Your ``pip`` and/or ``setuptools`` are outdated. Please upgrade to the latest
versions with ``pip install -U pip setuptools`` (or on Windows
``python -m pip install -U pip setuptools``).

Importing cryptography causes a ``RuntimeError`` about OpenSSL 1.0.2
--------------------------------------------------------------------

The OpenSSL project has dropped support for the 1.0.2 release series. Since it
is no longer receiving security patches from upstream, ``cryptography`` is also
dropping support for it. To fix this issue you should upgrade to a newer
version of OpenSSL (1.1.0 or later). This may require you to upgrade to a newer
operating system.

For the 3.2 release, you can set the ``CRYPTOGRAPHY_ALLOW_OPENSSL_102``
environment variable. Please note that this is *temporary* and will be removed
in ``cryptography`` 3.3.

Installing cryptography with OpenSSL 0.9.8, 1.0.0, 1.0.1 fails
--------------------------------------------------------------

2 changes: 0 additions & 2 deletions docs/fernet.rst
Original file line number Diff line number Diff line change
@@ -229,7 +229,6 @@ password through a key derivation function such as
>>> import base64
>>> import os
>>> from cryptography.fernet import Fernet
>>> from cryptography.hazmat.backends import default_backend
>>> from cryptography.hazmat.primitives import hashes
>>> from cryptography.hazmat.primitives.kdf.pbkdf2 import PBKDF2HMAC
>>> password = b"password"
@@ -239,7 +238,6 @@ password through a key derivation function such as
... length=32,
... salt=salt,
... iterations=100000,
... backend=default_backend()
... )
>>> key = base64.urlsafe_b64encode(kdf.derive(password))
>>> f = Fernet(key)
22 changes: 0 additions & 22 deletions docs/hazmat/bindings/index.rst

This file was deleted.

Loading