wip: implelented SingleServerCrypto struct

This commit is contained in:
Jun Kurihara 2024-05-27 01:25:41 +09:00
commit d657f6d766
No known key found for this signature in database
GPG key ID: 48ADFD173ED22B03
6 changed files with 371 additions and 0 deletions

15
rpxy-certs/src/error.rs Normal file
View file

@ -0,0 +1,15 @@
use thiserror::Error;
/// Describes things that can go wrong in the Rpxy certificate
#[derive(Debug, Error)]
pub enum RpxyCertError {
/// Error when reading certificates and keys
#[error("Failed to read certificates from file: {0}")]
IoError(#[from] std::io::Error),
/// Error when parsing certificates and keys to generate a rustls CertifiedKey
#[error("Unable to find a valid certificate and key")]
InvalidCertificateAndKey,
/// Error when parsing client CA certificates: No client certificate found
#[error("No client certificate found")]
NoClientCert,
}