Giter VIP home page Giter VIP logo

x509-dropzone-test's Introduction

Installation

  1. Clone the repository
  2. Run npm install to install dependencies
  3. Run npm start to start the localhost
  4. Dummy certificates can be found at src\test_certs for testing purposes.

About

Idea:

A simple form where a user can upload one or more x509 certificates (*.cer), display them as a list and view some of their contents. The list of certificates appears on the left side as a list of clickable options. When clicked, a certificate will display the issuer's common name (CN), subject's common name, valid from and valid until dates on the right side of the form.

The button below the list will conditionally toggle between the content output and dropbox components. However, the toggle will also fire when one of the certiciates is clicked.

Technicalities:

Files are uploaded via the File Reader API. Because File Reader uploads files one by one, the array of the data parsed from these files is constructed with the use of useCallback() and Promises exactly after the files are being dropped.

If one or more certificate from the existing list contains the same serial number as the newly uploaded certificate(s), the new and old certificates will merge into a single list without duplicates with the help of new Set().

There's some basic validation to exclude files without .cer extention, e.g. if a mix of .cer, .txt, .exe files is being dropped, the dropbox will not interrupt the upload of .cer files. Uploaded certificates are saved to local storage, and the list is rendered from local storage on reload.

This project was bootstrapped with Create React App.

x509-dropzone-test's People

Contributors

pavsoldatov avatar

Stargazers

 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.