GithubHelp home page GithubHelp logo

x509-test's Introduction

X509 Test Certificates

These crates exist to help your crate test TLS or HTTPS.

A lot of software doesn't test the tricky code paths like client certificate authentication. One reason is that it's just too hard to generate realistic certificates.

And why should you have to learn how to build realistic certificates? You're not running a CA. There should just be a crate that offers pre-built certificates with the properties you need.

use x509_test_certs::good_certs1 as certs;

let server_key = certs::SERVER_KEY_PEM;
let server_cert = certs::SERVER_CERT_PEM;

Pre-built test certificates can be found in the x509-test-certs crate. This crate has zero dependencies, and doesn't even contain any code! It only holds const byte arrays containing certificates and private keys.

Generating certificates

Code for generating certificates can be found in the x509-test-gen crate. There is limited flexibility right now, but this will improve in the future.

Future goals:

  • More custom options for certificates.
  • Elliptic curve keys and signatures.
  • rustls support.
  • Various flavors of "broken" certificates: expired, bad signatures, incorrect or missing extensions (non-CA signatures, bad path length, etc.)

Non-goals:

  • Building or supporting a custom certificate authority. Running a CA requires a great deal more care than this crate takes. Please don't use any of the keys or certificates from these crates in real public services.

License

The crates that contain code are released under the MIT license.

The x509-test-certs crate is released into the public domain. I don't think cryptographic keys or X509 certificates are copyrightable, but even if they are, you are allowed to do anything you want with them, including copying the certificate files into your own project.

x509-test's People

Contributors

ericseppanen avatar eric-seppanen avatar

Watchers

 avatar

Forkers

eric-seppanen

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.