Giter Site home page Giter Site logo

project-amsr-certificates's Introduction

project-amsr-certificates

Description

This project was made for university. The aim is to explore how we can generate X.509 certificates, extend themm, revoke them and create certificate chains.

How to use

  1. Install the requirements from the requirements.txt file using pip.
$ pip install -r requirements.txt
  1. Run the program
python3 ./src/main.py

Menu functions

This takes the following parameters from user input:

Parameter Type
common_name str
organization_name str
country_name str
private_key_path str
certificate_path str
validity_period int

This will take a certificates_data.json configuration file path from user input. A good example of a file like this can be found here

Parameter Type
json_configuration_file_path str

Takes the path to a certificate that you want to read the data from.

Parameter Type
certificate_path str

Takes the path to the old certificate, the new validity period and the destination of the extended certificate.

Parameter Type
private_key_path str
certificate_path str
extended_certificate_path str
validity_period int

The revoke_certificate function revokes a given certificate by performing the following steps:

  1. Load the certificate and private key.
  2. Check if a Certificate Revocation List (CRL) file exists. If not, create a new one.
  3. Set the CRL's last update and next update times to match the certificate's validity period.
  4. Add the revoked certificate to the CRL with the specified revocation date.
  5. Sign the CRL using the private key and SHA256 hashing algorithm.
  6. Serialize and save the updated CRL to a file.
  7. Save the revoked certificate separately.
Parameter Type
private_key_path str
certificate_path str
crl_path str
revoked_cert_path str
revocation_date datetime.datetime

project-amsr-certificates's People

Contributors

dianaanton avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.