Skip to content

Tool for eazy management for certificates needed to interact with Vero API

License

Notifications You must be signed in to change notification settings

DIASfi/vero-api-certificate-tool

Repository files navigation

Vero API Certificate Tool

This tool is for creating new certificate and renewing them which are needed to interact with Vero API's.

Run Tests

Installation

  1. Ensure that you running *NIX system and have Java 11+ installed
  2. Download latest executable from https://github.com/DIASfi/vero-api-certificate-tool/releases
  3. Add execution rights $ chmod +x certificate
  4. Add it to your PATH or not
  5. Try it $ certificate -V

Usage

Request new certificate

General information

$ certificate new -h

Example

$ certificate new -v --env="TEST" \
  --customer-id="7017233-8" \
  --customer-name="Testifirma OY" \
  # Password used for all JKS actions \
  --key-store-password="password" \
  --transfer-id="92090786525592125851283719040090" \
  --transfer-password="LJ3taJTi29fechaD" \
  # Alias used when saving entries to JKS \
  --key-store-alias="2021-09-09-00001" \
  new.jks

Renew certificate using existing certificate

General information

$ certificate renew -h

Example

$ certificate renew -v --env="TEST" \
  --customer-id="7017233-8" \
  --customer-name="Testifirma OY" \
  # Password used for all JKS actions \
  --key-store-password="password" \
  # Alias which is used for reading private key and certificate from JKS for signing renew request \
  --key-store-alias="2021-09-09-00001" \
  existing.jks

Manual test against "Vero-testipenkki"

Initial implementation test with Vero provided Private Keys

  1. Build
$ ./scripts/build
  1. Request new certificate
$ release/certificate new -v --env="DEV" \
  --customer-id="0123456-7" \
  --customer-name="Ab PKI Developer Company Oy" \
  --key-store-password="password" \
  --transfer-id="12345678903" \
  --transfer-password="Pw8a1d4u3HhOqhlo" \
  --key-store-alias="2021-09-09-12846" \
  --use-existing-private-key="test/SignNewCertificate_Private.key" \
  tmp/test-run.jks
  1. Renew requested certificate with previous certificate
$ release/certificate renew -v --env="DEV" \
  --use-existing-private-key="test/RenewCertificate_Private.key" \
  --customer-id="0123456-7" \
  --customer-name="Ab PKI Developer Company Oy" \
  --key-store-password="password" \
  --key-store-alias="2021-09-09-12846" \
  tmp/test-run.jks

About

Tool for eazy management for certificates needed to interact with Vero API

Resources

License

Stars

Watchers

Forks

Packages

No packages published