diff options
author | Christian Persch <chpe@cvs.gnome.org> | 2005-10-15 18:02:04 +0800 |
---|---|---|
committer | Christian Persch <chpe@src.gnome.org> | 2005-10-15 18:02:04 +0800 |
commit | 6c9506d12f519b416ab8d7b04b7f16799abe595c (patch) | |
tree | 5ef65a22eeb904d214feb7e8b21b40601ce05740 /embed/mozilla/EphyBadCertRejector.cpp | |
parent | 0beb9543055b4149b0fee9bf2418ef2048eae4f9 (diff) | |
download | gsoc2013-epiphany-6c9506d12f519b416ab8d7b04b7f16799abe595c.tar gsoc2013-epiphany-6c9506d12f519b416ab8d7b04b7f16799abe595c.tar.gz gsoc2013-epiphany-6c9506d12f519b416ab8d7b04b7f16799abe595c.tar.bz2 gsoc2013-epiphany-6c9506d12f519b416ab8d7b04b7f16799abe595c.tar.lz gsoc2013-epiphany-6c9506d12f519b416ab8d7b04b7f16799abe595c.tar.xz gsoc2013-epiphany-6c9506d12f519b416ab8d7b04b7f16799abe595c.tar.zst gsoc2013-epiphany-6c9506d12f519b416ab8d7b04b7f16799abe595c.zip |
Add EPHY_EMBED_PERSIST_NO_CERTDIALOGS flag.
2005-10-15 Christian Persch <chpe@cvs.gnome.org>
* embed/ephy-embed-persist.h:
Add EPHY_EMBED_PERSIST_NO_CERTDIALOGS flag.
* embed/mozilla/Makefile.am:
A embed/mozilla/EphyBadCertRejector.cpp:
A embed/mozilla/EphyBadCertRejector.h:
A class implementing nsIBadCertListener which always rejects.
* embed/mozilla/EphyHeaderSniffer.cpp:
* embed/mozilla/EphyHeaderSniffer.h:
* embed/mozilla/MozDownload.cpp:
* embed/mozilla/MozDownload.h:
For gecko 1.8, implement nsIInterfaceRequestor for EphyHeaderSniffer
and MozDownload, and make GetInterface hand out a EphyBadCertRejector
if the EPHY_EMBED_PERSIST_NO_CERTDIALOGS flag is set.
Diffstat (limited to 'embed/mozilla/EphyBadCertRejector.cpp')
-rw-r--r-- | embed/mozilla/EphyBadCertRejector.cpp | 68 |
1 files changed, 68 insertions, 0 deletions
diff --git a/embed/mozilla/EphyBadCertRejector.cpp b/embed/mozilla/EphyBadCertRejector.cpp new file mode 100644 index 000000000..2ae56de30 --- /dev/null +++ b/embed/mozilla/EphyBadCertRejector.cpp @@ -0,0 +1,68 @@ +/* + * Copyright (C) 2005 Christian Persch + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2, or (at your option) + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * + * $Id$ + */ + +#include "mozilla-config.h" +#include "config.h" + +#include "EphyBadCertRejector.h" + +NS_IMPL_THREADSAFE_ISUPPORTS1 (EphyBadCertRejector, nsIBadCertListener) + +/* boolean confirmUnknownIssuer (in nsIInterfaceRequestor socketInfo, in nsIX509Cert cert, out short certAddType); */ +NS_IMETHODIMP +EphyBadCertRejector::ConfirmUnknownIssuer(nsIInterfaceRequestor *socketInfo, + nsIX509Cert *cert, + PRInt16 *certAddType, + PRBool *_retval) +{ + *certAddType = nsIBadCertListener::UNINIT_ADD_FLAG; + *_retval = PR_FALSE; + return NS_OK; +} + +/* boolean confirmMismatchDomain (in nsIInterfaceRequestor socketInfo, in AUTF8String targetURL, in nsIX509Cert cert); */ +NS_IMETHODIMP +EphyBadCertRejector::ConfirmMismatchDomain(nsIInterfaceRequestor *socketInfo, + const nsACString & targetURL, + nsIX509Cert *cert, + PRBool *_retval) +{ + *_retval = PR_FALSE; + return NS_OK; +} + +/* boolean confirmCertExpired (in nsIInterfaceRequestor socketInfo, in nsIX509Cert cert); */ +NS_IMETHODIMP +EphyBadCertRejector::ConfirmCertExpired(nsIInterfaceRequestor *socketInfo, + nsIX509Cert *cert, + PRBool *_retval) +{ + *_retval = PR_FALSE; + return NS_OK; +} + +/* void notifyCrlNextupdate (in nsIInterfaceRequestor socketInfo, in AUTF8String targetURL, in nsIX509Cert cert); */ +NS_IMETHODIMP +EphyBadCertRejector::NotifyCrlNextupdate(nsIInterfaceRequestor *socketInfo, + const nsACString & targetURL, + nsIX509Cert *cert) +{ + return NS_OK; +} |