// Copyright © 2010-2014 The CefSharp Authors. All rights reserved.
//
// Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.
namespace CefSharp
{
///
/// Lists some of the error codes that can be reported by CEF.
///
public enum CefErrorCode
{
///
/// No error occurred.
///
None = 0,
///
/// A generic failure occurred.
///
Failed = -2,
///
/// A request was aborted, possibly by the user.
///
Aborted = -3,
///
/// An argument to the function is incorrect.
///
InvalidArgument = -4,
///
/// The handle or file descriptor is invalid.
///
InvalidHandle = -5,
///
/// The file or directory cannot be found.
///
FileNotFound = -6,
///
/// An operation timed out.
///
TimedOut = -7,
///
/// The file is too large.
///
FileTooBig = -8,
///
/// An unexpected error. This may be caused by a programming mistake or an invalid assumption
///
Unexpected = -9,
///
/// Permission to access a resource, other than the network, was denied.
///
AccessDenied = -10,
///
/// The operation failed because of unimplemented functionality.
///
NotImplemented = -11,
///
/// A connection was closed (corresponding to a TCP FIN).
///
ConnectionClosed = -100,
///
/// A connection was reset (corresponding to a TCP RST).
///
ConnectionReset = -101,
///
/// A connection attempt was refused.
///
ConnectionRefused = -102,
///
/// A connection timed out as a result of not receiving an ACK for data sent.
/// This can include a FIN packet that did not get ACK'd.
///
ConnectionAborted = -103,
///
/// A connection attempt failed.
///
ConnectionFailed = -104,
///
/// The host name could not be resolved.
///
NameNotResolved = -105,
///
/// The Internet connection has been lost.
///
InternetDisconnected = -106,
///
/// An SSL protocol error occurred.
///
SslProtocolError = -107,
///
/// The IP address or port number is invalid (e.g., cannot connect to the IP address 0 or the port 0).
///
AddressInvalid = -108,
///
/// The IP address is unreachable. This usually means that there is no route to the specified host or network.
///
AddressUnreachable = -109,
///
/// The server requested a client certificate for SSL client authentication.
///
SslClientAuthCertNeeded = -110,
///
/// A tunnel connection through the proxy could not be established.
///
TunnelConnectionFailed = -111,
///
/// No SSL protocol versions are enabled.
///
NoSslVersionsEnabled = -112,
///
/// The client and server don't support a common SSL protocol version or cipher suite.
///
SslVersionOrCipherMismatch = -113,
///
/// The server requested a renegotiation (rehandshake).
///
SslRenegotiationRequested = -114,
///
/// The server responded with a certificate whose common name did not match the host name.
/// This could mean:
/// 1. An attacker has redirected our traffic to his server and is presenting a certificate
/// for which he knows the private key.
/// 2. The server is misconfigured and responding with the wrong cert.
/// 3. The user is on a wireless network and is being redirected to the network's login page.
/// 4. The OS has used a DNS search suffix and the server doesn't have a certificate for the
/// abbreviated name in the address bar.
///
CertCommonNameInvalid = -200,
///
/// The server responded with a certificate that, by our clock, appears to either not yet be valid or to have expired.
/// This could mean:
/// 1. An attacker is presenting an old certificate for which he has managed to obtain the private key
/// 2. The server is misconfigured and is not presenting a valid cert.
/// 3. Our clock is wrong.
///
CertDateInvalid = -201,
///
/// The server responded with a certificate that is signed by an authority we don't trust.
/// The could mean:
/// 1. An attacker has substituted the real certificate for a cert that
/// contains his public key and is signed by his cousin.
/// 2. The server operator has a legitimate certificate from a CA we don't know about, but should trust.
/// 3. The server is presenting a self-signed certificate, providing no defense against active attackers (but foiling passive attackers).
///
CertAuthorityInvalid = -202,
///
/// The server responded with a certificate that contains errors. This error is not recoverable.
/// MSDN describes this error as follows:
/// "The SSL certificate contains errors."
/// NOTE: It's unclear how this differs from ERR_CERT_INVALID. For consistency,
/// use that code instead of this one from now on.
///
CertContainsErrors = -203,
///
/// The certificate has no mechanism for determining if it is revoked. In effect, this certificate cannot be revoked.
///
CertNoRevocationMechanism = -204,
///
/// Revocation information for the security certificate for this site is not available.
/// This could mean:
/// 1. An attacker has compromised the private key in the certificate and is blocking our attempt to
/// find out that the cert was revoked.
/// 2. The certificate is unrevoked, but the revocation server is busy or unavailable.
///
CertUnableToCheckRevocation = -205,
///
/// The server responded with a certificate has been revoked.
/// We have the capability to ignore this error, but it is probably not the thing to do.
///
CertRevoked = -206,
///
/// The server responded with a certificate that is invalid. This error is not recoverable.
///
CertInvalid = -207,
///
/// The value immediately past the last certificate error code.
///
CertEnd = -208,
///
/// The URL is invalid.
///
InvalidUrl = -300,
///
/// The scheme of the URL is disallowed.
///
DisallowedUrlScheme = -301,
///
/// The scheme of the URL is unknown.
///
UnknownUrlScheme = -302,
///
/// Attempting to load an URL resulted in too many redirects.
///
TooManyRedirects = -310,
///
/// Attempting to load an URL resulted in an unsafe redirect (e.g., a redirect to file:// is considered unsafe).
///
UnsafeRedirect = -311,
///
/// Attempting to load an URL with an unsafe port number. These are port
/// numbers that correspond to services, which are not robust to spurious input
/// that may be constructed as a result of an allowed web construct (e.g., HTTP
/// looks a lot like SMTP, so form submission to port 25 is denied).
///
UnsafePort = -312,
///
/// The server's response was invalid.
///
InvalidResponse = -320,
///
/// Error in chunked transfer encoding.
///
InvalidChunkedEncoding = -321,
///
/// The server did not support the request method.
///
MethodNotSupported = -322,
///
/// The response was 407 (Proxy Authentication Required), yet we did not send the request to a proxy.
///
UnexpectedProxyAuth = -323,
///
/// The server closed the connection without sending any data.
///
EmptyResponse = -324,
///
/// The headers section of the response is too large.
///
ResponseHeadersTooBig = -325,
///
/// The cache does not have the requested entry.
///
CacheMiss = -400,
///
/// The server's response was insecure (e.g. there was a cert error).
///
InsecureResponse = -501
};
}