Code Monkey home page Code Monkey logo

restpkisamples's Introduction

REST PKI Samples

This project contains sample web applications demonstrating the use of the REST PKI service in different programming languages.

To run the samples, you will need an API access token. If you don't have one, register on the REST PKI website and generate a token.

Samples are available in the following programming languages:

Test certificates

If you need test certificates to use in a development or staging environment, you can use one of the certificates in our test PKI.

NOTICE: The Lacuna Test PKI should never be trusted in a production environment

First, you need to specify in your API calls that the Lacuna Test PKI security context is to be trusted (naturally, it is not trusted by default). The Lacuna Test PKI security context ID is:

Lacuna Test PKI security context ID (for development purposes only!!!):
803517ad-3bbc-4169-b085-60053a8f6dbf

Where you'll use it depends on the programming language you're using and on the operation you're performing. For instance, if you are performing a PAdES (PDF) signature on PHP, edit the file pades-signature.php:

// Trust Lacuna Test PKI (for development purposes only!!!)
$signatureStarter->setSecurityContext("803517ad-3bbc-4169-b085-60053a8f6dbf");

Or if you're using Java, edit the file PadesSignatureController.java:

// Trust Lacuna Test PKI (for development purposes only!!!)
signatureStarter.setSecurityContext(new SecurityContext("803517ad-3bbc-4169-b085-60053a8f6dbf"));

Whatever operation or language you're using, it should be fairly clear from the code comments where to put the security context ID.

From then on, the certificates in our test PKI will be trusted. Download the file TestCertificates.zip to get the certificates. All files are PKCS #12 certificates with password 1234. The following certificates are included:

  • Alan Mathison Turing
  • Ferdinand Georg Frobenius
  • Pierre de Fermat

If you need a certificate with a particular information, contact us.

Always remember to remove the trust in the Lacuna Test PKI security context when you're moving to a production environment. Better yet, use some sort of conditional compilation so that the test PKI is only trusted when running in debug mode.

restpkisamples's People

Contributors

desenvlacuna avatar leopignataro avatar medisco avatar mespadoto avatar

Watchers

James Cloos avatar  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.