Python Flask app (api) to generate the certificate signing request.
Internally, this will call up openssl shell command, generate signing request and then read csr & key. Afterwards, deletes both .key & .csr files from physical disk, returns it back to response.
Python Flask app (api) to generate the certificate signing request.
Supports AMD and ARM architectures.
In order to run this you'll need one of the following OS/docker installed:
$ python app_api1.py
(Flask will run on 11055, change it in main .py file)
curl --request POST \
--url http://127.0.0.1:11055/generate \
--header 'Content-Type: application/json' \
--data '{
"commonname": "testing123.com",
"country": "IN",
"state": "GJ",
"locality": "AMD",
"organization": "tj org",
"organizationunit": "IT",
"keysize": "4096"
}'
Response :
{
"csr": "",
"key": "",
"error": ""
}
$ docker run -p 11055:11055 -d tjhackz/pycsrapi
version: '3.3'
services:
pycsrapi:
ports:
- '11055:11055'
restart: always
image: tjhackz/pycsrapi
Docker Hub URL : https://hub.docker.com/r/tjhackz/pycsrapi
GitHub URL : https://github.com/tjhackzy/PyCSRAPI
To Do: Will add one Nice GUI at /gui path. WIP.