summaryrefslogtreecommitdiffstats
path: root/net/base/cert_status_flags.h
diff options
context:
space:
mode:
authorwtc@chromium.org <wtc@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-02-03 16:51:15 +0000
committerwtc@chromium.org <wtc@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-02-03 16:51:15 +0000
commitdedb594391d9ec31a6eac1eccbdd754ac2ce5ed7 (patch)
treecac5603ceb1a8dd526624c428d6ffd6eafaf3de5 /net/base/cert_status_flags.h
parent7f969d6b73d925d306032565179d6b2109646ee0 (diff)
downloadchromium_src-dedb594391d9ec31a6eac1eccbdd754ac2ce5ed7.zip
chromium_src-dedb594391d9ec31a6eac1eccbdd754ac2ce5ed7.tar.gz
chromium_src-dedb594391d9ec31a6eac1eccbdd754ac2ce5ed7.tar.bz2
Move certificate verification off the IO thread.
Move the MapNetErrorToCertStatus and MapCertStatusToNetError functions to cert_status_flags.h so they can be shared with Mac and Linux code. Move the certificate verification function to the X509Certificate class. Right now X509Certificate::Verify is only implemented on Windows. R=eroman BUG=3592 Review URL: http://codereview.chromium.org/14915 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9084 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/base/cert_status_flags.h')
-rw-r--r--net/base/cert_status_flags.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/net/base/cert_status_flags.h b/net/base/cert_status_flags.h
index fcd03f0..02381cc 100644
--- a/net/base/cert_status_flags.h
+++ b/net/base/cert_status_flags.h
@@ -33,6 +33,14 @@ static inline bool IsCertStatusError(int status) {
return (CERT_STATUS_ALL_ERRORS & status) != 0;
}
+// Maps a network error code to the equivalent certificate status flag. If
+// the error code is not a certificate error, it is mapped to 0.
+int MapNetErrorToCertStatus(int error);
+
+// Maps the most serious certificate error in the certificate status flags
+// to the equivalent network error code.
+int MapCertStatusToNetError(int cert_status);
+
} // namespace net
#endif // NET_BASE_CERT_STATUS_FLAGS_H_