pub struct Ed25519 {}

Trait Implementations

KISS function to generate a self signed certificate from a dalek keypair Given a set of domain names you want your certificate to be valid for, this function fills in the other generation parameters with reasonable defaults and generates a self signed certificate using the keypair passed as argument as output.

Example
extern crate rccheck;
use rccheck::ed25519_certgen::Ed25519;
use rccheck::Certifiable;
let subject_alt_names = vec!["localhost".to_string()];
let kp = ed25519_dalek::Keypair::generate(&mut rng);

let cert = Ed25519::keypair_to_certificate(subject_alt_names, kp).unwrap();
// The certificate is now valid for localhost

This produces X.509 SubjectPublicKeyInfo (SPKI) as defined in [RFC 5280 Section 4.1.2.7]. in DER-encoded format, serialized to a byte string. Example

use rccheck::*;
let mut rng = rand::thread_rng();
let keypair = ed25519_dalek::Keypair::generate(&mut rng);
let spki = ed25519_certgen::Ed25519::public_key_to_spki(&keypair.public); // readable by Psk::from_der

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Should always be Self

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more