certipy


Namecertipy JSON
Version 0.1.3 PyPI version JSON
download
home_pagehttps://github.com/LLNL/certipy
SummaryUtility to create and sign CAs and certificates
upload_time2019-03-18 17:31:11
maintainer
docs_urlNone
authorThomas Mendoza
requires_python
licenseBSD
keywords pki ssl tls certificates
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            Certipy
=======

A simple python tool for creating certificate authorities and
certificates on the fly.

Introduction
------------

Certipy was made to simplify the certificate creation process. To that
end, Certipy exposes methods for creating and managing certificate
authorities, certificates, signing and building trust bundles. Behind
the scenes Certipy:

-  Manages records of all certificates it creates

   -  External certs can be imported and managed by Certipy
   -  Maintains signing hierarchy

-  Persists certificates to files with appropriate permissions

Usage
-----

Command line
~~~~~~~~~~~~

Creating a certificate authority:

Certipy defaults to writing certs and certipy.json into a folder called
``out`` in your current directory.

::

   $ certipy foo
   FILES {'ca': '', 'cert': 'out/foo/foo.crt', 'key': 'out/foo/foo.key'}
   IS_CA True
   SERIAL 0
   SIGNEES None
   PARENT_CA

Creating and signing a key-cert pair:

::

   $ certipy bar --ca-name foo
   FILES {'ca': 'out/foo/foo.crt', 'key': 'out/bar/bar.key', 'cert': 'out/bar/bar.crt'}
   IS_CA False
   SERIAL 0
   SIGNEES None
   PARENT_CA foo

Removal:

::

   certipy --rm bar
   Deleted:
   FILES {'ca': 'out/foo/foo.crt', 'key': 'out/bar/bar.key', 'cert': 'out/bar/bar.crt'}
   IS_CA False
   SERIAL 0
   SIGNEES None
   PARENT_CA foo

Code
~~~~

Creating a certificate authority:

::

   from certipy import Certipy

   certipy = Certipy(store_dir='/tmp')
   certipy.create_ca('foo')
   record = certipy.store.get_record('foo')

Creating and signing a key-cert pair:

::

   certipy.create_signed_pair('bar', 'foo')
   record = certipy.store.get_record('bar')

Creating trust:

::

   certipy.create_ca_bundle('ca-bundle.crt')

   # or to trust specific certs only:
   certipy.create_ca_bundle_for_names('ca-bundle.crt', ['bar'])

Removal:

::

   record = certipy.remove_files('bar')

Records are dicts with the following structure:

::

   {
     'serial': 0,
     'is_ca': true,
     'parent_ca': 'ca_name',
     'signees': {
       'signee_name': 1
     },
     'files': {
       'key': 'path/to/key.key',
       'cert': 'path/to/cert.crt',
       'ca': 'path/to/ca.crt',
     }
   }

The ``signees`` will be empty for non-CA certificates. The ``signees``
field is stored as a python ``Counter``. These relationships are used to
build trust bundles.

Information in Certipy is generally passed around as records which point
to actual files. For most ``_record`` methods, there are generally
equivalent ``_file`` methods that operate on files themselves. The
former will only affect records in Certipy’s store and the latter will
affect both (something happens to the file, the record for it should
change, too).

Release
~~~~~~~

Certipy is released under BSD license. For more details see the LICENSE
file.

LLNL-CODE-754897



            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/LLNL/certipy",
    "name": "certipy",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "pki ssl tls certificates",
    "author": "Thomas Mendoza",
    "author_email": "mendoza33@llnl.gov",
    "download_url": "https://files.pythonhosted.org/packages/3a/b3/f9228354c1eac06cd3577a981571b9188392d73d583fcaa7a8f3fb374a56/certipy-0.1.3.tar.gz",
    "platform": "",
    "description": "Certipy\n=======\n\nA simple python tool for creating certificate authorities and\ncertificates on the fly.\n\nIntroduction\n------------\n\nCertipy was made to simplify the certificate creation process. To that\nend, Certipy exposes methods for creating and managing certificate\nauthorities, certificates, signing and building trust bundles. Behind\nthe scenes Certipy:\n\n-  Manages records of all certificates it creates\n\n   -  External certs can be imported and managed by Certipy\n   -  Maintains signing hierarchy\n\n-  Persists certificates to files with appropriate permissions\n\nUsage\n-----\n\nCommand line\n~~~~~~~~~~~~\n\nCreating a certificate authority:\n\nCertipy defaults to writing certs and certipy.json into a folder called\n``out`` in your current directory.\n\n::\n\n   $ certipy foo\n   FILES {'ca': '', 'cert': 'out/foo/foo.crt', 'key': 'out/foo/foo.key'}\n   IS_CA True\n   SERIAL 0\n   SIGNEES None\n   PARENT_CA\n\nCreating and signing a key-cert pair:\n\n::\n\n   $ certipy bar --ca-name foo\n   FILES {'ca': 'out/foo/foo.crt', 'key': 'out/bar/bar.key', 'cert': 'out/bar/bar.crt'}\n   IS_CA False\n   SERIAL 0\n   SIGNEES None\n   PARENT_CA foo\n\nRemoval:\n\n::\n\n   certipy --rm bar\n   Deleted:\n   FILES {'ca': 'out/foo/foo.crt', 'key': 'out/bar/bar.key', 'cert': 'out/bar/bar.crt'}\n   IS_CA False\n   SERIAL 0\n   SIGNEES None\n   PARENT_CA foo\n\nCode\n~~~~\n\nCreating a certificate authority:\n\n::\n\n   from certipy import Certipy\n\n   certipy = Certipy(store_dir='/tmp')\n   certipy.create_ca('foo')\n   record = certipy.store.get_record('foo')\n\nCreating and signing a key-cert pair:\n\n::\n\n   certipy.create_signed_pair('bar', 'foo')\n   record = certipy.store.get_record('bar')\n\nCreating trust:\n\n::\n\n   certipy.create_ca_bundle('ca-bundle.crt')\n\n   # or to trust specific certs only:\n   certipy.create_ca_bundle_for_names('ca-bundle.crt', ['bar'])\n\nRemoval:\n\n::\n\n   record = certipy.remove_files('bar')\n\nRecords are dicts with the following structure:\n\n::\n\n   {\n     'serial': 0,\n     'is_ca': true,\n     'parent_ca': 'ca_name',\n     'signees': {\n       'signee_name': 1\n     },\n     'files': {\n       'key': 'path/to/key.key',\n       'cert': 'path/to/cert.crt',\n       'ca': 'path/to/ca.crt',\n     }\n   }\n\nThe ``signees`` will be empty for non-CA certificates. The ``signees``\nfield is stored as a python ``Counter``. These relationships are used to\nbuild trust bundles.\n\nInformation in Certipy is generally passed around as records which point\nto actual files. For most ``_record`` methods, there are generally\nequivalent ``_file`` methods that operate on files themselves. The\nformer will only affect records in Certipy\u2019s store and the latter will\naffect both (something happens to the file, the record for it should\nchange, too).\n\nRelease\n~~~~~~~\n\nCertipy is released under BSD license. For more details see the LICENSE\nfile.\n\nLLNL-CODE-754897\n\n\n",
    "bugtrack_url": null,
    "license": "BSD",
    "summary": "Utility to create and sign CAs and certificates",
    "version": "0.1.3",
    "project_urls": {
        "Homepage": "https://github.com/LLNL/certipy"
    },
    "split_keywords": [
        "pki",
        "ssl",
        "tls",
        "certificates"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "4ec402194a623c03547306c5edfb6b1c0fadaa35ad7fdc2a93b2c1e5e86afc51",
                "md5": "e6e8d0b571e3ab62b342c5ca985ab3b6",
                "sha256": "f272c13bfa9af6b2f3f746329d08adb66af7dd0bbb08fc81175597f25a7284b5"
            },
            "downloads": -1,
            "filename": "certipy-0.1.3-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "e6e8d0b571e3ab62b342c5ca985ab3b6",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 22835,
            "upload_time": "2019-03-18T17:31:09",
            "upload_time_iso_8601": "2019-03-18T17:31:09.934559Z",
            "url": "https://files.pythonhosted.org/packages/4e/c4/02194a623c03547306c5edfb6b1c0fadaa35ad7fdc2a93b2c1e5e86afc51/certipy-0.1.3-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "3ab3f9228354c1eac06cd3577a981571b9188392d73d583fcaa7a8f3fb374a56",
                "md5": "db5935a74d3c8b924ceef4ae0b3a8d40",
                "sha256": "695704b7716b033375c9a1324d0d30f27110a28895c40151a90ec07ff1032859"
            },
            "downloads": -1,
            "filename": "certipy-0.1.3.tar.gz",
            "has_sig": false,
            "md5_digest": "db5935a74d3c8b924ceef4ae0b3a8d40",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 15271,
            "upload_time": "2019-03-18T17:31:11",
            "upload_time_iso_8601": "2019-03-18T17:31:11.166223Z",
            "url": "https://files.pythonhosted.org/packages/3a/b3/f9228354c1eac06cd3577a981571b9188392d73d583fcaa7a8f3fb374a56/certipy-0.1.3.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2019-03-18 17:31:11",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "LLNL",
    "github_project": "certipy",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "certipy"
}
        
Elapsed time: 0.32010s