Metadata-Version: 2.4
Name: sep2cert
Version: 0.2.1
Summary: Useful functions for working with IEEE 2030.5 (SEP2)
Author-email: Alex Guinman <alex@guinman.id.au>
Requires-Python: >=3.12
Description-Content-Type: text/markdown
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.14
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.12
Classifier: Operating System :: OS Independent
License-File: LICENSE
Requires-Dist: asn1==2.8.0
Requires-Dist: cryptography>=44.0.1
Requires-Dist: python-dateutil>=2.8.2
Requires-Dist: typer>=0.15.1
Requires-Dist: pytest>=2.7.3 ; extra == "test"
Requires-Dist: pytest-cov>=6.0.0 ; extra == "test"
Project-URL: Source, https://github.com/aguinane/SEP2-Certs
Provides-Extra: test

# SEP2-Certs

Create and verify IEEE 2030.5 (SEP2) PKI certificates

## Certificate Creation

Note the below CLI commands are only intended for testing purposes.
For production certificates, additional functions and policies may be required.

### Signing Certificates

Create a SERCA:

```sh
uvx sep2cert create-serca
```

Create a MICA:

```sh
uvx sep2cert create-key certs/mica.key
uvx sep2cert create-csr certs/mica.key --org-name "Example Org" --country-name "AU" --common-name "IEEE 2030.5 MICA" --serial-no "1"
uvx sep2cert create-mica certs/mica.csr certs/serca.pem certs/serca.key
```


### Device Certificates

To create a device certificate, first create a Key and Certificate Signing Request (CSR).

```sh
uvx sep2cert create-key certs/dev-ABC.key
uvx sep2cert create-csr certs/dev-ABC.key 
```

Once you have the CSR, build the cert by signing it with the MICA.

```sh
uvx sep2cert create-cert certs/dev-ABC.csr certs/mica.pem certs/mica.key --pen 12345 --serno ABC
```

## Certificate Inspection

Get the LFDI for a certificate. It will also do some validation checks.

```sh
uvx sep2cert info certs/dev-ABC-cert.pem
```

