https://github.com/lucho00cuba/py-mtls
https://github.com/lucho00cuba/py-mtls
mtls python
Last synced: 7 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/lucho00cuba/py-mtls
- Owner: Lucho00Cuba
- Created: 2022-12-26T20:55:42.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2024-06-27T05:38:44.000Z (over 1 year ago)
- Last Synced: 2024-06-27T06:43:40.921Z (over 1 year ago)
- Topics: mtls, python
- Language: Python
- Homepage:
- Size: 7.81 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Proof of Concept: TLS/SSL with Python
This project demonstrates a basic implementation of Transport Layer Security (TLS) and Secure Socket Layer (SSL) communication using Python scripts. It includes scripts for both a TLS server (`server-tls.py`) and a TLS client (`client-tls.py`), as well as a Makefile (`Makefile`) for automating SSL/TLS certificate management with OpenSSL.
## Usage
### Setting Up the Environment
1. **Install Requirements**: Ensure all dependencies are installed using `pip`:
```bash
pip install -r requirements.txt
```
2. **Generate Certificates**: Use the Makefile to generate SSL/TLS certificates. Replace with the desired certificate name:```bash
make generate_cert NAME=
```3. **Start Server and Client**: Execute the Python scripts for the TLS server and client:
```bash
python src/server-tls.py
python src/client-tls.py
```### Cleaning Up
- Clean Certificates: Remove generated certificates for a specific name:
```bash
make clean NAME=
```- Clean All: Remove all generated certificates and files:
```bash
make clean-all
```