cert.resetAndLock(aCert);
}
-Ssl::CertError::CertError(CertError const &err): code(err.code), depth(err.depth)
-{
- cert.resetAndLock(err.cert.get());
-}
-
-Ssl::CertError &
-Ssl::CertError::operator = (const CertError &old)
-{
- code = old.code;
- depth = old.depth;
- cert.resetAndLock(old.cert.get());
- return *this;
-}
-
-bool
-Ssl::CertError::operator == (const CertError &ce) const
-{
- return code == ce.code && cert.get() == ce.cert.get() && depth == ce.depth;
-}
-
-bool
-Ssl::CertError::operator != (const CertError &ce) const
-{
- return code != ce.code || cert.get() != ce.cert.get() || depth != ce.depth;
-}
-
static int
store_session_cb(SSL *ssl, SSL_SESSION *session)
{
*/
int depth;
CertError(ssl_error_t anErr, X509 *aCert, int depth = -1);
- CertError(CertError const &err);
- CertError & operator = (const CertError &old);
- bool operator == (const CertError &ce) const;
- bool operator != (const CertError &ce) const;
+ bool operator == (const CertError &ce) const {
+ // We expect to be used in contexts where identical certificates have
+ // identical pointers.
+ return code == ce.code && depth == ce.depth && cert.get() == ce.cert.get();
+ }
+ bool operator != (const CertError &ce) const {
+ return !(*this == ce);
+ }
};
/// Holds a list of certificate SSL errors