From 6c9506d12f519b416ab8d7b04b7f16799abe595c Mon Sep 17 00:00:00 2001 From: Christian Persch Date: Sat, 15 Oct 2005 10:02:04 +0000 Subject: Add EPHY_EMBED_PERSIST_NO_CERTDIALOGS flag. 2005-10-15 Christian Persch * 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. --- embed/mozilla/EphyBadCertRejector.cpp | 68 +++++++++++++++++++++++++++++++++++ 1 file changed, 68 insertions(+) create mode 100644 embed/mozilla/EphyBadCertRejector.cpp (limited to 'embed/mozilla/EphyBadCertRejector.cpp') 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; +} -- cgit v1.2.3