To work with timestamp stations in Python

How to use Python + OpenSSL?

--pyOpenssl has the lowest hurdle. --If you want to create a CA station, you can.

What I'm trying to do this time is (Oreore) Timestamp Bureau

As advance information

-(Oreore) Different from the CA station --In terms of OpenSSL, I want to do what I can do with the "openssl ts" command system built into the mainstream from around version 1.1.0.

Is it feasible to hit the openssl command in the shell in the first place?

I researched various things, but I can only find specific articles on the following sites. Setting to create Timestamping Authority certificate signing request If you look at the information on this site, the entire configuration file openssl.cfg is posted, so let's check if it can be executed at the command level based on it.

――It seems to work basically, but there were various parts that got stuck. --The information in the configuration file is a little old overall. SHA-2 is not included in the encryption method settings, etc. --Since an openssl error appears at the time of execution, resolve the error one by one based on it. --The final verification "openssl ts -verify" gives an error that the certificate cannot be found. --At the end of the command, "openssl ts -verify ... -CAfile " is followed by "-untrusted " option)

Can't you do the same from Python?

--I checked pyOpenssl, but I can't find such a function. --It doesn't seem to be in cryptography.hazmat, which pyOpenssl depends on. --For example, the TS_REQ_new () function included in the OpenSSL main_ts function is not available. --In the first place, pyOpenssl depends on cryptography, and cryptography looks like openssl version 1.0.2.

After all, is there no choice but to drive it from Python via the shell?

$ openssl ts -query ・ ・ ・
$ openssl ts -reply ・ ・ ・

Recommended Posts

To work with timestamp stations in Python
How to work with BigQuery in Python
I want to work with a robot in python.
Try logging in to qiita with Python
[REAPER] How to play with Reascript in Python
Convert PDFs to images in bulk with Python
Log in to Yahoo Business with Selenium Python
How to use tkinter with python in pyenv
Work in a virtual environment with Python virtualenv.
Connect to BigQuery with Python
How to convert / restore a string with [] in python
To flush stdout in Python
Working with LibreOffice in Python
How to do hash calculation with salt in Python
Scraping with chromedriver in python
Explain in detail how to make sounds with python
Login to website in Python
Connect to Wikipedia with Python
Post to slack with Python 3
How to run tests in bulk with Python unittest
Working with sounds in Python
Scraping with Selenium in Python
Convert the image in .zip to PDF with Python
Super Primer to python-Getting started with python3.5 in 3 minutes
I was addicted to scraping with Selenium (+ Python) in 2020
Scraping with Tor in Python
Combined with permutations in Python
Speech to speech in python [text to speech]
Switch python to 2.7 with alternatives
Write to csv with Python
[Work efficiency] How to change file names in Python
Search engine work with python
How to develop in Python
Post to Slack in Python
How to extract any appointment in Google Calendar with Python
Things to keep in mind when using Python with AtCoder
Things to keep in mind when using cgi with python.
How to log in to AtCoder with Python and submit automatically
[Python] How to do PCA in Python
Python: How to use async with
Testing with random numbers in Python
Link to get started with python
GOTO in Python with Sublime Text 3
Working with LibreOffice in Python: import
Convert markdown to PDF in Python
[Python] Write to csv file with Python
Scraping with Selenium in Python (Basic)
How to collect images in Python
Create folders from '01' to '12' with python
Nice to meet you with python
Try to operate Facebook with Python
How to use SQLite in Python
Output to csv file with Python
Numer0n with items made in Python
Open UTF-8 with BOM in Python
In the python command python points to python3.8
Convert list to DataFrame with python
MP3 to WAV conversion with Python
To do tail recursion with Python2
Try to calculate Trace in Python
Use rospy with virtualenv in Python3