#[derive(Debug)]
pub enum CertificateChainAndPrivateKeyError
{
CouldNotOpenCertificateFile(io::Error),
CouldNotReadClientCertificateFile,
CouldNotOpenPrivateKeysFile(io::Error),
CouldNotReadPkcs8PrivateKey,
CouldNotReadRsaPrivateKey,
ThereIsNeitherAPkcs8OrRsaPrivateKey,
}
impl Display for CertificateChainAndPrivateKeyError
{
#[inline(always)]
fn fmt(&self, f: &mut Formatter) -> fmt::Result
{
Debug::fmt(self, f)
}
}
impl error::Error for CertificateChainAndPrivateKeyError
{
#[inline(always)]
fn source(&self) -> Option<&(error::Error + 'static)>
{
use self::CertificateChainAndPrivateKeyError::*;
match self
{
&CouldNotOpenCertificateFile(ref error) => Some(error),
&CouldNotReadClientCertificateFile => None,
&CouldNotOpenPrivateKeysFile(ref error) => Some(error),
&CouldNotReadPkcs8PrivateKey => None,
&CouldNotReadRsaPrivateKey => None,
&ThereIsNeitherAPkcs8OrRsaPrivateKey => None,
}
}
}