certipy


Namecertipy JSON
Version 0.2.1 PyPI version JSON
download
home_pageNone
SummaryUtility to create and sign CAs and certificates
upload_time2024-09-15 18:05:34
maintainerNone
docs_urlNone
authorNone
requires_python>=3.7
licenseBSD 3-Clause License Copyright (c) 2018, Lawrence Livermore National Security, LLC All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
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": null,
    "name": "certipy",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.7",
    "maintainer_email": null,
    "keywords": "pki, ssl, tls, certificates",
    "author": null,
    "author_email": "Thomas Mendoza <mendoza33@llnl.gov>",
    "download_url": "https://files.pythonhosted.org/packages/6f/d7/1590f6801c76ecb73faf037f375fc7a314f3a773a30df680eaf69a617c94/certipy-0.2.1.tar.gz",
    "platform": null,
    "description": "# Certipy\n\nA simple python tool for creating certificate authorities and certificates on\nthe fly.\n\n## Introduction\n\nCertipy was made to simplify the certificate creation process. To that end,\nCertipy exposes methods for creating and managing certificate authorities,\ncertificates, signing and building trust bundles. Behind the scenes Certipy:\n\n* Manages records of all certificates it creates\n  * External certs can be imported and managed by Certipy\n  * Maintains signing hierarchy\n* Persists certificates to files with appropriate permissions\n\n## Usage\n\n### Command line\n\nCreating a certificate authority:\n\nCertipy defaults to writing certs and certipy.json into a folder called `out`\nin your current directory.\n\n```\n$ certipy foo\nFILES {'ca': '', 'cert': 'out/foo/foo.crt', 'key': 'out/foo/foo.key'}\nIS_CA True\nSERIAL 0\nSIGNEES None\nPARENT_CA\n```\n\nCreating and signing a key-cert pair:\n\n```\n$ certipy bar --ca-name foo\nFILES {'ca': 'out/foo/foo.crt', 'key': 'out/bar/bar.key', 'cert': 'out/bar/bar.crt'}\nIS_CA False\nSERIAL 0\nSIGNEES None\nPARENT_CA foo\n```\n\nRemoval:\n\n```\ncertipy --rm bar\nDeleted:\nFILES {'ca': 'out/foo/foo.crt', 'key': 'out/bar/bar.key', 'cert': 'out/bar/bar.crt'}\nIS_CA False\nSERIAL 0\nSIGNEES None\nPARENT_CA foo\n```\n\n### Code\n\nCreating a certificate authority:\n\n```\nfrom certipy import Certipy\n\ncertipy = Certipy(store_dir='/tmp')\ncertipy.create_ca('foo')\nrecord = certipy.store.get_record('foo')\n```\n\nCreating and signing a key-cert pair:\n\n```\ncertipy.create_signed_pair('bar', 'foo')\nrecord = certipy.store.get_record('bar')\n```\n\nCreating trust:\n\n```\ncertipy.create_ca_bundle('ca-bundle.crt')\n\n# or to trust specific certs only:\ncertipy.create_ca_bundle_for_names('ca-bundle.crt', ['bar'])\n```\n\nRemoval:\n\n```\nrecord = certipy.remove_files('bar')\n```\n\nRecords are dicts with the following structure:\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```\n\nThe `signees` will be empty for non-CA certificates. The `signees` field\nis stored as a python `Counter`. These relationships are used to build trust\nbundles.\n\nInformation in Certipy is generally passed around as records which point to\nactual files. For most `_record` methods, there are generally equivalent\n`_file` methods that operate on files themselves. The former will only affect\nrecords in Certipy's store and the latter will affect both (something happens\nto the file, the record for it should change, too).\n\n### Release\n\nCertipy is released under BSD license. For more details see the LICENSE file.\n\nLLNL-CODE-754897\n",
    "bugtrack_url": null,
    "license": "BSD 3-Clause License  Copyright (c) 2018, Lawrence Livermore National Security, LLC All rights reserved.  Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:  * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.  * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.  * Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ",
    "summary": "Utility to create and sign CAs and certificates",
    "version": "0.2.1",
    "project_urls": {
        "Homepage": "https://github.com/LLNL/certipy"
    },
    "split_keywords": [
        "pki",
        " ssl",
        " tls",
        " certificates"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "521b1472d714ca3f05d016c0b2779321af55e4c9efeabc852557e1e528f3330a",
                "md5": "bec0bfa81c070c714da7b3f65ab39547",
                "sha256": "aee9b93903c49038c4a214ea75cf3b72c4e9fd08bd7225887052a1dc5c938bfe"
            },
            "downloads": -1,
            "filename": "certipy-0.2.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "bec0bfa81c070c714da7b3f65ab39547",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7",
            "size": 19675,
            "upload_time": "2024-09-15T18:05:33",
            "upload_time_iso_8601": "2024-09-15T18:05:33.055528Z",
            "url": "https://files.pythonhosted.org/packages/52/1b/1472d714ca3f05d016c0b2779321af55e4c9efeabc852557e1e528f3330a/certipy-0.2.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "6fd71590f6801c76ecb73faf037f375fc7a314f3a773a30df680eaf69a617c94",
                "md5": "75943909ab570ff65c0fde75cb962e1a",
                "sha256": "0c0ea7b25248b42fb930f30173a78c029e6ba67e2ef9598ca4470d8975c9cbb6"
            },
            "downloads": -1,
            "filename": "certipy-0.2.1.tar.gz",
            "has_sig": false,
            "md5_digest": "75943909ab570ff65c0fde75cb962e1a",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7",
            "size": 20424,
            "upload_time": "2024-09-15T18:05:34",
            "upload_time_iso_8601": "2024-09-15T18:05:34.222968Z",
            "url": "https://files.pythonhosted.org/packages/6f/d7/1590f6801c76ecb73faf037f375fc7a314f3a773a30df680eaf69a617c94/certipy-0.2.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-09-15 18:05:34",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "LLNL",
    "github_project": "certipy",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "certipy"
}
        
Elapsed time: 0.51169s