Skip to content

Store Revocation Certificate List on top of Ethereum

Notifications You must be signed in to change notification settings

kalambet/ethcrl

Repository files navigation

Pack CRL to Ethereum

This repo provides example implementation of an approach to place CRL (as Certificate Revocation List) to Ethereum as a set of smart contracts.

Prerequisites

To run this code you'll need:

  1. Go
  2. Truffle Suite
  3. abigen
  4. solidity

Steps

  • Clone and build repo
$: git clone github.com/kalambet/ethcrl
$: cd ethcrl && go mod download
  • Obtain supported solidity compiler
$: cd sol/src && truffle obtain && cd -
  • Generate binding contracts with abigen
$: cd sol && ./gen.sh && cd -
  • On a separate console run Truffle Develop from <repo_path>/sol/src folder and leave it as is
$: cd sol/src && truffle develop
  • Copy the first private key from the provided output
  • Build an example code
$: go build cmd/ethcrl.go
  • Run binary with previously copied private key
$: ./ethcrl -key <PRIVATE_KEY>

Alternative CRL data

It is possible to test arbitrary CRL certificates, for that --der key can be provided. For example, it is possible to download external CRL file, ex:

wget "http://testca2012.cryptopro.ru/cdp/064b632533662a24381872437a3bb7cbb2cafc73.crl"

And provide it as an input to ethcrl:

./bashcrl -key <PRIVATE_KEY> -der "./064b632533662a24381872437a3bb7cbb2cafc73.crl"

Usage

Usage of ./ethcrl:
  -backend string
    	address to eth node listening on port (default "http://localhost:9545")
  -der string
    	path to DER CRL file
  -key string
    	private key data (default "7b90ee8f413863ae7d1dea2886f3bec462f56ebb22a9bf379a9a76f5de7ba335")

About

Store Revocation Certificate List on top of Ethereum

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published