This is the rest of the checkin to remove mozilla's dependency on building psm-glue. All security glue

interfaces and resources that aren't specific to PSM have moved to security/base.  The remaining psm-glue
interfaces which are used elsewhere in the code have been abstracted to be non-PSM-specific, and the call
sites changed to use the abstracted interface.  Bug 18352.  r=brendan,pavlov,shaver.  a=brendan.
This commit is contained in:
bryner%uiuc.edu 2000-09-14 19:27:23 +00:00
Родитель 4884379265
Коммит 14b39559f7
39 изменённых файлов: 80 добавлений и 621 удалений

Просмотреть файл

@ -89,9 +89,9 @@ DIRS += \
widget/timer \
include \
modules/libutil \
netwerk \
modules/appfilelocprovider \
security \
netwerk \
uriloader \
intl \
modules/libpref \

Просмотреть файл

@ -711,6 +711,12 @@ embedding/tests/gtkEmbed/Makefile
MAKEFILES_security="
security/Makefile
security/base/Makefile
security/base/public/Makefile
security/base/res/Makefile
security/base/res/content/Makefile
security/base/res/locale/Makefile
security/base/res/locale/en-US/Makefile
security/psm/Makefile
security/psm/lib/Makefile
security/psm/lib/client/Makefile
@ -862,10 +868,6 @@ for extension in $MOZ_EXTENSIONS; do
psm-glue ) MAKEFILES_extensions="$MAKEFILES_extensions
extensions/psm-glue/public/Makefile
extensions/psm-glue/Makefile
extensions/psm-glue/res/content/Makefile
extensions/psm-glue/res/Makefile
extensions/psm-glue/res/locale/Makefile
extensions/psm-glue/res/locale/en-US/Makefile
extensions/psm-glue/src/Makefile
" ;;
irc ) MAKEFILES_extensions="$MAKEFILES_extensions

Просмотреть файл

@ -360,6 +360,7 @@ sub Checkout()
my($nsprpub_tag) = "NSPRPUB_CLIENT_BRANCH";
my($nss_tab) = "NSS_30_BRANCH";
my($psm_tag) = "SECURITY_MAC_BRANCH";
my($secbase_tag) = "SECURITY_CLIENT_BRANCH";
my($ldapsdk_tag) = "LDAPCSDK_40_BRANCH";
#//
@ -370,6 +371,7 @@ sub Checkout()
$session->checkout("mozilla/nsprpub", $nsprpub_tag) || print "checkout of nsprpub failed\n";
$session->checkout("mozilla/security/nss", $nss_tab) || print "checkout of security/nss failed\n";
$session->checkout("mozilla/security/psm", $psm_tag) || print "checkout of security/psm failed\n";
$session->checkout("mozilla/security/base", $secbase_tag) || print "checkout of security/base failed\n";
$session->checkout("DirectorySDKSourceC", $ldapsdk_tag) || print "checkout of LDAP C SDK failed\n";
$session->checkout("SeaMonkeyAll") ||
print "MacCVS reported some errors checking out SeaMonkeyAll, but these are probably not serious.\n";
@ -867,8 +869,8 @@ sub MakeResourceAliases()
_InstallResources(":mozilla:xpfe:components:autocomplete:resources:content:MANIFEST", "$globalContent", 0);
# security
_InstallResources(":mozilla:extensions:psm-glue:res:content:MANIFEST", "$communicatorContent");
_InstallResources(":mozilla:extensions:psm-glue:res:locale:en-US:MANIFEST", "$communicatorLocale");
_InstallResources(":mozilla:security:base:res:content:MANIFEST", "$communicatorContent");
_InstallResources(":mozilla:security:base:res:locale:en-us:MANIFEST", "$communicatorLocale");
# widget-toolkit
_InstallResources(":mozilla:xpfe:global:resources:content:MANIFEST", "$globalContent");
@ -1777,6 +1779,9 @@ sub BuildIDLProjects()
BuildIDLProject(":mozilla:xpcom:macbuild:XPCOMIDL.mcp", "xpcom");
# security base
BuildIDLProject(":mozilla:security:base:macbuild:securityBaseIDL.mcp", "securityBase");
# necko
BuildIDLProject(":mozilla:netwerk:macbuild:netwerkIDL.mcp","necko");
BuildIDLProject(":mozilla:uriloader:macbuild:uriLoaderIDL.mcp", "uriloader");

Просмотреть файл

@ -26,7 +26,7 @@ VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
DIRS = public src res
DIRS = public src
include $(topsrcdir)/config/rules.mk

Просмотреть файл

@ -34,12 +34,7 @@ include $(DEPTH)/config/autoconf.mk
XPIDLSRCS = \
nsIPSMComponent.idl \
nsIPSMUIHandler.idl \
nsISecureBrowserUI.idl \
nsIPSMSocketInfo.idl \
nsISSLSocketProvider.idl \
nsISecretDecoderRing.idl \
nsIPSMSocketInfo.idl \
$(NULL)
PREF_JS_EXPORTS = $(srcdir)/psm-glue.js
include $(topsrcdir)/config/rules.mk

Просмотреть файл

@ -23,7 +23,7 @@
* Mitch Stoltz <mstoltz@netscape.com>
*/
#include "nsISupports.idl"
#include "nsISecurityManagerComponent.idl"
#include "domstubs.idl"
interface nsIPrincipal;
@ -35,7 +35,7 @@ interface nsIPrincipal;
[ptr] native nsCMTControlStar(CMT_CONTROL);
[scriptable, uuid(9e482670-5412-11d3-bbc8-0000861d1237)]
interface nsIPSMComponent : nsISupports
interface nsIPSMComponent : nsISecurityManagerComponent
{
[noscript] nsCMTControlStar getControlConnection( );
@ -45,7 +45,7 @@ interface nsIPSMComponent : nsISupports
* If they are, the "Selected Info" dialog will be empty.
*/
void displaySecurityAdvisor(in string pickledStatus, in string hostName, in nsIDOMWindow window);
void displayPSMAdvisor(in string pickledStatus, in string hostName, in nsIDOMWindow window);
/**
* This will send PSM all preferences that we know about.
@ -53,8 +53,3 @@ interface nsIPSMComponent : nsISupports
void passPrefs();
};
%{C++
#define PSM_COMPONENT_CONTRACTID "@mozilla.org/psm;1"
#define PSM_COMPONENT_CLASSNAME "Mozilla PSM Component"
%}

Просмотреть файл

@ -21,7 +21,7 @@
* Doug Turner <dougt@netscape.com>
*/
#include "nsISupports.idl"
#include "nsISecureSocketInfo.idl"
%{C++
#include "cmtcmn.h"
@ -33,23 +33,12 @@
[ptr] native nsFileDescStar(PRFileDesc);
[noscript, uuid(deeb8dfc-fb7a-11d3-ac84-00c04fa0d26b)]
interface nsIPSMSocketInfo : nsISupports {
interface nsIPSMSocketInfo : nsISecureSocketInfo {
readonly attribute string hostName;
readonly attribute PRInt32 hostPort;
readonly attribute string proxyName;
readonly attribute PRInt32 proxyPort;
readonly attribute psmtControlStar controlPtr;
readonly attribute cmSocketStar socketPtr;
readonly attribute nsFileDescStar fileDescPtr;
attribute boolean forceHandshake;
void getPickledStatus(out charPtr pickledStatus);
void proxyStepUp();
void TLSStepUp();
};

Просмотреть файл

@ -1,43 +0,0 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Mozilla Public
* License Version 1.1 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All
* Rights Reserved.
*
* Contributor(s):
* Hubbie Shaw
* Doug Turner <dougt@netscape.com>
*/
#include "nsISocketProvider.idl"
[noscript, uuid(856a93d0-5415-11d3-bbc8-0000861d1237)]
interface nsISSLSocketProvider : nsISocketProvider {
};
%{C++
#define NS_ISSLSOCKETPROVIDER_CONTRACTID NS_NETWORK_SOCKET_CONTRACTID_PREFIX "ssl"
#define NS_ISSLSOCKETPROVIDER_CLASSNAME "Mozilla SSL Socket Provider Component"
/* this code behaves just like the above, but has to force a handshake */
#define NS_ISSLFHSOCKETPROVIDER_CONTRACTID NS_NETWORK_SOCKET_CONTRACTID_PREFIX "ssl-forcehandshake"
#define NS_ISSLFHSOCKETPROVIDER_CLASSNAME "Mozilla SSL-FH Socket Provider Component"
/* this code behaves just like the above, but has to force a handshake */
#define NS_TLSSOCKETPROVIDER_CONTRACTID NS_NETWORK_SOCKET_CONTRACTID_PREFIX "tls"
#define NS_TLSSOCKETPROVIDER_CLASSNAME "Mozilla TLS Socket Provider Component"
%}

Просмотреть файл

@ -1,63 +0,0 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Netscape Public
* License Version 1.1 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All
* Rights Reserved.
*
* Contributor(s):
* thayes@netscape.com
*
*/
#include "nsISupports.idl"
/* Buffer type - for storing 8-bit octet values */
[ptr] native buffer(unsigned char);
[scriptable, uuid(0EC80360-075C-11d4-9FD4-00C04F1B83D8)]
interface nsISecretDecoderRing: nsISupports {
/* Encrypt a buffer - callable only from C++ */
[noscript] long encrypt(in buffer data, in long dataLen, out buffer result);
/* Decrypt a buffer - callable only from C++ */
[noscript] long decrypt(in buffer data, in long dataLen, out buffer result);
/* Encrypt nul-terminated string to BASE64 output */
string encryptString(in string text);
/* Decrypt BASE64 input to nul-terminated string output */
/* There is no check for embedded nul values in the decrypted output */
string decryptString(in string crypt);
/* Prompt the user to change the password on the SDR key */
void changePassword();
/* Logout of the security device that protects the SDR key */
void logout();
};
/*
* Configuration interface for the Secret Decoder Ring
* - this interface allows setting the window that will be
* used as parent for dialog windows (such as password prompts)
*/
[scriptable, uuid(01D8C0F0-0CCC-11d4-9FDD-000064657374)]
interface nsISecretDecoderRingConfig: nsISupports {
void setWindow(in nsISupports w);
};

Просмотреть файл

@ -1,44 +0,0 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Mozilla Public
* License Version 1.1 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All
* Rights Reserved.
*
* Contributor(s):
* Hubbie Shaw
* Doug Turner <dougt@netscape.com>
*/
#include "nsISupports.idl"
interface nsIDOMWindowInternal;
interface nsIDOMElement;
[scriptable, uuid(081e31e0-a144-11d3-8c7c-00609792278c)]
interface nsSecureBrowserUI : nsISupports
{
void init(in nsIDOMWindowInternal window, in nsIDOMElement button);
void displayPageInfoUI();
};
%{C++
#define NS_SECURE_BROWSER_UI_CONTRACTID "@mozilla.org/secure_browser_ui;1"
#define NS_SECURE_BROWSER_UI_CLASSNAME "Mozilla Secure Browser UI Handler"
#define NS_SECURE_BROWSER_UI_CID \
{ 0x10fe7ea0, 0xa10a, 0x11d3, {0x8c, 0x7c, 0x00, 0x60, 0x97, 0x92, 0x27, 0x8c}}
%}

Просмотреть файл

@ -1 +0,0 @@
Makefile

Просмотреть файл

@ -1,32 +0,0 @@
#
# The contents of this file are subject to the Netscape Public
# License Version 1.1 (the "License"); you may not use this file
# except in compliance with the License. You may obtain a copy of
# the License at http://www.mozilla.org/NPL/
#
# Software distributed under the License is distributed on an "AS
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
# implied. See the License for the specific language governing
# rights and limitations under the License.
#
# The Original Code is mozilla.org code.
#
# The Initial Developer of the Original Code is Netscape
# Communications Corporation. Portions created by Netscape are
# Copyright (C) 1998 Netscape Communications Corporation. All
# Rights Reserved.
#
# Contributor(s):
#
DEPTH = ../../..
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
DIRS = content locale
include $(topsrcdir)/config/rules.mk

Просмотреть файл

@ -1 +0,0 @@
Makefile

Просмотреть файл

@ -1,3 +0,0 @@
securityOverlay.xul
securityUI.js
PSMTaskMenu.xul

Просмотреть файл

@ -1,38 +0,0 @@
#
# The contents of this file are subject to the Netscape Public
# License Version 1.1 (the "License"); you may not use this file
# except in compliance with the License. You may obtain a copy of
# the License at http://www.mozilla.org/NPL/
#
# Software distributed under the License is distributed on an "AS
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
# implied. See the License for the specific language governing
# rights and limitations under the License.
#
# The Original Code is mozilla.org code.
#
# The Initial Developer of the Original Code is Netscape
# Communications Corporation. Portions created by Netscape are
# Copyright (C) 1998 Netscape Communications Corporation. All
# Rights Reserved.
#
# Contributor(s):
#
DEPTH = ../../../..
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
include $(topsrcdir)/config/rules.mk
COMMUNICATOR_CONTENT_DIR = $(DIST)/bin/chrome/packages/core/communicator/content
COMMUNICATOR_EXPORT_CONTENT = \
$(srcdir)/securityOverlay.xul \
$(srcdir)/securityUI.js \
$(srcdir)/PSMTaskMenu.xul \
$(NULL)
install::
$(INSTALL) $(COMMUNICATOR_EXPORT_CONTENT) $(COMMUNICATOR_CONTENT_DIR)

Просмотреть файл

@ -1,22 +0,0 @@
<?xml version="1.0"?>
<!DOCTYPE window SYSTEM "chrome://communicator/locale/PSMTaskMenu.dtd" >
<overlay id="psmTaskMenuID"
xmlns:html="http://www.w3.org/1999/xhtml"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<script language="JavaScript">
function displaySecurityAdvisor()
{
var psm = Components.classes["@mozilla.org/psm;1"].getService();
psm = psm.QueryInterface(Components.interfaces.nsIPSMComponent);
psm.displaySecurityAdvisor( null, null, null );
}
</script>
<menupopup id="personalManagers">
<menuitem id="PSMMentItem" position="1" value="&PSMCmd.label;" oncommand="displaySecurityAdvisor()"/>
</menupopup>
</overlay>

Просмотреть файл

@ -1,35 +0,0 @@
#!nmake
#
# The contents of this file are subject to the Netscape Public
# License Version 1.1 (the "License"); you may not use this file
# except in compliance with the License. You may obtain a copy of
# the License at http://www.mozilla.org/NPL/
#
# Software distributed under the License is distributed on an "AS
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
# implied. See the License for the specific language governing
# rights and limitations under the License.
#
# The Original Code is mozilla.org code.
#
# The Initial Developer of the Original Code is Netscape
# Communications Corporation. Portions created by Netscape are
# Copyright (C) 1998 Netscape Communications Corporation. All
# Rights Reserved.
#
# Contributor(s):
DEPTH=..\..\..\..
include <$(DEPTH)/config/config.mak>
include <$(DEPTH)\config\rules.mak>
install:: $(DLL)
$(MAKE_INSTALL) securityOverlay.xul $(DIST)\bin\chrome\packages\core\communicator\content
$(MAKE_INSTALL) securityUI.js $(DIST)\bin\chrome\packages\core\communicator\content
$(MAKE_INSTALL) PSMTaskMenu.xul $(DIST)\bin\chrome\packages\core\communicator\content
clobber::
$(RM) $(DIST)\bin\chrome\packages\core\communicator\content\securityOverlay.xul
$(RM) $(DIST)\bin\chrome\packages\core\communicator\content\securityUI.js
$(RM) $(DIST)\bin\chrome\packages\core\communicator\content\PSMTaskMenu.xul

Просмотреть файл

@ -1,14 +0,0 @@
<?xml version="1.0"?>
<?xml-stylesheet href="chrome://communicator/skin/securityOverlay.css" type="text/css"?>
<!DOCTYPE window SYSTEM "chrome://communicator/locale/securityOverlay.dtd">
<overlay id="NavSecurityOverlay"
xmlns:html="http://www.w3.org/1999/xhtml"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<script language="JavaScript" src="chrome://communicator/content/securityUI.js" />
<statusbarpanel id="security-button" onclick="displayPageInfo()" tooltip="aTooltip" tooltiptext="&lockIcon.label;"/>
</overlay>

Просмотреть файл

@ -1,45 +0,0 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Mozilla Public
* License Version 1.1 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All
* Rights Reserved.
*
* Contributor(s):
*/
window.addEventListener("load", SetSecurityButton, false);
var securityUI;
function SetSecurityButton()
{
dump("in SetSecurityButton\n");
var ui = Components.classes["@mozilla.org/secure_browser_ui;1"].createInstance();
securityUI = ui.QueryInterface(Components.interfaces.nsSecureBrowserUI);
var button = document.getElementById('security-button');
if (button && window._content)
securityUI.init(window._content, button);
}
function displayPageInfo()
{
if (securityUI)
securityUI.displayPageInfoUI();
}

Просмотреть файл

@ -1,9 +0,0 @@
packages/core.jar:
communicator/content/securityOverlay.xul (content/securityOverlay.xul)
communicator/content/securityUI.js (content/securityUI.js)
communicator/content/PSMTaskMenu.xul (content/PSMTaskMenu.xul)
locales/en-US.jar:
communicator/locale/PSMTaskMenu.dtd (locale/en-US/PSMTaskMenu.dtd)
communicator/locale/security.properties (locale/en-US/security.properties)
communicator/locale/securityOverlay.dtd (locale/en-US/securityOverlay.dtd)

Просмотреть файл

@ -1 +0,0 @@
Makefile

Просмотреть файл

@ -1,32 +0,0 @@
#
# The contents of this file are subject to the Netscape Public
# License Version 1.1 (the "License"); you may not use this file
# except in compliance with the License. You may obtain a copy of
# the License at http://www.mozilla.org/NPL/
#
# Software distributed under the License is distributed on an "AS
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
# implied. See the License for the specific language governing
# rights and limitations under the License.
#
# The Original Code is mozilla.org code.
#
# The Initial Developer of the Original Code is Netscape
# Communications Corporation. Portions created by Netscape are
# Copyright (C) 1998 Netscape Communications Corporation. All
# Rights Reserved.
#
# Contributor(s):
#
DEPTH = ../../../..
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
DIRS = en-US
include $(topsrcdir)/config/rules.mk

Просмотреть файл

@ -1 +0,0 @@
Makefile

Просмотреть файл

@ -1,3 +0,0 @@
PSMTaskMenu.dtd
securityOverlay.dtd
security.properties

Просмотреть файл

@ -1,41 +0,0 @@
#
# The contents of this file are subject to the Netscape Public
# License Version 1.1 (the "License"); you may not use this file
# except in compliance with the License. You may obtain a copy of
# the License at http://www.mozilla.org/NPL/
#
# Software distributed under the License is distributed on an "AS
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
# implied. See the License for the specific language governing
# rights and limitations under the License.
#
# The Original Code is mozilla.org code.
#
# The Initial Developer of the Original Code is Netscape
# Communications Corporation. Portions created by Netscape are
# Copyright (C) 1998 Netscape Communications Corporation. All
# Rights Reserved.
#
# Contributor(s):
#
DEPTH = ../../../../..
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
COMMUNICATOR_RESOURCE_CONTENT = \
$(srcdir)/PSMTaskMenu.dtd \
$(srcdir)/security.properties \
$(srcdir)/securityOverlay.dtd \
$(NULL)
include $(topsrcdir)/config/rules.mk
install::
$(INSTALL) $(COMMUNICATOR_RESOURCE_CONTENT) $(DIST)/bin/chrome/locales/en-US/communicator/locale

Просмотреть файл

@ -1 +0,0 @@
<!ENTITY PSMCmd.label "Security Manager">

Просмотреть файл

@ -1,37 +0,0 @@
#!nmake
#
# The contents of this file are subject to the Netscape Public
# License Version 1.1 (the "License"); you may not use this file
# except in compliance with the License. You may obtain a copy of
# the License at http://www.mozilla.org/NPL/
#
# Software distributed under the License is distributed on an "AS
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
# implied. See the License for the specific language governing
# rights and limitations under the License.
#
# The Original Code is mozilla.org code.
#
# The Initial Developer of the Original Code is Netscape
# Communications Corporation. Portions created by Netscape are
# Copyright (C) 1998 Netscape Communications Corporation. All
# Rights Reserved.
#
# Contributor(s):
DEPTH=..\..\..\..\..
include <$(DEPTH)\config\rules.mak>
COMMUNICATOR_DIST=$(DIST)\bin\chrome\locales\en-US\communicator\locale
install::
$(MAKE_INSTALL) PSMTaskMenu.dtd $(COMMUNICATOR_DIST)
$(MAKE_INSTALL) security.properties $(COMMUNICATOR_DIST)
$(MAKE_INSTALL) securityOverlay.dtd $(COMMUNICATOR_DIST)
clobber::
$(RM) -f $(DIST)\bin\chrome\locales\en-US\communicator\locale\PSMTaskMenu.dtd
$(RM) -f $(DIST)\bin\chrome\locales\en-US\communicator\locale\security.properties
$(RM) -f $(DIST)\bin\chrome\locales\en-US\communicator\locale\securityOverlay.dtd

Просмотреть файл

@ -1,30 +0,0 @@
#
# The contents of this file are subject to the Netscape Public
# License Version 1.1 (the "License"); you may not use this file
# except in compliance with the License. You may obtain a copy of
# the License at http://www.mozilla.org/NPL/
#
# Software distributed under the License is distributed on an "AS
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
# implied. See the License for the specific language governing
# rights and limitations under the License.
#
# The Original Code is mozilla.org code.
#
# The Initial Developer of the Original Code is Netscape
# Communications Corporation. Portions created by Netscape are
# Copyright (C) 1998 Netscape Communications Corporation. All
# Rights Reserved.
#
# Contributor(s):
#
Title=Security Warning
MixedContentMessage=You have requested a secure document that contains some insecure information.
LeaveSiteMessage=You have requested an insecure document. The document and any information you send back could be observed by a third party while in transit.
EnterSiteMessage=You have requested a secure document. The document and any information you send back are encrypted for privacy while in transit.
PostToInsecure=Warning! Although this document is secure, the information you have submitted is insecure and could be observed by a third party while in transit. If you are submitting passwords, credit card numbers, or other information you would like to keep private, it would be safer for you to cancel the submission.
PostToInsecureFromInsecure=Any information you submit is insecure and could be observed by a third party while in transit. If you are submitting passwords, credit card numbers, or other information you would like to keep private, it would be safer for you to cancel the submission.
DontShowAgain=Show Me This Alert Next Time.
FindText=Please find the Personal Security Manager application
SecurityButtonTooltipText=Show security information for this window

Просмотреть файл

@ -1,2 +0,0 @@
<!ENTITY lockIcon.label "Show security information for this window">

Просмотреть файл

@ -1,27 +0,0 @@
#!nmake
#
# The contents of this file are subject to the Netscape Public
# License Version 1.1 (the "License"); you may not use this file
# except in compliance with the License. You may obtain a copy of
# the License at http://www.mozilla.org/NPL/
#
# Software distributed under the License is distributed on an "AS
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
# implied. See the License for the specific language governing
# rights and limitations under the License.
#
# The Original Code is mozilla.org code.
#
# The Initial Developer of the Original Code is Netscape
# Communications Corporation. Portions created by Netscape are
# Copyright (C) 1998 Netscape Communications Corporation. All
# Rights Reserved.
#
# Contributor(s):
DEPTH=..\..\..\..
DIRS=en-US
include <$(DEPTH)\config\rules.mak>

Просмотреть файл

@ -1,29 +0,0 @@
#!nmake
#
# The contents of this file are subject to the Netscape Public
# License Version 1.1 (the "License"); you may not use this file
# except in compliance with the License. You may obtain a copy of
# the License at http://www.mozilla.org/NPL/
#
# Software distributed under the License is distributed on an "AS
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
# implied. See the License for the specific language governing
# rights and limitations under the License.
#
# The Original Code is mozilla.org code.
#
# The Initial Developer of the Original Code is Netscape
# Communications Corporation. Portions created by Netscape are
# Copyright (C) 1998 Netscape Communications Corporation. All
# Rights Reserved.
#
# Contributor(s):
DEPTH=..\..\..
include <$(DEPTH)/config/config.mak>
!ifdef MOZ_DISABLE_JAR_PACKAGING
DIRS = content locale
!endif
include <$(DEPTH)\config\rules.mak>

Просмотреть файл

@ -153,8 +153,9 @@ nsPSMComponent::RegisterCertContentListener()
}
/* nsISupports Implementation for the class */
NS_IMPL_THREADSAFE_ISUPPORTS3(nsPSMComponent,
NS_IMPL_THREADSAFE_ISUPPORTS4(nsPSMComponent,
nsIPSMComponent,
nsISecurityManagerComponent,
nsIContentHandler,
nsISignatureVerifier);
@ -629,7 +630,13 @@ failure:
}
NS_IMETHODIMP
nsPSMComponent::DisplaySecurityAdvisor(const char *pickledStatus, const char *hostName, nsIDOMWindow * window)
nsPSMComponent::DisplaySecurityAdvisor()
{
return DisplayPSMAdvisor(nsnull, nsnull, nsnull);
}
NS_IMETHODIMP
nsPSMComponent::DisplayPSMAdvisor(const char *pickledStatus, const char *hostName, nsIDOMWindow* window)
{
CMT_CONTROL *controlConnection;
GetControlConnection( &controlConnection );
@ -1023,6 +1030,18 @@ UselessPK7DataSink(void* arg, const char* buf, CMUint32 len)
{
}
NS_IMETHODIMP
nsPSMComponent::GetPassword(char **aRet)
{
PCMT_CONTROL control;
if (NS_SUCCEEDED(GetControlConnection(&control))) {
*aRet = nsCRT::strndup((const char*)control->nonce.data, control->nonce.len);
return NS_OK;
}
return NS_ERROR_FAILURE;
}
NS_IMETHODIMP
nsPSMComponent::VerifySignature(const char* aRSABuf, PRUint32 aRSABufLen,
const char* aPlaintext, PRUint32 aPlaintextLen,

Просмотреть файл

@ -67,6 +67,7 @@ public:
virtual ~nsPSMComponent();
NS_DECL_ISUPPORTS
NS_DECL_NSISECURITYMANAGERCOMPONENT
NS_DECL_NSIPSMCOMPONENT
NS_DECL_NSICONTENTHANDLER
NS_DECL_NSISIGNATUREVERIFIER

Просмотреть файл

@ -44,6 +44,7 @@ public:
virtual ~nsPSMSocketInfo();
NS_DECL_ISUPPORTS
NS_DECL_NSISECURESOCKETINFO
NS_DECL_NSIPSMSOCKETINFO
// internal functions to psm-glue.
@ -340,7 +341,8 @@ nsPSMSocketInfo::~nsPSMSocketInfo()
PR_FREEIF(mPickledStatus);
}
NS_IMPL_THREADSAFE_ISUPPORTS1(nsPSMSocketInfo, nsIPSMSocketInfo);
NS_IMPL_THREADSAFE_ISUPPORTS2(nsPSMSocketInfo, nsISecureSocketInfo,
nsIPSMSocketInfo);
// if the connection was via a proxy, we need to have the
// ssl layer "step up" to take an active role in the connection

Просмотреть файл

@ -212,7 +212,7 @@ nsSecureBrowserUIImpl::DisplayPageInfoUI()
if (mCurrentURI)
mCurrentURI->GetHost(getter_Copies(host));
return psm->DisplaySecurityAdvisor(mLastPSMStatus, host, mWindow);
return psm->DisplayPSMAdvisor(mLastPSMStatus, host, mWindow);
}

Просмотреть файл

@ -52,7 +52,7 @@
#include "prprf.h"
#include "nsIProfile.h"
#include "nsIContent.h"
#include "nsIPSMComponent.h"
#include "nsISecurityManagerComponent.h"
#include "nsIWalletService.h"
@ -3483,18 +3483,23 @@ wallet_IsFromCartman(nsIURI* aURL) {
if (host && PL_strncasecmp(host, "127.0.0.1", 9) == 0) {
/* submit is to server on local machine */
nsresult res;
NS_WITH_SERVICE(nsIPSMComponent, psm, PSM_COMPONENT_CONTRACTID, &res);
PCMT_CONTROL control;
if (NS_SUCCEEDED(res) && NS_SUCCEEDED(psm->GetControlConnection(&control))) {
NS_WITH_SERVICE(nsISecurityManagerComponent, psm, PSM_COMPONENT_CONTRACTID, &res);
if (NS_SUCCEEDED(res)) {
char* password;
aURL->GetPassword(&password);
if (password && PL_strncasecmp(password, (const char*)control->nonce.data, control->nonce.len) == 0) {
char* secmanPassword;
psm->GetPassword(&secmanPassword);
if (password && secmanPassword && PL_strncasecmp(password, secmanPassword, 9) == 0) {
/* password for submit is cartman's password */
retval = PR_TRUE;
}
if (password) {
Recycle(password);
}
if (secmanPassword) {
Recycle(secmanPassword);
}
}
}
if (host) {

Просмотреть файл

@ -48,7 +48,7 @@
#include "plbase64.h"
#include "nsEscape.h"
#include "nsIPSMSocketInfo.h"
#include "nsISecureSocketInfo.h"
/* sigh, cmtcmn.h, included from nsIPSMSocketInfo.h, includes windows.h, which includes winuser.h,
which defines PostMessage to be either PostMessageA or PostMessageW... of course it does this
without using parameters, so any use of PostMessage now becomes PostMessageA...
@ -771,7 +771,7 @@ PRInt32 nsSmtpProtocol::SendTLSResponse()
rv = m_channel->GetSecurityInfo(getter_AddRefs(secInfo));
if (NS_SUCCEEDED(rv) && secInfo) {
nsCOMPtr<nsIPSMSocketInfo> securityInfo = do_QueryInterface(secInfo, &rv);
nsCOMPtr<nsISecureSocketInfo> securityInfo = do_QueryInterface(secInfo, &rv);
if (NS_SUCCEEDED(rv) && securityInfo) {
rv = securityInfo->TLSStepUp();

Просмотреть файл

@ -39,7 +39,7 @@
#include "nsIProxyObjectManager.h"
#include "nsXPIDLString.h"
#include "nsNetUtil.h"
#include "nsIPSMSocketInfo.h"
#include "nsISecureSocketInfo.h"
#include "nsMemory.h"
static NS_DEFINE_CID(kSocketProviderService, NS_SOCKETPROVIDERSERVICE_CID);
@ -130,12 +130,12 @@ nsSocketTransport::nsSocketTransport():
mCloseConnectionOnceDone(PR_FALSE),
mCurrentState(eSocketState_Created),
mHostName(nsnull),
mPort(0),
mLoadAttributes(LOAD_NORMAL),
mMonitor(nsnull),
mOperation(eSocketOperation_None),
mPort(0),
mProxyHost(nsnull),
mProxyPort(0),
mProxyHost(nsnull),
mProxyTransparent(PR_FALSE),
mReadWriteState(0),
mSelectFlags(0),
@ -869,7 +869,7 @@ nsresult nsSocketTransport::doConnection(PRInt16 aSelectFlags)
}
else if (nsCRT::strcmp(mSocketTypes[type], "ssl-forcehandshake") == 0) {
mSecurityInfo = socketInfo;
nsCOMPtr<nsIPSMSocketInfo> securityInfo = do_QueryInterface(mSecurityInfo, &rv);
nsCOMPtr<nsISecureSocketInfo> securityInfo = do_QueryInterface(mSecurityInfo, &rv);
if (NS_SUCCEEDED(rv) && securityInfo)
securityInfo->SetForceHandshake(PR_TRUE);
}
@ -987,7 +987,7 @@ nsresult nsSocketTransport::doConnection(PRInt16 aSelectFlags)
// has been pushed, and we were proxying (transparently; ie. nothing
// has to happen in the protocol layer above us), it's time
// for the ssl to "step up" and start doing it's thing.
nsCOMPtr<nsIPSMSocketInfo> securityInfo = do_QueryInterface(mSecurityInfo, &rv);
nsCOMPtr<nsISecureSocketInfo> securityInfo = do_QueryInterface(mSecurityInfo, &rv);
if (NS_SUCCEEDED(rv) && securityInfo) {
securityInfo->ProxyStepUp();
}

Просмотреть файл

@ -41,7 +41,7 @@
#include "nsAuthEngine.h"
#include "nsIServiceManager.h"
#include "nsISocketTransport.h"
#include "nsIPSMSocketInfo.h"
#include "nsISecureSocketInfo.h"
#include "plstr.h"
#if defined(PR_LOGGING)
@ -61,6 +61,7 @@ nsHTTPRequest::nsHTTPRequest(nsIURI* i_URL,
mBufferSegmentSize(bufferSegmentSize),
mBufferMaxSize(bufferMaxSize),
mPipelinedRequest(nsnull),
mDoingProxySSLConnect(PR_FALSE),
mVersion(HTTP_ONE_ZERO),
mKeepAliveTimeout(0),
mRequestSpec(0),
@ -68,7 +69,6 @@ nsHTTPRequest::nsHTTPRequest(nsIURI* i_URL,
mAbortStatus(NS_OK),
mHeadersFormed(PR_FALSE),
mPort(-1),
mDoingProxySSLConnect(PR_FALSE),
mProxySSLConnectAllowed(PR_FALSE)
{
NS_INIT_REFCNT();
@ -83,7 +83,7 @@ nsHTTPRequest::nsHTTPRequest(nsIURI* i_URL,
mURI->GetSpec(getter_Copies(urlCString));
PR_LOG(gHTTPLog, PR_LOG_DEBUG,
("Creating nsHTTPRequest [this=%x] for URI: %s.\n",
("Creating nsHTTPRequest [this=%p] for URI: %s.\n",
this,(const char *)urlCString));
#endif
@ -533,8 +533,8 @@ nsHTTPPipelinedRequest::nsHTTPPipelinedRequest(nsHTTPHandler* i_Handler, const c
mBufferSegmentSize(0),
mBufferMaxSize(0),
mMustCommit(PR_FALSE),
mTotalWritten(0),
mTotalProcessed(0),
mTotalWritten(0),
mHandler(i_Handler),
mPort(port),
mListener(nsnull),
@ -542,8 +542,8 @@ nsHTTPPipelinedRequest::nsHTTPPipelinedRequest(nsHTTPHandler* i_Handler, const c
{
NS_INIT_REFCNT();
mHost = host;
PR_LOG(gHTTPLog, PR_LOG_DEBUG,("Creating nsHTTPPipelinedRequest [this=%x], created=%d, deleted=%d\n",
mHost = host;
PR_LOG(gHTTPLog, PR_LOG_DEBUG,("Creating nsHTTPPipelinedRequest [this=%p], created=%d, deleted=%d\n",
this, ++sPipelinedRequestCreated, sPipelinedRequestDeleted));
NS_NewISupportsArray(getter_AddRefs(mRequests));
@ -556,7 +556,7 @@ nsHTTPPipelinedRequest::~nsHTTPPipelinedRequest()
PRUint32 count = 0;
PRInt32 index;
PR_LOG(gHTTPLog, PR_LOG_DEBUG,("Deleting nsHTTPPipelinedRequest [this=%x], created=%d, deleted=%d\n",
PR_LOG(gHTTPLog, PR_LOG_DEBUG,("Deleting nsHTTPPipelinedRequest [this=%p], created=%d, deleted=%d\n",
this, sPipelinedRequestCreated, ++sPipelinedRequestDeleted));
if (mRequests)
@ -608,7 +608,7 @@ nsHTTPPipelinedRequest::WriteRequest(nsIInputStream* iRequestStream)
PRUint32 count = 0;
PRUint32 index;
PR_LOG(gHTTPLog, PR_LOG_ALWAYS,("nsHTTPPipelinedRequest::WriteRequest()[%x], mOnStopDone=%d, mTransport=%x\n", this, mOnStopDone, mTransport));
PR_LOG(gHTTPLog, PR_LOG_ALWAYS, ("nsHTTPPipelinedRequest::WriteRequest()[%p], mOnStopDone=%d, mTransport=%x\n", this, mOnStopDone, mTransport.get()));
if (!mRequests)
return NS_ERROR_FAILURE;
@ -673,7 +673,7 @@ nsHTTPPipelinedRequest::WriteRequest(nsIInputStream* iRequestStream)
// Build up the request into mRequestBuffer...
//
PR_LOG(gHTTPLog, PR_LOG_ALWAYS,
("\nnsHTTPRequest::Build() [this=%x].\tWriting Request:\n"
("\nnsHTTPRequest::Build() [this=%p].\tWriting Request:\n"
"=== Start\n%s=== End\n",
this, mRequestBuffer.GetBuffer()));
@ -772,7 +772,7 @@ nsHTTPPipelinedRequest::OnStopRequest(nsIChannel* channel, nsISupports* i_Contex
else
{
PR_LOG(gHTTPLog, PR_LOG_ALWAYS,
("nsHTTPRequest [this=%x]. "
("nsHTTPRequest [this=%p]. "
"Finished writing request to server."
"\tStatus: %x\n", this, aStatus));
@ -810,7 +810,7 @@ nsHTTPPipelinedRequest::OnStopRequest(nsIChannel* channel, nsISupports* i_Contex
else
{
PR_LOG(gHTTPLog, PR_LOG_ERROR,
("nsHTTPRequest [this=%x]. Error writing request to server."
("nsHTTPRequest [this=%p]. Error writing request to server."
"\tStatus: %x\n", this, aStatus));
rv = aStatus;
}
@ -833,7 +833,7 @@ nsHTTPPipelinedRequest::OnStopRequest(nsIChannel* channel, nsISupports* i_Contex
req->mConnection->GetStatus(&channelStatus);
PR_LOG(gHTTPLog, PR_LOG_DEBUG,("nsHTTPRequest::OnStopRequest() [this=%x]. wasKeptAlive=%d, channelStatus=%x\n", this, wasKeptAlive, channelStatus));
PR_LOG(gHTTPLog, PR_LOG_DEBUG,("nsHTTPRequest::OnStopRequest() [this=%p]. wasKeptAlive=%d, channelStatus=%x\n", this, wasKeptAlive, channelStatus));
if (wasKeptAlive && NS_SUCCEEDED(channelStatus))
{
@ -900,7 +900,7 @@ nsHTTPPipelinedRequest::RestartRequest(PRUint32 aType)
{
nsresult rval = NS_ERROR_FAILURE;
PR_LOG(gHTTPLog, PR_LOG_DEBUG,("nsHTTPPipelinedRequest::RestartRequest() [this=%x], mTotalProcessed=%u\n", this, mTotalProcessed));
PR_LOG(gHTTPLog, PR_LOG_DEBUG,("nsHTTPPipelinedRequest::RestartRequest() [this=%p], mTotalProcessed=%u\n", this, mTotalProcessed));
if (aType == REQUEST_RESTART_SSL)
{
@ -919,7 +919,7 @@ nsHTTPPipelinedRequest::RestartRequest(PRUint32 aType)
rval = mTransport->GetSecurityInfo(getter_AddRefs(securityInfo));
if (NS_FAILED(rval)) return rval;
nsCOMPtr<nsIPSMSocketInfo> psmSocketInfo = do_QueryInterface(securityInfo, &rval);
nsCOMPtr<nsISecureSocketInfo> psmSocketInfo = do_QueryInterface(securityInfo, &rval);
if (NS_FAILED(rval)) return rval;
rval = psmSocketInfo->ProxyStepUp();
@ -952,7 +952,7 @@ nsHTTPPipelinedRequest::RestartRequest(PRUint32 aType)
NS_RELEASE(req);
}
PR_LOG(gHTTPLog, PR_LOG_DEBUG,("nsHTTPPipelinedRequest::RestartRequest() [this=%x], wasKepAlive=%u, mAttempts=%d, mOnStopDone=%d\n", this, wasKeptAlive, mAttempts, mOnStopDone));
PR_LOG(gHTTPLog, PR_LOG_DEBUG,("nsHTTPPipelinedRequest::RestartRequest() [this=%p], wasKepAlive=%u, mAttempts=%d, mOnStopDone=%d\n", this, wasKeptAlive, mAttempts, mOnStopDone));
if (wasKeptAlive && mAttempts == 0 && NS_SUCCEEDED(channelStatus))
{
@ -1081,7 +1081,7 @@ nsHTTPPipelinedRequest::AddToPipeline(nsHTTPRequest *aRequest)
sLongestPipeline = count + 1;
PR_LOG(gHTTPLog, PR_LOG_DEBUG,
("nsHTTPPipelinedRequest::AddToPipeline() [this=%x]"
("nsHTTPPipelinedRequest::AddToPipeline() [this=%p]"
" count=%u, longest pipeline=%u\n",
this, count + 1, sLongestPipeline));