{ "info": { "author": "Nils Fredrik Gjerull", "author_email": "n.f.gjerull@usit.uio.no", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Environment :: Console", "Intended Audience :: Developers", "Intended Audience :: System Administrators", "License :: OSI Approved :: BSD License", "Operating System :: POSIX :: Linux", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.5", "Topic :: Security" ], "description": "========\ncertsign\n========\n\nA tiny ACME_ Python 2 & 3 client library with minimal dependencies. ACME is a\nprotocol for domain certificate verification and signing initiated by `Let's Encrypt`_.\nThis package is meant to be used as a library and also comes with command line scripts.\n\nInstallation\n============\n\nYou can choose to either install it in your user's home directory or in the system directories.\n\nThis package depends on having the OpenSSL executable in the PATH.\n\nUsing pip\n---------\n\nTo install it from PyPI_ using pip_ call::\n\n\tpip install certsign\n\nYou can also install it from a code checkout using::\n\n\tpip install .\n\nInstall to user home directory\n------------------------------\nWith pip you can use the ``--user`` option to install it to your user's home directory::\n\n\tpip install --user certsign\n\nIf you install to the user directory on Linux ``$HOME/.local/bin`` should be in your\n``$PATH``-variable. On Linux you can add the following to ``.profile`` or ``.bashrc``\nin your home directory, if ``$HOME/.local/bin`` is not already in you PATH.\n\n.. code:: bash\n\n\t# set PATH so it includes user's private .local/bin if it exists\n\tif [ -d \"$HOME/.local/bin\" ] ; then\n\t\tPATH=\"$HOME/.local/bin:$PATH\"\n\tfi\n\nThe location for the scripts and the method to add it to the PATH is different for MacOS/OSX\nand Windows.\n\nUsage\n=====\n\nAs a library\n------------\n\nSigning a Certificate Signing Request (CSR)\n...........................................\nThis is the primary usage of this library:\n\n.. code:: python\n\n\tfrom certsign import client\n\taccount_key = 'acme_directory_account.key'\n\tcsr_file = 'your_domain.csr'\n\tchallenges_path = '/path/served/by/your/http/server'\n\taccount_email = 'you@example.com'\n\n\tsigned_cert = client.sign_csr(\n\t\taccount_key, csr_file, challenges_path, account_email=account_email\n\t)\n\nCreating a private key and a CSR\n................................\n\n.. code:: python\n\n\tfrom certsign import crypto\n\n\tprivkey_path = '/tmp/privkey.pem'\n\tcsr_path = '/tmp/example.com.csr'\n\n\tprivkey = crypto.create_private_key(bits=2048)\n\twith open(privkey_path, 'w') as f:\n\t\tf.write(privkey.encode('utf-8'))\n\n\tcsr = crypto.create_csr(\n\t\tprivkey_path,\n\t\t['example.com', 'www.example.com'],\n\t\topenssl_conf='/etc/ssl/openssl.cnf'\n\t)\n\twith open(csr_path, 'w') as f:\n\t\tf.write(csr.encode('utf-8'))\n\nCommand line\n------------\n\ncertsign\n........\nFor signing a Certificate Signing Request (CSR)::\n\n\tcertsign --account-key /path/to/account/key --csr /path/to/domain.csr \\\n\t --challenge-dir /path/served/by/your/http/server \\\n\t --account-email you@example.com\n\ncertsign-tool\n.............\nCreate a private key::\n\n\tcertsign-tool privkey --bits=4096 --out=/path/to/privkey.pem\n\nCreate a CSR::\n\n\tcertsign-tool csr --privkey=/path/to/privkey.pem \\\n\t --out=/path/to/example.com.csr example.com www.example.com\n\nView the CSR you just created::\n\n\tcertsign-tool view /path/to/example.com.csr\n\ncertsign-server\n...............\nA simple server to respond to ACME challenges::\n\n\tcertsign-server --challenge-dir /path/served/by/your/http/server \\\n\t\t--addr localhost \\\n\t\t--port 8000 \\\n\t\t--pidfile /tmp/certsign.pid &\n\nTo kill the server when finished:\n\n.. code:: bash\n\n\tif [ -f /tmp/certsign.pid ]; then\n\t\tpkill -F /tmp/certsign.pid\n\tfi\n\nDevelopment\n===========\n\nIt is recommended that you create a Python 3 virtual environment using pyvenv_, and a Python 2\nvirtual environment using virtualenv_.\n\nGo to the root of this project (where setup.py is located) and run the following commands:\n\n- For Python 3: ``pyvenv venv-certsign-py3`` and\n ``source venv-certsign-py3/bin/activate`` to activate.\n- For Python 2: ``virtualenv venv-certsign-py2`` and\n ``source venv-certsign-py2/bin/activate`` to activate.\n\nSet up a development environment using the following command (with literal square brackets)::\n\n pip install -e .[dev]\n\nTo run the test in your current environment::\n\n python setup.py test\n\nTo run the tests for several Python versions::\n\n tox\n\n.. _ACME: https://github.com/ietf-wg-acme/acme/\n.. _Let's Encrypt: https://letsencrypt.org/\n.. _PyPI: https://pypi.org/\n.. _pip: https://pip.pypa.io/\n.. _pyvenv: https://docs.python.org/3/library/venv.html\n.. _virtualenv: http://docs.python-guide.org/en/latest/dev/virtualenvs/\n\n\n", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/unioslo/certsign", "keywords": "acme letsencrypt", "license": "BSD", "maintainer": "", "maintainer_email": "", "name": "certsign", "package_url": "https://pypi.org/project/certsign/", "platform": "", "project_url": "https://pypi.org/project/certsign/", "project_urls": { "Homepage": "https://github.com/unioslo/certsign" }, "release_url": "https://pypi.org/project/certsign/0.1/", "requires_dist": [ "pytest; extra == 'dev'", "wheel; extra == 'dev'", "tox; extra == 'dev'", "twine; extra == 'dev'" ], "requires_python": "", "summary": "A tiny ACME (Let's Encrypt) Python 2 & 3 client library with minimal dependencies", "version": "0.1" }, "last_serial": 3283568, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "497d5548d2b584d23c3fa27fc625cc72", "sha256": "cc8c26f1389bb2c0e3bc333495c282e3cdc99bf619c79fefcee34c6e463ea15f" }, "downloads": -1, "filename": "certsign-0.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "497d5548d2b584d23c3fa27fc625cc72", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 15057, "upload_time": "2017-10-27T12:11:48", "url": "https://files.pythonhosted.org/packages/14/e5/9eae29389bc54907926db1b55f3e8c5f1042a53da81452adf8284a23d467/certsign-0.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "e9ae89801e08470a00cd712137669b1a", "sha256": "1ae57cdb3496bc597ff72e1e98eabd61d32c2ba04e43fd12cf1bacb873191457" }, "downloads": -1, "filename": "certsign-0.1.tar.gz", "has_sig": false, "md5_digest": "e9ae89801e08470a00cd712137669b1a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11408, "upload_time": "2017-10-27T12:11:50", "url": "https://files.pythonhosted.org/packages/7a/02/258a620e9e92eb50146c1e02c5ab595242518fbf07cc979ef317cec35920/certsign-0.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "497d5548d2b584d23c3fa27fc625cc72", "sha256": "cc8c26f1389bb2c0e3bc333495c282e3cdc99bf619c79fefcee34c6e463ea15f" }, "downloads": -1, "filename": "certsign-0.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "497d5548d2b584d23c3fa27fc625cc72", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 15057, "upload_time": "2017-10-27T12:11:48", "url": "https://files.pythonhosted.org/packages/14/e5/9eae29389bc54907926db1b55f3e8c5f1042a53da81452adf8284a23d467/certsign-0.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "e9ae89801e08470a00cd712137669b1a", "sha256": "1ae57cdb3496bc597ff72e1e98eabd61d32c2ba04e43fd12cf1bacb873191457" }, "downloads": -1, "filename": "certsign-0.1.tar.gz", "has_sig": false, "md5_digest": "e9ae89801e08470a00cd712137669b1a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11408, "upload_time": "2017-10-27T12:11:50", "url": "https://files.pythonhosted.org/packages/7a/02/258a620e9e92eb50146c1e02c5ab595242518fbf07cc979ef317cec35920/certsign-0.1.tar.gz" } ] }