Changeset - 3c69231d7781
[Not reviewed]
0 7 0
Branko Majic (branko) - 3 years ago 2020-11-05 00:05:45
branko@majic.rs
GC-39: Added support for Python 3.9:

- Updated release notes
- Updated functional test for changes in help output in Python 3.9.
- Updated comments on public signing keys used for validating the
Python archives when using Vagrant provisioning.
- Updated supported Python versions in package configuration file.
- Updated Python versions used for tests.
7 files changed with 19 insertions and 5 deletions:
0 comments (0 inline, 0 general)
README.rst
Show inline comments
 
@@ -24,24 +24,25 @@ The tool is useful for issuing certificates in:
 
  to develop new feature that involves use of certificates.
 
- Testing/CI/CD environment, when it is necessary to deploy/configure
 
  tests to use certificates in order to ensure the tests are run
 
  properly and in full.
 

	
 
At time of this writing, Gimmecert is compatible with the following
 
Python versions:
 

	
 
- *Python 3.5*
 
- *Python 3.6*
 
- *Python 3.7*
 
- *Python 3.8*
 
- *Python 3.8*
 

	
 

	
 
Why was this tool created?
 
--------------------------
 

	
 
The tool was created to remove the pain of setting-up a CA hierarchy,
 
and then using this hierarchy to issue a couple of test certificates.
 

	
 
While there are existing tools that can be used to this end (in
 
particular the OpenSSL's CLI and GnuTLS' ``certtool``), the process of
 
using them is tedious, slow, and error-prone.
 

	
docs/releasenotes.rst
Show inline comments
 
Release notes
 
=============
 

	
 

	
 
NEXT RELEASE
 
------------
 

	
 
This release adds support for Python 3.9, and updates the package
 
requirements.
 

	
 
Resolved issues:
 

	
 
- **Tasks**:
 

	
 
  - `GC-39: Support for Python 3.9 <https://projects.majic.rs/gimmecert/issues/GC-39>`_
 
  - `GC-40: Update all requirements <https://projects.majic.rs/gimmecert/issues/GC-40>`_
 

	
 

	
 
0.4.0
 
-----
 

	
 
This release adds support for picking the key algorithm and parameters
 
used for generating the private keys, and support for using ECDSA
 
keys.
 

	
 
Resolved issues:
 

	
functional_tests/test_server.py
Show inline comments
 
@@ -9,49 +9,55 @@
 
# Software Foundation, either version 3 of the License, or (at your option) any
 
# later version.
 
#
 
# Gimmecert is distributed in the hope that it will be useful, but
 
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 
# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
 
# details.
 
#
 
# You should have received a copy of the GNU General Public License along with
 
# Gimmecert.  If not, see <http://www.gnu.org/licenses/>.
 
#
 

	
 
import sys
 

	
 
from .base import run_command
 

	
 

	
 
def test_server_command_available_with_help():
 
    # John has finally finished initialising his CA hierarchy. What he
 
    # wants to do now is to issue a server certificate. He starts off
 
    # by having a look at the list of available commands.
 
    stdout, stderr, exit_code = run_command("gimmecert")
 

	
 
    # Looking at output, John notices the server command.
 
    assert exit_code == 0
 
    assert stderr == ""
 
    assert "server" in stdout
 

	
 
    # He goes ahead and has a look at the server command invocation to
 
    # check what kind of parameters he might need to provide.
 
    stdout, stderr, exit_code = run_command("gimmecert", "server", "-h")
 

	
 
    # John can see that the command accepts an entity name, and an
 
    # optional list of DNS subject alternative names.
 
    assert exit_code == 0
 
    assert stderr == ""
 
    assert stdout.startswith("usage: gimmecert server")
 
    assert " entity_name [dns_name [dns_name ...]]" in stdout
 
    # Help output for nargs="*" got changed in Python 3.9. See
 
    # https://bugs.python.org/issue38438 for details.
 
    if sys.version_info.major == 3 and sys.version_info.minor < 9:
 
        assert " entity_name [dns_name [dns_name ...]]" in stdout
 
    else:
 
        assert " entity_name [dns_name ...]" in stdout
 

	
 

	
 
def test_server_command_requires_initialised_hierarchy(tmpdir):
 
    # John is about to issue a server certificate. He switches to his
 
    # project directory.
 
    tmpdir.chdir()
 

	
 
    # John tries to issue a server certificate.
 
    stdout, stderr, exit_code = run_command("gimmecert", "server", "myserver")
 

	
 
    # Unfortunately, John has forgotten to initialise the CA hierarchy
 
    # from within this directory, and is instead presented with an
provision.sh
Show inline comments
 
@@ -18,25 +18,25 @@ fi
 
apt-get update -qq
 

	
 
# Install development tools.
 
apt-get install -qq -y git virtualenv
 

	
 
# Install Python build dependencies.
 
apt-get install -qq -y make build-essential libssl1.0-dev zlib1g-dev libbz2-dev libreadline-dev libsqlite3-dev wget curl llvm libncurses5-dev xz-utils tk-dev libxml2-dev libffi-dev
 

	
 
# Import public keys for validating Python releases.
 
sudo -i -u vagrant gpg -q --import /vagrant/provision/python_releases_signing_keys.pub
 

	
 
# Download and build additional Python versions.
 
python_versions=("3.5.9" "3.6.10" "3.7.7" "3.8.2")
 
python_versions=("3.5.10" "3.6.12" "3.7.9" "3.8.6" "3.9.0")
 
work_directory="/home/vagrant/src"
 

	
 
echo "Setting-up work directory."
 
sudo -i -u vagrant mkdir -p "$work_directory"
 

	
 
for version in "${python_versions[@]}"; do
 
    # Set-up information about Python version.
 
    minor_version="${version%.[[:digit:]]}"
 
    interpreter="/usr/local/bin/python${minor_version}"
 
    source_archive_link="https://www.python.org/ftp/python/${version}/Python-${version}.tar.xz"
 
    source_archive="$work_directory/Python-${version}.tar.xz"
 
    source_signature_link="https://www.python.org/ftp/python/${version}/Python-${version}.tar.xz.asc"
provision/python_releases_signing_keys.pub
Show inline comments
 
# Python 3.5, 3.6, and 3.7 archive signing key
 
-----BEGIN PGP PUBLIC KEY BLOCK-----
 

	
 
mQENBE0yGHgBCAClbIKFESe6Ae/wJv4c50K2C5BnyAVIbNObvl/maM7X0sTpi9cv
 
AoOIjXvVKT2G2KPwtBLilAltsmmY6kPVSrevg90laMLGH7/kDeNuKC/TL0lLQcu9
 
5L224n2UiB0N5AV+arMuuBlX6m7SsfkI18Yi/LAli4eMLg/ecLtA8FpVDjwXlKxo
 
U4vUOC0ePxeSeDtU8AR15UY1c5id7xkn4EC3jvOXm/KRcyaBX4FD2Tes1XozOmwF
 
d1kGjclSC9M/lmKwplhe/dYULpag2F6HF34PKRuQmwF73+ZMNUDNWQ7fVa7q/e8+
 
zldsOjWTrt27MDWXeW7XocX4/Md4/bm5FxfBABEBAAG0F05lZCBEZWlseSA8bmFk
 
QGFjbS5vcmc+iQE6BBMBCgAkAhsDAh4BAheABQsJCAcDBRUKCQgLBRYCAwEABQJU
 
Vft7AhkBAAoJEPuZIShvXhVA/68H/2PQPdPypaBjvngBh7RaaSsQjB45DMSVXOsj
 
+7AvaCK0GSCWxXtNzAGE3ajhO0iljhCgDD8njjKele5WwvNQOSmkjXfnxEb8qTyS
 
AgKtAEazI3mFCROekO1ivAVXokUjUdcshaQLpjoYGoK0iT4BcP9fJR/Q4WDST/ra
 
@@ -7705,25 +7706,25 @@ RkNIcDTlG3IQAJ04SYaiUvXEboj6UNV2i3qgFmoL17TbVotaoJSlYkUOnSbRpOYJ
 
kGi8nco2klEjKduvXnrrMJJAmEeIIZaYT8zko3eA+w5FsIFBcSQ41JWyyV/Vabrq
 
FTq6pJZRpx4P7h+XksKVtyTUM9ZyEA/v64so8Q605HIfopFOAqXvfNijvFTUrhAw
 
3/VoyOhs+So2++RedQ3A7tAzPXw3H5ao9ziSwmBbU7Vo9Daov8BFjmNq1noEF3uL
 
K1/Pt3ok6HQU4iWaEGptZ3t8QasuxID4SMEYHBbkGcgybE/XGGOHCtwjXzLyQArl
 
TN1baFtsCVzauWy7ERz7E5iHyQZxz6ZnWP9oyfiAAuxNtI7/RP5gmF84M2cvV0KP
 
ug9skaaYbqlv+js/hrMFRUL2Uc65XdeUA+NKYnKWc2xXv4/HA+VeW8qCHhLgLhk9
 
Rz+I962zFdHZ2Nxw6g3FVTgKokGpgqC6X+lSmFeSHtB8QrIf7jZQRNtWGy10FVRr
 
MnpJ5Se/0KVUMawISF8Rl806c6gPMkbEN8RKgDDuKH3W8iFPIcewrzenYcsMws+m
 
0vPH/QAUF+joxYYal3ZFKcxY1u+Hn3CJOGUN4j4NqzeWfmewCjrt0xh0
 
=erwG
 
-----END PGP PUBLIC KEY BLOCK-----
 

	
 
# Python 3.8 archive signing key
 
# Python 3.8 and 3.9 archive signing key
 
-----BEGIN PGP PUBLIC KEY BLOCK-----
 

	
 
mQINBFVRJ0kBEACko4KHmTBm01lcf4IsN4QxglIuf51lYqHs9B5nQbO6OSUivPXP
 
QBq3fu69yellpQiWaWhBvJB1s91sVuP1G30hcwl7SRxBUNQUUXT7lliLvhXEvcAb
 
l7iyoi3MsCdIcDdJvdMSMcbCJLSBDl8hETWcGj6Mnoj/HBr0r8IYmLf+cnCCNFg5
 
f4mBQDlgsXpSjiMulprFwsEUctaJ1/7V0cMvXllsyXFw6lzd9xvULjih+C3eiKqQ
 
G8TInOPZgaWQSYKr5ihoVFZViRm0mlAzZ6/h9OZ3AeNJ4LhtThw6HbhNA93RkMx+
 
zt6HeH4e8QGQQK5KZf4Kt3OdnTyJ3cOnLy6UQAzQAsmcFef7DwbbEQglgY56k4z1
 
iB0289eJTIwA9f4fJNjlw6wcuUaGQGSF0yPYDq11PoZjc0tSUM3UxLeqwZco+o3e
 
oQ4d6bKEKmdHLyX9Hkg7WxXOqylNm/45roFE1d3STCt942n3+gRtOEGLmBP02ad1
 
LfjOYNZyjltv2fo6xAaT06/YT2YuhgTL+aOS9nLtZ6vbV43IBw6O+xmBBZDM6Cbx
 
SNN2Bzu1HFij/wTUuX3Dq8cSCgkK2x/o1L5u2fBBDr4iMLthI1TFhVF5B6PAgV4o
setup.py
Show inline comments
 
@@ -15,25 +15,25 @@
 
# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
 
# details.
 
#
 
# You should have received a copy of the GNU General Public License along with
 
# Gimmecert.  If not, see <http://www.gnu.org/licenses/>.
 
#
 

	
 
import os
 
from setuptools import setup, find_packages
 

	
 
README = open(os.path.join(os.path.dirname(__file__), 'README.rst')).read()
 

	
 
python_requirements = ">=3.5,<3.9"
 
python_requirements = ">=3.5,<3.10"
 

	
 
install_requirements = [
 
    'cryptography>=3.2,<3.3',
 
    'python-dateutil>=2.8,<2.9',
 
]
 

	
 
doc_requirements = [
 
    'sphinx>=3.3,<3.4',
 
]
 

	
 
test_lint_requirements = [
 
    'flake8>=3.8,<3.9',
 
@@ -88,19 +88,20 @@ setup(
 
    },
 
    classifiers=[
 
        'Development Status :: 4 - Beta',
 
        'Environment :: Console',
 
        'Intended Audience :: Developers',
 
        'Intended Audience :: System Administrators',
 
        'License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)',
 
        'Operating System :: OS Independent',
 
        'Programming Language :: Python :: 3.5',
 
        'Programming Language :: Python :: 3.6',
 
        'Programming Language :: Python :: 3.7',
 
        'Programming Language :: Python :: 3.8',
 
        'Programming Language :: Python :: 3.9',
 
        'Topic :: Internet :: WWW/HTTP',
 
        'Topic :: Internet :: WWW/HTTP :: Site Management',
 
        'Topic :: Security',
 
        'Topic :: Software Development :: Testing',
 
        'Topic :: Utilities',
 
    ],
 
)
tox.ini
Show inline comments
 
[tox]
 
envlist = {py35,py36,py37,py38},lint,doc
 
envlist = {py35,py36,py37,py38,py39},lint,doc
 

	
 
[testenv]
 
whitelist_externals =
 
  make
 

	
 
basepython =
 
  doc: python3
 
  lint: python3
 
  py35: python3.5
 
  py36: python3.6
 
  py37: python3.7
 
  py38: python3.8
 
  py39: python3.9
 

	
 
deps =
 
  .[test]
 

	
 
commands =
 
  # Must specify cov-report explicitly, otherwise coverage starts
 
  # going through the tests as well.
 
  pytest --cov --cov-report=term-missing:skip-covered --basetemp={envtmpdir} tests/ functional_tests/
 

	
 
[testenv:lint]
 
deps =
 
  .[testlint]
0 comments (0 inline, 0 general)