Compare commits
1 Commits
release
...
tags/PSM11
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
26bb77ccd0 |
32
mozilla/extensions/psm-glue/Makefile.in
Normal file
32
mozilla/extensions/psm-glue/Makefile.in
Normal file
@@ -0,0 +1,32 @@
|
||||
#
|
||||
# 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 = public src res
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
||||
BIN
mozilla/extensions/psm-glue/macbuild/PSMGlue.mcp
Normal file
BIN
mozilla/extensions/psm-glue/macbuild/PSMGlue.mcp
Normal file
Binary file not shown.
BIN
mozilla/extensions/psm-glue/macbuild/psmglueIDL.mcp
Normal file
BIN
mozilla/extensions/psm-glue/macbuild/psmglueIDL.mcp
Normal file
Binary file not shown.
27
mozilla/extensions/psm-glue/makefile.win
Normal file
27
mozilla/extensions/psm-glue/makefile.win
Normal file
@@ -0,0 +1,27 @@
|
||||
#!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>
|
||||
|
||||
DIRS = public src res
|
||||
|
||||
include <$(DEPTH)\config\rules.mak>
|
||||
4
mozilla/extensions/psm-glue/public/MANIFEST
Normal file
4
mozilla/extensions/psm-glue/public/MANIFEST
Normal file
@@ -0,0 +1,4 @@
|
||||
nsIPSMComponent.idl
|
||||
nsIPSMUIHandler.idl
|
||||
nsISecureBrowserUI.idl
|
||||
nsISSLSocketProvider.idl
|
||||
45
mozilla/extensions/psm-glue/public/Makefile.in
Normal file
45
mozilla/extensions/psm-glue/public/Makefile.in
Normal file
@@ -0,0 +1,45 @@
|
||||
#
|
||||
# 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):
|
||||
# Hubbie Shaw
|
||||
# Doug Turner <dougt@netscape.com>
|
||||
# Terry Hayes <thayes@netscape.com>
|
||||
#
|
||||
|
||||
MODULE = psmglue
|
||||
|
||||
DEPTH = ../../..
|
||||
topsrcdir = @top_srcdir@
|
||||
srcdir = @srcdir@
|
||||
VPATH = @srcdir@
|
||||
|
||||
include $(DEPTH)/config/autoconf.mk
|
||||
|
||||
XPIDLSRCS = \
|
||||
nsIPSMComponent.idl \
|
||||
nsIPSMUIHandler.idl \
|
||||
nsISecureBrowserUI.idl \
|
||||
nsIPSMSocketInfo.idl \
|
||||
nsISSLSocketProvider.idl \
|
||||
nsISecretDecoderRing.idl \
|
||||
$(NULL)
|
||||
|
||||
PREF_JS_EXPORTS = $(srcdir)/psm-glue.js
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
53
mozilla/extensions/psm-glue/public/makefile.win
Normal file
53
mozilla/extensions/psm-glue/public/makefile.win
Normal file
@@ -0,0 +1,53 @@
|
||||
#!nmake
|
||||
#
|
||||
# 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>
|
||||
# Terry Hayes <thayes@netscape.com>
|
||||
#
|
||||
|
||||
MODULE = psmglue
|
||||
|
||||
DEPTH=..\..\..
|
||||
IGNORE_MANIFEST=1
|
||||
|
||||
DLLNAME = psmglue
|
||||
PDBFILE = $(DLLNAME).pdb
|
||||
MAPFILE = $(DLLNAME).map
|
||||
DLL = .\$(OBJDIR)\$(DLLNAME).dll
|
||||
MAKE_OBJ_TYPE = DLL
|
||||
|
||||
include <$(DEPTH)/config/config.mak>
|
||||
|
||||
XPIDL_INCLUDES=-I$(DEPTH)\..\mozilla\dist\idl
|
||||
|
||||
XPIDLSRCS= \
|
||||
.\nsIPSMComponent.idl \
|
||||
.\nsIPSMUIHandler.idl \
|
||||
.\nsISecureBrowserUI.idl \
|
||||
.\nsISSLSocketProvider.idl \
|
||||
.\nsIPSMSocketInfo.idl \
|
||||
.\nsISecretDecoderRing.idl \
|
||||
$(NULL)
|
||||
|
||||
include <$(DEPTH)\config\rules.mak>
|
||||
|
||||
install::
|
||||
$(MAKE_INSTALL) .\psm-glue.js $(DIST)\bin\defaults\pref
|
||||
87
mozilla/extensions/psm-glue/public/nsIPSMComponent.idl
Normal file
87
mozilla/extensions/psm-glue/public/nsIPSMComponent.idl
Normal file
@@ -0,0 +1,87 @@
|
||||
/* -*- 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>
|
||||
* Mitch Stoltz <mstoltz@netscape.com>
|
||||
*/
|
||||
|
||||
#include "nsISupports.idl"
|
||||
interface nsIPrincipal;
|
||||
|
||||
%{C++
|
||||
#include "cmtcmn.h"
|
||||
%}
|
||||
|
||||
[ptr] native nsCMTControlStar(CMT_CONTROL);
|
||||
|
||||
[scriptable, uuid(9e482670-5412-11d3-bbc8-0000861d1237)]
|
||||
interface nsIPSMComponent : nsISupports
|
||||
{
|
||||
|
||||
[noscript] nsCMTControlStar getControlConnection( );
|
||||
|
||||
/**
|
||||
* Display the Security Advisor. PickledStatus and hostName can be null.
|
||||
* If they are, the "Selected Info" dialog will be empty.
|
||||
*/
|
||||
|
||||
void displaySecurityAdvisor(in string pickledStatus, in string hostName);
|
||||
|
||||
/**
|
||||
* This will send PSM all preferences that we know about.
|
||||
*/
|
||||
void passPrefs();
|
||||
|
||||
/* Sig Verification Error Codes */
|
||||
const long VERIFY_OK = 0;
|
||||
const long VERIFY_NOSIG = -2;
|
||||
const long VERIFY_ERROR_UNKNOWN_CA = -8172;
|
||||
|
||||
/* Hash Algorithms (based on cmtcmn.h) */
|
||||
const short MD2 = 1;
|
||||
const short MD5 = 2;
|
||||
const short SHA1 = 3;
|
||||
const unsigned long MD2_LENGTH = 16;
|
||||
const unsigned long MD5_LENGTH = 16;
|
||||
const unsigned long SHA1_LENGTH = 20;
|
||||
const unsigned long MAX_HASH_LENGTH = SHA1_LENGTH;
|
||||
|
||||
/* Secure Hashing functions */
|
||||
void hashBegin(in unsigned long alg, out unsigned long id);
|
||||
void hashUpdate(in unsigned long id, in string buf, in unsigned long buflen);
|
||||
void hashEnd(in unsigned long id, out string hash, out unsigned long hashlen,
|
||||
in unsigned long maxLen);
|
||||
|
||||
/* Signature Verification functions */
|
||||
void verifyRSABegin(out unsigned long id);
|
||||
void verifyRSAUpdate(in unsigned long id, in string buf,
|
||||
in unsigned long buflen);
|
||||
void verifyRSAEnd(in unsigned long id, in string plaintext,
|
||||
in unsigned long plaintextLen,
|
||||
in boolean keepCert, out nsIPrincipal principal, out long result);
|
||||
nsIPrincipal CreatePrincipalFromCert(in unsigned long certID);
|
||||
};
|
||||
|
||||
%{C++
|
||||
#define PSM_COMPONENT_PROGID "component://netscape/psm"
|
||||
#define PSM_COMPONENT_CLASSNAME "Mozilla PSM Component"
|
||||
%}
|
||||
|
||||
45
mozilla/extensions/psm-glue/public/nsIPSMSocketInfo.idl
Normal file
45
mozilla/extensions/psm-glue/public/nsIPSMSocketInfo.idl
Normal file
@@ -0,0 +1,45 @@
|
||||
/* -*- 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):
|
||||
* Doug Turner <dougt@netscape.com>
|
||||
*/
|
||||
|
||||
#include "nsISupports.idl"
|
||||
|
||||
%{C++
|
||||
#include "cmtcmn.h"
|
||||
#include "nsPSMShimLayer.h"
|
||||
%}
|
||||
|
||||
[ptr] native psmtControlStar(CMT_CONTROL);
|
||||
[ptr] native cmSocketStar(CMSocket);
|
||||
[ptr] native nsFileDescStar(PRFileDesc);
|
||||
|
||||
[noscript, uuid(deeb8dfc-fb7a-11d3-ac84-00c04fa0d26b)]
|
||||
interface nsIPSMSocketInfo : nsISupports {
|
||||
|
||||
readonly attribute string hostName;
|
||||
readonly attribute psmtControlStar controlPtr;
|
||||
readonly attribute cmSocketStar socketPtr;
|
||||
readonly attribute nsFileDescStar fileDescPtr;
|
||||
|
||||
void getPickledStatus(out charStar pickledStatus);
|
||||
};
|
||||
|
||||
36
mozilla/extensions/psm-glue/public/nsIPSMUIHandler.idl
Normal file
36
mozilla/extensions/psm-glue/public/nsIPSMUIHandler.idl
Normal file
@@ -0,0 +1,36 @@
|
||||
/* -*- Mode: IDL; 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 the Mozilla browser.
|
||||
*
|
||||
* The Initial Developer of the Original Code is Netscape
|
||||
* Communications, Inc. Portions created by Netscape are
|
||||
* Copyright (C) 1999, Mozilla. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
* Hubbie Shaw
|
||||
* Doug Turner <dougt@netscape.com>
|
||||
*/
|
||||
|
||||
#include "nsISupports.idl"
|
||||
|
||||
[scriptable, uuid(d92be9b0-601b-11d3-8c4a-000064657374)]
|
||||
interface nsIPSMUIHandler : nsISupports
|
||||
{
|
||||
void DisplayURI(in long width, in long height, in string urlStr);
|
||||
void PromptForFile(in wstring prompt, in string fileRegEx, in boolean shouldFileExist, out string outFile);
|
||||
};
|
||||
|
||||
%{C++
|
||||
#define PSM_UI_HANLDER_PROGID "component://netscape/psm/ui"
|
||||
#define PSM_UI_HANLDER_CLASSNAME "Mozilla PSM UI Handler"
|
||||
%}
|
||||
35
mozilla/extensions/psm-glue/public/nsISSLSocketProvider.idl
Normal file
35
mozilla/extensions/psm-glue/public/nsISSLSocketProvider.idl
Normal file
@@ -0,0 +1,35 @@
|
||||
/* -*- 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_PROGID NS_NETWORK_SOCKET_PROGID_PREFIX "ssl"
|
||||
#define NS_ISSLSOCKETPROVIDER_CLASSNAME "Mozilla SSL Socket Provider Component"
|
||||
|
||||
%}
|
||||
57
mozilla/extensions/psm-glue/public/nsISecretDecoderRing.idl
Normal file
57
mozilla/extensions/psm-glue/public/nsISecretDecoderRing.idl
Normal file
@@ -0,0 +1,57 @@
|
||||
/* -*- 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);
|
||||
};
|
||||
|
||||
/*
|
||||
* 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);
|
||||
};
|
||||
|
||||
|
||||
44
mozilla/extensions/psm-glue/public/nsISecureBrowserUI.idl
Normal file
44
mozilla/extensions/psm-glue/public/nsISecureBrowserUI.idl
Normal file
@@ -0,0 +1,44 @@
|
||||
/* -*- 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 nsIDOMWindow;
|
||||
interface nsIDOMElement;
|
||||
|
||||
[scriptable, uuid(081e31e0-a144-11d3-8c7c-00609792278c)]
|
||||
interface nsSecureBrowserUI : nsISupports
|
||||
{
|
||||
void init(in nsIDOMWindow window, in nsIDOMElement button);
|
||||
void displayPageInfoUI();
|
||||
};
|
||||
|
||||
%{C++
|
||||
#define NS_SECURE_BROWSER_UI_PROGID "component://netscape/secure_browser_ui"
|
||||
#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}}
|
||||
|
||||
%}
|
||||
11
mozilla/extensions/psm-glue/public/psm-glue.js
Normal file
11
mozilla/extensions/psm-glue/public/psm-glue.js
Normal file
@@ -0,0 +1,11 @@
|
||||
pref("general.useragent.security", "U");
|
||||
|
||||
pref("security.enable_ssl2", true);
|
||||
pref("security.enable_ssl3", true);
|
||||
pref("security.default_personal_cert", "Select Automatically");
|
||||
pref("security.ask_for_password", 0);
|
||||
pref("security.password_lifetime", 30);
|
||||
pref("security.warn_entering_secure", true);
|
||||
pref("security.warn_leaving_secure", true);
|
||||
pref("security.warn_viewing_mixed", true);
|
||||
pref("security.warn_submit_insecure", true);
|
||||
32
mozilla/extensions/psm-glue/res/Makefile.in
Normal file
32
mozilla/extensions/psm-glue/res/Makefile.in
Normal file
@@ -0,0 +1,32 @@
|
||||
#
|
||||
# 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 skin locale
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
||||
1
mozilla/extensions/psm-glue/res/content/MANIFEST_GLOBAL
Normal file
1
mozilla/extensions/psm-glue/res/content/MANIFEST_GLOBAL
Normal file
@@ -0,0 +1 @@
|
||||
PSMTaskMenu.xul
|
||||
2
mozilla/extensions/psm-glue/res/content/MANIFEST_NAV
Normal file
2
mozilla/extensions/psm-glue/res/content/MANIFEST_NAV
Normal file
@@ -0,0 +1,2 @@
|
||||
NavSecurityOverlay.xul
|
||||
NavSecurityUI.js
|
||||
43
mozilla/extensions/psm-glue/res/content/Makefile.in
Normal file
43
mozilla/extensions/psm-glue/res/content/Makefile.in
Normal file
@@ -0,0 +1,43 @@
|
||||
#
|
||||
# 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
|
||||
|
||||
NAVIGATOR_CONTENT_DIR = $(DIST)/bin/chrome/navigator/content/
|
||||
NAVIGATOR_EXPORT_CONTENT = \
|
||||
$(srcdir)/NavSecurityOverlay.xul \
|
||||
$(srcdir)/NavSecurityUI.js \
|
||||
$(NULL)
|
||||
|
||||
GLOBAL_CONTENT_DIR = $(DIST)/bin/chrome/global/content/
|
||||
GLOBAL_EXPORT_CONTENT = \
|
||||
$(srcdir)/PSMTaskMenu.xul \
|
||||
$(NULL)
|
||||
|
||||
install::
|
||||
$(INSTALL) $(NAVIGATOR_EXPORT_CONTENT) $(NAVIGATOR_CONTENT_DIR)
|
||||
$(INSTALL) $(GLOBAL_EXPORT_CONTENT) $(GLOBAL_CONTENT_DIR)
|
||||
@@ -0,0 +1,14 @@
|
||||
<?xml version="1.0"?>
|
||||
|
||||
<overlay id="NavSecurityOverlay"
|
||||
xmlns:html="http://www.w3.org/TR/REC-html40"
|
||||
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
|
||||
|
||||
<?xml-stylesheet href="chrome://navigator/skin/NavSecurityOverlay.css" type="text/css"?>
|
||||
<html:script language="JavaScript" src="chrome://navigator/content/NavSecurityUI.js" />
|
||||
|
||||
<box id="state-box">
|
||||
<titledbutton id="security-button" class="borderless" align="left" onclick="displayPageInfo()"/>
|
||||
</box>
|
||||
|
||||
</overlay>
|
||||
45
mozilla/extensions/psm-glue/res/content/NavSecurityUI.js
Normal file
45
mozilla/extensions/psm-glue/res/content/NavSecurityUI.js
Normal file
@@ -0,0 +1,45 @@
|
||||
/* -*- 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["component://netscape/secure_browser_ui"].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();
|
||||
}
|
||||
|
||||
|
||||
24
mozilla/extensions/psm-glue/res/content/PSMTaskMenu.xul
Normal file
24
mozilla/extensions/psm-glue/res/content/PSMTaskMenu.xul
Normal file
@@ -0,0 +1,24 @@
|
||||
<?xml version="1.0"?>
|
||||
|
||||
<!DOCTYPE window SYSTEM "chrome://global/locale/PSMTaskMenu.dtd" >
|
||||
|
||||
<overlay id="psmTaskMenuID"
|
||||
xmlns:html="http://www.w3.org/TR/REC-html40"
|
||||
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
|
||||
|
||||
<html:script language="JavaScript">
|
||||
|
||||
function displaySecurityAdvisor()
|
||||
{
|
||||
var psm = Components.classes["component://netscape/psm"].getService();
|
||||
psm = psm.QueryInterface(Components.interfaces.nsIPSMComponent);
|
||||
psm.displaySecurityAdvisor( null, null );
|
||||
}
|
||||
|
||||
</html:script>
|
||||
|
||||
<menupopup id="personalManagers">
|
||||
<menuitem id="PSMMentItem" position="1" value="&PSMCmd.label;" oncommand="displaySecurityAdvisor()"/>
|
||||
</menupopup>
|
||||
|
||||
</overlay>
|
||||
37
mozilla/extensions/psm-glue/res/content/makefile.win
Normal file
37
mozilla/extensions/psm-glue/res/content/makefile.win
Normal file
@@ -0,0 +1,37 @@
|
||||
#!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) NavSecurityOverlay.xul $(DIST)\bin\chrome\navigator\content
|
||||
$(MAKE_INSTALL) NavSecurityUI.js $(DIST)\bin\chrome\navigator\content
|
||||
|
||||
install:: $(DLL)
|
||||
$(MAKE_INSTALL) PSMTaskMenu.xul $(DIST)\bin\chrome\global\content
|
||||
|
||||
clobber::
|
||||
$(RM) $(DIST)\bin\chrome\navigator\content\NavSecurityOverlay.xul
|
||||
$(RM) $(DIST)\bin\chrome\navigator\content\NavSecurityUI.js
|
||||
$(RM) $(DIST)\bin\chrome\global\content\PSMTaskMenu.xul
|
||||
|
||||
32
mozilla/extensions/psm-glue/res/locale/Makefile.in
Normal file
32
mozilla/extensions/psm-glue/res/locale/Makefile.in
Normal file
@@ -0,0 +1,32 @@
|
||||
#
|
||||
# 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
mozilla/extensions/psm-glue/res/locale/en-US/MANIFEST
Normal file
1
mozilla/extensions/psm-glue/res/locale/en-US/MANIFEST
Normal file
@@ -0,0 +1 @@
|
||||
PSMTaskMenu.dtd
|
||||
@@ -0,0 +1 @@
|
||||
security.properties
|
||||
44
mozilla/extensions/psm-glue/res/locale/en-US/Makefile.in
Normal file
44
mozilla/extensions/psm-glue/res/locale/en-US/Makefile.in
Normal file
@@ -0,0 +1,44 @@
|
||||
#
|
||||
# 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
|
||||
|
||||
EXPORT_RESOURCE_CONTENT = \
|
||||
$(srcdir)/PSMTaskMenu.dtd \
|
||||
$(NULL)
|
||||
|
||||
EXPORT_NAV_RESOURCE_CONTENT = \
|
||||
$(srcdir)/security.properties \
|
||||
$(NULL)
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
||||
install::
|
||||
$(INSTALL) $(EXPORT_RESOURCE_CONTENT) $(DIST)/bin/chrome/global/locale
|
||||
$(INSTALL) $(EXPORT_NAV_RESOURCE_CONTENT) $(DIST)/bin/chrome/navigator/locale
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
<!ENTITY PSMCmd.label "Security Manager">
|
||||
36
mozilla/extensions/psm-glue/res/locale/en-US/makefile.win
Normal file
36
mozilla/extensions/psm-glue/res/locale/en-US/makefile.win
Normal file
@@ -0,0 +1,36 @@
|
||||
#!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>
|
||||
|
||||
GLOBAL_DIST=$(DIST)\bin\chrome\global\locale
|
||||
NAV_DIST=$(DIST)\bin\chrome\navigator\locale
|
||||
|
||||
|
||||
install::
|
||||
$(MAKE_INSTALL) PSMTaskMenu.dtd $(GLOBAL_DIST)
|
||||
$(MAKE_INSTALL) security.properties $(NAV_DIST)
|
||||
|
||||
clobber::
|
||||
$(RM) -f $(DIST)\bin\chrome\global\locale\PSMTaskMenu.dtd
|
||||
$(RM) -f $(DIST)\bin\chrome\navigator\locale\security.properties
|
||||
@@ -0,0 +1,28 @@
|
||||
#
|
||||
# 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=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.
|
||||
DontShowAgain=Show Me This Alert Next Time.
|
||||
FindText=Please find the Personal Security Manager application
|
||||
27
mozilla/extensions/psm-glue/res/locale/makefile.win
Normal file
27
mozilla/extensions/psm-glue/res/locale/makefile.win
Normal file
@@ -0,0 +1,27 @@
|
||||
#!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>
|
||||
|
||||
27
mozilla/extensions/psm-glue/res/makefile.win
Normal file
27
mozilla/extensions/psm-glue/res/makefile.win
Normal file
@@ -0,0 +1,27 @@
|
||||
#!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>
|
||||
|
||||
DIRS = skin content locale
|
||||
|
||||
include <$(DEPTH)\config\rules.mak>
|
||||
4
mozilla/extensions/psm-glue/res/skin/MANIFEST
Normal file
4
mozilla/extensions/psm-glue/res/skin/MANIFEST
Normal file
@@ -0,0 +1,4 @@
|
||||
lock.gif
|
||||
unlock.gif
|
||||
broken.gif
|
||||
NavSecurityOverlay.css
|
||||
39
mozilla/extensions/psm-glue/res/skin/Makefile.in
Normal file
39
mozilla/extensions/psm-glue/res/skin/Makefile.in
Normal file
@@ -0,0 +1,39 @@
|
||||
#
|
||||
# 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
|
||||
|
||||
SKIN_DIR = $(DIST)/bin/chrome/navigator/skin/
|
||||
EXPORT_SKINS = \
|
||||
$(srcdir)/broken.gif \
|
||||
$(srcdir)/lock.gif \
|
||||
$(srcdir)/unlock.gif \
|
||||
$(srcdir)/NavSecurityOverlay.css \
|
||||
$(NULL)
|
||||
|
||||
install::
|
||||
$(INSTALL) $(EXPORT_SKINS) $(SKIN_DIR)
|
||||
15
mozilla/extensions/psm-glue/res/skin/NavSecurityOverlay.css
Normal file
15
mozilla/extensions/psm-glue/res/skin/NavSecurityOverlay.css
Normal file
@@ -0,0 +1,15 @@
|
||||
titledbutton#security-button {
|
||||
list-style-image:url("chrome://navigator/skin/unlock.gif");
|
||||
}
|
||||
|
||||
titledbutton#security-button[level="high"] {
|
||||
list-style-image:url("chrome://navigator/skin/lock.gif");
|
||||
}
|
||||
|
||||
titledbutton#security-button[level="low"] {
|
||||
list-style-image:url("chrome://navigator/skin/lock.gif");
|
||||
}
|
||||
|
||||
titledbutton#security-button[level="broken"] {
|
||||
list-style-image:url("chrome://navigator/skin/broken.gif");
|
||||
}
|
||||
BIN
mozilla/extensions/psm-glue/res/skin/broken.gif
Normal file
BIN
mozilla/extensions/psm-glue/res/skin/broken.gif
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 88 B |
BIN
mozilla/extensions/psm-glue/res/skin/lock.gif
Normal file
BIN
mozilla/extensions/psm-glue/res/skin/lock.gif
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 76 B |
41
mozilla/extensions/psm-glue/res/skin/makefile.win
Normal file
41
mozilla/extensions/psm-glue/res/skin/makefile.win
Normal file
@@ -0,0 +1,41 @@
|
||||
#!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::
|
||||
$(MAKE_INSTALL) broken.gif $(DIST)\bin\chrome\navigator\skin
|
||||
$(MAKE_INSTALL) lock.gif $(DIST)\bin\chrome\navigator\skin
|
||||
$(MAKE_INSTALL) unlock.gif $(DIST)\bin\chrome\navigator\skin
|
||||
$(MAKE_INSTALL) NavSecurityOverlay.css $(DIST)\bin\chrome\navigator\skin
|
||||
|
||||
clobber::
|
||||
$(RM) $(DIST)\bin\chrome\navigator\skin\broken.gif
|
||||
$(RM) $(DIST)\bin\chrome\navigator\skin\lock.gif
|
||||
$(RM) $(DIST)\bin\chrome\navigator\skin\unlock.gif
|
||||
$(RM) $(DIST)\bin\chrome\navigator\skin\NavSecurityOverlay.css
|
||||
|
||||
|
||||
|
||||
BIN
mozilla/extensions/psm-glue/res/skin/unlock.gif
Normal file
BIN
mozilla/extensions/psm-glue/res/skin/unlock.gif
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 67 B |
63
mozilla/extensions/psm-glue/src/Makefile.in
Normal file
63
mozilla/extensions/psm-glue/src/Makefile.in
Normal file
@@ -0,0 +1,63 @@
|
||||
#
|
||||
# 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):
|
||||
# Hubbie Shaw
|
||||
# Doug Turner <dougt@netscape.com>
|
||||
#
|
||||
|
||||
DEPTH = ../../..
|
||||
topsrcdir = @top_srcdir@
|
||||
srcdir = @srcdir@
|
||||
VPATH = @srcdir@
|
||||
|
||||
include $(DEPTH)/config/autoconf.mk
|
||||
|
||||
MODULE = psmglue
|
||||
|
||||
IS_COMPONENT = 1
|
||||
LIBRARY_NAME = psmglue
|
||||
|
||||
|
||||
CPPSRCS = \
|
||||
nsPSMComponent.cpp \
|
||||
nsPSMUICallbacks.cpp \
|
||||
nsSSLSocketProvider.cpp \
|
||||
nsPSMModule.cpp \
|
||||
nsSSLIOLayer.cpp \
|
||||
nsSecureBrowserUIImpl.cpp \
|
||||
nsSDR.cpp \
|
||||
$(NULL)
|
||||
|
||||
CSRCS = \
|
||||
nsPSMMutex.c \
|
||||
nsPSMShimLayer.c \
|
||||
$(NULL)
|
||||
|
||||
EXTRA_DSO_LDOPTS = \
|
||||
$(MOZ_COMPONENT_LIBS) \
|
||||
-lcmt \
|
||||
-lprotocol \
|
||||
-lmozjs \
|
||||
$(NULL)
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
||||
INCLUDES += \
|
||||
-I$(srcdir) \
|
||||
$(NULL)
|
||||
68
mozilla/extensions/psm-glue/src/makefile.win
Normal file
68
mozilla/extensions/psm-glue/src/makefile.win
Normal file
@@ -0,0 +1,68 @@
|
||||
#!nmake
|
||||
#
|
||||
# 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>
|
||||
#
|
||||
|
||||
MODULE = psmglue
|
||||
|
||||
DEPTH=..\..\..
|
||||
IGNORE_MANIFEST=1
|
||||
|
||||
DLLNAME = psmglue
|
||||
PDBFILE = $(DLLNAME).pdb
|
||||
MAPFILE = $(DLLNAME).map
|
||||
DLL = .\$(OBJDIR)\$(DLLNAME).dll
|
||||
MAKE_OBJ_TYPE = DLL
|
||||
|
||||
include <$(DEPTH)/config/config.mak>
|
||||
|
||||
LINCS = $(LINCS) \
|
||||
-I$(PUBLIC) \
|
||||
-I$(PUBLIC)/security \
|
||||
$(NULL)
|
||||
|
||||
LLIBS = \
|
||||
$(LIBNSPR) \
|
||||
$(DIST)\lib\neckobase_s.lib \
|
||||
$(DIST)\lib\xpcom.lib \
|
||||
$(DIST)\lib\js3250.lib \
|
||||
$(DIST)\lib\cmt.lib \
|
||||
$(DIST)\lib\protocol.lib \
|
||||
$(DIST)\lib\mozreg.lib \
|
||||
$(NULL)
|
||||
|
||||
OBJS = \
|
||||
.\$(OBJDIR)\nsPSMMutex.obj \
|
||||
.\$(OBJDIR)\nsPSMShimLayer.obj \
|
||||
.\$(OBJDIR)\nsPSMComponent.obj \
|
||||
.\$(OBJDIR)\nsPSMUICallbacks.obj \
|
||||
.\$(OBJDIR)\nsPSMModule.obj \
|
||||
.\$(OBJDIR)\nsSecureBrowserUIImpl.obj \
|
||||
.\$(OBJDIR)\nsSSLIOLayer.obj \
|
||||
.\$(OBJDIR)\nsSSLSocketProvider.obj \
|
||||
.\$(OBJDIR)\nsSDR.obj \
|
||||
$(NULL)
|
||||
|
||||
include <$(DEPTH)\config\rules.mak>
|
||||
|
||||
install:: $(DLL)
|
||||
$(MAKE_INSTALL) .\$(OBJDIR)\$(DLLNAME).dll $(DIST)\bin\components
|
||||
792
mozilla/extensions/psm-glue/src/nsPSMComponent.cpp
Normal file
792
mozilla/extensions/psm-glue/src/nsPSMComponent.cpp
Normal file
@@ -0,0 +1,792 @@
|
||||
/* -*- 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>
|
||||
* Mitch Stoltz <mstoltz@netscape.com>
|
||||
*/
|
||||
|
||||
#include "nsProxiedService.h"
|
||||
#include "nsPSMUICallbacks.h"
|
||||
#include "VerReg.h"
|
||||
|
||||
#include "nspr.h"
|
||||
#include "nsPSMComponent.h"
|
||||
|
||||
#include "nsCRT.h"
|
||||
|
||||
#include "nsIPref.h"
|
||||
#include "nsIProfile.h"
|
||||
#include "nsILocalFile.h"
|
||||
#ifdef XP_MAC
|
||||
#include "nsILocalFileMac.h"
|
||||
#endif
|
||||
#include "nsSpecialSystemDirectory.h"
|
||||
|
||||
#include "rsrcids.h"
|
||||
|
||||
#include "nsPSMMutex.h"
|
||||
#include "nsPSMShimLayer.h"
|
||||
#include "nsPSMUICallbacks.h"
|
||||
|
||||
#include "nsISecureBrowserUI.h"
|
||||
#include "nsIDocumentLoaderObserver.h"
|
||||
#include "nsIScriptSecurityManager.h"
|
||||
|
||||
#define PSM_VERSION_REG_KEY "/Netscape/Personal Security Manager"
|
||||
|
||||
#ifdef WIN32
|
||||
#define PSM_FILE_NAME "psm.exe"
|
||||
#elif XP_UNIX
|
||||
#define PSM_FILE_NAME "start-psm"
|
||||
#define PSM_FILE_LOCATION "/opt/netscape/security/start-psm"
|
||||
#else
|
||||
#define PSM_FILE_NAME "psm"
|
||||
#endif
|
||||
|
||||
|
||||
static NS_DEFINE_CID(kCStringBundleServiceCID, NS_STRINGBUNDLESERVICE_CID);
|
||||
static NS_DEFINE_CID(kProfileCID, NS_PROFILE_CID);
|
||||
static NS_DEFINE_CID(kPrefCID, NS_PREF_CID);
|
||||
|
||||
|
||||
nsPSMComponent* nsPSMComponent::mInstance = nsnull;
|
||||
|
||||
nsPSMComponent::nsPSMComponent()
|
||||
{
|
||||
NS_INIT_REFCNT();
|
||||
mControl = nsnull;
|
||||
}
|
||||
|
||||
nsPSMComponent::~nsPSMComponent()
|
||||
{
|
||||
if (mControl)
|
||||
{
|
||||
CMT_CloseControlConnection(mControl);
|
||||
mControl = nsnull;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsPSMComponent::CreatePSMComponent(nsISupports* aOuter, REFNSIID aIID, void **aResult)
|
||||
{
|
||||
if (!aResult) {
|
||||
return NS_ERROR_INVALID_POINTER;
|
||||
}
|
||||
if (aOuter) {
|
||||
*aResult = nsnull;
|
||||
return NS_ERROR_NO_AGGREGATION;
|
||||
}
|
||||
|
||||
if (mInstance == nsnull)
|
||||
{
|
||||
mInstance = new nsPSMComponent();
|
||||
}
|
||||
|
||||
if (mInstance == nsnull)
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
|
||||
nsresult rv = mInstance->QueryInterface(aIID, aResult);
|
||||
if (NS_FAILED(rv))
|
||||
{
|
||||
*aResult = nsnull;
|
||||
}
|
||||
return rv;
|
||||
}
|
||||
|
||||
/* nsISupports Implementation for the class */
|
||||
NS_IMPL_THREADSAFE_ISUPPORTS1 (nsPSMComponent, nsIPSMComponent);
|
||||
|
||||
#define INIT_NUM_PREFS 100
|
||||
/* preference types */
|
||||
#define STRING_PREF 0
|
||||
#define BOOL_PREF 1
|
||||
#define INT_PREF 2
|
||||
|
||||
|
||||
/* resizable list struct that contains pref items */
|
||||
typedef struct CMSetPrefList {
|
||||
int n; /* number of filled items */
|
||||
int capacity; /* allocated memory */
|
||||
CMTSetPrefElement* list; /* actual list */
|
||||
} CMSetPrefList;
|
||||
|
||||
static void get_pack_bool_pref(nsIPref *prefManager, char* key, CMTSetPrefElement* list, int* n)
|
||||
{
|
||||
PRBool boolpref;
|
||||
|
||||
list[*n].key = nsCRT::strdup(key);
|
||||
list[*n].type = BOOL_PREF;
|
||||
|
||||
if ((prefManager->GetBoolPref(key, &boolpref) != 0) || boolpref)
|
||||
{
|
||||
list[*n].value = nsCRT::strdup("true");
|
||||
}
|
||||
else
|
||||
{
|
||||
list[*n].value = nsCRT::strdup("false");
|
||||
}
|
||||
|
||||
(*n)++; /* increment the counter after done packing */
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
static void SaveAllPrefs(int number, CMTSetPrefElement* list)
|
||||
{
|
||||
nsCOMPtr<nsIPref> prefManager;
|
||||
|
||||
nsresult res = nsServiceManager::GetService(kPrefCID,
|
||||
nsIPref::GetIID(),
|
||||
getter_AddRefs(prefManager));
|
||||
|
||||
if (NS_FAILED(res) || !prefManager)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
int i;
|
||||
int intval;
|
||||
|
||||
for (i = 0; i < number; i++)
|
||||
{
|
||||
if (list[i].key == nsnull)
|
||||
{
|
||||
/* misconfigured item: next */
|
||||
continue;
|
||||
}
|
||||
|
||||
switch (list[i].type)
|
||||
{
|
||||
case 0: /* string type */
|
||||
prefManager->SetCharPref(list[i].key, list[i].value);
|
||||
break;
|
||||
case 1: /* boolean type */
|
||||
if (strcmp(list[i].value, "true") == 0) {
|
||||
prefManager->SetBoolPref(list[i].key, (PRBool)1);
|
||||
}
|
||||
else if (strcmp(list[i].value, "false") == 0) {
|
||||
prefManager->SetBoolPref(list[i].key, (PRBool)0);
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
intval = atoi(list[i].value);
|
||||
prefManager->SetIntPref(list[i].key, intval);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsPSMComponent::PassPrefs()
|
||||
{
|
||||
// if we have not passed anything to psm yet, this function can just return.
|
||||
|
||||
if (!mControl)
|
||||
return NS_OK;
|
||||
|
||||
int i;
|
||||
nsresult rv = NS_ERROR_FAILURE;
|
||||
char* strpref = NULL;
|
||||
int intpref;
|
||||
PRBool boolpref;
|
||||
CMSetPrefList prefs = {0};
|
||||
CMTSetPrefElement* list = NULL;
|
||||
|
||||
char* pickAuto = "Select Automatically";
|
||||
char* alwaysAsk = "Ask Every Time";
|
||||
|
||||
nsCOMPtr<nsIPref> prefManager;
|
||||
|
||||
nsresult res = nsServiceManager::GetService(kPrefCID,
|
||||
nsIPref::GetIID(),
|
||||
getter_AddRefs(prefManager));
|
||||
|
||||
if (NS_OK != res)
|
||||
{
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
/* allocate memory for list */
|
||||
prefs.n = 0; /* counter */
|
||||
prefs.capacity = INIT_NUM_PREFS;
|
||||
prefs.list = (CMTSetPrefElement*) new char[(INIT_NUM_PREFS * sizeof(CMTSetPrefElement))];
|
||||
|
||||
if (prefs.list == NULL)
|
||||
{
|
||||
return rv;
|
||||
}
|
||||
|
||||
/* shorthand */
|
||||
list = prefs.list;
|
||||
|
||||
/* get preferences */
|
||||
get_pack_bool_pref(prefManager, "security.enable_ssl2", (CMTSetPrefElement*)list, &(prefs.n));
|
||||
get_pack_bool_pref(prefManager, "security.enable_ssl3", (CMTSetPrefElement*)list, &(prefs.n));
|
||||
|
||||
/* this pref is a boolean pref in nature but a string pref for
|
||||
* historical reason
|
||||
*/
|
||||
|
||||
list[prefs.n].key = nsCRT::strdup("security.default_personal_cert");
|
||||
list[prefs.n].type = STRING_PREF;
|
||||
|
||||
if ((prefManager->CopyCharPref(list[prefs.n].key, &strpref) == 0) && (strcmp(strpref, pickAuto) == 0))
|
||||
{
|
||||
list[prefs.n].value = nsCRT::strdup(pickAuto);
|
||||
}
|
||||
else
|
||||
{
|
||||
/* although one could choose a specific cert for client auth in
|
||||
* Nova, that mode is deprecated with PSM and mapped to ASK
|
||||
*/
|
||||
list[prefs.n].value = nsCRT::strdup(alwaysAsk);
|
||||
}
|
||||
|
||||
prefs.n++;
|
||||
if (strpref != NULL)
|
||||
{
|
||||
nsCRT::free(strpref);
|
||||
}
|
||||
|
||||
list[prefs.n].key = nsCRT::strdup("security.default_mail_cert");
|
||||
list[prefs.n].type = STRING_PREF;
|
||||
if (prefManager->CopyCharPref(list[prefs.n].key, &list[prefs.n].value) != 0)
|
||||
{
|
||||
list[prefs.n].value = NULL;
|
||||
}
|
||||
prefs.n++;
|
||||
|
||||
list[prefs.n].key = nsCRT::strdup("security.ask_for_password");
|
||||
list[prefs.n].type = INT_PREF;
|
||||
if (prefManager->GetIntPref(list[prefs.n].key, &intpref) != 0)
|
||||
{
|
||||
intpref = 0; /* default */
|
||||
}
|
||||
|
||||
list[prefs.n].value = PR_smprintf("%d", intpref);
|
||||
prefs.n++;
|
||||
|
||||
list[prefs.n].key = nsCRT::strdup("security.password_lifetime");
|
||||
list[prefs.n].type = INT_PREF;
|
||||
if (prefManager->GetIntPref(list[prefs.n].key, &intpref) != 0)
|
||||
{
|
||||
intpref = 30; /* default */
|
||||
}
|
||||
|
||||
list[prefs.n].value = PR_smprintf("%d", intpref);
|
||||
prefs.n++;
|
||||
|
||||
/* OCSP preferences */
|
||||
/* XXX since these are the new ones added by PSM, we will be more
|
||||
* error-tolerant in fetching them
|
||||
*/
|
||||
if (prefManager->GetBoolPref("security.OCSP.enabled", &boolpref) == 0)
|
||||
{
|
||||
if (boolpref)
|
||||
{
|
||||
list[prefs.n].value = nsCRT::strdup("true");
|
||||
}
|
||||
else
|
||||
{
|
||||
list[prefs.n].value = nsCRT::strdup("false");
|
||||
}
|
||||
list[prefs.n].key = nsCRT::strdup("security.OCSP.enabled");
|
||||
list[prefs.n].type = BOOL_PREF;
|
||||
prefs.n++;
|
||||
}
|
||||
|
||||
if (prefManager->GetBoolPref("security.OCSP.useDefaultResponder", &boolpref) == 0)
|
||||
{
|
||||
if (boolpref)
|
||||
{
|
||||
list[prefs.n].value = nsCRT::strdup("true");
|
||||
}
|
||||
else
|
||||
{
|
||||
list[prefs.n].value = nsCRT::strdup("false");
|
||||
}
|
||||
list[prefs.n].key = nsCRT::strdup("security.OCSP.useDefaultResponder");
|
||||
list[prefs.n].type = BOOL_PREF;
|
||||
prefs.n++;
|
||||
}
|
||||
|
||||
if (prefManager->CopyCharPref("security.OCSP.URL", &strpref) == 0)
|
||||
{
|
||||
list[prefs.n].value = strpref;
|
||||
list[prefs.n].key = nsCRT::strdup("security.OCSP.URL");
|
||||
list[prefs.n].type = STRING_PREF;
|
||||
prefs.n++;
|
||||
}
|
||||
|
||||
if (prefManager->CopyCharPref("security.OCSP.signingCA", &strpref) == 0)
|
||||
{
|
||||
list[prefs.n].value = strpref;
|
||||
list[prefs.n].key = nsCRT::strdup("security.OCSP.signingCA");
|
||||
list[prefs.n].type = STRING_PREF;
|
||||
prefs.n++;
|
||||
}
|
||||
|
||||
/* now application-specific preferences */
|
||||
/* get navigator preferences */
|
||||
get_pack_bool_pref(prefManager, "security.warn_entering_secure", (CMTSetPrefElement*)list, &prefs.n);
|
||||
get_pack_bool_pref(prefManager, "security.warn_leaving_secure", (CMTSetPrefElement*)list, &prefs.n);
|
||||
get_pack_bool_pref(prefManager, "security.warn_viewing_mixed", (CMTSetPrefElement*)list, &prefs.n);
|
||||
get_pack_bool_pref(prefManager, "security.warn_submit_insecure", (CMTSetPrefElement*)list, &prefs.n);
|
||||
|
||||
// Add any other prefs here such as ldap or mail/news.
|
||||
|
||||
CMT_SetSavePrefsCallback(mControl, (savePrefsCallback_fn)SaveAllPrefs);
|
||||
|
||||
if (CMT_PassAllPrefs(mControl, prefs.n, (CMTSetPrefElement*)prefs.list) != CMTSuccess)
|
||||
{
|
||||
goto loser;
|
||||
}
|
||||
|
||||
rv = NS_OK; /* success */
|
||||
loser:
|
||||
/* clean out memory for prefs */
|
||||
for (i = 0; i < prefs.n; i++)
|
||||
{
|
||||
if (prefs.list[i].key != NULL)
|
||||
{
|
||||
nsCRT::free(prefs.list[i].key);
|
||||
}
|
||||
|
||||
if (prefs.list[i].value != NULL)
|
||||
{
|
||||
nsCRT::free(prefs.list[i].value);
|
||||
}
|
||||
}
|
||||
|
||||
if (prefs.list != NULL)
|
||||
{
|
||||
delete(prefs.list);
|
||||
}
|
||||
return rv;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsPSMComponent::GetControlConnection( CMT_CONTROL * *_retval )
|
||||
{
|
||||
nsresult rv;
|
||||
*_retval = nsnull;
|
||||
if (mControl)
|
||||
{
|
||||
*_retval = mControl;
|
||||
return NS_OK;
|
||||
}
|
||||
else /* initialize mutex, sock table, etc. */
|
||||
{
|
||||
|
||||
if (nsPSMMutexInit() != PR_SUCCESS)
|
||||
return NS_ERROR_FAILURE;
|
||||
|
||||
mControl = CMT_ControlConnect(&nsPSMMutexTbl, &nsPSMShimTbl);
|
||||
|
||||
if (mControl == nsnull)
|
||||
{
|
||||
//Try to find it.
|
||||
int err;
|
||||
char filepath[MAXREGPATHLEN];
|
||||
|
||||
err = VR_GetPath(PSM_VERSION_REG_KEY, sizeof(filepath), filepath);
|
||||
if ( err == REGERR_OK )
|
||||
{
|
||||
nsFileSpec psmSpec(filepath);
|
||||
psmSpec += PSM_FILE_NAME;
|
||||
|
||||
if (psmSpec.Exists())
|
||||
{
|
||||
mControl = CMT_EstablishControlConnection((char *)psmSpec.GetNativePathCString(), &nsPSMShimTbl, &nsPSMMutexTbl);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#ifndef XP_MAC
|
||||
if (mControl == nsnull)
|
||||
{
|
||||
nsSpecialSystemDirectory sysDir(nsSpecialSystemDirectory::OS_CurrentProcessDirectory);
|
||||
nsFileSpec spec = sysDir;
|
||||
|
||||
spec += "psm/";
|
||||
spec += PSM_FILE_NAME;
|
||||
|
||||
if (spec.Exists())
|
||||
{
|
||||
mControl = CMT_EstablishControlConnection((char *)spec.GetNativePathCString(), &nsPSMShimTbl, &nsPSMMutexTbl);
|
||||
}
|
||||
}
|
||||
#else
|
||||
if (mControl == nsnull)
|
||||
{
|
||||
// Attempt to locate "Personal Security Manager" in "Essential Files".
|
||||
nsCOMPtr<nsILocalFile> aPSMApp = do_CreateInstance(NS_LOCAL_FILE_PROGID, &rv);
|
||||
if (NS_SUCCEEDED(rv))
|
||||
{
|
||||
nsCOMPtr<nsILocalFileMac> psmAppMacFile = do_QueryInterface(aPSMApp, &rv);
|
||||
if (NS_SUCCEEDED(rv))
|
||||
{
|
||||
rv = psmAppMacFile->InitFindingAppByCreatorCode('nPSM');
|
||||
if (NS_SUCCEEDED(rv))
|
||||
{
|
||||
rv = psmAppMacFile->LaunchAppWithDoc(nsnull, PR_TRUE);
|
||||
if (NS_SUCCEEDED(rv))
|
||||
{
|
||||
const PRUint32 kMaxWaitTicks = 180; // max 3 seconds
|
||||
PRUint32 endTicks = ::TickCount() + kMaxWaitTicks;
|
||||
|
||||
do
|
||||
{
|
||||
EventRecord theEvent;
|
||||
WaitNextEvent(0, &theEvent, 5, NULL);
|
||||
mControl = CMT_ControlConnect(&nsPSMMutexTbl, &nsPSMShimTbl);
|
||||
} while (!mControl && (::TickCount() < endTicks));
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
NS_ASSERTION(NS_SUCCEEDED(rv), "Launching Personal Security Manager failed");
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef XP_UNIX
|
||||
if (mControl == nsnull)
|
||||
{
|
||||
nsFileSpec psmSpec(PSM_FILE_LOCATION);
|
||||
if (psmSpec.Exists())
|
||||
{
|
||||
mControl = CMT_EstablishControlConnection(PSM_FILE_LOCATION, &nsPSMShimTbl, &nsPSMMutexTbl);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
if (mControl == nsnull)
|
||||
{
|
||||
char* filePath = nsnull;
|
||||
|
||||
NS_WITH_PROXIED_SERVICE(nsIPSMUIHandler, handler, nsPSMUIHandlerImpl::GetCID(), NS_UI_THREAD_EVENTQ, &rv);
|
||||
if(NS_SUCCEEDED(rv))
|
||||
{
|
||||
NS_WITH_SERVICE(nsIStringBundleService, service, kCStringBundleServiceCID, &rv);
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
|
||||
nsILocale* locale = nsnull;
|
||||
nsCOMPtr<nsIStringBundle> stringBundle;
|
||||
|
||||
rv = service->CreateBundle(SECURITY_STRING_BUNDLE_URL, locale, getter_AddRefs(stringBundle));
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
|
||||
PRUnichar *ptrv = nsnull;
|
||||
rv = stringBundle->GetStringFromName( nsString("FindText").GetUnicode(), &ptrv);
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
|
||||
handler->PromptForFile(ptrv, PSM_FILE_NAME, PR_TRUE, &filePath);
|
||||
|
||||
nsAllocator::Free(ptrv);
|
||||
|
||||
}
|
||||
if (! filePath)
|
||||
return NS_ERROR_FAILURE;
|
||||
|
||||
mControl = CMT_EstablishControlConnection(filePath, &nsPSMShimTbl, &nsPSMMutexTbl);
|
||||
}
|
||||
|
||||
|
||||
if (!mControl || InitPSMUICallbacks(mControl) != PR_SUCCESS)
|
||||
goto failure;
|
||||
|
||||
nsFileSpec profileSpec;
|
||||
PRUnichar* profileName;
|
||||
|
||||
NS_WITH_SERVICE(nsIProfile, profile, kProfileCID, &rv);
|
||||
if (NS_FAILED(rv)) goto failure;
|
||||
|
||||
rv = profile->GetCurrentProfileDir(&profileSpec);
|
||||
if (NS_FAILED(rv)) goto failure;;
|
||||
|
||||
rv = profile->GetCurrentProfile(&profileName);
|
||||
if (NS_FAILED(rv)) goto failure;
|
||||
|
||||
CMTStatus psmStatus;
|
||||
|
||||
psmStatus = CMT_Hello( mControl,
|
||||
PROTOCOL_VERSION,
|
||||
nsCAutoString(profileName),
|
||||
(char*)profileSpec.GetNativePathCString());
|
||||
|
||||
if (psmStatus == CMTFailure)
|
||||
{
|
||||
PR_FREEIF(profileName);
|
||||
goto failure;
|
||||
}
|
||||
|
||||
if (NS_FAILED(PassPrefs()))
|
||||
{
|
||||
PR_FREEIF(profileName);
|
||||
goto failure;
|
||||
}
|
||||
|
||||
PR_FREEIF(profileName);
|
||||
|
||||
*_retval = mControl;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
failure:
|
||||
#ifdef DEBUG
|
||||
printf("*** Failure setting up Cartman! \n");
|
||||
#endif
|
||||
|
||||
if (mControl)
|
||||
{
|
||||
CMT_CloseControlConnection(mControl);
|
||||
mControl = NULL;
|
||||
}
|
||||
|
||||
// TODO we need to unregister our UI callback BEFORE destroying our mutex.
|
||||
// nsPSMMutexDestroy();
|
||||
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsPSMComponent::DisplaySecurityAdvisor(const char *pickledStatus, const char *hostName)
|
||||
{
|
||||
CMT_CONTROL *controlConnection;
|
||||
GetControlConnection( &controlConnection );
|
||||
if (DisplayPSMUIDialog(controlConnection, pickledStatus, hostName) == PR_SUCCESS)
|
||||
return NS_OK;
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Secure Hash Functions
|
||||
//-----------------------------------------
|
||||
NS_IMETHODIMP
|
||||
nsPSMComponent::HashBegin(PRUint32 alg, PRUint32* id)
|
||||
{
|
||||
CMT_CONTROL *controlConnection;
|
||||
if (NS_FAILED(GetControlConnection( &controlConnection )))
|
||||
return NS_ERROR_FAILURE;
|
||||
|
||||
if(CMT_HashCreate(controlConnection, alg, (CMUint32*)id) != CMTSuccess)
|
||||
return NS_ERROR_FAILURE;
|
||||
if(CMT_HASH_Begin(controlConnection, *id) != CMTSuccess)
|
||||
return NS_ERROR_FAILURE;
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsPSMComponent::HashUpdate(PRUint32 id, const char* buf, PRUint32 buflen)
|
||||
{
|
||||
CMT_CONTROL *controlConnection;
|
||||
|
||||
if (NS_FAILED(GetControlConnection( &controlConnection )))
|
||||
return NS_ERROR_FAILURE;
|
||||
if (CMT_HASH_Update(controlConnection, id,
|
||||
(const unsigned char*)buf, buflen) != CMTSuccess)
|
||||
return NS_ERROR_FAILURE;
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsPSMComponent::HashEnd(PRUint32 id, char** hash, PRUint32* hashlen,
|
||||
PRUint32 maxLen)
|
||||
{
|
||||
if (!hash)
|
||||
return NS_ERROR_ILLEGAL_VALUE;
|
||||
|
||||
CMT_CONTROL *controlConnection;
|
||||
if (NS_FAILED(GetControlConnection( &controlConnection )))
|
||||
return NS_ERROR_FAILURE;
|
||||
|
||||
if(CMT_HASH_End(controlConnection, id, (unsigned char*)*hash,
|
||||
(CMUint32*)hashlen, maxLen) != CMTSuccess)
|
||||
return NS_ERROR_FAILURE;
|
||||
CMT_HASH_Destroy(controlConnection, id);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Signature Verification Functions
|
||||
//-----------------------------------------
|
||||
PR_STATIC_CALLBACK(void)
|
||||
UselessPK7DataSink(void* arg, const char* buf, CMUint32 len)
|
||||
{
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsPSMComponent::VerifyRSABegin(PRUint32* id)
|
||||
{
|
||||
if (!id)
|
||||
return NS_ERROR_ILLEGAL_VALUE;
|
||||
|
||||
CMT_CONTROL *controlConnection;
|
||||
if (NS_FAILED(GetControlConnection( &controlConnection )))
|
||||
return NS_ERROR_FAILURE;
|
||||
|
||||
CMInt32* blah = nsnull;
|
||||
CMTStatus result = CMT_PKCS7DecoderStart(controlConnection, nsnull,
|
||||
(CMUint32*)id, blah,
|
||||
UselessPK7DataSink, nsnull);
|
||||
if (result == CMTSuccess)
|
||||
return NS_OK;
|
||||
else
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsPSMComponent::VerifyRSAUpdate(PRUint32 id, const char* buf, PRUint32 buflen)
|
||||
{
|
||||
CMT_CONTROL *controlConnection;
|
||||
if (NS_FAILED(GetControlConnection( &controlConnection )))
|
||||
return NS_ERROR_FAILURE;
|
||||
|
||||
CMTStatus result = CMT_PKCS7DecoderUpdate(controlConnection, id, buf, buflen);
|
||||
if (result == CMTSuccess)
|
||||
return NS_OK;
|
||||
else
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsPSMComponent::VerifyRSAEnd(PRUint32 id, const char* plaintext,
|
||||
PRUint32 plaintextLen,
|
||||
PRBool aKeepCert,
|
||||
nsIPrincipal** aPrincipal,
|
||||
PRInt32* aVerifyError)
|
||||
{
|
||||
*aVerifyError = -1;
|
||||
CMT_CONTROL *controlConnection;
|
||||
if (NS_FAILED(GetControlConnection( &controlConnection )))
|
||||
return NS_ERROR_FAILURE;
|
||||
|
||||
CMUint32 contentInfo;
|
||||
CMTStatus result = CMT_PKCS7DecoderFinish(controlConnection,
|
||||
id, &contentInfo);
|
||||
if (result != CMTSuccess)
|
||||
return NS_ERROR_FAILURE;
|
||||
|
||||
//-- Make sure a signature is present
|
||||
CMInt32 isSigned;
|
||||
result = CMT_GetNumericAttribute(controlConnection, contentInfo,
|
||||
SSM_FID_P7CINFO_IS_SIGNED, &isSigned);
|
||||
if (result != CMTSuccess) return NS_ERROR_FAILURE;
|
||||
if (!isSigned)
|
||||
{
|
||||
*aPrincipal = nsnull;
|
||||
*aVerifyError = nsIPSMComponent::VERIFY_NOSIG;
|
||||
return NS_OK;
|
||||
}
|
||||
// SHA1 hash the plaintext to compare it to the signature
|
||||
CMUint32 hashId;
|
||||
CMT_HashCreate(controlConnection, nsIPSMComponent::SHA1, &hashId);
|
||||
CMT_HASH_Begin(controlConnection, hashId);
|
||||
result = CMT_HASH_Update(controlConnection, hashId,
|
||||
(const unsigned char*)plaintext, plaintextLen);
|
||||
if (result != CMTSuccess) return NS_ERROR_FAILURE;
|
||||
|
||||
unsigned char* hash = (unsigned char*)PR_MALLOC(nsIPSMComponent::SHA1_LENGTH);
|
||||
if (!hash) return NS_ERROR_OUT_OF_MEMORY;
|
||||
CMUint32 hashLen;
|
||||
result = CMT_HASH_End(controlConnection, hashId, hash,
|
||||
&hashLen, nsIPSMComponent::SHA1_LENGTH);
|
||||
NS_ASSERTION(hashLen == nsIPSMComponent::SHA1_LENGTH,
|
||||
"PSMComponent: Hash too short.");
|
||||
CMT_HASH_Destroy(controlConnection, hashId);
|
||||
if (result != CMTSuccess)
|
||||
{
|
||||
PR_FREEIF(hash);
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
//-- Verify signature
|
||||
CMTItemStr hashItem;
|
||||
hashItem.data = hash;
|
||||
hashItem.len = hashLen;
|
||||
result = CMT_PKCS7VerifyDetachedSignature(controlConnection, contentInfo,
|
||||
6 /* =Object Signing Cert */,
|
||||
3 /* =SHA1 algorithm (MD5=2)*/,
|
||||
(CMUint32)aKeepCert,
|
||||
&hashItem, (CMInt32*)aVerifyError);
|
||||
PR_FREEIF(hash);
|
||||
if (result != CMTSuccess) return NS_ERROR_FAILURE;
|
||||
//-- Did it verify?
|
||||
|
||||
if (*aVerifyError != 0)
|
||||
*aPrincipal = nsnull;
|
||||
else
|
||||
{
|
||||
//-- Generate a principal from the cert
|
||||
CMUint32 certID;
|
||||
result = CMT_GetRIDAttribute(controlConnection, contentInfo,
|
||||
SSM_FID_P7CINFO_SIGNER_CERT, &certID);
|
||||
if (result != CMTSuccess) return NS_ERROR_FAILURE;
|
||||
if (NS_FAILED(CreatePrincipalFromCert(certID, aPrincipal)))
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
CMT_PKCS7DestroyContentInfo(controlConnection, contentInfo);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsPSMComponent::CreatePrincipalFromCert(PRUint32 aCertID, nsIPrincipal** aPrincipal)
|
||||
{
|
||||
CMT_CONTROL *controlConnection;
|
||||
if (NS_FAILED(GetControlConnection( &controlConnection )))
|
||||
return NS_ERROR_FAILURE;
|
||||
|
||||
//-- Read cert info
|
||||
CMTStatus result;
|
||||
CMTItem issuerItem;
|
||||
result = CMT_GetStringAttribute(controlConnection, aCertID,
|
||||
SSM_FID_CERT_COMMON_NAME, &issuerItem);
|
||||
if (result != CMTSuccess) return NS_ERROR_FAILURE;
|
||||
CMTItemStr serialNumberItem;
|
||||
result = CMT_GetStringAttribute(controlConnection, aCertID,
|
||||
SSM_FID_CERT_SERIAL_NUMBER, &serialNumberItem);
|
||||
if (result != CMTSuccess) return NS_ERROR_FAILURE;
|
||||
CMTItemStr companyNameItem;
|
||||
result = CMT_GetStringAttribute(controlConnection, aCertID,
|
||||
SSM_FID_CERT_ORG_NAME, &companyNameItem);
|
||||
if (result != CMTSuccess) return NS_ERROR_FAILURE;
|
||||
//-- Get a principal
|
||||
nsresult rv;
|
||||
NS_WITH_SERVICE(nsIScriptSecurityManager, secMan,
|
||||
NS_SCRIPTSECURITYMANAGER_PROGID, &rv)
|
||||
if (NS_FAILED(rv)) return NS_ERROR_FAILURE;
|
||||
rv = secMan->GetCertificatePrincipal((char*)issuerItem.data,
|
||||
(char*)serialNumberItem.data,
|
||||
(char*)companyNameItem.data,
|
||||
aPrincipal);
|
||||
return rv;
|
||||
}
|
||||
|
||||
54
mozilla/extensions/psm-glue/src/nsPSMComponent.h
Normal file
54
mozilla/extensions/psm-glue/src/nsPSMComponent.h
Normal file
@@ -0,0 +1,54 @@
|
||||
/* -*- 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 "nscore.h"
|
||||
#include "nsIPSMComponent.h"
|
||||
#include "nsIStringBundle.h"
|
||||
|
||||
#define SECURITY_STRING_BUNDLE_URL "chrome://navigator/locale/security.properties"
|
||||
|
||||
#define NS_PSMCOMPONENT_CID {0xddcae170, 0x5412, 0x11d3, {0xbb, 0xc8, 0x00, 0x00, 0x86, 0x1d, 0x12, 0x37}}
|
||||
|
||||
// Implementation of the PSM component interface.
|
||||
class nsPSMComponent : public nsIPSMComponent
|
||||
{
|
||||
public:
|
||||
NS_DEFINE_STATIC_CID_ACCESSOR( NS_PSMCOMPONENT_CID );
|
||||
|
||||
nsPSMComponent();
|
||||
virtual ~nsPSMComponent();
|
||||
|
||||
NS_DECL_ISUPPORTS
|
||||
|
||||
NS_DECL_NSIPSMCOMPONENT
|
||||
|
||||
static NS_METHOD CreatePSMComponent(nsISupports* aOuter, REFNSIID aIID, void **aResult);
|
||||
|
||||
private:
|
||||
|
||||
PCMT_CONTROL mControl;
|
||||
|
||||
nsCOMPtr<nsISupports> mSecureBrowserIU;
|
||||
static nsPSMComponent* mInstance;
|
||||
};
|
||||
86
mozilla/extensions/psm-glue/src/nsPSMModule.cpp
Normal file
86
mozilla/extensions/psm-glue/src/nsPSMModule.cpp
Normal file
@@ -0,0 +1,86 @@
|
||||
/* -*- 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 "nsIModule.h"
|
||||
#include "nsIGenericFactory.h"
|
||||
|
||||
#include "nsPSMUICallbacks.h"
|
||||
#include "nsPSMComponent.h"
|
||||
|
||||
#include "nsISecureBrowserUI.h"
|
||||
#include "nsSecureBrowserUIImpl.h"
|
||||
|
||||
#include "nsSSLSocketProvider.h"
|
||||
|
||||
#include "nsSDR.h"
|
||||
|
||||
// Define SDR object constructor
|
||||
NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsSecretDecoderRing, init)
|
||||
|
||||
static nsModuleComponentInfo components[] =
|
||||
{
|
||||
{
|
||||
PSM_COMPONENT_CLASSNAME,
|
||||
NS_PSMCOMPONENT_CID,
|
||||
PSM_COMPONENT_PROGID,
|
||||
nsPSMComponent::CreatePSMComponent
|
||||
},
|
||||
|
||||
{
|
||||
PSM_UI_HANLDER_CLASSNAME,
|
||||
NS_PSMUIHANDLER_CID,
|
||||
PSM_UI_HANLDER_PROGID,
|
||||
nsPSMUIHandlerImpl::CreatePSMUIHandler
|
||||
},
|
||||
|
||||
{
|
||||
NS_SECURE_BROWSER_UI_CLASSNAME,
|
||||
NS_SECURE_BROWSER_UI_CID,
|
||||
NS_SECURE_BROWSER_UI_PROGID,
|
||||
nsSecureBrowserUIImpl::Create
|
||||
},
|
||||
|
||||
{
|
||||
NS_SECURE_BROWSER_DOCOBSERVER_CLASSNAME,
|
||||
NS_SECURE_BROWSER_DOCOBSERVER_CID,
|
||||
NS_SECURE_BROWSER_DOCOBSERVER_PROGID,
|
||||
nsSecureBrowserUIImpl::Create
|
||||
},
|
||||
|
||||
{
|
||||
NS_ISSLSOCKETPROVIDER_CLASSNAME,
|
||||
NS_SSLSOCKETPROVIDER_CID,
|
||||
NS_ISSLSOCKETPROVIDER_PROGID,
|
||||
nsSSLSocketProvider::Create
|
||||
},
|
||||
|
||||
{
|
||||
NS_SDR_CLASSNAME,
|
||||
NS_SDR_CID,
|
||||
NS_SDR_PROGID,
|
||||
nsSecretDecoderRingConstructor
|
||||
}
|
||||
};
|
||||
|
||||
NS_IMPL_NSGETMODULE("PSMComponent", components);
|
||||
72
mozilla/extensions/psm-glue/src/nsPSMMutex.c
Normal file
72
mozilla/extensions/psm-glue/src/nsPSMMutex.c
Normal file
@@ -0,0 +1,72 @@
|
||||
/* -*- 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 "prmon.h"
|
||||
#include "prtypes.h"
|
||||
|
||||
#include "nsPSMMutex.h"
|
||||
|
||||
static PRMonitor *_nsPSMMutexVar;
|
||||
|
||||
PRStatus
|
||||
nsPSMMutexInit()
|
||||
{
|
||||
if (!_nsPSMMutexVar)
|
||||
_nsPSMMutexVar = PR_NewMonitor();
|
||||
|
||||
return _nsPSMMutexVar ? PR_SUCCESS : PR_FAILURE;
|
||||
}
|
||||
|
||||
PRStatus
|
||||
nsPSMMutexDestroy()
|
||||
{
|
||||
if (!_nsPSMMutexVar)
|
||||
return PR_FAILURE;
|
||||
|
||||
PR_Wait(_nsPSMMutexVar, PR_INTERVAL_NO_TIMEOUT);
|
||||
|
||||
PR_DestroyMonitor(_nsPSMMutexVar);
|
||||
return PR_SUCCESS;
|
||||
}
|
||||
|
||||
static void
|
||||
nsPSMMutexLock(CMTMutexPointer *p)
|
||||
{
|
||||
PR_EnterMonitor(*(PRMonitor **)p);
|
||||
return;
|
||||
}
|
||||
|
||||
static void
|
||||
nsPSMMutexUnlock(CMTMutexPointer *p)
|
||||
{
|
||||
PR_ExitMonitor(*(PRMonitor **)p);
|
||||
return;
|
||||
}
|
||||
|
||||
CMT_MUTEX nsPSMMutexTbl =
|
||||
{
|
||||
&_nsPSMMutexVar,
|
||||
(CMTMutexFunction)nsPSMMutexLock,
|
||||
(CMTMutexFunction)nsPSMMutexUnlock
|
||||
};
|
||||
39
mozilla/extensions/psm-glue/src/nsPSMMutex.h
Normal file
39
mozilla/extensions/psm-glue/src/nsPSMMutex.h
Normal file
@@ -0,0 +1,39 @@
|
||||
/* -*- 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>
|
||||
*/
|
||||
|
||||
#ifndef _NSPSMMUTEX_H
|
||||
#define _NSPSMMUTEX_H
|
||||
|
||||
#include "cmtcmn.h"
|
||||
|
||||
PR_BEGIN_EXTERN_C
|
||||
|
||||
PR_EXTERN(CMT_MUTEX) nsPSMMutexTbl;
|
||||
|
||||
PR_EXTERN(PRStatus) nsPSMMutexInit(void);
|
||||
PR_EXTERN(PRStatus) nsPSMMutexDestroy(void);
|
||||
|
||||
PR_END_EXTERN_C
|
||||
|
||||
#endif
|
||||
284
mozilla/extensions/psm-glue/src/nsPSMShimLayer.c
Normal file
284
mozilla/extensions/psm-glue/src/nsPSMShimLayer.c
Normal file
@@ -0,0 +1,284 @@
|
||||
/* -*- 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 "nspr.h"
|
||||
#include "nsPSMShimLayer.h"
|
||||
|
||||
#ifdef XP_UNIX
|
||||
#include <sys/stat.h>
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
|
||||
|
||||
#define NSPSMSHIMMAXFD 50
|
||||
|
||||
CMT_SocketFuncs nsPSMShimTbl =
|
||||
{
|
||||
nsPSMShimGetSocket,
|
||||
nsPSMShimConnect,
|
||||
nsPSMShimVerifyUnixSocket,
|
||||
nsPSMShimSend,
|
||||
nsPSMShimSelect,
|
||||
nsPSMShimReceive,
|
||||
nsPSMShimShutdown,
|
||||
nsPSMShimClose
|
||||
};
|
||||
|
||||
|
||||
CMTSocket
|
||||
nsPSMShimGetSocket(int unixSock)
|
||||
{
|
||||
PRStatus rv;
|
||||
PRFileDesc *fd;
|
||||
CMSocket *sock;
|
||||
|
||||
|
||||
if (unixSock)
|
||||
{
|
||||
#ifndef XP_UNIX
|
||||
return NULL;
|
||||
#else
|
||||
fd = PR_OpenTCPSocket(AF_UNIX);
|
||||
PR_ASSERT(fd);
|
||||
#endif
|
||||
}
|
||||
else
|
||||
{
|
||||
PRSocketOptionData sockopt;
|
||||
|
||||
fd = PR_NewTCPSocket();
|
||||
PR_ASSERT(fd);
|
||||
|
||||
/* disable Nagle algorithm delay for control sockets */
|
||||
sockopt.option = PR_SockOpt_NoDelay;
|
||||
sockopt.value.no_delay = PR_TRUE;
|
||||
|
||||
rv = PR_SetSocketOption(fd, &sockopt);
|
||||
PR_ASSERT(PR_SUCCESS == rv);
|
||||
}
|
||||
|
||||
sock = (CMSocket *)PR_Malloc(sizeof(CMSocket));
|
||||
|
||||
if (sock == NULL)
|
||||
return sock;
|
||||
|
||||
sock->fd = fd;
|
||||
sock->isUnix = unixSock;
|
||||
|
||||
memset(&sock->netAddr, 0, sizeof(PRNetAddr));
|
||||
|
||||
return (CMTSocket)sock;
|
||||
}
|
||||
|
||||
CMTStatus
|
||||
nsPSMShimConnect(CMTSocket sock, short port, char *path)
|
||||
{
|
||||
PRStatus err;
|
||||
PRErrorCode errcode;
|
||||
CMTStatus rv = CMTSuccess;
|
||||
CMSocket *cmSock = (CMSocket *)sock;
|
||||
|
||||
if (!sock) return CMTFailure;
|
||||
|
||||
if (cmSock->isUnix)
|
||||
{
|
||||
#ifndef XP_UNIX
|
||||
return CMTFailure;
|
||||
#else
|
||||
int pathLen;
|
||||
if (!path)
|
||||
{
|
||||
return CMTFailure;
|
||||
}
|
||||
|
||||
/* check buffer overrun */
|
||||
pathLen = strlen(path)+1;
|
||||
|
||||
pathLen = pathLen < sizeof(cmSock->netAddr.local.path)
|
||||
? pathLen : sizeof(cmSock->netAddr.local.path);
|
||||
|
||||
memcpy(&cmSock->netAddr.local.path, path, pathLen);
|
||||
cmSock->netAddr.local.family = PR_AF_LOCAL;
|
||||
#endif
|
||||
}
|
||||
else /* cmSock->isUnix */
|
||||
{
|
||||
cmSock->netAddr.inet.family = PR_AF_INET;
|
||||
cmSock->netAddr.inet.port = PR_htons(port);
|
||||
cmSock->netAddr.inet.ip = PR_htonl(PR_INADDR_LOOPBACK);
|
||||
}
|
||||
|
||||
err = PR_Connect( cmSock->fd, &cmSock->netAddr, PR_INTERVAL_MAX );
|
||||
|
||||
if (err == PR_FAILURE)
|
||||
{
|
||||
errcode = PR_GetError();
|
||||
|
||||
/* TODO: verify PR_INVALID_ARGUMENT_ERROR continue with connect */
|
||||
|
||||
switch (errcode)
|
||||
{
|
||||
case PR_IS_CONNECTED_ERROR:
|
||||
rv = CMTSuccess;
|
||||
break;
|
||||
|
||||
case PR_IN_PROGRESS_ERROR:
|
||||
case PR_IO_TIMEOUT_ERROR:
|
||||
#ifdef WIN32
|
||||
case PR_WOULD_BLOCK_ERROR:
|
||||
case PR_INVALID_ARGUMENT_ERROR:
|
||||
#endif
|
||||
default:
|
||||
rv = CMTFailure;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return rv;
|
||||
}
|
||||
|
||||
CMTStatus
|
||||
nsPSMShimVerifyUnixSocket(CMTSocket sock)
|
||||
{
|
||||
#ifndef XP_UNIX
|
||||
return CMTFailure;
|
||||
#else
|
||||
|
||||
int rv;
|
||||
CMSocket *cmSock;
|
||||
struct stat statbuf;
|
||||
|
||||
cmSock = (CMSocket *)sock;
|
||||
|
||||
if (!cmSock || !cmSock->isUnix)
|
||||
return CMTFailure;
|
||||
|
||||
rv = stat(cmSock->netAddr.local.path, &statbuf);
|
||||
if (rv < 0 || statbuf.st_uid != geteuid() )
|
||||
{
|
||||
PR_Close(cmSock->fd);
|
||||
cmSock->fd = NULL;
|
||||
PR_Free(cmSock);
|
||||
return CMTFailure;
|
||||
}
|
||||
return CMTSuccess;
|
||||
#endif
|
||||
}
|
||||
|
||||
size_t
|
||||
nsPSMShimSend(CMTSocket sock, void *buffer, size_t length)
|
||||
{
|
||||
PRInt32 total;
|
||||
CMSocket *cmSock = (CMSocket *)sock;
|
||||
|
||||
if (!sock) return CMTFailure;
|
||||
|
||||
total = PR_Send(cmSock->fd, buffer, length, 0, PR_INTERVAL_NO_TIMEOUT);
|
||||
|
||||
/* TODO: for now, return 0 if there's an error */
|
||||
return (total < 0) ? 0 : total;
|
||||
}
|
||||
|
||||
|
||||
CMTSocket
|
||||
nsPSMShimSelect(CMTSocket *socks, int numsocks, int poll)
|
||||
{
|
||||
CMSocket **sockArr = (CMSocket **)socks;
|
||||
PRPollDesc readPDs[NSPSMSHIMMAXFD];
|
||||
PRIntervalTime timeout;
|
||||
PRInt32 cnt;
|
||||
int i;
|
||||
|
||||
if (!socks) return NULL;
|
||||
|
||||
memset(readPDs, 0, sizeof(readPDs));
|
||||
|
||||
PR_ASSERT(NSPSMSHIMMAXFD >= numsocks);
|
||||
|
||||
for (i=0; i<numsocks; i++)
|
||||
{
|
||||
readPDs[i].fd = sockArr[i]->fd;
|
||||
readPDs[i].in_flags = PR_POLL_READ;
|
||||
}
|
||||
|
||||
timeout = poll ? PR_INTERVAL_NO_WAIT : PR_INTERVAL_NO_TIMEOUT;
|
||||
|
||||
cnt = PR_Poll(readPDs, numsocks, timeout);
|
||||
|
||||
/* Figure out which socket was selected */
|
||||
if (cnt > 0)
|
||||
{
|
||||
for (i=0; i<numsocks; i++)
|
||||
{
|
||||
if (readPDs[i].out_flags & PR_POLL_READ)
|
||||
{
|
||||
return (CMTSocket)sockArr[i];
|
||||
}
|
||||
}
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
size_t
|
||||
nsPSMShimReceive(CMTSocket sock, void *buffer, size_t bufSize)
|
||||
{
|
||||
PRInt32 total;
|
||||
CMSocket *cmSock = (CMSocket *)sock;
|
||||
|
||||
if (!sock) return CMTFailure;
|
||||
|
||||
total = PR_Recv(cmSock->fd, buffer, bufSize, 0, PR_INTERVAL_NO_TIMEOUT);
|
||||
|
||||
/* TODO: for now, return 0 if there's an error */
|
||||
return (total < 0) ? 0 : total;
|
||||
}
|
||||
|
||||
CMTStatus
|
||||
nsPSMShimShutdown(CMTSocket sock)
|
||||
{
|
||||
CMSocket *cmSock = (CMSocket*)sock;
|
||||
PRStatus rv;
|
||||
|
||||
if (!sock) return CMTFailure;
|
||||
|
||||
rv = PR_Shutdown(cmSock->fd, PR_SHUTDOWN_SEND);
|
||||
return (PR_SUCCESS == rv) ? CMTSuccess : CMTFailure;
|
||||
}
|
||||
|
||||
CMTStatus
|
||||
nsPSMShimClose(CMTSocket sock)
|
||||
{
|
||||
CMSocket *cmSock = (CMSocket*)sock;
|
||||
PRStatus rv = PR_SUCCESS;
|
||||
PR_ASSERT(cmSock);
|
||||
|
||||
if (!sock) return CMTFailure;
|
||||
|
||||
rv = PR_Close(cmSock->fd);
|
||||
cmSock->fd = NULL;
|
||||
|
||||
PR_Free(cmSock);
|
||||
|
||||
return (PR_SUCCESS == rv) ? CMTSuccess : CMTFailure;
|
||||
}
|
||||
67
mozilla/extensions/psm-glue/src/nsPSMShimLayer.h
Normal file
67
mozilla/extensions/psm-glue/src/nsPSMShimLayer.h
Normal file
@@ -0,0 +1,67 @@
|
||||
/* -*- 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>
|
||||
*/
|
||||
|
||||
#ifndef _NSPSMSHIMLAYER_H_
|
||||
#define _NSPSMSHIMLAYER_H_
|
||||
|
||||
#include "cmtcmn.h"
|
||||
#include "prio.h"
|
||||
|
||||
PR_BEGIN_EXTERN_C
|
||||
|
||||
typedef struct CMSocket {
|
||||
PRFileDesc *fd;
|
||||
PRBool isUnix;
|
||||
PRNetAddr netAddr;
|
||||
} CMSocket;
|
||||
|
||||
PR_EXTERN(CMT_SocketFuncs) nsPSMShimTbl;
|
||||
|
||||
PR_EXTERN(CMTSocket)
|
||||
nsPSMShimGetSocket(int unixSock);
|
||||
|
||||
PR_EXTERN(CMTStatus)
|
||||
nsPSMShimConnect(CMTSocket sock, short port, char *path);
|
||||
|
||||
PR_EXTERN(CMTStatus)
|
||||
nsPSMShimVerifyUnixSocket(CMTSocket sock);
|
||||
|
||||
PR_EXTERN(size_t)
|
||||
nsPSMShimSend(CMTSocket sock, void *buffer, size_t length);
|
||||
|
||||
PR_EXTERN(CMTSocket)
|
||||
nsPSMShimSelect(CMTSocket *socks, int numsocks, int poll);
|
||||
|
||||
PR_EXTERN(size_t)
|
||||
nsPSMShimReceive(CMTSocket sock, void *buffer, size_t bufSize);
|
||||
|
||||
PR_EXTERN(CMTStatus)
|
||||
nsPSMShimShutdown(CMTSocket sock);
|
||||
|
||||
PR_EXTERN(CMTStatus)
|
||||
nsPSMShimClose(CMTSocket sock);
|
||||
|
||||
PR_END_EXTERN_C
|
||||
|
||||
#endif /* _NSPSMSHIMLAYER_H_ */
|
||||
332
mozilla/extensions/psm-glue/src/nsPSMUICallbacks.cpp
Normal file
332
mozilla/extensions/psm-glue/src/nsPSMUICallbacks.cpp
Normal file
@@ -0,0 +1,332 @@
|
||||
/* -*- 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 "nsProxiedService.h"
|
||||
#include "nsIEventQueueService.h"
|
||||
#include "nsPSMUICallbacks.h"
|
||||
#include "nsINetSupportDialogService.h"
|
||||
#include "nsIFilePicker.h"
|
||||
|
||||
#include "nsAppShellCIDs.h"
|
||||
#include "prprf.h"
|
||||
#include "prmem.h"
|
||||
|
||||
#include "nsSSLIOLayer.h" // for SSMSTRING_PADDED_LENGTH
|
||||
#include "ssmdefs.h"
|
||||
#include "rsrcids.h"
|
||||
|
||||
// Interfaces Needed
|
||||
#include "nsIAppShellService.h"
|
||||
#include "nsIDocShell.h"
|
||||
#include "nsIDOMWindow.h"
|
||||
#include "nsIInterfaceRequestor.h"
|
||||
#include "nsIPrompt.h"
|
||||
#include "nsIScriptGlobalObject.h"
|
||||
#include "nsIURL.h"
|
||||
#include "nsIXULWindow.h"
|
||||
|
||||
static NS_DEFINE_IID(kAppShellServiceCID, NS_APPSHELL_SERVICE_CID);
|
||||
static NS_DEFINE_CID(kNetSupportDialogCID, NS_NETSUPPORTDIALOG_CID);
|
||||
|
||||
|
||||
// Happy callbacks
|
||||
static char * PromptUserCallback(void *arg, char *prompt, int isPasswd);
|
||||
static char * FilePathPromptCallback(void *arg, char *prompt, char *fileRegEx, CMUint32 shouldFileExist);
|
||||
static void ApplicationFreeCallback(char *userInput);
|
||||
static void * CartmanUIHandler(uint32 resourceID, void* clientContext, uint32 width, uint32 height, char* urlStr, void *data);
|
||||
extern "C" void CARTMAN_UIEventLoop(void *data);
|
||||
|
||||
|
||||
/* nsISupports Implementation for the class */
|
||||
NS_IMPL_ISUPPORTS1(nsPSMUIHandlerImpl, nsIPSMUIHandler)
|
||||
|
||||
NS_METHOD
|
||||
nsPSMUIHandlerImpl::DisplayURI(PRInt32 width, PRInt32 height, const char *urlStr)
|
||||
{
|
||||
nsresult rv;
|
||||
nsCOMPtr<nsIDOMWindow> hiddenWindow;
|
||||
JSContext *jsContext;
|
||||
|
||||
NS_WITH_SERVICE(nsIAppShellService, appShell, kAppShellServiceCID, &rv);
|
||||
if (NS_SUCCEEDED(rv))
|
||||
{
|
||||
rv = appShell->GetHiddenWindowAndJSContext( getter_AddRefs( hiddenWindow ),
|
||||
&jsContext );
|
||||
|
||||
if ( NS_SUCCEEDED( rv ) )
|
||||
{
|
||||
// Set up arguments for "window.open"
|
||||
void *stackPtr;
|
||||
|
||||
char buffer[256];
|
||||
PR_snprintf(buffer,
|
||||
sizeof(buffer),
|
||||
"menubar=no,height=%d,width=%d",
|
||||
height,
|
||||
width );
|
||||
|
||||
jsval *argv = JS_PushArguments(jsContext, &stackPtr, "sss", urlStr, "_blank", buffer);
|
||||
if (argv)
|
||||
{
|
||||
// open the window
|
||||
nsIDOMWindow *newWindow;
|
||||
hiddenWindow->Open(jsContext, argv, 3, &newWindow);
|
||||
newWindow->ResizeTo(width, height);
|
||||
JS_PopArguments(jsContext, stackPtr);
|
||||
}
|
||||
}
|
||||
}
|
||||
return rv;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsPSMUIHandlerImpl::PromptForFile(const PRUnichar *prompt, const char *fileRegEx, PRBool shouldFileExist, char **outFile)
|
||||
{
|
||||
NS_ENSURE_ARG_POINTER(outFile);
|
||||
nsCOMPtr<nsIFilePicker> fp = do_CreateInstance("component://mozilla/filepicker");
|
||||
|
||||
if (!fp)
|
||||
return NS_ERROR_NULL_POINTER;
|
||||
|
||||
|
||||
fp->Init(nsnull, prompt, nsIFilePicker::modeOpen);
|
||||
fp->SetFilters(nsIFilePicker::filterAll);
|
||||
fp->AppendFilter(nsAutoString(fileRegEx).GetUnicode(), nsAutoString(fileRegEx).GetUnicode());
|
||||
PRInt16 mode;
|
||||
nsresult rv = fp->Show(&mode);
|
||||
|
||||
if (NS_FAILED(rv) || (mode == nsIFilePicker::returnCancel))
|
||||
return rv;
|
||||
|
||||
nsCOMPtr<nsILocalFile> file;
|
||||
rv = fp->GetFile(getter_AddRefs(file));
|
||||
|
||||
if (file)
|
||||
file->GetPath(outFile);
|
||||
|
||||
return rv;
|
||||
}
|
||||
|
||||
NS_METHOD
|
||||
nsPSMUIHandlerImpl::CreatePSMUIHandler(nsISupports* aOuter, REFNSIID aIID, void **aResult)
|
||||
{
|
||||
nsresult rv = NS_OK;
|
||||
if ( aResult )
|
||||
{
|
||||
/* Allocate new find component object. */
|
||||
nsPSMUIHandlerImpl *component = new nsPSMUIHandlerImpl();
|
||||
if ( component )
|
||||
{
|
||||
/* Allocated OK, do query interface to get proper */
|
||||
/* pointer and increment refcount. */
|
||||
rv = component->QueryInterface( aIID, aResult );
|
||||
if ( NS_FAILED( rv ) )
|
||||
{
|
||||
/* refcount still at zero, delete it here. */
|
||||
delete component;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
rv = NS_ERROR_OUT_OF_MEMORY;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
rv = NS_ERROR_NULL_POINTER;
|
||||
}
|
||||
return rv;
|
||||
}
|
||||
|
||||
|
||||
|
||||
extern "C" void CARTMAN_UIEventLoop(void *data)
|
||||
{
|
||||
CMT_EventLoop((PCMT_CONTROL)data);
|
||||
}
|
||||
|
||||
PRStatus InitPSMUICallbacks(PCMT_CONTROL control)
|
||||
{
|
||||
if (!control)
|
||||
return PR_FAILURE;
|
||||
|
||||
CMT_SetPromptCallback(control, (promptCallback_fn)PromptUserCallback, nsnull);
|
||||
CMT_SetAppFreeCallback(control, (applicationFreeCallback_fn) ApplicationFreeCallback);
|
||||
CMT_SetFilePathPromptCallback(control, (filePathPromptCallback_fn) FilePathPromptCallback, nsnull);
|
||||
|
||||
if (CMT_SetUIHandlerCallback(control, (uiHandlerCallback_fn) CartmanUIHandler, NULL) != CMTSuccess)
|
||||
return PR_FAILURE;
|
||||
|
||||
PR_CreateThread(PR_USER_THREAD,
|
||||
CARTMAN_UIEventLoop,
|
||||
control,
|
||||
PR_PRIORITY_NORMAL,
|
||||
PR_GLOBAL_THREAD,
|
||||
PR_UNJOINABLE_THREAD,
|
||||
0);
|
||||
|
||||
return PR_SUCCESS;
|
||||
}
|
||||
|
||||
PRStatus DisplayPSMUIDialog(PCMT_CONTROL control, const char *pickledStatus, const char *hostName)
|
||||
{
|
||||
CMUint32 advRID = 0;
|
||||
CMInt32 width = 0;
|
||||
CMInt32 height = 0;
|
||||
CMTItem urlItem = {0, NULL, 0};
|
||||
CMTStatus rv = CMTSuccess;
|
||||
CMTItem advisorContext = {0, NULL, 0};
|
||||
void * pwin;
|
||||
|
||||
CMTSecurityAdvisorData data;
|
||||
memset(&data, '\0', sizeof(CMTSecurityAdvisorData));
|
||||
|
||||
if (hostName)
|
||||
{
|
||||
// if there is a hostName, than this request is about
|
||||
// a webpage.
|
||||
data.hostname = (char*) hostName;
|
||||
data.infoContext = SSM_BROWSER;
|
||||
|
||||
if (pickledStatus)
|
||||
{
|
||||
CMTItem pickledResource = {0, NULL, 0};
|
||||
CMUint32 socketStatus = 0;
|
||||
|
||||
pickledResource.len = *(int*)(pickledStatus);
|
||||
pickledResource.data = (unsigned char*) PR_Malloc(SSMSTRING_PADDED_LENGTH(pickledResource.len));
|
||||
|
||||
if (! pickledResource.data) return PR_FAILURE;
|
||||
|
||||
memcpy(pickledResource.data, pickledStatus+sizeof(int), pickledResource.len);
|
||||
|
||||
/* Unpickle the SSL Socket Status */
|
||||
if (CMT_UnpickleResource( control,
|
||||
SSM_RESTYPE_SSL_SOCKET_STATUS,
|
||||
pickledResource,
|
||||
&socketStatus) == CMTSuccess)
|
||||
{
|
||||
data.infoContext = SSM_BROWSER;
|
||||
data.resID = socketStatus;
|
||||
}
|
||||
|
||||
PR_FREEIF(pickledResource.data);
|
||||
}
|
||||
}
|
||||
|
||||
/* Create a Security Advisor context object. */
|
||||
rv = CMT_SecurityAdvisor(control, &data, &advRID);
|
||||
|
||||
if (rv != CMTSuccess)
|
||||
return PR_FAILURE;
|
||||
|
||||
/* Get the URL, width, height, etc. from the advisor context. */
|
||||
rv = CMT_GetStringAttribute(control,
|
||||
advRID,
|
||||
SSM_FID_SECADVISOR_URL,
|
||||
&urlItem);
|
||||
|
||||
if ((rv != CMTSuccess) || (!urlItem.data))
|
||||
return PR_FAILURE;
|
||||
|
||||
rv = CMT_GetNumericAttribute(control,
|
||||
advRID,
|
||||
SSM_FID_SECADVISOR_WIDTH,
|
||||
&width);
|
||||
if (rv != CMTSuccess)
|
||||
return PR_FAILURE;
|
||||
|
||||
rv = CMT_GetNumericAttribute(control,
|
||||
advRID,
|
||||
SSM_FID_SECADVISOR_HEIGHT,
|
||||
&height);
|
||||
if (rv != CMTSuccess)
|
||||
return PR_FAILURE;
|
||||
|
||||
/* Fire the URL up in a window of its own. */
|
||||
pwin = CartmanUIHandler(advRID, nsnull, width, height, (char*)urlItem.data, NULL);
|
||||
|
||||
//allocated by cmt, we can free with free:
|
||||
free(urlItem.data);
|
||||
|
||||
return PR_SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
|
||||
void* CartmanUIHandler(uint32 resourceID, void* clientContext, uint32 width, uint32 height, char* urlStr, void *data)
|
||||
{
|
||||
nsresult rv = NS_OK;
|
||||
|
||||
NS_WITH_PROXIED_SERVICE(nsIPSMUIHandler, handler, nsPSMUIHandlerImpl::GetCID(), NS_UI_THREAD_EVENTQ, &rv);
|
||||
|
||||
if(NS_SUCCEEDED(rv))
|
||||
handler->DisplayURI(width, height, urlStr);
|
||||
|
||||
return nsnull;
|
||||
}
|
||||
|
||||
|
||||
|
||||
char * PromptUserCallback(void *arg, char *prompt, int isPasswd)
|
||||
{
|
||||
|
||||
nsresult rv = NS_OK;
|
||||
PRUnichar *password;
|
||||
PRInt32 value;
|
||||
|
||||
NS_WITH_PROXIED_SERVICE(nsIPrompt, dialog, kNetSupportDialogCID, NS_UI_THREAD_EVENTQ, &rv);
|
||||
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
rv = dialog->PromptPassword(nsString(prompt).GetUnicode(), nsString(" ").GetUnicode(), &password, &value);
|
||||
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
nsString a(password);
|
||||
char* str = a.ToNewCString();
|
||||
Recycle(password);
|
||||
return str;
|
||||
}
|
||||
}
|
||||
|
||||
return nsnull;
|
||||
}
|
||||
|
||||
void ApplicationFreeCallback(char *userInput)
|
||||
{
|
||||
nsAllocator::Free(userInput);
|
||||
}
|
||||
|
||||
char * FilePathPromptCallback(void *arg, char *prompt, char *fileRegEx, CMUint32 shouldFileExist)
|
||||
{
|
||||
nsresult rv = NS_OK;
|
||||
|
||||
char* filePath = nsnull;
|
||||
|
||||
NS_WITH_PROXIED_SERVICE(nsIPSMUIHandler, handler, nsPSMUIHandlerImpl::GetCID(), NS_UI_THREAD_EVENTQ, &rv);
|
||||
|
||||
if(NS_SUCCEEDED(rv))
|
||||
handler->PromptForFile(nsAutoString(prompt).GetUnicode(), fileRegEx, (PRBool)shouldFileExist, &filePath);
|
||||
|
||||
return filePath;
|
||||
}
|
||||
55
mozilla/extensions/psm-glue/src/nsPSMUICallbacks.h
Normal file
55
mozilla/extensions/psm-glue/src/nsPSMUICallbacks.h
Normal file
@@ -0,0 +1,55 @@
|
||||
/* -*- 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>
|
||||
*/
|
||||
|
||||
#ifndef _NSPSMUICALLBACKS_H
|
||||
#define _NSPSMUICALLBACKS_H
|
||||
|
||||
#include "prtypes.h"
|
||||
#include "cmtcmn.h"
|
||||
|
||||
#include "nsIPSMUIHandler.h"
|
||||
|
||||
PRStatus InitPSMUICallbacks(PCMT_CONTROL gControl);
|
||||
PRStatus DisplayPSMUIDialog(PCMT_CONTROL control, const char* pickledStatus, const char *hostName);
|
||||
|
||||
|
||||
#define NS_PSMUIHANDLER_CID {0x15944e30, 0x601e, 0x11d3, {0x8c, 0x4a, 0x00, 0x00, 0x64, 0x65, 0x73, 0x74}}
|
||||
|
||||
class nsPSMUIHandlerImpl : public nsIPSMUIHandler
|
||||
{
|
||||
public:
|
||||
|
||||
NS_DEFINE_STATIC_CID_ACCESSOR( NS_PSMUIHANDLER_CID );
|
||||
|
||||
/* ctor/dtor */
|
||||
nsPSMUIHandlerImpl() { NS_INIT_REFCNT(); }
|
||||
virtual ~nsPSMUIHandlerImpl() { }
|
||||
|
||||
NS_DECL_ISUPPORTS
|
||||
NS_DECL_NSIPSMUIHANDLER
|
||||
|
||||
static NS_METHOD CreatePSMUIHandler(nsISupports* aOuter, REFNSIID aIID, void **aResult);
|
||||
};
|
||||
|
||||
#endif
|
||||
332
mozilla/extensions/psm-glue/src/nsSDR.cpp
Normal file
332
mozilla/extensions/psm-glue/src/nsSDR.cpp
Normal file
@@ -0,0 +1,332 @@
|
||||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
|
||||
*
|
||||
* 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 "nsIModule.h"
|
||||
#include "nsIGenericFactory.h"
|
||||
*/
|
||||
|
||||
#include "stdlib.h"
|
||||
#include "plstr.h"
|
||||
#include "nsIAllocator.h"
|
||||
#include "nsIServiceManager.h"
|
||||
|
||||
#include "nsISecretDecoderRing.h"
|
||||
|
||||
#include "cmtcmn.h"
|
||||
#include "nsIPSMComponent.h"
|
||||
|
||||
#include "nsSDR.h"
|
||||
|
||||
/* Test version */
|
||||
static const char *kSuccess = "Success:";
|
||||
static const char *kFailure = "Failure:";
|
||||
|
||||
|
||||
#if 0
|
||||
// ===============================================
|
||||
// nsSecretDecoderRing - implementation of nsISecretDecoderRing
|
||||
// ===============================================
|
||||
|
||||
#define NS_SDR_PROGID "netscape.security.sdr.1"
|
||||
|
||||
// {0D9A0341-0CE7-11d4-9FDD-000064657374}
|
||||
#define NS_SDR_CID \
|
||||
{ 0xd9a0341, 0xce7, 0x11d4, { 0x9f, 0xdd, 0x0, 0x0, 0x64, 0x65, 0x73, 0x74 } }
|
||||
|
||||
class nsSecretDecoderRing : public nsISecretDecoderRing
|
||||
{
|
||||
public:
|
||||
NS_DECL_ISUPPORTS
|
||||
NS_DECL_NSISECRETDECODERRING
|
||||
|
||||
nsSecretDecoderRing();
|
||||
virtual ~nsSecretDecoderRing();
|
||||
|
||||
nsresult init();
|
||||
|
||||
private:
|
||||
nsIPSMComponent *mPSM;
|
||||
|
||||
static const char *kPrefix;
|
||||
static const char *kFailed;
|
||||
static const char *kPSMComponentProgID;
|
||||
|
||||
nsresult encode(const unsigned char *data, PRInt32 dataLen, char **_retval);
|
||||
nsresult decode(const char *data, unsigned char **result, PRInt32 * _retval);
|
||||
};
|
||||
|
||||
#endif /* 0 */
|
||||
|
||||
NS_IMPL_ISUPPORTS1(nsSecretDecoderRing, nsISecretDecoderRing)
|
||||
|
||||
nsSecretDecoderRing::nsSecretDecoderRing()
|
||||
{
|
||||
NS_INIT_ISUPPORTS();
|
||||
|
||||
mPSM = NULL;
|
||||
}
|
||||
|
||||
nsSecretDecoderRing::~nsSecretDecoderRing()
|
||||
{
|
||||
if (mPSM) mPSM->Release();
|
||||
}
|
||||
|
||||
/* Init the new instance */
|
||||
nsresult nsSecretDecoderRing::
|
||||
init()
|
||||
{
|
||||
nsresult rv;
|
||||
nsISupports *psm;
|
||||
CMT_CONTROL *control;
|
||||
|
||||
rv = nsServiceManager::GetService(kPSMComponentProgID, NS_GET_IID(nsIPSMComponent),
|
||||
&psm);
|
||||
if (rv == NS_OK) mPSM = (nsIPSMComponent *)psm;
|
||||
|
||||
rv = mPSM->GetControlConnection(&control);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
/* [noscript] long encrypt (in buffer data, in long dataLen, out buffer result); */
|
||||
NS_IMETHODIMP nsSecretDecoderRing::
|
||||
Encrypt(unsigned char * data, PRInt32 dataLen, unsigned char * *result, PRInt32 *_retval)
|
||||
{
|
||||
nsresult rv = NS_OK;
|
||||
unsigned char *r = 0;
|
||||
CMT_CONTROL *control;
|
||||
CMTStatus status;
|
||||
CMUint32 cLen;
|
||||
|
||||
rv = mPSM->GetControlConnection(&control);
|
||||
if (rv != CMTSuccess) { rv = NS_ERROR_NULL_POINTER; goto loser; } /* XXX */
|
||||
|
||||
status = CMT_SDREncrypt(control, (const unsigned char *)0, 0,
|
||||
data, dataLen, result, &cLen);
|
||||
if (status != CMTSuccess) { rv = NS_ERROR_NULL_POINTER; goto loser; } /* XXX */
|
||||
|
||||
*_retval = cLen;
|
||||
|
||||
loser:
|
||||
return rv;
|
||||
}
|
||||
|
||||
/* [noscript] long decrypt (in buffer data, in long dataLen, out buffer result); */
|
||||
NS_IMETHODIMP nsSecretDecoderRing::
|
||||
Decrypt(unsigned char * data, PRInt32 dataLen, unsigned char * *result, PRInt32 *_retval)
|
||||
{
|
||||
nsresult rv = NS_OK;
|
||||
CMTStatus status;
|
||||
CMT_CONTROL *control;
|
||||
CMUint32 len;
|
||||
|
||||
/* Get the control connection */
|
||||
rv = mPSM->GetControlConnection(&control);
|
||||
if (rv != NS_OK) goto loser;
|
||||
|
||||
/* Call PSM to decrypt the value */
|
||||
status = CMT_SDRDecrypt(control, data, dataLen, result, &len);
|
||||
if (status != CMTSuccess) { rv = NS_ERROR_NULL_POINTER; goto loser; }
|
||||
|
||||
*_retval = len;
|
||||
|
||||
loser:
|
||||
return rv;
|
||||
}
|
||||
|
||||
/* string encryptString (in string text); */
|
||||
NS_IMETHODIMP nsSecretDecoderRing::
|
||||
EncryptString(const char *text, char **_retval)
|
||||
{
|
||||
nsresult rv = NS_OK;
|
||||
unsigned char *encrypted = 0;
|
||||
PRInt32 eLen;
|
||||
|
||||
rv = Encrypt((unsigned char *)text, PL_strlen(text), &encrypted, &eLen);
|
||||
if (rv != NS_OK) { goto loser; }
|
||||
|
||||
rv = encode(encrypted, eLen, _retval);
|
||||
|
||||
loser:
|
||||
if (encrypted) nsAllocator::Free(encrypted);
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
/* string decryptString (in string crypt); */
|
||||
NS_IMETHODIMP nsSecretDecoderRing::
|
||||
DecryptString(const char *crypt, char **_retval)
|
||||
{
|
||||
nsresult rv = NS_OK;
|
||||
char *r = 0;
|
||||
unsigned char *decoded = 0;
|
||||
PRInt32 decodedLen;
|
||||
unsigned char *decrypted = 0;
|
||||
PRInt32 decryptedLen;
|
||||
|
||||
rv = decode(crypt, &decoded, &decodedLen);
|
||||
if (rv != NS_OK) goto loser;
|
||||
|
||||
rv = Decrypt(decoded, decodedLen, &decrypted, &decryptedLen);
|
||||
if (rv != NS_OK) goto loser;
|
||||
|
||||
// Convert to NUL-terminated string
|
||||
r = (char *)nsAllocator::Alloc(decryptedLen+1);
|
||||
if (!r) { rv = NS_ERROR_OUT_OF_MEMORY; goto loser; }
|
||||
|
||||
memcpy(r, decrypted, decryptedLen);
|
||||
r[decryptedLen] = 0;
|
||||
|
||||
*_retval = r;
|
||||
r = 0;
|
||||
|
||||
loser:
|
||||
if (r) nsAllocator::Free(r);
|
||||
if (decrypted) nsAllocator::Free(decrypted);
|
||||
if (decoded) nsAllocator::Free(decoded);
|
||||
|
||||
return rv;
|
||||
}
|
||||
|
||||
nsresult nsSecretDecoderRing::
|
||||
encode(const unsigned char *data, PRInt32 dataLen, char **_retval)
|
||||
{
|
||||
nsresult rv = NS_OK;
|
||||
char *r = 0;
|
||||
|
||||
// Allocate space for encoded string (with NUL)
|
||||
r = (char *)nsAllocator::Alloc(dataLen+1);
|
||||
if (!r) { rv = NS_ERROR_OUT_OF_MEMORY; goto loser; }
|
||||
|
||||
memcpy(r, data, dataLen);
|
||||
r[dataLen] = 0;
|
||||
|
||||
*_retval = r;
|
||||
r = 0;
|
||||
|
||||
loser:
|
||||
if (r) nsAllocator::Free(r);
|
||||
|
||||
return rv;
|
||||
}
|
||||
|
||||
nsresult nsSecretDecoderRing::
|
||||
decode(const char *data, unsigned char **result, PRInt32 * _retval)
|
||||
{
|
||||
nsresult rv = NS_OK;
|
||||
unsigned char *r = 0;
|
||||
PRInt32 rLen;
|
||||
|
||||
// Allocate space for decoded string (missing NUL)
|
||||
rLen = PL_strlen(data);
|
||||
r = (unsigned char *)nsAllocator::Alloc(rLen);
|
||||
if (!r) { rv = NS_ERROR_OUT_OF_MEMORY; goto loser; }
|
||||
|
||||
memcpy(r, data, rLen);
|
||||
|
||||
*result = r;
|
||||
r = 0;
|
||||
*_retval = rLen;
|
||||
|
||||
loser:
|
||||
if (r) nsAllocator::Free(r);
|
||||
|
||||
return rv;
|
||||
}
|
||||
|
||||
const char * nsSecretDecoderRing::kPrefix = "PSMtest:";
|
||||
const char * nsSecretDecoderRing::kFailed = "Failed:";
|
||||
const char * nsSecretDecoderRing::kPSMComponentProgID = PSM_COMPONENT_PROGID;
|
||||
|
||||
#if 0
|
||||
|
||||
// *** MODULE *** ///
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
// Define the contructor function for the object nsSampleImpl
|
||||
//
|
||||
// What this does is defines a function nsSampleImplConstructor which we
|
||||
// will specific in the nsModuleComponentInfo table. This function will
|
||||
// be used by the generic factory to create an instance of nsSampleImpl.
|
||||
//
|
||||
// NOTE: This creates an instance of nsSampleImpl by using the default
|
||||
// constructor nsSampleImpl::nsSampleImpl()
|
||||
//
|
||||
NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsSecretDecoderRing, init)
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
// Define a table of CIDs implemented by this module along with other
|
||||
// information like the function to create an instance, progid, and
|
||||
// class name.
|
||||
//
|
||||
// The Registration and Unregistration proc are optional in the structure.
|
||||
//
|
||||
static NS_METHOD nsSDRRegistrationProc(nsIComponentManager *aCompMgr,
|
||||
nsIFile *aPath,
|
||||
const char *registryLocation,
|
||||
const char *componentType)
|
||||
{
|
||||
// Do any registration specific activity like adding yourself to a
|
||||
// category. The Generic Module will take care of registering your
|
||||
// component with xpcom. You dont need to do that. Only any component
|
||||
// specific additional activity needs to be done here.
|
||||
|
||||
// This functions is optional. If you dont need it, dont add it to the structure.
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
static NS_METHOD nsSDRUnregistrationProc(nsIComponentManager *aCompMgr,
|
||||
nsIFile *aPath,
|
||||
const char *registryLocation)
|
||||
{
|
||||
// Undo any component specific registration like adding yourself to a
|
||||
// category here. The Generic Module will take care of unregistering your
|
||||
// component from xpcom. You dont need to do that. Only any component
|
||||
// specific additional activity needs to be done here.
|
||||
|
||||
// This functions is optional. If you dont need it, dont add it to the structure.
|
||||
|
||||
// Return value is not used from this function.
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
static nsModuleComponentInfo components[] =
|
||||
{
|
||||
{ "SDR Component", NS_SDR_CID, NS_SDR_PROGID, nsSecretDecoderRingConstructor,
|
||||
nsSDRRegistrationProc /* NULL if you dont need one */,
|
||||
nsSDRUnregistrationProc /* NULL if you dont need one */
|
||||
}
|
||||
};
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
// Implement the NSGetModule() exported function for your module
|
||||
// and the entire implementation of the module object.
|
||||
//
|
||||
// NOTE: If you want to use the module shutdown to release any
|
||||
// module specific resources, use the macro
|
||||
// NS_IMPL_NSGETMODULE_WITH_DTOR() instead of the vanilla
|
||||
// NS_IMPL_NSGETMODULE()
|
||||
//
|
||||
NS_IMPL_NSGETMODULE("nsSecretDecoderRing", components)
|
||||
|
||||
#endif /* 0 */
|
||||
60
mozilla/extensions/psm-glue/src/nsSDR.h
Normal file
60
mozilla/extensions/psm-glue/src/nsSDR.h
Normal file
@@ -0,0 +1,60 @@
|
||||
/* -*- 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):
|
||||
* Terry Hayes <thayes@netscape.com>
|
||||
*/
|
||||
|
||||
#ifndef _NSSDR_H_
|
||||
#define _NSSDR_H_
|
||||
|
||||
#include "nsISecretDecoderRing.h"
|
||||
|
||||
// ===============================================
|
||||
// nsSecretDecoderRing - implementation of nsISecretDecoderRing
|
||||
// ===============================================
|
||||
|
||||
#define NS_SDR_CLASSNAME "Secret Decoder Ring"
|
||||
#define NS_SDR_CID \
|
||||
{ 0xd9a0341, 0xce7, 0x11d4, { 0x9f, 0xdd, 0x0, 0x0, 0x64, 0x65, 0x73, 0x74 } }
|
||||
#define NS_SDR_PROGID "netscape.security.sdr"
|
||||
|
||||
class nsSecretDecoderRing : public nsISecretDecoderRing
|
||||
{
|
||||
public:
|
||||
NS_DECL_ISUPPORTS
|
||||
NS_DECL_NSISECRETDECODERRING
|
||||
|
||||
nsSecretDecoderRing();
|
||||
virtual ~nsSecretDecoderRing();
|
||||
|
||||
nsresult init();
|
||||
|
||||
private:
|
||||
nsIPSMComponent *mPSM;
|
||||
|
||||
static const char *kPrefix;
|
||||
static const char *kFailed;
|
||||
static const char *kPSMComponentProgID;
|
||||
|
||||
nsresult encode(const unsigned char *data, PRInt32 dataLen, char **_retval);
|
||||
nsresult decode(const char *data, unsigned char **result, PRInt32 * _retval);
|
||||
};
|
||||
|
||||
#endif /* _NSSDR_H_ */
|
||||
432
mozilla/extensions/psm-glue/src/nsSSLIOLayer.cpp
Normal file
432
mozilla/extensions/psm-glue/src/nsSSLIOLayer.cpp
Normal file
@@ -0,0 +1,432 @@
|
||||
/* -*- 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):
|
||||
*/
|
||||
|
||||
#include "nspr.h"
|
||||
#include "nsString.h"
|
||||
#include "cmtcmn.h"
|
||||
|
||||
#include "nsIPSMComponent.h"
|
||||
#include "nsIPSMSocketInfo.h"
|
||||
#include "nsIServiceManager.h"
|
||||
#include "nsPSMShimLayer.h"
|
||||
#include "nsSSLIOLayer.h"
|
||||
|
||||
static PRDescIdentity nsSSLIOLayerIdentity;
|
||||
static PRIOMethods nsSSLIOLayerMethods;
|
||||
static nsIPSMComponent* gPSMService = nsnull;
|
||||
|
||||
|
||||
|
||||
class nsPSMSocketInfo : public nsIPSMSocketInfo
|
||||
{
|
||||
public:
|
||||
nsPSMSocketInfo();
|
||||
~nsPSMSocketInfo();
|
||||
|
||||
NS_DECL_ISUPPORTS
|
||||
NS_DECL_NSIPSMSOCKETINFO
|
||||
|
||||
// internal functions to psm-glue.
|
||||
nsresult SetSocketPtr(CMSocket *socketPtr);
|
||||
nsresult SetControlPtr(CMT_CONTROL *aControlPtr);
|
||||
nsresult SetFileDescPtr(PRFileDesc *aControlPtr);
|
||||
nsresult SetHostName(char *aHostName);
|
||||
|
||||
protected:
|
||||
CMT_CONTROL* mControl;
|
||||
CMSocket* mSocket;
|
||||
PRFileDesc* mFd;
|
||||
nsString mHostName;
|
||||
};
|
||||
|
||||
|
||||
static PRStatus PR_CALLBACK
|
||||
nsSSLIOLayerConnect(PRFileDesc *fd, const PRNetAddr *addr, PRIntervalTime timeout)
|
||||
{
|
||||
nsresult result;
|
||||
PRStatus rv = PR_SUCCESS;
|
||||
CMTStatus status = CMTFailure;
|
||||
char* hostName;
|
||||
|
||||
/* Set the error in case of failure. */
|
||||
|
||||
PR_SetError(PR_UNKNOWN_ERROR, status);
|
||||
|
||||
if (!fd || !addr || !fd->secret)
|
||||
return PR_FAILURE;
|
||||
|
||||
if (gPSMService == nsnull)
|
||||
{
|
||||
result = nsServiceManager::GetService( PSM_COMPONENT_PROGID,
|
||||
NS_GET_IID(nsIPSMComponent),
|
||||
(nsISupports**)&gPSMService); //FIX leak one per app run
|
||||
if (NS_FAILED(result))
|
||||
return PR_FAILURE;
|
||||
}
|
||||
|
||||
|
||||
// Make the socket non-blocking...
|
||||
PRSocketOptionData opt;
|
||||
opt.option = PR_SockOpt_Nonblocking;
|
||||
opt.value.non_blocking = PR_FALSE;
|
||||
rv = PR_SetSocketOption(fd->lower, &opt);
|
||||
if (PR_SUCCESS != rv)
|
||||
return PR_FAILURE;
|
||||
|
||||
char ipBuffer[PR_NETDB_BUF_SIZE];
|
||||
rv = PR_NetAddrToString(addr, (char*)&ipBuffer, PR_NETDB_BUF_SIZE);
|
||||
if (rv != PR_SUCCESS)
|
||||
return PR_FAILURE;
|
||||
|
||||
if (addr->raw.family == PR_AF_INET6 && PR_IsNetAddrType(addr, PR_IpAddrV4Mapped))
|
||||
{
|
||||
/* Chop off the leading "::ffff:" */
|
||||
strcpy(ipBuffer, ipBuffer + 7);
|
||||
}
|
||||
|
||||
|
||||
CMSocket* cmsock = (CMSocket *)PR_Malloc(sizeof(CMSocket));
|
||||
if (!cmsock)
|
||||
return PR_FAILURE;
|
||||
|
||||
memset(cmsock, 0, sizeof(CMSocket));
|
||||
|
||||
CMT_CONTROL *control;
|
||||
result = gPSMService->GetControlConnection(&control);
|
||||
|
||||
if (result != PR_SUCCESS)
|
||||
{
|
||||
PR_FREEIF(cmsock)
|
||||
return PR_FAILURE;
|
||||
}
|
||||
|
||||
cmsock->fd = fd->lower;
|
||||
cmsock->isUnix = PR_FALSE;
|
||||
|
||||
nsPSMSocketInfo *infoObject = (nsPSMSocketInfo *)fd->secret;
|
||||
|
||||
infoObject->GetHostName(&hostName);
|
||||
infoObject->SetControlPtr(control);
|
||||
infoObject->SetSocketPtr(cmsock);
|
||||
|
||||
status = CMT_OpenSSLConnection(control,
|
||||
cmsock,
|
||||
SSM_REQUEST_SSL_DATA_SSL,
|
||||
PR_ntohs(addr->inet.port),
|
||||
ipBuffer,
|
||||
(hostName ? hostName : ipBuffer),
|
||||
CM_FALSE,
|
||||
nsnull);
|
||||
if (CMTSuccess == status)
|
||||
{
|
||||
// since our stuff can block, what we want to do is return PR_FAILURE,
|
||||
// but set the nspr ERROR to BLOCK. This will put us into a select
|
||||
// q.
|
||||
PR_SetError(PR_WOULD_BLOCK_ERROR, status);
|
||||
return PR_FAILURE;
|
||||
}
|
||||
|
||||
return PR_FAILURE;
|
||||
}
|
||||
|
||||
/* CMT_DestroyDataConnection(ctrl, sock); */
|
||||
/* need to strip our layer, pass result to DestroyDataConnection */
|
||||
/* which will clean up the CMT accounting of sock, then call our */
|
||||
/* shim layer to translate back to NSPR */
|
||||
|
||||
static PRStatus PR_CALLBACK
|
||||
nsSSLIOLayerClose(PRFileDesc *fd)
|
||||
{
|
||||
nsPSMSocketInfo *infoObject = (nsPSMSocketInfo *)fd->secret;
|
||||
PRDescIdentity id = PR_GetLayersIdentity(fd);
|
||||
|
||||
if (infoObject && id == nsSSLIOLayerIdentity)
|
||||
{
|
||||
CMInt32 errorCode = PR_FAILURE;
|
||||
CMT_CONTROL* control;
|
||||
CMSocket* socket;
|
||||
|
||||
infoObject->GetControlPtr(&control);
|
||||
infoObject->GetSocketPtr(&socket);
|
||||
|
||||
if (((PRStatus) CMT_GetSSLDataErrorCode(control, socket, &errorCode)) == PR_SUCCESS)
|
||||
{
|
||||
CMT_DestroyDataConnection(control, socket);
|
||||
NS_RELEASE(infoObject);
|
||||
fd->identity = PR_INVALID_IO_LAYER;
|
||||
}
|
||||
return (PRStatus)errorCode;
|
||||
}
|
||||
|
||||
return PR_FAILURE;
|
||||
}
|
||||
|
||||
static PRInt32 PR_CALLBACK
|
||||
nsSSLIOLayerRead( PRFileDesc *fd, void *buf, PRInt32 amount)
|
||||
{
|
||||
if (!fd)
|
||||
return PR_FAILURE;
|
||||
|
||||
PRInt32 result = PR_Recv(fd, buf, amount, 0, PR_INTERVAL_MIN);
|
||||
|
||||
if (result > 0)
|
||||
return result;
|
||||
|
||||
if (result == -1)
|
||||
{
|
||||
PRErrorCode code = PR_GetError();
|
||||
|
||||
if (code == PR_IO_TIMEOUT_ERROR )
|
||||
PR_SetError(PR_WOULD_BLOCK_ERROR, PR_WOULD_BLOCK_ERROR);
|
||||
return PR_FAILURE;
|
||||
}
|
||||
|
||||
if (result == 0)
|
||||
{
|
||||
nsPSMSocketInfo *infoObject = (nsPSMSocketInfo *)fd->secret;
|
||||
PRDescIdentity id = PR_GetLayersIdentity(fd);
|
||||
|
||||
if (infoObject && id == nsSSLIOLayerIdentity)
|
||||
{
|
||||
CMInt32 errorCode = PR_FAILURE;
|
||||
|
||||
CMT_CONTROL* control;
|
||||
CMSocket* socket;
|
||||
|
||||
infoObject->GetControlPtr(&control);
|
||||
infoObject->GetSocketPtr(&socket);
|
||||
|
||||
CMT_GetSSLDataErrorCode(control, socket, &errorCode);
|
||||
|
||||
if (errorCode == PR_IO_TIMEOUT_ERROR)
|
||||
{
|
||||
PR_SetError(PR_WOULD_BLOCK_ERROR, PR_WOULD_BLOCK_ERROR);
|
||||
return PR_FAILURE;
|
||||
}
|
||||
|
||||
PR_SetError(0, 0);
|
||||
return errorCode;
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
static PRInt32 PR_CALLBACK
|
||||
nsSSLIOLayerWrite( PRFileDesc *fd, const void *buf, PRInt32 amount)
|
||||
{
|
||||
if (!fd)
|
||||
return PR_FAILURE;
|
||||
|
||||
PRInt32 result = PR_Send(fd, buf, amount, 0, PR_INTERVAL_MIN);
|
||||
|
||||
if (result > 0)
|
||||
return result;
|
||||
|
||||
if (result == -1)
|
||||
{
|
||||
PRErrorCode code = PR_GetError();
|
||||
|
||||
if (code == PR_IO_TIMEOUT_ERROR )
|
||||
PR_SetError(PR_WOULD_BLOCK_ERROR, PR_WOULD_BLOCK_ERROR);
|
||||
return PR_FAILURE;
|
||||
}
|
||||
|
||||
if (result == 0)
|
||||
{
|
||||
nsPSMSocketInfo *infoObject = (nsPSMSocketInfo *)fd->secret;
|
||||
PRDescIdentity id = PR_GetLayersIdentity(fd);
|
||||
|
||||
if (infoObject && id == nsSSLIOLayerIdentity)
|
||||
{
|
||||
CMInt32 errorCode = PR_FAILURE;
|
||||
CMT_CONTROL* control;
|
||||
CMSocket* socket;
|
||||
|
||||
infoObject->GetControlPtr(&control);
|
||||
infoObject->GetSocketPtr(&socket);
|
||||
|
||||
CMT_GetSSLDataErrorCode(control, socket, &errorCode);
|
||||
PR_SetError(0, 0);
|
||||
return errorCode;
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
|
||||
nsPSMSocketInfo::nsPSMSocketInfo()
|
||||
{
|
||||
NS_INIT_REFCNT();
|
||||
mControl = nsnull;
|
||||
mSocket = nsnull;
|
||||
}
|
||||
|
||||
nsPSMSocketInfo::~nsPSMSocketInfo()
|
||||
{
|
||||
}
|
||||
|
||||
NS_IMPL_THREADSAFE_ISUPPORTS1(nsPSMSocketInfo, nsIPSMSocketInfo);
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsPSMSocketInfo::GetControlPtr(CMT_CONTROL * *aControlPtr)
|
||||
{
|
||||
*aControlPtr = mControl;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
nsresult
|
||||
nsPSMSocketInfo::SetControlPtr(CMT_CONTROL *aControlPtr)
|
||||
{
|
||||
mControl = aControlPtr;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsPSMSocketInfo::GetSocketPtr(CMSocket * *socketPtr)
|
||||
{
|
||||
*socketPtr = mSocket;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
nsresult
|
||||
nsPSMSocketInfo::SetSocketPtr(CMSocket *socketPtr)
|
||||
{
|
||||
mSocket = socketPtr;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsPSMSocketInfo::GetFileDescPtr(PRFileDesc * *aFilePtr)
|
||||
{
|
||||
*aFilePtr = mFd;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
||||
nsresult
|
||||
nsPSMSocketInfo::SetFileDescPtr(PRFileDesc *aFilePtr)
|
||||
{
|
||||
mFd = aFilePtr;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsPSMSocketInfo::GetHostName(char * *aHostName)
|
||||
{
|
||||
*aHostName = mHostName.ToNewCString();
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
||||
nsresult
|
||||
nsPSMSocketInfo::SetHostName(char *aHostName)
|
||||
{
|
||||
mHostName.Assign(aHostName);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsPSMSocketInfo::GetPickledStatus(char * *pickledStatusString)
|
||||
{
|
||||
*pickledStatusString = nsnull;
|
||||
|
||||
if (mSocket && mControl)
|
||||
{
|
||||
long level;
|
||||
CMTItem pickledStatus = {0, nsnull, 0};
|
||||
unsigned char* ret = nsnull;
|
||||
|
||||
if (CMT_GetSSLSocketStatus(mControl, mSocket, &pickledStatus, &level) == PR_FAILURE)
|
||||
return nsnull;
|
||||
|
||||
ret = (unsigned char*) PR_Malloc( (SSMSTRING_PADDED_LENGTH(pickledStatus.len) + sizeof(int)) );
|
||||
if (!ret)
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
|
||||
*(int*)ret = pickledStatus.len;
|
||||
memcpy(ret+sizeof(int), pickledStatus.data, *(int*)ret);
|
||||
|
||||
PR_FREEIF(pickledStatus.data);
|
||||
|
||||
*pickledStatusString = (char*) ret;
|
||||
}
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
nsresult
|
||||
nsSSLIOLayerNewSocket(const char* hostName, PRFileDesc **fd, nsISupports** info)
|
||||
{
|
||||
static PRBool firstTime = PR_TRUE;
|
||||
if (firstTime)
|
||||
{
|
||||
nsSSLIOLayerIdentity = PR_GetUniqueIdentity("Cartman layer");
|
||||
nsSSLIOLayerMethods = *PR_GetDefaultIOMethods();
|
||||
|
||||
nsSSLIOLayerMethods.connect = nsSSLIOLayerConnect;
|
||||
nsSSLIOLayerMethods.close = nsSSLIOLayerClose;
|
||||
nsSSLIOLayerMethods.read = nsSSLIOLayerRead;
|
||||
nsSSLIOLayerMethods.write = nsSSLIOLayerWrite;
|
||||
firstTime = PR_FALSE;
|
||||
}
|
||||
|
||||
|
||||
PRFileDesc * sock;
|
||||
PRFileDesc * layer;
|
||||
PRStatus rv;
|
||||
|
||||
/* Get a normal NSPR socket */
|
||||
sock = PR_NewTCPSocket();
|
||||
if (! sock) return NS_ERROR_OUT_OF_MEMORY;
|
||||
|
||||
layer = PR_CreateIOLayerStub(nsSSLIOLayerIdentity, &nsSSLIOLayerMethods);
|
||||
if (! layer)
|
||||
{
|
||||
PR_Close(sock);
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
nsPSMSocketInfo *infoObject = new nsPSMSocketInfo();
|
||||
if (!infoObject)
|
||||
{
|
||||
PR_Close(sock);
|
||||
// clean up IOLayerStub.
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
NS_ADDREF(infoObject);
|
||||
infoObject->SetHostName((char*)hostName);
|
||||
layer->secret = (PRFilePrivate*) infoObject;
|
||||
rv = PR_PushIOLayer(sock, PR_GetLayersIdentity(sock), layer);
|
||||
|
||||
if (rv == PR_SUCCESS)
|
||||
{
|
||||
*fd = sock;
|
||||
*info = infoObject;
|
||||
NS_ADDREF(*info);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
PR_Close(sock);
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
37
mozilla/extensions/psm-glue/src/nsSSLIOLayer.h
Normal file
37
mozilla/extensions/psm-glue/src/nsSSLIOLayer.h
Normal file
@@ -0,0 +1,37 @@
|
||||
/* -*- 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):
|
||||
*/
|
||||
|
||||
#ifndef _NSSSLIOLAYER_H
|
||||
#define _NSSSLIOLAYER_H
|
||||
|
||||
#include "prtypes.h"
|
||||
#include "prio.h"
|
||||
#include "nsIPSMSocketInfo.h"
|
||||
|
||||
// define taken from 4.x cartman glue code.
|
||||
#define SSMSTRING_PADDED_LENGTH(x) ((((x)+3)/4)*4)
|
||||
|
||||
nsresult nsSSLIOLayerNewSocket(const char* hostName, PRFileDesc **fd, nsISupports **securityInfo);
|
||||
|
||||
|
||||
|
||||
#endif /* _NSSSLIOLAYER_H */
|
||||
83
mozilla/extensions/psm-glue/src/nsSSLSocketProvider.cpp
Normal file
83
mozilla/extensions/psm-glue/src/nsSSLSocketProvider.cpp
Normal file
@@ -0,0 +1,83 @@
|
||||
/* -*- 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):
|
||||
*/
|
||||
|
||||
#include "nsIComponentManager.h"
|
||||
#include "nsIServiceManager.h"
|
||||
#include "nsSSLSocketProvider.h"
|
||||
#include "nsSSLIOLayer.h"
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
nsSSLSocketProvider::nsSSLSocketProvider()
|
||||
{
|
||||
NS_INIT_REFCNT();
|
||||
}
|
||||
|
||||
nsresult
|
||||
nsSSLSocketProvider::Init()
|
||||
{
|
||||
nsresult rv = NS_OK;
|
||||
return rv;
|
||||
}
|
||||
|
||||
nsSSLSocketProvider::~nsSSLSocketProvider()
|
||||
{
|
||||
}
|
||||
|
||||
NS_IMPL_THREADSAFE_ISUPPORTS2(nsSSLSocketProvider, nsISocketProvider, nsISSLSocketProvider);
|
||||
|
||||
NS_METHOD
|
||||
nsSSLSocketProvider::Create(nsISupports *aOuter, REFNSIID aIID, void **aResult)
|
||||
{
|
||||
nsresult rv;
|
||||
|
||||
nsSSLSocketProvider * inst;
|
||||
|
||||
if (NULL == aResult) {
|
||||
rv = NS_ERROR_NULL_POINTER;
|
||||
return rv;
|
||||
}
|
||||
*aResult = NULL;
|
||||
if (NULL != aOuter) {
|
||||
rv = NS_ERROR_NO_AGGREGATION;
|
||||
return rv;
|
||||
}
|
||||
|
||||
NS_NEWXPCOM(inst, nsSSLSocketProvider);
|
||||
if (NULL == inst) {
|
||||
rv = NS_ERROR_OUT_OF_MEMORY;
|
||||
return rv;
|
||||
}
|
||||
NS_ADDREF(inst);
|
||||
rv = inst->QueryInterface(aIID, aResult);
|
||||
NS_RELEASE(inst);
|
||||
|
||||
return rv;
|
||||
}
|
||||
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsSSLSocketProvider::NewSocket(const char *hostName, PRFileDesc **_result, nsISupports **securityInfo)
|
||||
{
|
||||
nsresult rv = nsSSLIOLayerNewSocket(hostName, _result, securityInfo);
|
||||
return (NS_FAILED(rv)) ? NS_ERROR_SOCKET_CREATE_FAILED : NS_OK;
|
||||
}
|
||||
54
mozilla/extensions/psm-glue/src/nsSSLSocketProvider.h
Normal file
54
mozilla/extensions/psm-glue/src/nsSSLSocketProvider.h
Normal file
@@ -0,0 +1,54 @@
|
||||
/* -*- 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):
|
||||
*/
|
||||
|
||||
#ifndef _NSSSLSOCKETPROVIDER_H_
|
||||
#define _NSSSLSOCKETPROVIDER_H_
|
||||
|
||||
#include "nsISSLSocketProvider.h"
|
||||
|
||||
|
||||
/* 274418d0-5437-11d3-bbc8-0000861d1237 */
|
||||
#define NS_SSLSOCKETPROVIDER_CID { 0x274418d0, 0x5437, 0x11d3, {0xbb, 0xc8, 0x00, 0x00, 0x86, 0x1d, 0x12, 0x37}}
|
||||
|
||||
|
||||
class nsSSLSocketProvider : public nsISSLSocketProvider
|
||||
{
|
||||
public:
|
||||
NS_DECL_ISUPPORTS
|
||||
|
||||
NS_DECL_NSISOCKETPROVIDER
|
||||
|
||||
NS_DECL_NSISSLSOCKETPROVIDER
|
||||
|
||||
// nsSSLSocketProvider methods:
|
||||
nsSSLSocketProvider();
|
||||
virtual ~nsSSLSocketProvider();
|
||||
|
||||
static NS_METHOD
|
||||
Create(nsISupports *aOuter, REFNSIID aIID, void **aResult);
|
||||
|
||||
nsresult Init();
|
||||
|
||||
protected:
|
||||
};
|
||||
|
||||
#endif /* _NSSSLSOCKETPROVIDER_H_ */
|
||||
619
mozilla/extensions/psm-glue/src/nsSecureBrowserUIImpl.cpp
Normal file
619
mozilla/extensions/psm-glue/src/nsSecureBrowserUIImpl.cpp
Normal file
@@ -0,0 +1,619 @@
|
||||
/* -*- 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 "nspr.h"
|
||||
#include "prlog.h"
|
||||
|
||||
#include "nsISecureBrowserUI.h"
|
||||
#include "nsSecureBrowserUIImpl.h"
|
||||
#include "nsIPSMComponent.h"
|
||||
#include "nsPSMComponent.h"
|
||||
#include "nsCOMPtr.h"
|
||||
#include "nsIServiceManager.h"
|
||||
|
||||
#include "nsIScriptGlobalObject.h"
|
||||
#include "nsIObserverService.h"
|
||||
#include "nsIDocumentLoader.h"
|
||||
#include "nsCURILoader.h"
|
||||
#include "nsIDocShell.h"
|
||||
#include "nsIDocumentViewer.h"
|
||||
#include "nsCURILoader.h"
|
||||
#include "nsIDocument.h"
|
||||
#include "nsIDOMHTMLDocument.h"
|
||||
#include "nsIDOMXULDocument.h"
|
||||
#include "nsIDOMElement.h"
|
||||
#include "nsIDOMWindow.h"
|
||||
#include "nsIWebProgress.h"
|
||||
#include "nsIChannel.h"
|
||||
#include "nsIPSMSocketInfo.h"
|
||||
|
||||
#include "nsIURI.h"
|
||||
|
||||
#include "prmem.h"
|
||||
|
||||
#include "nsINetSupportDialogService.h"
|
||||
#include "nsIPrompt.h"
|
||||
#include "nsICommonDialogs.h"
|
||||
#include "nsIPref.h"
|
||||
|
||||
#include "nsIFormSubmitObserver.h"
|
||||
|
||||
static NS_DEFINE_CID(kCStringBundleServiceCID, NS_STRINGBUNDLESERVICE_CID);
|
||||
static NS_DEFINE_CID(kCommonDialogsCID, NS_CommonDialog_CID );
|
||||
static NS_DEFINE_CID(kPrefCID, NS_PREF_CID);
|
||||
|
||||
#define ENTER_SITE_PREF "security.warn_entering_secure"
|
||||
#define LEAVE_SITE_PREF "security.warn_leaving_secure"
|
||||
#define MIXEDCONTENT_PREF "security.warn_viewing_mixed"
|
||||
#define INSECURE_SUBMIT_PREF "security.warn_submit_insecure"
|
||||
|
||||
#if defined(PR_LOGGING)
|
||||
//
|
||||
// Log module for nsSecureBroswerUI logging...
|
||||
//
|
||||
// To enable logging (see prlog.h for full details):
|
||||
//
|
||||
// set NSPR_LOG_MODULES=nsSecureBroswerUI:5
|
||||
// set NSPR_LOG_FILE=nspr.log
|
||||
//
|
||||
// this enables PR_LOG_DEBUG level information and places all output in
|
||||
// the file nspr.log
|
||||
//
|
||||
PRLogModuleInfo* gSecureDocLog = nsnull;
|
||||
#endif /* PR_LOGGING */
|
||||
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsSecureBrowserUIImpl::Create(nsISupports *aOuter, REFNSIID aIID, void **aResult)
|
||||
{
|
||||
nsresult rv;
|
||||
|
||||
nsSecureBrowserUIImpl * inst;
|
||||
|
||||
if (NULL == aResult) {
|
||||
rv = NS_ERROR_NULL_POINTER;
|
||||
return rv;
|
||||
}
|
||||
*aResult = NULL;
|
||||
if (NULL != aOuter) {
|
||||
rv = NS_ERROR_NO_AGGREGATION;
|
||||
return rv;
|
||||
}
|
||||
|
||||
NS_NEWXPCOM(inst, nsSecureBrowserUIImpl);
|
||||
if (NULL == inst) {
|
||||
rv = NS_ERROR_OUT_OF_MEMORY;
|
||||
return rv;
|
||||
}
|
||||
NS_ADDREF(inst);
|
||||
rv = inst->QueryInterface(aIID, aResult);
|
||||
NS_RELEASE(inst);
|
||||
|
||||
return rv;
|
||||
}
|
||||
|
||||
nsSecureBrowserUIImpl::nsSecureBrowserUIImpl()
|
||||
{
|
||||
NS_INIT_REFCNT();
|
||||
|
||||
#if defined(PR_LOGGING)
|
||||
if (nsnull == gSecureDocLog) {
|
||||
gSecureDocLog = PR_NewLogModule("nsSecureBroswerUI");
|
||||
}
|
||||
#endif /* PR_LOGGING */
|
||||
|
||||
|
||||
mIsSecureDocument = mMixContentAlertShown = mIsDocumentBroken = PR_FALSE;
|
||||
mLastPSMStatus = nsnull;
|
||||
mCurrentURI = nsnull;
|
||||
mSecurityButton = nsnull;
|
||||
}
|
||||
|
||||
nsSecureBrowserUIImpl::~nsSecureBrowserUIImpl()
|
||||
{
|
||||
PR_FREEIF(mLastPSMStatus);
|
||||
}
|
||||
|
||||
NS_IMPL_ISUPPORTS4(nsSecureBrowserUIImpl,
|
||||
nsSecureBrowserUI,
|
||||
nsIWebProgressListener,
|
||||
nsIFormSubmitObserver,
|
||||
nsIObserver);
|
||||
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsSecureBrowserUIImpl::Init(nsIDOMWindow *window, nsIDOMElement *button)
|
||||
{
|
||||
mSecurityButton = button;
|
||||
mWindow = window;
|
||||
|
||||
nsresult rv = nsServiceManager::GetService( kPrefCID,
|
||||
NS_GET_IID(nsIPref),
|
||||
getter_AddRefs(mPref));
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
|
||||
NS_WITH_SERVICE(nsIStringBundleService, service, kCStringBundleServiceCID, &rv);
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
|
||||
nsILocale* locale = nsnull;
|
||||
rv = service->CreateBundle(SECURITY_STRING_BUNDLE_URL, locale, getter_AddRefs(mStringBundle));
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
|
||||
// hook up to the form post notifications:
|
||||
nsIObserverService *svc = 0;
|
||||
rv = nsServiceManager::GetService(NS_OBSERVERSERVICE_PROGID,
|
||||
NS_GET_IID(nsIObserverService),
|
||||
(nsISupports**)&svc );
|
||||
if ( NS_SUCCEEDED( rv ) && svc )
|
||||
{
|
||||
nsString topic; topic.AssignWithConversion(NS_FORMSUBMIT_SUBJECT);
|
||||
rv = svc->AddObserver( this, topic.GetUnicode());
|
||||
nsServiceManager::ReleaseService( NS_OBSERVERSERVICE_PROGID, svc );
|
||||
}
|
||||
|
||||
// hook up to the webprogress notifications.
|
||||
nsCOMPtr<nsIDocShell> docShell;
|
||||
|
||||
nsCOMPtr<nsIScriptGlobalObject> sgo = do_QueryInterface(window);
|
||||
if (!sgo) return NS_ERROR_NULL_POINTER;
|
||||
|
||||
sgo->GetDocShell(getter_AddRefs(docShell));
|
||||
if (!docShell) return NS_ERROR_NULL_POINTER;
|
||||
|
||||
nsCOMPtr<nsIWebProgress> wp = do_QueryInterface(docShell);
|
||||
if (!wp) return NS_ERROR_NULL_POINTER;
|
||||
|
||||
wp->AddProgressListener(NS_STATIC_CAST(nsIWebProgressListener*,this));
|
||||
|
||||
// Set up stuff the first time the window loads:
|
||||
docShell->GetCurrentURI(getter_AddRefs(mCurrentURI));
|
||||
|
||||
return IsURLHTTPS(mCurrentURI, &mIsSecureDocument);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsSecureBrowserUIImpl::DisplayPageInfoUI()
|
||||
{
|
||||
nsresult res;
|
||||
NS_WITH_SERVICE(nsIPSMComponent, psm, PSM_COMPONENT_PROGID, &res);
|
||||
if (NS_FAILED(res))
|
||||
return res;
|
||||
|
||||
nsXPIDLCString temp;
|
||||
mCurrentURI->GetHost(getter_Copies(temp));
|
||||
return psm->DisplaySecurityAdvisor(mLastPSMStatus, temp);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsSecureBrowserUIImpl::Observe(nsISupports*, const PRUnichar*, const PRUnichar*)
|
||||
{
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsSecureBrowserUIImpl::Notify(nsIContent* formNode, nsIDOMWindow* window, nsIURI* actionURL)
|
||||
{
|
||||
// Return NS_OK unless we want to prevent this form from submitting.
|
||||
if (!window || (mWindow.get() != window) || !actionURL) {
|
||||
return NS_OK;
|
||||
}
|
||||
PRBool okayToPost;
|
||||
nsresult res = CheckPost(actionURL, &okayToPost);
|
||||
|
||||
// Return NS_OK unless we want to prevent this form from submitting.
|
||||
if (NS_SUCCEEDED(res) && okayToPost)
|
||||
return NS_OK;
|
||||
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
// nsIWebProgressListener
|
||||
NS_IMETHODIMP
|
||||
nsSecureBrowserUIImpl::OnProgressChange(nsIChannel* aChannel,
|
||||
PRInt32 aCurSelfProgress,
|
||||
PRInt32 aMaxSelfProgress,
|
||||
PRInt32 aCurTotalProgress,
|
||||
PRInt32 aMaxTotalProgress)
|
||||
{
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsSecureBrowserUIImpl::OnChildProgressChange(nsIChannel* aChannel,
|
||||
PRInt32 aCurSelfProgress,
|
||||
PRInt32 aMaxSelfProgress)
|
||||
{
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsSecureBrowserUIImpl::OnStatusChange(nsIChannel* aChannel,
|
||||
PRInt32 aProgressStatusFlags)
|
||||
{
|
||||
nsresult res;
|
||||
|
||||
if (aChannel == nsnull || !mSecurityButton || !mPref)
|
||||
return NS_ERROR_NULL_POINTER;
|
||||
|
||||
nsCOMPtr<nsIURI> loadingURI;
|
||||
aChannel->GetURI(getter_AddRefs(loadingURI));
|
||||
|
||||
#if defined(DEBUG)
|
||||
nsXPIDLCString temp;
|
||||
loadingURI->GetSpec(getter_Copies(temp));
|
||||
PR_LOG(gSecureDocLog, PR_LOG_DEBUG, ("SecureUI:%p: OnStatusChange: %x :%s\n", this, aProgressStatusFlags,(const char*)temp));
|
||||
#endif
|
||||
|
||||
if (aProgressStatusFlags & nsIWebProgress::flag_net_start)
|
||||
{
|
||||
// starting to load a webpage
|
||||
PR_FREEIF(mLastPSMStatus); mLastPSMStatus = nsnull;
|
||||
|
||||
mIsSecureDocument = mMixContentAlertShown = mIsDocumentBroken = PR_FALSE;
|
||||
|
||||
res = CheckProtocolContextSwitch( loadingURI, mCurrentURI);
|
||||
|
||||
}
|
||||
else if ((aProgressStatusFlags & nsIWebProgress::flag_net_stop) && mIsSecureDocument)
|
||||
{
|
||||
if (!mIsDocumentBroken) // and status is okay FIX
|
||||
{
|
||||
// qi for the psm information about this channel load.
|
||||
nsCOMPtr<nsISupports> info;
|
||||
aChannel->GetSecurityInfo(getter_AddRefs(info));
|
||||
nsCOMPtr<nsIPSMSocketInfo> psmInfo = do_QueryInterface(info);
|
||||
if ( psmInfo )
|
||||
{
|
||||
// Everything looks okay. Lets stash the picked status.
|
||||
PR_FREEIF(mLastPSMStatus);
|
||||
res = psmInfo->GetPickledStatus(&mLastPSMStatus);
|
||||
|
||||
if (NS_SUCCEEDED(res))
|
||||
{
|
||||
PR_LOG(gSecureDocLog, PR_LOG_DEBUG, ("SecureUI:%p: Icon set to lock\n", this));
|
||||
res = mSecurityButton->SetAttribute( "level", nsString("high") );
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
PR_LOG(gSecureDocLog, PR_LOG_DEBUG, ("SecureUI:%p: Icon set to broken\n", this));
|
||||
mIsDocumentBroken = PR_TRUE;
|
||||
res = mSecurityButton->SetAttribute( "level", nsString("broken") );
|
||||
}
|
||||
}
|
||||
else // if (aProgressStatusFlags == nsIWebProgress::flag_net_redirecting)
|
||||
{
|
||||
res = NS_ERROR_NOT_IMPLEMENTED;
|
||||
// xxx need to fix.
|
||||
}
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsSecureBrowserUIImpl::OnChildStatusChange(nsIChannel* aChannel, PRInt32 aProgressStatusFlags)
|
||||
{
|
||||
nsresult rv;
|
||||
if (aChannel == nsnull || !mSecurityButton || !mPref)
|
||||
return NS_ERROR_NULL_POINTER;
|
||||
|
||||
nsCOMPtr<nsIURI> uri;
|
||||
rv = aChannel->GetURI(getter_AddRefs(uri));
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
|
||||
#if defined(DEBUG)
|
||||
nsXPIDLCString temp;
|
||||
uri->GetSpec(getter_Copies(temp));
|
||||
PR_LOG(gSecureDocLog, PR_LOG_DEBUG, ("SecureUI:%p: OnChildStatusChange: %x :%s\n", this, aProgressStatusFlags,(const char*)temp));
|
||||
#endif
|
||||
|
||||
// don't need to do anything more if the page is broken or not secure...
|
||||
|
||||
if (!mIsSecureDocument || mIsDocumentBroken)
|
||||
return NS_OK;
|
||||
|
||||
if (aProgressStatusFlags & nsIWebProgress::flag_net_start)
|
||||
{ // check to see if we are going to mix content.
|
||||
return CheckMixedContext(uri);
|
||||
}
|
||||
|
||||
if (aProgressStatusFlags & nsIWebProgress::flag_net_stop)
|
||||
{
|
||||
if (1) // FIX status from the flag...
|
||||
{
|
||||
nsCOMPtr<nsISupports> info;
|
||||
aChannel->GetSecurityInfo(getter_AddRefs(info));
|
||||
nsCOMPtr<nsIPSMSocketInfo> psmInfo = do_QueryInterface(info, &rv);
|
||||
|
||||
// qi for the psm information about this channel load.
|
||||
if ( psmInfo )
|
||||
{
|
||||
return NS_OK;
|
||||
}
|
||||
}
|
||||
|
||||
PR_LOG(gSecureDocLog, PR_LOG_DEBUG, ("SecureUI:%p: OnChildStatusChange - Icon set to broken\n", this));
|
||||
mSecurityButton->SetAttribute( "level", nsString("broken") );
|
||||
mIsDocumentBroken = PR_TRUE;
|
||||
}
|
||||
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsSecureBrowserUIImpl::OnLocationChange(nsIURI* aLocation)
|
||||
{
|
||||
mCurrentURI = aLocation;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
||||
nsresult
|
||||
nsSecureBrowserUIImpl::IsURLHTTPS(nsIURI* aURL, PRBool* value)
|
||||
{
|
||||
*value = PR_FALSE;
|
||||
|
||||
if (!aURL)
|
||||
return NS_OK;
|
||||
|
||||
char* scheme;
|
||||
aURL->GetScheme(&scheme);
|
||||
|
||||
if (scheme == nsnull)
|
||||
return NS_ERROR_NULL_POINTER;
|
||||
|
||||
if ( PL_strncasecmp(scheme, "https", 5) == 0 )
|
||||
*value = PR_TRUE;
|
||||
|
||||
nsAllocator::Free(scheme);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
||||
|
||||
void nsSecureBrowserUIImpl::GetBundleString(const nsString& name, nsString &outString)
|
||||
{
|
||||
if (mStringBundle && name.Length() > 0)
|
||||
{
|
||||
PRUnichar *ptrv = nsnull;
|
||||
if (NS_SUCCEEDED(mStringBundle->GetStringFromName(name.GetUnicode(), &ptrv)))
|
||||
outString = ptrv;
|
||||
else
|
||||
outString = "";
|
||||
|
||||
nsAllocator::Free(ptrv);
|
||||
}
|
||||
else
|
||||
{
|
||||
outString = "";
|
||||
}
|
||||
}
|
||||
|
||||
nsresult
|
||||
nsSecureBrowserUIImpl::CheckProtocolContextSwitch( nsIURI* newURI, nsIURI* oldURI)
|
||||
{
|
||||
nsresult res;
|
||||
PRBool isNewSchemeSecure, isOldSchemeSecure, boolpref;
|
||||
|
||||
res = IsURLHTTPS(oldURI, &isOldSchemeSecure);
|
||||
if (NS_FAILED(res))
|
||||
return res;
|
||||
res = IsURLHTTPS(newURI, &isNewSchemeSecure);
|
||||
if (NS_FAILED(res))
|
||||
return res;
|
||||
|
||||
// Check to see if we are going from a secure page to and insecure page
|
||||
if ( !isNewSchemeSecure && isOldSchemeSecure)
|
||||
{
|
||||
mSecurityButton->RemoveAttribute( "level" );
|
||||
|
||||
if ((mPref->GetBoolPref(LEAVE_SITE_PREF, &boolpref) != 0))
|
||||
boolpref = PR_TRUE;
|
||||
|
||||
if (boolpref)
|
||||
{
|
||||
NS_WITH_SERVICE(nsICommonDialogs, dialog, kCommonDialogsCID, &res);
|
||||
if (NS_FAILED(res))
|
||||
return res;
|
||||
|
||||
nsAutoString windowTitle, message, dontShowAgain;
|
||||
|
||||
GetBundleString("Title", windowTitle);
|
||||
GetBundleString("LeaveSiteMessage", message);
|
||||
GetBundleString("DontShowAgain", dontShowAgain);
|
||||
|
||||
PRBool outCheckValue = PR_TRUE;
|
||||
dialog->AlertCheck(mWindow,
|
||||
windowTitle.GetUnicode(),
|
||||
message.GetUnicode(),
|
||||
dontShowAgain.GetUnicode(),
|
||||
&outCheckValue);
|
||||
|
||||
if (!outCheckValue)
|
||||
{
|
||||
mPref->SetBoolPref(LEAVE_SITE_PREF, PR_FALSE);
|
||||
NS_WITH_SERVICE(nsIPSMComponent, psm, PSM_COMPONENT_PROGID, &res);
|
||||
if (NS_FAILED(res))
|
||||
return res;
|
||||
psm->PassPrefs();
|
||||
}
|
||||
}
|
||||
}
|
||||
// check to see if we are going from an insecure page to a secure one.
|
||||
else if (isNewSchemeSecure && !isOldSchemeSecure)
|
||||
{
|
||||
|
||||
if ((mPref->GetBoolPref(ENTER_SITE_PREF, &boolpref) != 0))
|
||||
boolpref = PR_TRUE;
|
||||
|
||||
if (boolpref)
|
||||
{
|
||||
NS_WITH_SERVICE(nsICommonDialogs, dialog, kCommonDialogsCID, &res);
|
||||
if (NS_FAILED(res))
|
||||
return res;
|
||||
|
||||
nsAutoString windowTitle, message, dontShowAgain;
|
||||
|
||||
GetBundleString("Title", windowTitle);
|
||||
GetBundleString("EnterSiteMessage", message);
|
||||
GetBundleString("DontShowAgain", dontShowAgain);
|
||||
|
||||
PRBool outCheckValue = PR_TRUE;
|
||||
dialog->AlertCheck(mWindow,
|
||||
windowTitle.GetUnicode(),
|
||||
message.GetUnicode(),
|
||||
dontShowAgain.GetUnicode(),
|
||||
&outCheckValue);
|
||||
|
||||
if (!outCheckValue)
|
||||
{
|
||||
mPref->SetBoolPref(ENTER_SITE_PREF, PR_FALSE);
|
||||
NS_WITH_SERVICE(nsIPSMComponent, psm, PSM_COMPONENT_PROGID, &res);
|
||||
if (NS_FAILED(res))
|
||||
return res;
|
||||
psm->PassPrefs();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
mIsSecureDocument = isNewSchemeSecure;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
||||
nsresult
|
||||
nsSecureBrowserUIImpl::CheckMixedContext(nsIURI* nextURI)
|
||||
{
|
||||
PRBool secure;
|
||||
|
||||
nsresult rv = IsURLHTTPS(nextURI, &secure);
|
||||
if (NS_FAILED(rv))
|
||||
return rv;
|
||||
|
||||
if (!secure && mIsSecureDocument)
|
||||
{
|
||||
mIsDocumentBroken = PR_TRUE;
|
||||
mSecurityButton->SetAttribute( "level", nsString("broken") );
|
||||
|
||||
if (!mPref) return NS_ERROR_NULL_POINTER;
|
||||
|
||||
PRBool boolpref;
|
||||
if ((mPref->GetBoolPref(MIXEDCONTENT_PREF, &boolpref) != 0))
|
||||
boolpref = PR_TRUE;
|
||||
|
||||
if (boolpref && !mMixContentAlertShown)
|
||||
{
|
||||
NS_WITH_SERVICE(nsICommonDialogs, dialog, kCommonDialogsCID, &rv);
|
||||
if (NS_FAILED(rv))
|
||||
return rv;
|
||||
|
||||
nsAutoString windowTitle, message, dontShowAgain;
|
||||
|
||||
GetBundleString("Title", windowTitle);
|
||||
GetBundleString("MixedContentMessage", message);
|
||||
GetBundleString("DontShowAgain", dontShowAgain);
|
||||
|
||||
PRBool outCheckValue = PR_TRUE;
|
||||
|
||||
dialog->AlertCheck(mWindow,
|
||||
windowTitle.GetUnicode(),
|
||||
message.GetUnicode(),
|
||||
dontShowAgain.GetUnicode(),
|
||||
&outCheckValue);
|
||||
|
||||
if (!outCheckValue)
|
||||
{
|
||||
mPref->SetBoolPref(MIXEDCONTENT_PREF, PR_FALSE);
|
||||
NS_WITH_SERVICE(nsIPSMComponent, psm, PSM_COMPONENT_PROGID, &rv);
|
||||
if (NS_FAILED(rv))
|
||||
return rv;
|
||||
psm->PassPrefs();
|
||||
}
|
||||
|
||||
|
||||
mMixContentAlertShown = PR_TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
nsresult
|
||||
nsSecureBrowserUIImpl::CheckPost(nsIURI *actionURL, PRBool *okayToPost)
|
||||
{
|
||||
PRBool secure;
|
||||
|
||||
nsresult rv = IsURLHTTPS(actionURL, &secure);
|
||||
if (NS_FAILED(rv))
|
||||
return rv;
|
||||
|
||||
if (!secure && mIsSecureDocument)
|
||||
{
|
||||
PRBool boolpref;
|
||||
|
||||
// posting to a non https URL.
|
||||
if ((mPref->GetBoolPref(INSECURE_SUBMIT_PREF, &boolpref) != 0))
|
||||
boolpref = PR_TRUE;
|
||||
|
||||
if (boolpref)
|
||||
{
|
||||
NS_WITH_SERVICE(nsICommonDialogs, dialog, kCommonDialogsCID, &rv);
|
||||
if (NS_FAILED(rv))
|
||||
return rv;
|
||||
|
||||
nsAutoString windowTitle, message, dontShowAgain;
|
||||
|
||||
GetBundleString("Title", windowTitle);
|
||||
GetBundleString("PostToInsecure", message);
|
||||
GetBundleString("DontShowAgain", dontShowAgain);
|
||||
|
||||
PRBool outCheckValue = PR_TRUE;
|
||||
dialog->ConfirmCheck(mWindow,
|
||||
windowTitle.GetUnicode(),
|
||||
message.GetUnicode(),
|
||||
dontShowAgain.GetUnicode(),
|
||||
&outCheckValue,
|
||||
okayToPost);
|
||||
|
||||
if (!outCheckValue)
|
||||
{
|
||||
mPref->SetBoolPref(INSECURE_SUBMIT_PREF, PR_FALSE);
|
||||
NS_WITH_SERVICE(nsIPSMComponent, psm, PSM_COMPONENT_PROGID, &rv);
|
||||
if (NS_FAILED(rv))
|
||||
return rv;
|
||||
psm->PassPrefs();
|
||||
}
|
||||
}
|
||||
}
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
||||
|
||||
99
mozilla/extensions/psm-glue/src/nsSecureBrowserUIImpl.h
Normal file
99
mozilla/extensions/psm-glue/src/nsSecureBrowserUIImpl.h
Normal file
@@ -0,0 +1,99 @@
|
||||
/* -*- 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>
|
||||
*/
|
||||
|
||||
#ifndef nsSecureBrowserUIImpl_h_
|
||||
#define nsSecureBrowserUIImpl_h_
|
||||
|
||||
#include "nsCOMPtr.h"
|
||||
#include "nsXPIDLString.h"
|
||||
#include "nsString.h"
|
||||
#include "nsIObserver.h"
|
||||
#include "nsIDocumentLoaderObserver.h"
|
||||
#include "nsIDOMElement.h"
|
||||
#include "nsIDOMWindow.h"
|
||||
#include "nsIStringBundle.h"
|
||||
#include "nsISecureBrowserUI.h"
|
||||
#include "nsIDocShell.h"
|
||||
#include "nsIPref.h"
|
||||
#include "nsIWebProgressListener.h"
|
||||
#include "nsIFormSubmitObserver.h"
|
||||
#include "nsIURI.h"
|
||||
|
||||
#define NS_SECURE_BROWSER_DOCOBSERVER_CLASSNAME "Mozilla Secure Browser Doc Observer"
|
||||
|
||||
#define NS_SECURE_BROWSER_DOCOBSERVER_CID \
|
||||
{0x97c06c30, 0xa145, 0x11d3, \
|
||||
{0x8c, 0x7c, 0x00, 0x60, 0x97, 0x92, 0x27, 0x8c}}
|
||||
|
||||
#define NS_SECURE_BROWSER_DOCOBSERVER_PROGID "component://netscape/secure_browser_docobserver"
|
||||
|
||||
|
||||
class nsSecureBrowserUIImpl : public nsSecureBrowserUI,
|
||||
public nsIWebProgressListener,
|
||||
public nsIFormSubmitObserver,
|
||||
public nsIObserver
|
||||
{
|
||||
public:
|
||||
|
||||
nsSecureBrowserUIImpl();
|
||||
virtual ~nsSecureBrowserUIImpl();
|
||||
|
||||
static NS_METHOD Create(nsISupports *aOuter, REFNSIID aIID, void **aResult);
|
||||
|
||||
NS_DECL_ISUPPORTS
|
||||
NS_DECL_NSIWEBPROGRESSLISTENER
|
||||
NS_DECL_NSSECUREBROWSERUI
|
||||
|
||||
|
||||
// nsIObserver
|
||||
NS_DECL_NSIOBSERVER
|
||||
NS_IMETHOD Notify(nsIContent* formNode, nsIDOMWindow* window, nsIURI *actionURL);
|
||||
|
||||
protected:
|
||||
|
||||
nsCOMPtr<nsIDOMWindow> mWindow;
|
||||
nsCOMPtr<nsIDOMElement> mSecurityButton;
|
||||
nsCOMPtr<nsIDocumentLoaderObserver> mOldWebShellObserver;
|
||||
nsCOMPtr<nsIPref> mPref;
|
||||
nsCOMPtr<nsIStringBundle> mStringBundle;
|
||||
|
||||
nsCOMPtr<nsIURI> mCurrentURI;
|
||||
|
||||
PRBool mIsSecureDocument; // is https loaded
|
||||
PRBool mIsDocumentBroken; //
|
||||
PRBool mMixContentAlertShown;
|
||||
|
||||
char* mLastPSMStatus;
|
||||
|
||||
|
||||
void GetBundleString(const nsString& name, nsString &outString);
|
||||
|
||||
nsresult CheckProtocolContextSwitch( nsIURI* newURI, nsIURI* oldURI);
|
||||
nsresult CheckMixedContext(nsIURI* nextURI);
|
||||
nsresult CheckPost(nsIURI *actionURL, PRBool *okayToPost);
|
||||
nsresult IsURLHTTPS(nsIURI* aURL, PRBool *value);
|
||||
};
|
||||
|
||||
|
||||
#endif /* nsSecureBrowserUIImpl_h_ */
|
||||
@@ -1,26 +0,0 @@
|
||||
#
|
||||
## hostname: fx-linux-tbox
|
||||
## uname: Linux fx-linux-tbox.build.mozilla.org 2.6.18-8.el5 #1 SMP Thu Mar 15 19:57:35 EDT 2007 i686 i686 i386 GNU/Linux
|
||||
#
|
||||
|
||||
export CFLAGS="-gstabs+"
|
||||
export CXXFLAGS="-gstabs+"
|
||||
|
||||
mk_add_options MOZ_CO_PROJECT=browser
|
||||
mk_add_options PROFILE_GEN_SCRIPT=@TOPSRCDIR@/build/profile_pageloader.pl
|
||||
mk_add_options MOZ_CO_MODULE="mozilla/tools/update-packaging"
|
||||
mk_add_options MOZ_MAKE_FLAGS="-j1"
|
||||
|
||||
ac_add_options --enable-application=browser
|
||||
ac_add_options --enable-update-channel=release
|
||||
ac_add_options --enable-update-packaging
|
||||
|
||||
# Don't add explicit optimize flags here, set them in configure.in, see bug 407794.
|
||||
ac_add_options --enable-optimize
|
||||
ac_add_options --disable-debug
|
||||
ac_add_options --disable-tests
|
||||
|
||||
ac_add_options --enable-official-branding
|
||||
|
||||
CC=/tools/gcc/bin/gcc
|
||||
CXX=/tools/gcc/bin/g++
|
||||
@@ -1,268 +0,0 @@
|
||||
#
|
||||
## hostname: fx-linux-tbox
|
||||
## uname: Linux fx-linux-tbox.build.mozilla.org 2.6.18-8.el5 #1 SMP Thu Mar 15 19:57:35 EDT 2007 i686 i686 i386 GNU/Linux
|
||||
#
|
||||
|
||||
#- tinder-config.pl - Tinderbox configuration file.
|
||||
#- Uncomment the variables you need to set.
|
||||
#- The default values are the same as the commented variables.
|
||||
|
||||
$ENV{CVS_RSH} = "ssh";
|
||||
$ENV{MOZ_CRASHREPORTER_NO_REPORT} = '1';
|
||||
|
||||
# To ensure Talkback client builds properly on some Linux boxen where LANG
|
||||
# is set to "en_US.UTF-8" by default, override that setting here by setting
|
||||
# it to "en_US.iso885915" (the setting on ocean). Proper fix is to update
|
||||
# where xrestool is called in the build system so that 'LANG=C' in its
|
||||
# environment, according to bryner.
|
||||
$ENV{LANG} = "en_US.iso885915";
|
||||
|
||||
# $ENV{MOZ_PACKAGE_MSI}
|
||||
#-----------------------------------------------------------------------------
|
||||
# Default: 0
|
||||
# Values: 0 | 1
|
||||
# Purpose: Controls whether a MSI package is made.
|
||||
# Requires: Windows and a local MakeMSI installation.
|
||||
#$ENV{MOZ_PACKAGE_MSI} = 0;
|
||||
|
||||
# $ENV{MOZ_SYMBOLS_TRANSFER_TYPE}
|
||||
#-----------------------------------------------------------------------------
|
||||
# Default: scp
|
||||
# Values: scp | rsync
|
||||
# Purpose: Use scp or rsync to transfer symbols to the Talkback server.
|
||||
# Requires: The selected type requires the command be available both locally
|
||||
# and on the Talkback server.
|
||||
#$ENV{MOZ_SYMBOLS_TRANSFER_TYPE} = "scp";
|
||||
|
||||
#- PLEASE FILL THIS IN WITH YOUR PROPER EMAIL ADDRESS
|
||||
$BuildAdministrator = 'build@mozilla.org';
|
||||
#$BuildAdministrator = "$ENV{USER}\@$ENV{HOST}";
|
||||
#$BuildAdministrator = ($ENV{USER} || "cltbld") . "\@" . ($ENV{HOST} || "dhcp");
|
||||
|
||||
#- You'll need to change these to suit your machine's needs
|
||||
$DisplayServer = ':0.0';
|
||||
|
||||
#- Default values of command-line opts
|
||||
#-
|
||||
#$BuildDepend = 1; # Depend or Clobber
|
||||
#$BuildDebug = 0; # Debug or Opt (Darwin)
|
||||
#$ReportStatus = 1; # Send results to server, or not
|
||||
#$ReportFinalStatus = 1; # Finer control over $ReportStatus.
|
||||
$UseTimeStamp = 0; # Use the CVS 'pull-by-timestamp' option, or not
|
||||
#$BuildOnce = 0; # Build once, don't send results to server
|
||||
#$TestOnly = 0; # Only run tests, don't pull/build
|
||||
#$BuildEmbed = 0; # After building seamonkey, go build embed app.
|
||||
#$SkipMozilla = 0; # Use to debug post-mozilla.pl scripts.
|
||||
#$BuildLocales = 0; # Do l10n packaging?
|
||||
|
||||
# Tests
|
||||
$CleanProfile = 1;
|
||||
#$ResetHomeDirForTests = 1;
|
||||
$ProductName = "Firefox";
|
||||
$VendorName = 'Mozilla';
|
||||
|
||||
$RunMozillaTests = 1; # Allow turning off of all tests if needed.
|
||||
$RegxpcomTest = 1;
|
||||
$AliveTest = 1;
|
||||
#$JavaTest = 0;
|
||||
#$ViewerTest = 0;
|
||||
#$BloatTest = 0; # warren memory bloat test
|
||||
#$BloatTest2 = 0; # dbaron memory bloat test, require tracemalloc
|
||||
#$DomToTextConversionTest = 0;
|
||||
#$XpcomGlueTest = 0;
|
||||
$CodesizeTest = 0; # Z, require mozilla/tools/codesighs
|
||||
$EmbedCodesizeTest = 0; # mZ, require mozilla/tools/codesigns
|
||||
#$MailBloatTest = 0;
|
||||
#$EmbedTest = 0; # Assumes you wanted $BuildEmbed=1
|
||||
$LayoutPerformanceTest = 0; # Tp
|
||||
$DHTMLPerformanceTest = 0; # Tdhtml
|
||||
#$QATest = 0;
|
||||
#$XULWindowOpenTest = 0; # Txul
|
||||
$StartupPerformanceTest = 0; # Ts
|
||||
|
||||
$TestsPhoneHome = 0; # Should test report back to server?
|
||||
$GraphNameOverride = 'fx-linux-tbox';
|
||||
|
||||
# $results_server
|
||||
#----------------------------------------------------------------------------
|
||||
# Server on which test results will be accessible. This was originally tegu,
|
||||
# then became axolotl. Once we moved services from axolotl, it was time
|
||||
# to give this service its own hostname to make future transitions easier.
|
||||
# - cmp@mozilla.org
|
||||
#$results_server = "build-graphs.mozilla.org";
|
||||
|
||||
#$pageload_server = "spider"; # localhost
|
||||
$pageload_server = "pageload.build.mozilla.org";
|
||||
|
||||
|
||||
#
|
||||
# Timeouts, values are in seconds.
|
||||
#
|
||||
#$CVSCheckoutTimeout = 3600;
|
||||
#$CreateProfileTimeout = 45;
|
||||
#$RegxpcomTestTimeout = 120;
|
||||
|
||||
#$AliveTestTimeout = 45;
|
||||
#$ViewerTestTimeout = 45;
|
||||
#$EmbedTestTimeout = 45;
|
||||
#$BloatTestTimeout = 120; # seconds
|
||||
#$MailBloatTestTimeout = 120; # seconds
|
||||
#$JavaTestTimeout = 45;
|
||||
#$DomTestTimeout = 45; # seconds
|
||||
#$XpcomGlueTestTimeout = 15;
|
||||
#$CodesizeTestTimeout = 900; # seconds
|
||||
#$CodesizeTestType = "auto"; # {"auto"|"base"}
|
||||
#$LayoutPerformanceTestTimeout = 1200; # entire test, seconds
|
||||
#$DHTMLPerformanceTestTimeout = 1200; # entire test, seconds
|
||||
#$QATestTimeout = 1200; # entire test, seconds
|
||||
#$LayoutPerformanceTestPageTimeout = 30000; # each page, ms
|
||||
#$StartupPerformanceTestTimeout = 15; # seconds
|
||||
#$XULWindowOpenTestTimeout = 150; # seconds
|
||||
|
||||
|
||||
#$MozConfigFileName = 'mozconfig';
|
||||
|
||||
#$UseMozillaProfile = 1;
|
||||
#$MozProfileName = 'default';
|
||||
|
||||
#- Set these to what makes sense for your system
|
||||
#$Make = 'gmake'; # Must be GNU make
|
||||
#$MakeOverrides = '';
|
||||
#$mail = '/bin/mail';
|
||||
#$CVS = 'cvs -q';
|
||||
#$CVSCO = 'checkout -P';
|
||||
|
||||
# win32 usually doesn't have /bin/mail
|
||||
#$blat = 'c:/nstools/bin/blat';
|
||||
#$use_blat = 0;
|
||||
|
||||
# Set moz_cvsroot to something like:
|
||||
# :pserver:$ENV{USER}%netscape.com\@cvs.mozilla.org:/cvsroot
|
||||
# :pserver:anonymous\@cvs-mirror.mozilla.org:/cvsroot
|
||||
#
|
||||
# Note that win32 may not need \@, depends on ' or ".
|
||||
# :pserver:$ENV{USER}%netscape.com@cvs.mozilla.org:/cvsroot
|
||||
|
||||
#$moz_cvsroot = $ENV{CVSROOT};
|
||||
# CONFIG: $moz_cvsroot = '%mozillaCvsroot%';
|
||||
$moz_cvsroot = 'cltbld@cvs.mozilla.org:/cvsroot';
|
||||
|
||||
#- Set these proper values for your tinderbox server
|
||||
#$Tinderbox_server = 'tinderbox-daemon@tinderbox.mozilla.org';
|
||||
|
||||
# Allow for non-client builds, e.g. camino.
|
||||
#$moz_client_mk = 'client.mk';
|
||||
|
||||
#- Set if you want to build in a separate object tree
|
||||
$ObjDir = 'obj-fx-trunk';
|
||||
|
||||
# Extra build name, if needed.
|
||||
$BuildNameExtra = 'Release';
|
||||
|
||||
# User comment, eg. ip address for dhcp builds.
|
||||
# ex: $UserComment = "ip = 208.12.36.108";
|
||||
#$UserComment = 0;
|
||||
|
||||
#-
|
||||
#- The rest should not need to be changed
|
||||
#-
|
||||
|
||||
#- Minimum wait period from start of build to start of next build in minutes.
|
||||
#$BuildSleep = 10;
|
||||
|
||||
#- Until you get the script working. When it works,
|
||||
#- change to the tree you're actually building
|
||||
# CONFIG: $BuildTree = '%buildTree%';
|
||||
$BuildTree = 'MozillaRelease';
|
||||
|
||||
#$BuildName = '';
|
||||
# CONFIG: $BuildTag = '%productTag%_RELEASE';
|
||||
$BuildTag = 'FIREFOX_3_0_19_RELEASE';
|
||||
#$BuildConfigDir = 'mozilla/config';
|
||||
#$Topsrcdir = 'mozilla';
|
||||
|
||||
$BinaryName = 'firefox-bin';
|
||||
|
||||
#
|
||||
# For embedding app, use:
|
||||
#$EmbedBinaryName = 'TestGtkEmbed';
|
||||
#$EmbedDistDir = 'dist/bin'
|
||||
|
||||
|
||||
#$ShellOverride = ''; # Only used if the default shell is too stupid
|
||||
#$ConfigureArgs = '';
|
||||
#$ConfigureEnvArgs = '';
|
||||
#$Compiler = 'gcc';
|
||||
#$NSPRArgs = '';
|
||||
#$ShellOverride = '';
|
||||
|
||||
# Release build options
|
||||
$ReleaseBuild = 1;
|
||||
$shiptalkback = 0;
|
||||
$ReleaseToLatest = 0; # Push the release to latest-<milestone>?
|
||||
$ReleaseToDated = 1; # Push the release to YYYY-MM-DD-HH-<milestone>?
|
||||
$build_hour = 4;
|
||||
$package_creation_path = "/browser/installer";
|
||||
# needs setting for mac + talkback: $mac_bundle_path = "/browser/app";
|
||||
$ssh_version = "2";
|
||||
# CONFIG: $ssh_user = "%sshUser%";
|
||||
$ssh_user = "cltbld";
|
||||
# CONFIG: $ssh_server = "%sshServer%";
|
||||
$ssh_server = "stage-old.mozilla.org";
|
||||
$ftp_path = "/home/ftp/pub/firefox/nightly";
|
||||
$url_path = "http://ftp.mozilla.org/pub/mozilla.org/firefox/nightly";
|
||||
$tbox_ftp_path = "/home/ftp/pub/firefox/tinderbox-builds";
|
||||
$tbox_url_path = "http://ftp.mozilla.org/pub/mozilla.org/firefox/tinderbox-builds";
|
||||
# CONFIG: $milestone = "firefox%version%";
|
||||
$milestone = "firefox3.0.19";
|
||||
$notify_list = 'build-announce@mozilla.org';
|
||||
$stub_installer = 0;
|
||||
$sea_installer = 0;
|
||||
$archive = 1;
|
||||
$push_raw_xpis = 0;
|
||||
$update_pushinfo = 0;
|
||||
$update_package = 1;
|
||||
$update_product = "Firefox";
|
||||
$update_version = "trunk";
|
||||
$update_platform = "Linux_x86-gcc3";
|
||||
$update_hash = "sha1";
|
||||
$update_filehost = 'ftp.mozilla.org';
|
||||
$update_ver_file = 'browser/config/version.txt';
|
||||
$crashreporter_buildsymbols = 1;
|
||||
$crashreporter_pushsymbols = 1;
|
||||
# CONFIG: $ENV{'SYMBOL_SERVER_HOST'} = '%symbolServer%';
|
||||
$ENV{'SYMBOL_SERVER_HOST'} = 'dm-symbolpush01.mozilla.org';
|
||||
# CONFIG: $ENV{'SYMBOL_SERVER_USER'} = '%symbolServerUser%';
|
||||
$ENV{'SYMBOL_SERVER_USER'} = 'ffxbld';
|
||||
# CONFIG: $ENV{'SYMBOL_SERVER_PATH'} = '%symbolServerPath%';
|
||||
$ENV{'SYMBOL_SERVER_PATH'} = '/mnt/netapp/breakpad/symbols_ffx';
|
||||
# CONFIG: $ENV{'SYMBOL_SERVER_SSH_KEY'} = '%symbolServerKey%';
|
||||
$ENV{'SYMBOL_SERVER_SSH_KEY'} = '/home/cltbld/.ssh/ffxbld_dsa';
|
||||
|
||||
# Reboot the OS at the end of build-and-test cycle. This is primarily
|
||||
# intended for Win9x, which can't last more than a few cycles before
|
||||
# locking up (and testing would be suspect even after a couple of cycles).
|
||||
# Right now, there is only code to force the reboot for Win9x, so even
|
||||
# setting this to 1, will not have an effect on other platforms. Setting
|
||||
# up win9x to automatically logon and begin running tinderbox is left
|
||||
# as an exercise to the reader.
|
||||
#$RebootSystem = 0;
|
||||
|
||||
# LogCompression specifies the type of compression used on the log file.
|
||||
# Valid options are 'gzip', and 'bzip2'. Please make sure the binaries
|
||||
# for 'gzip' or 'bzip2' are in the user's path before setting this
|
||||
# option.
|
||||
#$LogCompression = '';
|
||||
|
||||
# LogEncoding specifies the encoding format used for the logs. Valid
|
||||
# options are 'base64', and 'uuencode'. If $LogCompression is set above,
|
||||
# this needs to be set to 'base64' or 'uuencode' to ensure that the
|
||||
# binary data is transferred properly.
|
||||
#$LogEncoding = '';
|
||||
|
||||
# Prevent Extension Manager from spawning child processes during tests
|
||||
# - processes that tbox scripts cannot kill.
|
||||
#$ENV{NO_EM_RESTART} = '1';
|
||||
|
||||
# Do not build XForms
|
||||
$BuildXForms = 0;
|
||||
@@ -1,26 +0,0 @@
|
||||
#
|
||||
## hostname: bm-xserve08.build.mozilla.org
|
||||
## uname: Darwin bm-xserve08.build.mozilla.org 8.8.4 Darwin Kernel Version 8.8.4: Sun Oct 29 15:26:54 PST 2006; root:xnu-792.16.4.obj~1/RELEASE_I386 i386 i386
|
||||
#
|
||||
|
||||
# symbols for breakpad
|
||||
export CFLAGS="-g -gfull"
|
||||
export CXXFLAGS="-g -gfull"
|
||||
|
||||
. $topsrcdir/build/macosx/universal/mozconfig
|
||||
|
||||
mk_add_options MOZ_MAKE_FLAGS="-j1"
|
||||
mk_add_options MOZ_CO_MODULE="mozilla/tools/update-packaging"
|
||||
mk_add_options MOZ_CO_PROJECT="browser"
|
||||
mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/../build/universal
|
||||
|
||||
ac_add_options --enable-application=browser
|
||||
ac_add_options --enable-update-channel=release
|
||||
# Don't add explicit optimize flags here, set them in configure.in, see bug 407794.
|
||||
ac_add_options --enable-optimize
|
||||
ac_add_options --disable-debug
|
||||
ac_add_options --disable-tests
|
||||
ac_add_options --enable-update-packaging
|
||||
|
||||
ac_add_options --enable-official-branding
|
||||
ac_add_app_options ppc --enable-prebinding
|
||||
@@ -1,267 +0,0 @@
|
||||
#
|
||||
## hostname: bm-xserve08.build.mozilla.org
|
||||
## uname: Darwin bm-xserve08.build.mozilla.org 8.8.4 Darwin Kernel Version 8.8.4: Sun Oct 29 15:26:54 PST 2006; root:xnu-792.16.4.obj~1/RELEASE_I386 i386 i386
|
||||
#
|
||||
|
||||
#- tinder-config.pl - Tinderbox configuration file.
|
||||
#- Uncomment the variables you need to set.
|
||||
#- The default values are the same as the commented variables.
|
||||
|
||||
$ENV{NO_EM_RESTART} = "1";
|
||||
$ENV{DYLD_NO_FIX_PREBINDING} = "1";
|
||||
$ENV{LD_PREBIND_ALLOW_OVERLAP} = "1";
|
||||
$ENV{CVS_RSH} = "ssh";
|
||||
|
||||
$MacUniversalBinary = 1;
|
||||
|
||||
# $ENV{MOZ_PACKAGE_MSI}
|
||||
#-----------------------------------------------------------------------------
|
||||
# Default: 0
|
||||
# Values: 0 | 1
|
||||
# Purpose: Controls whether a MSI package is made.
|
||||
# Requires: Windows and a local MakeMSI installation.
|
||||
#$ENV{MOZ_PACKAGE_MSI} = 0;
|
||||
|
||||
# $ENV{MOZ_SYMBOLS_TRANSFER_TYPE}
|
||||
#-----------------------------------------------------------------------------
|
||||
# Default: scp
|
||||
# Values: scp | rsync
|
||||
# Purpose: Use scp or rsync to transfer symbols to the Talkback server.
|
||||
# Requires: The selected type requires the command be available both locally
|
||||
# and on the Talkback server.
|
||||
#$ENV{MOZ_SYMBOLS_TRANSFER_TYPE} = "scp";
|
||||
|
||||
#- PLEASE FILL THIS IN WITH YOUR PROPER EMAIL ADDRESS
|
||||
$BuildAdministrator = 'build@mozilla.org';
|
||||
#$BuildAdministrator = "$ENV{USER}\@$ENV{HOST}";
|
||||
#$BuildAdministrator = ($ENV{USER} || "cltbld") . "\@" . ($ENV{HOST} || "dhcp");
|
||||
|
||||
#- You'll need to change these to suit your machine's needs
|
||||
#$DisplayServer = ':0.0';
|
||||
|
||||
#- Default values of command-line opts
|
||||
#-
|
||||
#$BuildDepend = 1; # Depend or Clobber
|
||||
#$BuildDebug = 0; # Debug or Opt (Darwin)
|
||||
#$ReportStatus = 1; # Send results to server, or not
|
||||
#$ReportFinalStatus = 1; # Finer control over $ReportStatus.
|
||||
$UseTimeStamp = 0; # Use the CVS 'pull-by-timestamp' option, or not
|
||||
#$BuildOnce = 0; # Build once, don't send results to server
|
||||
#$TestOnly = 0; # Only run tests, don't pull/build
|
||||
#$BuildEmbed = 0; # After building seamonkey, go build embed app.
|
||||
#$SkipMozilla = 0; # Use to debug post-mozilla.pl scripts.
|
||||
#$BuildLocales = 0; # Do l10n packaging?
|
||||
|
||||
# Tests
|
||||
$CleanProfile = 1;
|
||||
#$ResetHomeDirForTests = 1;
|
||||
$ProductName = 'Firefox';
|
||||
$VendorName = "Mozilla";
|
||||
|
||||
$RunMozillaTests = 1; # Allow turning off of all tests if needed.
|
||||
$RegxpcomTest = 1;
|
||||
$AliveTest = 1;
|
||||
#$JavaTest = 0;
|
||||
#$ViewerTest = 0;
|
||||
#$BloatTest = 0; # warren memory bloat test
|
||||
#$BloatTest2 = 0; # dbaron memory bloat test, require tracemalloc
|
||||
#$DomToTextConversionTest = 0;
|
||||
#$XpcomGlueTest = 0;
|
||||
$CodesizeTest = 0; # Z, require mozilla/tools/codesighs
|
||||
$EmbedCodesizeTest = 0; # mZ, require mozilla/tools/codesigns
|
||||
#$MailBloatTest = 0;
|
||||
#$EmbedTest = 0; # Assumes you wanted $BuildEmbed=1
|
||||
$LayoutPerformanceTest = 0; # Tp
|
||||
$LayoutPerformanceLocalTest = 0; # Tp2
|
||||
$DHTMLPerformanceTest = 0; # Tdhtml
|
||||
#$QATest = 0;
|
||||
$XULWindowOpenTest = 0; # Txul
|
||||
$StartupPerformanceTest = 0; # Ts
|
||||
|
||||
$TestsPhoneHome = 0; # Should test report back to server?
|
||||
|
||||
$GraphNameOverride = 'xserve08.build.mozilla.org_Fx-Trunk';
|
||||
|
||||
# $results_server
|
||||
#----------------------------------------------------------------------------
|
||||
# Server on which test results will be accessible. This was originally tegu,
|
||||
# then became axolotl. Once we moved services from axolotl, it was time
|
||||
# to give this service its own hostname to make future transitions easier.
|
||||
# - cmp@mozilla.org
|
||||
#$results_server = "build-graphs.mozilla.org";
|
||||
|
||||
#$pageload_server = "spider"; # localhost
|
||||
$pageload_server = "pageload.build.mozilla.org"; # localhost
|
||||
|
||||
#
|
||||
# Timeouts, values are in seconds.
|
||||
#
|
||||
#$CVSCheckoutTimeout = 3600;
|
||||
#$CreateProfileTimeout = 45;
|
||||
#$RegxpcomTestTimeout = 120;
|
||||
|
||||
$AliveTestTimeout = 10;
|
||||
#$ViewerTestTimeout = 45;
|
||||
#$EmbedTestTimeout = 45;
|
||||
#$BloatTestTimeout = 120; # seconds
|
||||
#$MailBloatTestTimeout = 120; # seconds
|
||||
#$JavaTestTimeout = 45;
|
||||
#$DomTestTimeout = 45; # seconds
|
||||
#$XpcomGlueTestTimeout = 15;
|
||||
#$CodesizeTestTimeout = 900; # seconds
|
||||
#$CodesizeTestType = "auto"; # {"auto"|"base"}
|
||||
$LayoutPerformanceTestTimeout = 300; # entire test, seconds
|
||||
$LayoutPerformanceLocalTestTimeout = 180; # entire test, seconds
|
||||
$DHTMLPerformanceTestTimeout = 180; # entire test, seconds
|
||||
#$QATestTimeout = 1200; # entire test, seconds
|
||||
#$LayoutPerformanceTestPageTimeout = 30000; # each page, ms
|
||||
#$StartupPerformanceTestTimeout = 15; # seconds
|
||||
#$XULWindowOpenTestTimeout = 150; # seconds
|
||||
|
||||
|
||||
#$MozConfigFileName = 'mozconfig';
|
||||
|
||||
#$UseMozillaProfile = 1;
|
||||
#$MozProfileName = 'default';
|
||||
|
||||
#- Set these to what makes sense for your system
|
||||
#$Make = 'gmake'; # Must be GNU make
|
||||
#$MakeOverrides = '';
|
||||
#$mail = '/bin/mail';
|
||||
#$CVS = 'cvs -q';
|
||||
#$CVSCO = 'checkout -P';
|
||||
|
||||
# win32 usually doesn't have /bin/mail
|
||||
#$blat = 'c:/nstools/bin/blat';
|
||||
#$use_blat = 0;
|
||||
|
||||
# Set moz_cvsroot to something like:
|
||||
# :pserver:$ENV{USER}%netscape.com\@cvs.mozilla.org:/cvsroot
|
||||
# :pserver:anonymous\@cvs-mirror.mozilla.org:/cvsroot
|
||||
#
|
||||
# Note that win32 may not need \@, depends on ' or ".
|
||||
# :pserver:$ENV{USER}%netscape.com@cvs.mozilla.org:/cvsroot
|
||||
|
||||
# CONFIG: $moz_cvsroot = '%mozillaCvsroot%';
|
||||
$moz_cvsroot = 'cltbld@cvs.mozilla.org:/cvsroot';
|
||||
|
||||
#- Set these proper values for your tinderbox server
|
||||
#$Tinderbox_server = 'tinderbox-daemon@tinderbox.mozilla.org';
|
||||
|
||||
# Allow for non-client builds, e.g. camino.
|
||||
#$moz_client_mk = 'client.mk';
|
||||
|
||||
#- Set if you want to build in a separate object tree
|
||||
$ObjDir = '../build/universal';
|
||||
|
||||
# Extra build name, if needed.
|
||||
$BuildNameExtra = 'Release';
|
||||
|
||||
# User comment, eg. ip address for dhcp builds.
|
||||
# ex: $UserComment = "ip = 208.12.36.108";
|
||||
#$UserComment = 0;
|
||||
|
||||
#-
|
||||
#- The rest should not need to be changed
|
||||
#-
|
||||
|
||||
#- Minimum wait period from start of build to start of next build in minutes.
|
||||
#$BuildSleep = 10;
|
||||
|
||||
#- Until you get the script working. When it works,
|
||||
#- change to the tree you're actually building
|
||||
# CONFIG: $BuildTree = '%buildTree%';
|
||||
$BuildTree = 'MozillaRelease';
|
||||
|
||||
#$BuildName = '';
|
||||
# CONFIG: $BuildTag = '%productTag%_RELEASE';
|
||||
$BuildTag = 'FIREFOX_3_0_19_RELEASE';
|
||||
#$BuildConfigDir = 'mozilla/config';
|
||||
#$Topsrcdir = 'mozilla';
|
||||
|
||||
$BinaryName = 'firefox-bin';
|
||||
|
||||
#
|
||||
# For embedding app, use:
|
||||
#$EmbedBinaryName = 'TestGtkEmbed';
|
||||
#$EmbedDistDir = 'dist/bin'
|
||||
|
||||
|
||||
#$ShellOverride = ''; # Only used if the default shell is too stupid
|
||||
#$ConfigureArgs = '';
|
||||
#$ConfigureEnvArgs = '';
|
||||
#$Compiler = 'gcc';
|
||||
#$NSPRArgs = '';
|
||||
#$ShellOverride = '';
|
||||
|
||||
# Release build options
|
||||
$ReleaseBuild = 1;
|
||||
$shiptalkback = 0;
|
||||
$ReleaseToLatest = 0; # Push the release to latest-<milestone>?
|
||||
$ReleaseToDated = 1; # Push the release to YYYY-MM-DD-HH-<milestone>?
|
||||
$build_hour = "4";
|
||||
$package_creation_path = "/browser/installer";
|
||||
# needs setting for mac + talkback: $mac_bundle_path = "/browser/app";
|
||||
$mac_bundle_path = "/browser/app";
|
||||
$ssh_version = "2";
|
||||
# CONFIG: $ssh_user = "%sshUser%";
|
||||
$ssh_user = "cltbld";
|
||||
# CONFIG: $ssh_server = "%sshServer%";
|
||||
$ssh_server = "stage-old.mozilla.org";
|
||||
$ftp_path = "/home/ftp/pub/firefox/nightly";
|
||||
$url_path = "http://ftp.mozilla.org/pub/mozilla.org/firefox/nightly";
|
||||
$tbox_ftp_path = "/home/ftp/pub/firefox/tinderbox-builds";
|
||||
$tbox_url_path = "http://ftp.mozilla.org/pub/mozilla.org/firefox/tinderbox-builds";
|
||||
# CONFIG: $milestone = 'firefox%version%';
|
||||
$milestone = 'firefox3.0.19';
|
||||
$notify_list = "build-announce\@mozilla.org";
|
||||
$stub_installer = 0;
|
||||
$sea_installer = 0;
|
||||
$archive = 1;
|
||||
$push_raw_xpis = 0;
|
||||
$update_package = 1;
|
||||
$update_product = "Firefox";
|
||||
$update_version = "trunk";
|
||||
$update_platform = "Darwin_Universal-gcc3";
|
||||
$update_hash = "sha1";
|
||||
$update_filehost = "ftp.mozilla.org";
|
||||
$update_ver_file = 'browser/config/version.txt';
|
||||
$update_pushinfo = 0;
|
||||
$crashreporter_buildsymbols = 1;
|
||||
$crashreporter_pushsymbols = 1;
|
||||
# CONFIG: $ENV{'SYMBOL_SERVER_HOST'} = '%symbolServer%';
|
||||
$ENV{'SYMBOL_SERVER_HOST'} = 'dm-symbolpush01.mozilla.org';
|
||||
# CONFIG: $ENV{'SYMBOL_SERVER_USER'} = '%symbolServerUser%';
|
||||
$ENV{'SYMBOL_SERVER_USER'} = 'ffxbld';
|
||||
# CONFIG: $ENV{'SYMBOL_SERVER_PATH'} = '%symbolServerPath%';
|
||||
$ENV{'SYMBOL_SERVER_PATH'} = '/mnt/netapp/breakpad/symbols_ffx';
|
||||
# CONFIG: $ENV{'SYMBOL_SERVER_SSH_KEY'} = '%symbolServerKey%';
|
||||
$ENV{'SYMBOL_SERVER_SSH_KEY'} = '/Users/cltbld/.ssh/ffxbld_dsa';
|
||||
|
||||
# Reboot the OS at the end of build-and-test cycle. This is primarily
|
||||
# intended for Win9x, which can't last more than a few cycles before
|
||||
# locking up (and testing would be suspect even after a couple of cycles).
|
||||
# Right now, there is only code to force the reboot for Win9x, so even
|
||||
# setting this to 1, will not have an effect on other platforms. Setting
|
||||
# up win9x to automatically logon and begin running tinderbox is left
|
||||
# as an exercise to the reader.
|
||||
#$RebootSystem = 0;
|
||||
|
||||
# LogCompression specifies the type of compression used on the log file.
|
||||
# Valid options are 'gzip', and 'bzip2'. Please make sure the binaries
|
||||
# for 'gzip' or 'bzip2' are in the user's path before setting this
|
||||
# option.
|
||||
#$LogCompression = '';
|
||||
|
||||
# LogEncoding specifies the encoding format used for the logs. Valid
|
||||
# options are 'base64', and 'uuencode'. If $LogCompression is set above,
|
||||
# this needs to be set to 'base64' or 'uuencode' to ensure that the
|
||||
# binary data is transferred properly.
|
||||
#$LogEncoding = '';
|
||||
|
||||
# Prevent Extension Manager from spawning child processes during tests
|
||||
# - processes that tbox scripts cannot kill.
|
||||
#$ENV{NO_EM_RESTART} = '1';
|
||||
|
||||
# Do not build XForms
|
||||
$BuildXForms = 0;
|
||||
@@ -1,22 +0,0 @@
|
||||
#
|
||||
## hostname: fx-win32-tbox
|
||||
## uname: MINGW32_NT-5.2 FX-WIN32-TBOX 1.0.11(0.46/3/2) 2007-01-12 12:05 i686 Msys
|
||||
#
|
||||
export CFLAGS="-GL -wd4624 -wd4952"
|
||||
export CXXFLAGS="-GL -wd4624 -wd4952"
|
||||
export LDFLAGS="-LTCG"
|
||||
|
||||
mk_add_options MOZ_CO_PROJECT=browser
|
||||
mk_add_options MOZ_MAKE_FLAGS="-j1"
|
||||
mk_add_options MOZ_CO_MODULE="mozilla/tools/update-packaging"
|
||||
mk_add_options PROFILE_GEN_SCRIPT='$(PYTHON) $(MOZ_OBJDIR)/_profile/pgo/profileserver.py'
|
||||
|
||||
ac_add_options --enable-application=browser
|
||||
ac_add_options --enable-update-channel=release
|
||||
ac_add_options --enable-optimize
|
||||
ac_add_options --disable-debug
|
||||
ac_add_options --disable-tests
|
||||
ac_add_options --enable-update-packaging
|
||||
ac_add_options --enable-official-branding
|
||||
ac_add_options --enable-jemalloc
|
||||
ac_add_options --with-crashreporter-enable-percent=10
|
||||
@@ -1,267 +0,0 @@
|
||||
#
|
||||
## hostname: fx-win32-tbox
|
||||
## uname: MINGW32_NT-5.2 FX-WIN32-TBOX 1.0.11(0.46/3/2) 2007-01-12 12:05 i686 Msys
|
||||
#
|
||||
|
||||
#- tinder-config.pl - Tinderbox configuration file.
|
||||
#- Uncomment the variables you need to set.
|
||||
#- The default values are the same as the commented variables.
|
||||
|
||||
$ENV{NO_EM_RESTART} = '1';
|
||||
$ENV{CVS_RSH} = "ssh";
|
||||
$ENV{MOZ_CRASHREPORTER_NO_REPORT} = '1';
|
||||
# Both these two variables are for source server support
|
||||
$ENV{PDBSTR_PATH} = 'C:\\Program Files\\Debugging Tools for Windows\\sdk\\srcsrv\\pdbstr.exe';
|
||||
$ENV{SRCSRV_ROOT} = ':pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot';
|
||||
|
||||
# $ENV{MOZ_PACKAGE_MSI}
|
||||
#-----------------------------------------------------------------------------
|
||||
# Default: 0
|
||||
# Values: 0 | 1
|
||||
# Purpose: Controls whether a MSI package is made.
|
||||
# Requires: Windows and a local MakeMSI installation.
|
||||
#$ENV{MOZ_PACKAGE_MSI} = 0;
|
||||
|
||||
# $ENV{MOZ_SYMBOLS_TRANSFER_TYPE}
|
||||
#-----------------------------------------------------------------------------
|
||||
# Default: scp
|
||||
# Values: scp | rsync
|
||||
# Purpose: Use scp or rsync to transfer symbols to the Talkback server.
|
||||
# Requires: The selected type requires the command be available both locally
|
||||
# and on the Talkback server.
|
||||
#$ENV{MOZ_SYMBOLS_TRANSFER_TYPE} = "scp";
|
||||
|
||||
#- PLEASE FILL THIS IN WITH YOUR PROPER EMAIL ADDRESS
|
||||
$BuildAdministrator = 'build@mozilla.org';
|
||||
#$BuildAdministrator = "$ENV{USER}\@$ENV{HOST}";
|
||||
#$BuildAdministrator = ($ENV{USER} || "cltbld") . "\@" . ($ENV{HOST} || "dhcp");
|
||||
|
||||
#- You'll need to change these to suit your machine's needs
|
||||
#$DisplayServer = ':0.0';
|
||||
|
||||
#- Default values of command-line opts
|
||||
#-
|
||||
#$BuildDepend = 1; # Depend or Clobber
|
||||
#$BuildDebug = 0; # Debug or Opt (Darwin)
|
||||
#$ReportStatus = 1; # Send results to server, or not
|
||||
#$ReportFinalStatus = 1; # Finer control over $ReportStatus.
|
||||
$UseTimeStamp = 0; # Use the CVS 'pull-by-timestamp' option, or not
|
||||
#$BuildOnce = 0; # Build once, don't send results to server
|
||||
#$TestOnly = 0; # Only run tests, don't pull/build
|
||||
#$BuildEmbed = 0; # After building seamonkey, go build embed app.
|
||||
#$SkipMozilla = 0; # Use to debug post-mozilla.pl scripts.
|
||||
#$BuildLocales = 0; # Do l10n packaging?
|
||||
|
||||
# Tests
|
||||
$CleanProfile = 1;
|
||||
#$ResetHomeDirForTests = 1;
|
||||
$ProductName = "Firefox";
|
||||
$VendorName = "Mozilla";
|
||||
|
||||
$RunMozillaTests = 1; # Allow turning off of all tests if needed.
|
||||
$RegxpcomTest = 1;
|
||||
$AliveTest = 1;
|
||||
$JavaTest = 0;
|
||||
$ViewerTest = 0;
|
||||
$BloatTest = 0; # warren memory bloat test
|
||||
$BloatTest2 = 0; # dbaron memory bloat test, require tracemalloc
|
||||
$DomToTextConversionTest = 0;
|
||||
$XpcomGlueTest = 0;
|
||||
$CodesizeTest = 0; # Z, require mozilla/tools/codesighs
|
||||
$EmbedCodesizeTest = 0; # mZ, require mozilla/tools/codesigns
|
||||
$MailBloatTest = 0;
|
||||
$EmbedTest = 0; # Assumes you wanted $BuildEmbed=1
|
||||
$LayoutPerformanceTest = 0; # Tp
|
||||
$DHTMLPerformanceTest = 0; # Tdhtml
|
||||
$QATest = 0;
|
||||
$XULWindowOpenTest = 0; # Txul
|
||||
$StartupPerformanceTest = 0; # Ts
|
||||
$NeckoUnitTest = 0;
|
||||
$RenderPerformanceTest = 0; # Tgfx
|
||||
|
||||
$TestsPhoneHome = 0; # Should test report back to server?
|
||||
$GraphNameOverride = 'fx-win32-tbox';
|
||||
|
||||
# $results_server
|
||||
#----------------------------------------------------------------------------
|
||||
# Server on which test results will be accessible. This was originally tegu,
|
||||
# then became axolotl. Once we moved services from axolotl, it was time
|
||||
# to give this service its own hostname to make future transitions easier.
|
||||
# - cmp@mozilla.org
|
||||
#$results_server = "build-graphs.mozilla.org";
|
||||
|
||||
$pageload_server = "pageload.build.mozilla.org"; # localhost
|
||||
|
||||
#
|
||||
# Timeouts, values are in seconds.
|
||||
#
|
||||
#$CVSCheckoutTimeout = 3600;
|
||||
#$CreateProfileTimeout = 45;
|
||||
#$RegxpcomTestTimeout = 120;
|
||||
|
||||
#$AliveTestTimeout = 30;
|
||||
#$ViewerTestTimeout = 45;
|
||||
#$EmbedTestTimeout = 45;
|
||||
#$BloatTestTimeout = 120; # seconds
|
||||
#$MailBloatTestTimeout = 120; # seconds
|
||||
#$JavaTestTimeout = 45;
|
||||
#$DomTestTimeout = 45; # seconds
|
||||
#$XpcomGlueTestTimeout = 15;
|
||||
#$CodesizeTestTimeout = 900; # seconds
|
||||
#$CodesizeTestType = "auto"; # {"auto"|"base"}
|
||||
$LayoutPerformanceTestTimeout = 800; # entire test, seconds
|
||||
#$DHTMLPerformanceTestTimeout = 1200; # entire test, seconds
|
||||
#$QATestTimeout = 1200; # entire test, seconds
|
||||
#$LayoutPerformanceTestPageTimeout = 30000; # each page, ms
|
||||
#$StartupPerformanceTestTimeout = 20; # seconds
|
||||
#$XULWindowOpenTestTimeout = 90; # seconds
|
||||
#$NeckoUnitTestTimeout = 30; # seconds
|
||||
$RenderPerformanceTestTimeout = 1800; # seconds
|
||||
|
||||
#$MozConfigFileName = 'mozconfig';
|
||||
|
||||
#$UseMozillaProfile = 1;
|
||||
#$MozProfileName = 'default';
|
||||
|
||||
#- Set these to what makes sense for your system
|
||||
$Make = 'make'; # Must be GNU make
|
||||
#$MakeOverrides = '';
|
||||
#$mail = '/bin/mail';
|
||||
#$CVS = 'cvs -q';
|
||||
#$CVSCO = 'checkout -P';
|
||||
|
||||
# win32 usually doesn't have /bin/mail
|
||||
$blat = '/d/mozilla-build/blat261/full/blat';
|
||||
#$use_blat = 1;
|
||||
|
||||
# Set moz_cvsroot to something like:
|
||||
# :pserver:$ENV{USER}%netscape.com\@cvs.mozilla.org:/cvsroot
|
||||
# :pserver:anonymous\@cvs-mirror.mozilla.org:/cvsroot
|
||||
#
|
||||
# Note that win32 may not need \@, depends on ' or ".
|
||||
# :pserver:$ENV{USER}%netscape.com@cvs.mozilla.org:/cvsroot
|
||||
|
||||
# CONFIG: $moz_cvsroot = '%mozillaCvsroot%';
|
||||
$moz_cvsroot = 'cltbld@cvs.mozilla.org:/cvsroot';
|
||||
|
||||
#- Set these proper values for your tinderbox server
|
||||
#$Tinderbox_server = 'tinderbox-daemon@tinderbox.mozilla.org';
|
||||
|
||||
# Allow for non-client builds, e.g. camino.
|
||||
#$moz_client_mk = 'client.mk';
|
||||
|
||||
#- Set if you want to build in a separate object tree
|
||||
$ObjDir = 'obj-fx-trunk';
|
||||
|
||||
# Extra build name, if needed.
|
||||
$BuildNameExtra = 'Release';
|
||||
|
||||
# User comment, eg. ip address for dhcp builds.
|
||||
# ex: $UserComment = "ip = 208.12.36.108";
|
||||
#$UserComment = 0;
|
||||
|
||||
#-
|
||||
#- The rest should not need to be changed
|
||||
#-
|
||||
|
||||
#- Minimum wait period from start of build to start of next build in minutes.
|
||||
#$BuildSleep = 10;
|
||||
|
||||
#- Until you get the script working. When it works,
|
||||
#- change to the tree you're actually building
|
||||
#$BuildTree = 'MozillaTest';
|
||||
# CONFIG: $BuildTree = '%buildTree%';
|
||||
$BuildTree = 'MozillaRelease';
|
||||
|
||||
#$BuildName = '';
|
||||
# CONFIG: $BuildTag = '%productTag%_RELEASE';
|
||||
$BuildTag = 'FIREFOX_3_0_19_RELEASE';
|
||||
#$BuildConfigDir = 'mozilla/config';
|
||||
#$Topsrcdir = 'mozilla';
|
||||
|
||||
$BinaryName = 'firefox.exe';
|
||||
|
||||
#
|
||||
# For embedding app, use:
|
||||
#$EmbedBinaryName = 'TestGtkEmbed';
|
||||
#$EmbedDistDir = 'dist/bin'
|
||||
|
||||
|
||||
#$ShellOverride = ''; # Only used if the default shell is too stupid
|
||||
#$ConfigureArgs = '';
|
||||
#$ConfigureEnvArgs = '';
|
||||
#$Compiler = 'gcc';
|
||||
#$NSPRArgs = '';
|
||||
#$ShellOverride = '';
|
||||
|
||||
$ProfiledBuild = 1;
|
||||
# Release build options
|
||||
$ReleaseBuild = 1;
|
||||
$shiptalkback = 0;
|
||||
$ReleaseToLatest = 0; # Push the release to latest-<milestone>?
|
||||
$ReleaseToDated = 1; # Push the release to YYYY-MM-DD-HH-<milestone>?
|
||||
$build_hour = "4";
|
||||
$package_creation_path = "/browser/installer";
|
||||
# needs setting for mac + talkback: $mac_bundle_path = "/browser/app";
|
||||
$ssh_version = "2";
|
||||
# CONFIG: $ssh_user = "%sshUser%";
|
||||
$ssh_user = "cltbld";
|
||||
# CONFIG: $ssh_server = "%sshServer%";
|
||||
$ssh_server = "stage-old.mozilla.org";
|
||||
$ftp_path = "/home/ftp/pub/firefox/nightly";
|
||||
$url_path = "http://ftp.mozilla.org/pub/mozilla.org/firefox/nightly";
|
||||
$tbox_ftp_path = "/home/ftp/pub/firefox/tinderbox-builds";
|
||||
$tbox_url_path = "http://ftp.mozilla.org/pub/mozilla.org/firefox/tinderbox-builds";
|
||||
# CONFIG: $milestone = 'firefox%version%';
|
||||
$milestone = 'firefox3.0.19';
|
||||
$notify_list = 'build-announce@mozilla.org';
|
||||
$stub_installer = 0;
|
||||
$sea_installer = 1;
|
||||
$archive = 1;
|
||||
$push_raw_xpis = 0;
|
||||
$update_package = 1;
|
||||
$update_product = "Firefox";
|
||||
$update_version = "trunk";
|
||||
$update_platform = "WINNT_x86-msvc";
|
||||
$update_hash = "sha1";
|
||||
$update_filehost = "ftp.mozilla.org";
|
||||
$update_ver_file = 'browser/config/version.txt';
|
||||
$update_pushinfo = 0;
|
||||
$crashreporter_buildsymbols = 1;
|
||||
$crashreporter_pushsymbols = 1;
|
||||
# CONFIG: $ENV{'SYMBOL_SERVER_HOST'} = '%symbolServer%';
|
||||
$ENV{'SYMBOL_SERVER_HOST'} = 'dm-symbolpush01.mozilla.org';
|
||||
# CONFIG: $ENV{'SYMBOL_SERVER_USER'} = '%symbolServerUser%';
|
||||
$ENV{'SYMBOL_SERVER_USER'} = 'ffxbld';
|
||||
# CONFIG: $ENV{'SYMBOL_SERVER_PATH'} = '%symbolServerPath%';
|
||||
$ENV{'SYMBOL_SERVER_PATH'} = '/mnt/netapp/breakpad/symbols_ffx';
|
||||
# CONFIG: $ENV{'SYMBOL_SERVER_SSH_KEY'} = '%symbolServerKey%';
|
||||
$ENV{'SYMBOL_SERVER_SSH_KEY'} = '/c/Documents and Settings/cltbld/.ssh/ffxbld_dsa';
|
||||
|
||||
# Reboot the OS at the end of build-and-test cycle. This is primarily
|
||||
# intended for Win9x, which can't last more than a few cycles before
|
||||
# locking up (and testing would be suspect even after a couple of cycles).
|
||||
# Right now, there is only code to force the reboot for Win9x, so even
|
||||
# setting this to 1, will not have an effect on other platforms. Setting
|
||||
# up win9x to automatically logon and begin running tinderbox is left
|
||||
# as an exercise to the reader.
|
||||
#$RebootSystem = 0;
|
||||
|
||||
# LogCompression specifies the type of compression used on the log file.
|
||||
# Valid options are 'gzip', and 'bzip2'. Please make sure the binaries
|
||||
# for 'gzip' or 'bzip2' are in the user's path before setting this
|
||||
# option.
|
||||
#$LogCompression = '';
|
||||
|
||||
# LogEncoding specifies the encoding format used for the logs. Valid
|
||||
# options are 'base64', and 'uuencode'. If $LogCompression is set above,
|
||||
# this needs to be set to 'base64' or 'uuencode' to ensure that the
|
||||
# binary data is transferred properly.
|
||||
#$LogEncoding = '';
|
||||
|
||||
# Prevent Extension Manager from spawning child processes during tests
|
||||
# - processes that tbox scripts cannot kill.
|
||||
#$ENV{NO_EM_RESTART} = '1';
|
||||
|
||||
# Do not build XForms
|
||||
$BuildXForms = 0;
|
||||
@@ -1 +0,0 @@
|
||||
Clobbering to force nightly due to nightly bustage from bug 428672.
|
||||
@@ -1,25 +0,0 @@
|
||||
#
|
||||
## hostname: tb-linux-tbox
|
||||
## uname: Linux tb-linux-tbox.build.mozilla.org 2.6.18-8.el5 #1 SMP Thu Mar 15 19:57:35 EDT 2007 i686 athlon i386 GNU/Linux
|
||||
#
|
||||
|
||||
# symbols for breakpad
|
||||
export CFLAGS="-gstabs+"
|
||||
export CXXFLAGS="-gstabs+"
|
||||
|
||||
mk_add_options MOZ_CO_PROJECT=mail
|
||||
mk_add_options MOZ_MAKE_FLAGS=-j1
|
||||
mk_add_options MOZ_CO_MODULE="mozilla/tools/update-packaging"
|
||||
|
||||
ac_add_options --enable-application=mail
|
||||
ac_add_options --enable-update-channel=beta
|
||||
ac_add_options --disable-debug
|
||||
ac_add_options --enable-update-packaging
|
||||
# Add explicit optimize flags in configure.in, not here - see bug 407794
|
||||
ac_add_options --enable-optimize
|
||||
ac_add_options --disable-tests
|
||||
ac_add_options --disable-shared
|
||||
ac_add_options --enable-static
|
||||
|
||||
CC=/tools/gcc-4.1.1/bin/gcc
|
||||
CXX=/tools/gcc-4.1.1/bin/g++
|
||||
@@ -1,225 +0,0 @@
|
||||
#
|
||||
## hostname: tb-linux-tbox
|
||||
## uname: Linux tbnewref-linux-tbox.build.mozilla.org 2.6.18-8.el5 #1 SMP Thu Mar 15 19:57:35 EDT 2007 i686 athlon i386 GNU/Linux
|
||||
#
|
||||
|
||||
#- tinder-config.pl - Tinderbox configuration file.
|
||||
#- Uncomment the variables you need to set.
|
||||
#- The default values are the same as the commented variables.
|
||||
|
||||
$ENV{CVS_RSH} = "ssh";
|
||||
$ENV{MOZ_CRASHREPORTER_NO_REPORT} = '1';
|
||||
|
||||
#- PLEASE FILL THIS IN WITH YOUR PROPER EMAIL ADDRESS
|
||||
#$BuildAdministrator = "$ENV{USER}\@$ENV{HOST}";
|
||||
#$BuildAdministrator = ($ENV{USER} || "cltbld") . "\@" . ($ENV{HOST} || "dhcp");
|
||||
|
||||
#- You'll need to change these to suit your machine's needs
|
||||
#$DisplayServer = ':0.0';
|
||||
|
||||
#- Default values of command-line opts
|
||||
#-
|
||||
$BuildDepend = 0; # Depend or Clobber
|
||||
#$BuildDebug = 0; # Debug or Opt (Darwin)
|
||||
#$ReportStatus = 1; # Send results to server, or not
|
||||
#$ReportFinalStatus = 1; # Finer control over $ReportStatus.
|
||||
$UseTimeStamp = 0; # Use the CVS 'pull-by-timestamp' option, or not
|
||||
#$BuildOnce = 0; # Build once, don't send results to server
|
||||
#$TestOnly = 0; # Only run tests, don't pull/build
|
||||
#$BuildEmbed = 0; # After building seamonkey, go build embed app.
|
||||
#$SkipMozilla = 0; # Use to debug post-mozilla.pl scripts.
|
||||
|
||||
# Tests
|
||||
$CleanProfile = 1;
|
||||
#$ResetHomeDirForTests = 1;
|
||||
$ProductName = "Thunderbird";
|
||||
#$VendorName = "";
|
||||
|
||||
$RunMozillaTests = 1; # Allow turning off of all tests if needed.
|
||||
#$RegxpcomTest = 1;
|
||||
#$AliveTest = 1;
|
||||
#$JavaTest = 0;
|
||||
#$ViewerTest = 0;
|
||||
#$BloatTest = 0; # warren memory bloat test
|
||||
#$BloatTest2 = 0; # dbaron memory bloat test, require tracemalloc
|
||||
#$DomToTextConversionTest = 0;
|
||||
#$XpcomGlueTest = 0;
|
||||
$CodesizeTest = 0; # Z, require mozilla/tools/codesighs
|
||||
#$EmbedCodesizeTest = 0; # mZ, require mozilla/tools/codesigns
|
||||
#$MailBloatTest = 0;
|
||||
#$EmbedTest = 0; # Assumes you wanted $BuildEmbed=1
|
||||
#$LayoutPerformanceTest = 0; # Tp
|
||||
#$QATest = 0;
|
||||
#$XULWindowOpenTest = 0; # Txul
|
||||
#$StartupPerformanceTest = 0; # Ts
|
||||
|
||||
$TestsPhoneHome = 0; # Should test report back to server?
|
||||
#$results_server = "axolotl.mozilla.org"; # was tegu
|
||||
#$pageload_server = "spider"; # localhost
|
||||
|
||||
#
|
||||
# Timeouts, values are in seconds.
|
||||
#
|
||||
#$CVSCheckoutTimeout = 3600;
|
||||
#$CreateProfileTimeout = 45;
|
||||
#$RegxpcomTestTimeout = 15;
|
||||
|
||||
#$AliveTestTimeout = 45;
|
||||
#$ViewerTestTimeout = 45;
|
||||
#$EmbedTestTimeout = 45;
|
||||
#$BloatTestTimeout = 120; # seconds
|
||||
#$MailBloatTestTimeout = 120; # seconds
|
||||
#$JavaTestTimeout = 45;
|
||||
#$DomTestTimeout = 45; # seconds
|
||||
#$XpcomGlueTestTimeout = 15;
|
||||
#$CodesizeTestTimeout = 900; # seconds
|
||||
#$CodesizeTestType = "auto"; # {"auto"|"base"}
|
||||
#$LayoutPerformanceTestTimeout = 1200; # entire test, seconds
|
||||
#$QATestTimeout = 1200; # entire test, seconds
|
||||
#$LayoutPerformanceTestPageTimeout = 30000; # each page, ms
|
||||
#$StartupPerformanceTestTimeout = 60; # seconds
|
||||
#$XULWindowOpenTestTimeout = 150; # seconds
|
||||
|
||||
|
||||
#$MozConfigFileName = 'mozconfig';
|
||||
|
||||
#$UseMozillaProfile = 1;
|
||||
#$MozProfileName = 'default';
|
||||
|
||||
#- Set these to what makes sense for your system
|
||||
#$Make = 'gmake'; # Must be GNU make
|
||||
#$MakeOverrides = '';
|
||||
#$mail = '/bin/mail';
|
||||
#$CVS = 'cvs -q';
|
||||
#$CVSCO = 'checkout -P';
|
||||
|
||||
# win32 usually doesn't have /bin/mail
|
||||
#$blat = 'c:/nstools/bin/blat';
|
||||
#$use_blat = 0;
|
||||
|
||||
# Set moz_cvsroot to something like:
|
||||
# :pserver:$ENV{USER}%netscape.com\@cvs.mozilla.org:/cvsroot
|
||||
# :pserver:anonymous\@cvs-mirror.mozilla.org:/cvsroot
|
||||
#
|
||||
# Note that win32 may not need \@, depends on ' or ".
|
||||
# :pserver:$ENV{USER}%netscape.com@cvs.mozilla.org:/cvsroot
|
||||
|
||||
# CONFIG: $moz_cvsroot = '%mozillaCvsroot%';
|
||||
$moz_cvsroot = 'cltbld@cvs.mozilla.org:/cvsroot';
|
||||
|
||||
#- Set these proper values for your tinderbox server
|
||||
#$Tinderbox_server = 'tinderbox-daemon@tinderbox.mozilla.org';
|
||||
|
||||
# Allow for non-client builds, e.g. camino.
|
||||
#$moz_client_mk = 'client.mk';
|
||||
|
||||
#- Set if you want to build in a separate object tree
|
||||
$ObjDir = 'obj-tb-trunk';
|
||||
|
||||
# Extra build name, if needed.
|
||||
$BuildNameExtra = 'Release';
|
||||
|
||||
# User comment, eg. ip address for dhcp builds.
|
||||
# ex: $UserComment = "ip = 208.12.36.108";
|
||||
#$UserComment = 0;
|
||||
|
||||
#-
|
||||
#- The rest should not need to be changed
|
||||
#-
|
||||
|
||||
#- Minimum wait period from start of build to start of next build in minutes.
|
||||
#$BuildSleep = 10;
|
||||
|
||||
#- Until you get the script working. When it works,
|
||||
#- change to the tree you're actually building
|
||||
# CONFIG: $BuildTree = '%buildTree%';
|
||||
$BuildTree = 'MozillaRelease';
|
||||
|
||||
#$BuildName = '';
|
||||
# CONFIG: $BuildTag = '%productTag%_RELEASE';
|
||||
$BuildTag = 'THUNDERBIRD_3_0a2_RELEASE';
|
||||
#$BuildConfigDir = 'mozilla/config';
|
||||
#$Topsrcdir = 'mozilla';
|
||||
|
||||
$BinaryName = 'thunderbird-bin';
|
||||
|
||||
#
|
||||
# For embedding app, use:
|
||||
#$EmbedBinaryName = 'TestGtkEmbed';
|
||||
#$EmbedDistDir = 'dist/bin'
|
||||
|
||||
|
||||
#$ShellOverride = ''; # Only used if the default shell is too stupid
|
||||
#$ConfigureArgs = '';
|
||||
#$ConfigureEnvArgs = '';
|
||||
#$Compiler = 'gcc';
|
||||
#$NSPRArgs = '';
|
||||
#$ShellOverride = '';
|
||||
|
||||
# allow override of timezone value (for win32 POSIX::strftime)
|
||||
#$Timezone = '';
|
||||
|
||||
# Release build options
|
||||
$ReleaseBuild = 1;
|
||||
$ReleaseToLatest = 0; # Push the release to latest-<milestone>?
|
||||
$ReleaseToDated = 1; # Push the release to YYYY-MM-DD-HH-<milestone>?
|
||||
$shiptalkback = 0;
|
||||
$build_hour = "3";
|
||||
$package_creation_path = "/mail/installer";
|
||||
$ssh_version = "2";
|
||||
# CONFIG: $ssh_user = "%sshUser%";
|
||||
$ssh_user = "cltbld";
|
||||
# CONFIG: $ssh_server = "%sshServer%";
|
||||
$ssh_server = "stage-old.mozilla.org";
|
||||
#$ReleaseGroup = "thunderbird";
|
||||
$ftp_path = "/home/ftp/pub/thunderbird/nightly";
|
||||
$url_path = "http://ftp.mozilla.org/pub/mozilla.org/thunderbird/nightly";
|
||||
$tbox_ftp_path = "/home/ftp/pub/thunderbird/tinderbox-builds";
|
||||
$tbox_url_path = "http://ftp.mozilla.org/pub/mozilla.org/thunderbird/tinderbox-builds";
|
||||
# CONFIG: $milestone = 'thunderbird%version%';
|
||||
$milestone = 'thunderbird3.0a2';
|
||||
$notify_list = "build-announce\@mozilla.org";
|
||||
$stub_installer = 0;
|
||||
$sea_installer = 0;
|
||||
$archive = 1;
|
||||
$update_package = 1;
|
||||
$update_product = "Thunderbird";
|
||||
$update_version = "trunk";
|
||||
$update_platform = "Linux_x86-gcc3";
|
||||
$update_hash = "sha1";
|
||||
$update_filehost = "ftp.mozilla.org";
|
||||
$update_ver_file = "mail/config/version.txt";
|
||||
$update_pushinfo = 0;
|
||||
$crashreporter_buildsymbols = 1;
|
||||
$crashreporter_pushsymbols = 1;
|
||||
# CONFIG: $ENV{'SYMBOL_SERVER_HOST'} = '%symbolServer%';
|
||||
$ENV{'SYMBOL_SERVER_HOST'} = 'dm-symbolpush01.mozilla.org';
|
||||
# CONFIG: $ENV{'SYMBOL_SERVER_USER'} = '%symbolServerUser%';
|
||||
$ENV{'SYMBOL_SERVER_USER'} = 'tbirdbld';
|
||||
# CONFIG: $ENV{'SYMBOL_SERVER_PATH'} = '%symbolServerPath%';
|
||||
$ENV{'SYMBOL_SERVER_PATH'} = '/mnt/netapp/breakpad/symbols_tbrd';
|
||||
# CONFIG: $ENV{'SYMBOL_SERVER_SSH_KEY'} = '%symbolServerKey%';
|
||||
$ENV{'SYMBOL_SERVER_SSH_KEY'} = '/home/cltbld/.ssh/tbirdbld_dsa';
|
||||
|
||||
# Reboot the OS at the end of build-and-test cycle. This is primarily
|
||||
# intended for Win9x, which can't last more than a few cycles before
|
||||
# locking up (and testing would be suspect even after a couple of cycles).
|
||||
# Right now, there is only code to force the reboot for Win9x, so even
|
||||
# setting this to 1, will not have an effect on other platforms. Setting
|
||||
# up win9x to automatically logon and begin running tinderbox is left
|
||||
# as an exercise to the reader.
|
||||
#$RebootSystem = 0;
|
||||
|
||||
# LogCompression specifies the type of compression used on the log file.
|
||||
# Valid options are 'gzip', and 'bzip2'. Please make sure the binaries
|
||||
# for 'gzip' or 'bzip2' are in the user's path before setting this
|
||||
# option.
|
||||
#$LogCompression = 'bzip2';
|
||||
|
||||
# LogEncoding specifies the encoding format used for the logs. Valid
|
||||
# options are 'base64', and 'uuencode'. If $LogCompression is set above,
|
||||
# this needs to be set to 'base64' or 'uuencode' to ensure that the
|
||||
# binary data is transferred properly.
|
||||
#$LogEncoding = 'base64';
|
||||
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
Clobbering to force nightly due to nightly bustage from bug 428672.
|
||||
@@ -1,28 +0,0 @@
|
||||
#
|
||||
## hostname: bm-xserve07.build.mozilla.org
|
||||
## uname: Darwin bm-xserve07.build.mozilla.org 8.8.4 Darwin Kernel Version 8.8.4: Sun Oct 29 15:26:54 PST 2006; root:xnu-792.16.4.obj~1/RELEASE_I386 i386 i386
|
||||
#
|
||||
|
||||
# symbols for breakpad
|
||||
export CFLAGS="-g -gfull"
|
||||
export CXXFLAGS="-g -gfull"
|
||||
|
||||
. $topsrcdir/build/macosx/universal/mozconfig
|
||||
|
||||
# Make flags
|
||||
mk_add_options MOZ_CO_PROJECT=mail
|
||||
mk_add_options MOZ_MAKE_FLAGS="-j1"
|
||||
mk_add_options MOZ_CO_MODULE="mozilla/tools/update-packaging"
|
||||
mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/../build/universal
|
||||
|
||||
# Configure flags
|
||||
ac_add_options --enable-application=mail
|
||||
ac_add_options --enable-update-channel=beta
|
||||
# Add explicit optimize flags in configure.in, not here - see bug 407794
|
||||
ac_add_options --enable-optimize
|
||||
ac_add_options --disable-debug
|
||||
ac_add_options --disable-tests
|
||||
ac_add_options --enable-static
|
||||
ac_add_options --disable-shared
|
||||
|
||||
ac_add_options --enable-update-packaging
|
||||
@@ -1,262 +0,0 @@
|
||||
#
|
||||
## hostname: bm-xserve07.build.mozilla.org
|
||||
## uname: Darwin bm-xserve07.build.mozilla.org 8.8.4 Darwin Kernel Version 8.8.4: Sun Oct 29 15:26:54 PST 2006; root:xnu-792.16.4.obj~1/RELEASE_I386 i386 i386
|
||||
#
|
||||
|
||||
#- tinder-config.pl - Tinderbox configuration file.
|
||||
#- Uncomment the variables you need to set.
|
||||
#- The default values are the same as the commented variables.
|
||||
|
||||
# $ENV{NO_EM_RESTART} = "1";
|
||||
# $ENV{DYLD_NO_FIX_PREBINDING} = "1";
|
||||
# $ENV{LD_PREBIND_ALLOW_OVERLAP} = "1";
|
||||
$ENV{MOZ_CRASHREPORTER_NO_REPORT} = '1';
|
||||
|
||||
$MacUniversalBinary = 1;
|
||||
|
||||
# $ENV{MOZ_PACKAGE_MSI}
|
||||
#-----------------------------------------------------------------------------
|
||||
# Default: 0
|
||||
# Values: 0 | 1
|
||||
# Purpose: Controls whether a MSI package is made.
|
||||
# Requires: Windows and a local MakeMSI installation.
|
||||
#$ENV{MOZ_PACKAGE_MSI} = 0;
|
||||
|
||||
# $ENV{MOZ_SYMBOLS_TRANSFER_TYPE}
|
||||
#-----------------------------------------------------------------------------
|
||||
# Default: scp
|
||||
# Values: scp | rsync
|
||||
# Purpose: Use scp or rsync to transfer symbols to the Talkback server.
|
||||
# Requires: The selected type requires the command be available both locally
|
||||
# and on the Talkback server.
|
||||
#$ENV{MOZ_SYMBOLS_TRANSFER_TYPE} = "scp";
|
||||
|
||||
#- PLEASE FILL THIS IN WITH YOUR PROPER EMAIL ADDRESS
|
||||
$BuildAdministrator = 'build@mozilla.org';
|
||||
#$BuildAdministrator = "$ENV{USER}\@$ENV{HOST}";
|
||||
#$BuildAdministrator = ($ENV{USER} || "cltbld") . "\@" . ($ENV{HOST} || "dhcp");
|
||||
|
||||
#- You'll need to change these to suit your machine's needs
|
||||
#$DisplayServer = ':0.0';
|
||||
|
||||
#- Default values of command-line opts
|
||||
#-
|
||||
#$BuildDepend = 1; # Depend or Clobber
|
||||
#$BuildDebug = 0; # Debug or Opt (Darwin)
|
||||
#$ReportStatus = 1; # Send results to server, or not
|
||||
#$ReportFinalStatus = 1; # Finer control over $ReportStatus.
|
||||
$UseTimeStamp = 0; # Use the CVS 'pull-by-timestamp' option, or not
|
||||
#$BuildOnce = 0; # Build once, don't send results to server
|
||||
#$TestOnly = 0; # Only run tests, don't pull/build
|
||||
#$BuildEmbed = 0; # After building seamonkey, go build embed app.
|
||||
#$SkipMozilla = 0; # Use to debug post-mozilla.pl scripts.
|
||||
#$BuildLocales = 0; # Do l10n packaging?
|
||||
|
||||
# Tests
|
||||
$CleanProfile = 1;
|
||||
#$ResetHomeDirForTests = 1;
|
||||
$ProductName = "Thunderbird";
|
||||
#$VendorName = 'Mozilla';
|
||||
|
||||
$RunMozillaTests = 1; # Allow turning off of all tests if needed.
|
||||
$RegxpcomTest = 1;
|
||||
$AliveTest = 1;
|
||||
#$JavaTest = 0;
|
||||
#$ViewerTest = 0;
|
||||
#$BloatTest = 0; # warren memory bloat test
|
||||
#$BloatTest2 = 0; # dbaron memory bloat test, require tracemalloc
|
||||
#$DomToTextConversionTest = 0;
|
||||
#$XpcomGlueTest = 0;
|
||||
$CodesizeTest = 0; # Z, require mozilla/tools/codesighs
|
||||
$EmbedCodesizeTest = 0; # mZ, require mozilla/tools/codesigns
|
||||
#$MailBloatTest = 0;
|
||||
#$EmbedTest = 0; # Assumes you wanted $BuildEmbed=1
|
||||
#$LayoutPerformanceTest = 0; # Tp
|
||||
#$DHTMLPerformanceTest = 0; # Tdhtml
|
||||
#$QATest = 0;
|
||||
#$XULWindowOpenTest = 0; # Txul
|
||||
#$StartupPerformanceTest = 0; # Ts
|
||||
|
||||
$TestsPhoneHome = 0; # Should test report back to server?
|
||||
|
||||
# $results_server
|
||||
#----------------------------------------------------------------------------
|
||||
# Server on which test results will be accessible. This was originally tegu,
|
||||
# then became axolotl. Once we moved services from axolotl, it was time
|
||||
# to give this service its own hostname to make future transitions easier.
|
||||
# - cmp@mozilla.org
|
||||
#$results_server = "build-graphs.mozilla.org";
|
||||
|
||||
#$pageload_server = "spider"; # localhost
|
||||
|
||||
#
|
||||
# Timeouts, values are in seconds.
|
||||
#
|
||||
#$CVSCheckoutTimeout = 3600;
|
||||
#$CreateProfileTimeout = 45;
|
||||
#$RegxpcomTestTimeout = 120;
|
||||
|
||||
#$AliveTestTimeout = 45;
|
||||
#$ViewerTestTimeout = 45;
|
||||
#$EmbedTestTimeout = 45;
|
||||
#$BloatTestTimeout = 120; # seconds
|
||||
#$MailBloatTestTimeout = 120; # seconds
|
||||
#$JavaTestTimeout = 45;
|
||||
#$DomTestTimeout = 45; # seconds
|
||||
#$XpcomGlueTestTimeout = 15;
|
||||
#$CodesizeTestTimeout = 900; # seconds
|
||||
#$CodesizeTestType = "auto"; # {"auto"|"base"}
|
||||
#$LayoutPerformanceTestTimeout = 1200; # entire test, seconds
|
||||
#$DHTMLPerformanceTestTimeout = 1200; # entire test, seconds
|
||||
#$QATestTimeout = 1200; # entire test, seconds
|
||||
#$LayoutPerformanceTestPageTimeout = 30000; # each page, ms
|
||||
#$StartupPerformanceTestTimeout = 15; # seconds
|
||||
#$XULWindowOpenTestTimeout = 150; # seconds
|
||||
|
||||
|
||||
#$MozConfigFileName = 'mozconfig';
|
||||
|
||||
#$UseMozillaProfile = 1;
|
||||
#$MozProfileName = 'default';
|
||||
|
||||
#- Set these to what makes sense for your system
|
||||
#$Make = 'gmake'; # Must be GNU make
|
||||
#$MakeOverrides = '';
|
||||
#$mail = '/bin/mail';
|
||||
#$CVS = 'cvs -q';
|
||||
#$CVSCO = 'checkout -P';
|
||||
|
||||
# win32 usually doesn't have /bin/mail
|
||||
#$blat = 'c:/nstools/bin/blat';
|
||||
#$use_blat = 0;
|
||||
|
||||
# Set moz_cvsroot to something like:
|
||||
# :pserver:$ENV{USER}%netscape.com\@cvs.mozilla.org:/cvsroot
|
||||
# :pserver:anonymous\@cvs-mirror.mozilla.org:/cvsroot
|
||||
#
|
||||
# Note that win32 may not need \@, depends on ' or ".
|
||||
# :pserver:$ENV{USER}%netscape.com@cvs.mozilla.org:/cvsroot
|
||||
|
||||
#$moz_cvsroot = $ENV{CVSROOT};
|
||||
# CONFIG: $moz_cvsroot = '%mozillaCvsroot%';
|
||||
$moz_cvsroot = 'cltbld@cvs.mozilla.org:/cvsroot';
|
||||
|
||||
#- Set these proper values for your tinderbox server
|
||||
#$Tinderbox_server = 'tinderbox-daemon@tinderbox.mozilla.org';
|
||||
|
||||
# Allow for non-client builds, e.g. camino.
|
||||
#$moz_client_mk = 'client.mk';
|
||||
|
||||
#- Set if you want to build in a separate object tree
|
||||
$ObjDir = '../build/universal';
|
||||
|
||||
# Extra build name, if needed.
|
||||
$BuildNameExtra = 'Release';
|
||||
|
||||
# User comment, eg. ip address for dhcp builds.
|
||||
# ex: $UserComment = "ip = 208.12.36.108";
|
||||
#$UserComment = 0;
|
||||
|
||||
#-
|
||||
#- The rest should not need to be changed
|
||||
#-
|
||||
|
||||
#- Minimum wait period from start of build to start of next build in minutes.
|
||||
#$BuildSleep = 10;
|
||||
|
||||
#- Until you get the script working. When it works,
|
||||
#- change to the tree you're actually building
|
||||
#$BuildTree = 'MozillaTest';
|
||||
# CONFIG: $BuildTree = '%buildTree%';
|
||||
$BuildTree = 'MozillaRelease';
|
||||
|
||||
#$BuildName = '';
|
||||
# CONFIG: $BuildTag = '%productTag%_RELEASE';
|
||||
$BuildTag = 'THUNDERBIRD_3_0a2_RELEASE';
|
||||
#$BuildConfigDir = 'mozilla/config';
|
||||
#$Topsrcdir = 'mozilla';
|
||||
|
||||
$BinaryName = 'thunderbird-bin';
|
||||
|
||||
#
|
||||
# For embedding app, use:
|
||||
#$EmbedBinaryName = 'TestGtkEmbed';
|
||||
#$EmbedDistDir = 'dist/bin'
|
||||
|
||||
|
||||
#$ShellOverride = ''; # Only used if the default shell is too stupid
|
||||
#$ConfigureArgs = '';
|
||||
#$ConfigureEnvArgs = '';
|
||||
#$Compiler = 'gcc';
|
||||
#$NSPRArgs = '';
|
||||
#$ShellOverride = '';
|
||||
|
||||
# Release build options
|
||||
$ReleaseBuild = 1;
|
||||
$shiptalkback = 0;
|
||||
$ReleaseToLatest = 0; # Push the release to latest-<milestone>?
|
||||
$ReleaseToDated = 1; # Push the release to YYYY-MM-DD-HH-<milestone>?
|
||||
$build_hour = "3";
|
||||
$package_creation_path = "/mail/installer";
|
||||
# needs setting for mac + talkback: $mac_bundle_path = "/browser/app";
|
||||
$mac_bundle_path = "/mail/app";
|
||||
$ssh_version = "2";
|
||||
# CONFIG: $ssh_user = "%sshUser%";
|
||||
$ssh_user = "cltbld";
|
||||
# CONFIG: $ssh_server = "%sshServer%";
|
||||
$ssh_server = "stage-old.mozilla.org";
|
||||
#$ReleaseGroup = "thunderbird";
|
||||
$ftp_path = "/home/ftp/pub/thunderbird/nightly";
|
||||
$url_path = "http://ftp.mozilla.org/pub/mozilla.org/thunderbird/nightly";
|
||||
$tbox_ftp_path = "/home/ftp/pub/thunderbird/tinderbox-builds";
|
||||
$tbox_url_path = "http://ftp.mozilla.org/pub/mozilla.org/thunderbird/tinderbox-builds";
|
||||
# CONFIG: $milestone = 'thunderbird%version%';
|
||||
$milestone = 'thunderbird3.0a2';
|
||||
$notify_list = "build-announce\@mozilla.org";
|
||||
$stub_installer = 0;
|
||||
$sea_installer = 0;
|
||||
$archive = 1;
|
||||
$push_raw_xpis = 0;
|
||||
$update_package = 1;
|
||||
$update_product = "Thunderbird";
|
||||
$update_version = "trunk";
|
||||
$update_platform = "Darwin_Universal-gcc3";
|
||||
$update_hash = "sha1";
|
||||
$update_filehost = "ftp.mozilla.org";
|
||||
$update_ver_file = "mail/config/version.txt";
|
||||
$update_pushinfo = 0;
|
||||
$crashreporter_buildsymbols = 1;
|
||||
$crashreporter_pushsymbols = 1;
|
||||
# CONFIG: $ENV{'SYMBOL_SERVER_HOST'} = '%symbolServer%';
|
||||
$ENV{'SYMBOL_SERVER_HOST'} = 'dm-symbolpush01.mozilla.org';
|
||||
# CONFIG: $ENV{'SYMBOL_SERVER_USER'} = '%symbolServerUser%';
|
||||
$ENV{'SYMBOL_SERVER_USER'} = 'tbirdbld';
|
||||
# CONFIG: $ENV{'SYMBOL_SERVER_PATH'} = '%symbolServerPath%';
|
||||
$ENV{'SYMBOL_SERVER_PATH'} = '/mnt/netapp/breakpad/symbols_tbrd';
|
||||
# CONFIG: $ENV{'SYMBOL_SERVER_SSH_KEY'} = '%symbolServerKey%';
|
||||
$ENV{'SYMBOL_SERVER_SSH_KEY'} = '/Users/cltbld/.ssh/tbirdbld_dsa';
|
||||
|
||||
# Reboot the OS at the end of build-and-test cycle. This is primarily
|
||||
# intended for Win9x, which can't last more than a few cycles before
|
||||
# locking up (and testing would be suspect even after a couple of cycles).
|
||||
# Right now, there is only code to force the reboot for Win9x, so even
|
||||
# setting this to 1, will not have an effect on other platforms. Setting
|
||||
# up win9x to automatically logon and begin running tinderbox is left
|
||||
# as an exercise to the reader.
|
||||
#$RebootSystem = 0;
|
||||
|
||||
# LogCompression specifies the type of compression used on the log file.
|
||||
# Valid options are 'gzip', and 'bzip2'. Please make sure the binaries
|
||||
# for 'gzip' or 'bzip2' are in the user's path before setting this
|
||||
# option.
|
||||
#$LogCompression = '';
|
||||
|
||||
# LogEncoding specifies the encoding format used for the logs. Valid
|
||||
# options are 'base64', and 'uuencode'. If $LogCompression is set above,
|
||||
# this needs to be set to 'base64' or 'uuencode' to ensure that the
|
||||
# binary data is transferred properly.
|
||||
#$LogEncoding = '';
|
||||
|
||||
# Prevent Extension Manager from spawning child processes during tests
|
||||
# - processes that tbox scripts cannot kill.
|
||||
#$ENV{NO_EM_RESTART} = '1';
|
||||
@@ -1 +0,0 @@
|
||||
Clobbering to force nightly due to nightly bustage from bug 428672.
|
||||
@@ -1,22 +0,0 @@
|
||||
#
|
||||
## hostname: tbnewref-win32-tbox
|
||||
## MINGW32_NT-5.2 TBNEWREF-WIN32- 1.0.11(0.46/3/2) 2007-01-12 12:05 i686 Msys
|
||||
#
|
||||
|
||||
mk_add_options MOZ_CO_PROJECT=mail
|
||||
mk_add_options MOZ_DEBUG_SYMBOLS=1
|
||||
mk_add_options MOZ_MAKE_FLAGS=-j1
|
||||
mk_add_options MOZ_CO_MODULE="mozilla/tools/update-packaging"
|
||||
|
||||
ac_add_options --enable-application=mail
|
||||
ac_add_options --enable-update-channel=beta
|
||||
ac_add_options --disable-debug
|
||||
# Add explicit optimize flags in configure.in, not here - see bug 407794
|
||||
ac_add_options --enable-optimize
|
||||
ac_add_options --disable-tests
|
||||
ac_add_options --disable-shared
|
||||
ac_add_options --enable-static
|
||||
ac_add_options --enable-update-packaging
|
||||
|
||||
export WIN32_REDIST_DIR="/d/msvs8/VC/redist/x86/Microsoft.VC80.CRT"
|
||||
|
||||
@@ -1,235 +0,0 @@
|
||||
#
|
||||
## hostname: tbnewref-win32-tbox
|
||||
## MINGW32_NT-5.2 TBNEWREF-WIN32- 1.0.11(0.46/3/2) 2007-01-12 12:05 i686 Msys
|
||||
#
|
||||
|
||||
#- tinder-config.pl - Tinderbox configuration file.
|
||||
#- Uncomment the variables you need to set.
|
||||
#- The default values are the same as the commented variables.
|
||||
|
||||
$ENV{CVSROOT}=":ext:tbirdbld\@cvs.mozilla.org:/cvsroot";
|
||||
$ENV{MOZ_INSTALLER_USE_7ZIP}="1";
|
||||
$ENV{MOZ_PACKAGE_MSI} = 0;
|
||||
$ENV{MOZ_CRASHREPORTER_NO_REPORT} = '1';
|
||||
# Both these two variables are for source server support
|
||||
$ENV{PDBSTR_PATH} = 'C:\\Program Files\\Debugging Tools for Windows\\sdk\\srcsrv\\pdbstr.exe';
|
||||
$ENV{SRCSRV_ROOT} = ':pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot';
|
||||
|
||||
#- PLEASE FILL THIS IN WITH YOUR PROPER EMAIL ADDRESS
|
||||
#$BuildAdministrator = "$ENV{USER}\@$ENV{HOST}";
|
||||
#$BuildAdministrator = ($ENV{USER} || "cltbld") . "\@" . ($ENV{HOST} || "dhcp");
|
||||
|
||||
#- You'll need to change these to suit your machine's needs
|
||||
#$DisplayServer = ':0.0';
|
||||
|
||||
#- Default values of command-line opts
|
||||
#-
|
||||
$BuildDepend = 0; # Depend or Clobber
|
||||
#$BuildDebug = 0; # Debug or Opt (Darwin)
|
||||
#$ReportStatus = 1; # Send results to server, or not
|
||||
#$ReportFinalStatus = 1; # Finer control over $ReportStatus.
|
||||
$UseTimeStamp = 0; # Use the CVS 'pull-by-timestamp' option, or not
|
||||
#$BuildOnce = 0; # Build once, don't send results to server
|
||||
#$TestOnly = 0; # Only run tests, don't pull/build
|
||||
#$BuildEmbed = 0; # After building seamonkey, go build embed app.
|
||||
#$SkipMozilla = 0; # Use to debug post-mozilla.pl scripts.
|
||||
#$BuildLocales = 0; # Do l10n packaging?
|
||||
|
||||
# Tests
|
||||
$CleanProfile = 1;
|
||||
#$ResetHomeDirForTests = 1;
|
||||
$ProductName = "Thunderbird";
|
||||
#$VendorName = '';
|
||||
|
||||
$RunMozillaTests = 1; # Allow turning off of all tests if needed.
|
||||
#$RegxpcomTest = 1;
|
||||
#$AliveTest = 1;
|
||||
#$JavaTest = 0;
|
||||
#$ViewerTest = 0;
|
||||
#$BloatTest = 0; # warren memory bloat test
|
||||
#$BloatTest2 = 0; # dbaron memory bloat test, require tracemalloc
|
||||
#$DomToTextConversionTest = 0;
|
||||
#$XpcomGlueTest = 0;
|
||||
#$CodesizeTest = 0; # Z, require mozilla/tools/codesighs
|
||||
#$EmbedCodesizeTest = 0; # mZ, require mozilla/tools/codesigns
|
||||
#$MailBloatTest = 0;
|
||||
#$EmbedTest = 0; # Assumes you wanted $BuildEmbed=1
|
||||
#$LayoutPerformanceTest = 0; # Tp
|
||||
#$DHTMLPerformanceTest = 0; # Tdhtml
|
||||
#$QATest = 0;
|
||||
#$XULWindowOpenTest = 0; # Txul
|
||||
#$StartupPerformanceTest = 0; # Ts
|
||||
|
||||
$TestsPhoneHome = 0; # Should test report back to server?
|
||||
#$results_server = "axolotl.mozilla.org"; # was tegu
|
||||
#$pageload_server = "spider"; # localhost
|
||||
|
||||
#
|
||||
# Timeouts, values are in seconds.
|
||||
#
|
||||
#$CVSCheckoutTimeout = 3600;
|
||||
#$CreateProfileTimeout = 45;
|
||||
#$RegxpcomTestTimeout = 120;
|
||||
|
||||
#$AliveTestTimeout = 45;
|
||||
#$ViewerTestTimeout = 45;
|
||||
#$EmbedTestTimeout = 45;
|
||||
#$BloatTestTimeout = 120; # seconds
|
||||
#$MailBloatTestTimeout = 120; # seconds
|
||||
#$JavaTestTimeout = 45;
|
||||
#$DomTestTimeout = 45; # seconds
|
||||
#$XpcomGlueTestTimeout = 15;
|
||||
#$CodesizeTestTimeout = 900; # seconds
|
||||
#$CodesizeTestType = "auto"; # {"auto"|"base"}
|
||||
#$LayoutPerformanceTestTimeout = 1200; # entire test, seconds
|
||||
#$DHTMLPerformanceTestTimeout = 1200; # entire test, seconds
|
||||
#$QATestTimeout = 1200; # entire test, seconds
|
||||
#$LayoutPerformanceTestPageTimeout = 30000; # each page, ms
|
||||
#$StartupPerformanceTestTimeout = 15; # seconds
|
||||
#$XULWindowOpenTestTimeout = 150; # seconds
|
||||
|
||||
|
||||
#$MozConfigFileName = 'mozconfig';
|
||||
|
||||
#$UseMozillaProfile = 1;
|
||||
#$MozProfileName = 'default';
|
||||
|
||||
#- Set these to what makes sense for your system
|
||||
$Make = 'make'; # Must be GNU make
|
||||
#$MakeOverrides = '';
|
||||
#$mail = '/bin/mail';
|
||||
#$CVS = 'cvs -q';
|
||||
#$CVSCO = 'checkout -P';
|
||||
|
||||
# win32 usually doesn't have /bin/mail
|
||||
$blat = '/d/mozilla-build/blat261/full/blat';
|
||||
$use_blat = 0;
|
||||
|
||||
# Set moz_cvsroot to something like:
|
||||
# :pserver:$ENV{USER}%netscape.com\@cvs.mozilla.org:/cvsroot
|
||||
# :pserver:anonymous\@cvs-mirror.mozilla.org:/cvsroot
|
||||
#
|
||||
# Note that win32 may not need \@, depends on ' or ".
|
||||
# :pserver:$ENV{USER}%netscape.com@cvs.mozilla.org:/cvsroot
|
||||
|
||||
# CONFIG: $moz_cvsroot = '%mozillaCvsroot%';
|
||||
$moz_cvsroot = 'cltbld@cvs.mozilla.org:/cvsroot';
|
||||
|
||||
#- Set these proper values for your tinderbox server
|
||||
#$Tinderbox_server = 'tinderbox-daemon@tinderbox.mozilla.org';
|
||||
|
||||
# Allow for non-client builds, e.g. camino.
|
||||
#$moz_client_mk = 'client.mk';
|
||||
|
||||
#- Set if you want to build in a separate object tree
|
||||
$ObjDir = 'obj-tb-trunk';
|
||||
|
||||
# Extra build name, if needed.
|
||||
$BuildNameExtra = 'Release';
|
||||
|
||||
# User comment, eg. ip address for dhcp builds.
|
||||
# ex: $UserComment = "ip = 208.12.36.108";
|
||||
#$UserComment = 0;
|
||||
|
||||
#-
|
||||
#- The rest should not need to be changed
|
||||
#-
|
||||
|
||||
#- Minimum wait period from start of build to start of next build in minutes.
|
||||
#$BuildSleep = 10;
|
||||
|
||||
#- Until you get the script working. When it works,
|
||||
#- change to the tree you're actually building
|
||||
# CONFIG: $BuildTree = '%buildTree%';
|
||||
$BuildTree = 'MozillaRelease';
|
||||
|
||||
#$BuildName = '';
|
||||
# CONFIG: $BuildTag = '%productTag%_RELEASE';
|
||||
$BuildTag = 'THUNDERBIRD_3_0a2_RELEASE';
|
||||
#$BuildConfigDir = 'mozilla/config';
|
||||
#$Topsrcdir = 'mozilla';
|
||||
|
||||
$BinaryName = 'thunderbird.exe';
|
||||
|
||||
#
|
||||
# For embedding app, use:
|
||||
#$EmbedBinaryName = 'TestGtkEmbed';
|
||||
#$EmbedDistDir = 'dist/bin'
|
||||
|
||||
|
||||
#$ShellOverride = ''; # Only used if the default shell is too stupid
|
||||
#$ConfigureArgs = '';
|
||||
#$ConfigureEnvArgs = '';
|
||||
#$Compiler = 'gcc';
|
||||
#$NSPRArgs = '';
|
||||
#$ShellOverride = '';
|
||||
|
||||
# Release build options
|
||||
$ReleaseBuild = 1;
|
||||
$shiptalkback = 0;
|
||||
$ReleaseToLatest = 0;
|
||||
$ReleaseToDated = 1;
|
||||
$build_hour = "3";
|
||||
$package_creation_path = "/mail/installer";
|
||||
# needs setting for mac + talkback: $mac_bundle_path = "/browser/app";
|
||||
$ssh_version = "2";
|
||||
# CONFIG: $ssh_user = "%sshUser%";
|
||||
$ssh_user = "cltbld";
|
||||
# CONFIG: $ssh_server = "%sshServer%";
|
||||
$ssh_server = "stage-old.mozilla.org";
|
||||
#$ReleaseGroup = "thunderbird";
|
||||
$ftp_path = "/home/ftp/pub/thunderbird/nightly";
|
||||
$url_path = "http://ftp.mozilla.org/pub/mozilla.org/thunderbird/nightly";
|
||||
$tbox_ftp_path = "/home/ftp/pub/thunderbird/tinderbox-builds";
|
||||
$tbox_url_path = "http://ftp.mozilla.org/pub/mozilla.org/thunderbird/tinderbox-builds";
|
||||
# CONFIG: $milestone = 'thunderbird%version%';
|
||||
$milestone = 'thunderbird3.0a2';
|
||||
$notify_list = "build-announce\@mozilla.org";
|
||||
$stub_installer = 0;
|
||||
$sea_installer = 1;
|
||||
$archive = 1;
|
||||
$push_raw_xpis = 1;
|
||||
|
||||
$update_package = 1;
|
||||
$update_product = "Thunderbird";
|
||||
$update_version = "trunk";
|
||||
$update_ver_file = "mail/config/version.txt";
|
||||
$update_platform = "WINNT_x86-msvc";
|
||||
$update_hash = "sha1";
|
||||
$update_filehost = "ftp.mozilla.org";
|
||||
$update_pushinfo = 0;
|
||||
$crashreporter_buildsymbols = 1;
|
||||
$crashreporter_pushsymbols = 1;
|
||||
# CONFIG: $ENV{'SYMBOL_SERVER_HOST'} = '%symbolServer%';
|
||||
$ENV{'SYMBOL_SERVER_HOST'} = 'dm-symbolpush01.mozilla.org';
|
||||
# CONFIG: $ENV{'SYMBOL_SERVER_USER'} = '%symbolServerUser%';
|
||||
$ENV{'SYMBOL_SERVER_USER'} = 'tbirdbld';
|
||||
# CONFIG: $ENV{'SYMBOL_SERVER_PATH'} = '%symbolServerPath%';
|
||||
$ENV{'SYMBOL_SERVER_PATH'} = '/mnt/netapp/breakpad/symbols_tbrd';
|
||||
# CONFIG: $ENV{'SYMBOL_SERVER_SSH_KEY'} = '%symbolServerKey%';
|
||||
$ENV{'SYMBOL_SERVER_SSH_KEY'} = '/c/Documents and Settings/cltbld/.ssh/tbirdbld_dsa';
|
||||
|
||||
# Reboot the OS at the end of build-and-test cycle. This is primarily
|
||||
# intended for Win9x, which can't last more than a few cycles before
|
||||
# locking up (and testing would be suspect even after a couple of cycles).
|
||||
# Right now, there is only code to force the reboot for Win9x, so even
|
||||
# setting this to 1, will not have an effect on other platforms. Setting
|
||||
# up win9x to automatically logon and begin running tinderbox is left
|
||||
# as an exercise to the reader.
|
||||
#$RebootSystem = 0;
|
||||
|
||||
# LogCompression specifies the type of compression used on the log file.
|
||||
# Valid options are 'gzip', and 'bzip2'. Please make sure the binaries
|
||||
# for 'gzip' or 'bzip2' are in the user's path before setting this
|
||||
# option.
|
||||
#$LogCompression = '';
|
||||
|
||||
# LogEncoding specifies the encoding format used for the logs. Valid
|
||||
# options are 'base64', and 'uuencode'. If $LogCompression is set above,
|
||||
# this needs to be set to 'base64' or 'uuencode' to ensure that the
|
||||
# binary data is transferred properly.
|
||||
#$LogEncoding = '';
|
||||
|
||||
# Prevent Extension Manager from spawning child processes during tests
|
||||
# - processes that tbox scripts cannot kill.
|
||||
#$ENV{NO_EM_RESTART} = '1';
|
||||
@@ -1 +0,0 @@
|
||||
Clobbering to fix up checkout issues
|
||||
@@ -1,17 +0,0 @@
|
||||
#
|
||||
## hostname: xr-linux-tbox
|
||||
## uname: Linux xr-linux-tbox.build.mozilla.org 2.6.18-8.el5 #1 SMP Thu Mar 15 19:57:35 EDT 2007 i686 i686 i386 GNU/Linux
|
||||
#
|
||||
|
||||
export MOZILLA_OFFICIAL=1
|
||||
export JAVA_HOME=/tools/jdk
|
||||
mk_add_options MOZILLA_OFFICIAL=1
|
||||
|
||||
mk_add_options MOZ_CO_PROJECT=xulrunner
|
||||
mk_add_options MOZ_MAKE_FLAGS="-j3"
|
||||
|
||||
ac_add_options --enable-application=xulrunner
|
||||
ac_add_options --disable-tests
|
||||
|
||||
CC=/tools/gcc-4.1.1/bin/gcc
|
||||
CXX=/tools/gcc-4.1.1/bin/g++
|
||||
@@ -1,262 +0,0 @@
|
||||
#
|
||||
## hostname: xr-linux-tbox
|
||||
## uname: Linux xr-linux-tbox.build.mozilla.org 2.6.18-8.el5 #1 SMP Thu Mar 15 19:57:35 EDT 2007 i686 i686 i386 GNU/Linux
|
||||
#
|
||||
|
||||
#- tinder-config.pl - Tinderbox configuration file.
|
||||
#- Uncomment the variables you need to set.
|
||||
#- The default values are the same as the commented variables.
|
||||
|
||||
$ENV{MOZ_CRASHREPORTER_NO_REPORT} = '1';
|
||||
|
||||
# $ENV{MOZ_PACKAGE_MSI}
|
||||
#-----------------------------------------------------------------------------
|
||||
# Default: 0
|
||||
# Values: 0 | 1
|
||||
# Purpose: Controls whether a MSI package is made.
|
||||
# Requires: Windows and a local MakeMSI installation.
|
||||
#$ENV{MOZ_PACKAGE_MSI} = 0;
|
||||
|
||||
# $ENV{MOZ_SYMBOLS_TRANSFER_TYPE}
|
||||
#-----------------------------------------------------------------------------
|
||||
# Default: scp
|
||||
# Values: scp | rsync
|
||||
# Purpose: Use scp or rsync to transfer symbols to the Talkback server.
|
||||
# Requires: The selected type requires the command be available both locally
|
||||
# and on the Talkback server.
|
||||
#$ENV{MOZ_SYMBOLS_TRANSFER_TYPE} = "scp";
|
||||
|
||||
#- PLEASE FILL THIS IN WITH YOUR PROPER EMAIL ADDRESS
|
||||
#$BuildAdministrator = "$ENV{USER}\@$ENV{HOST}";
|
||||
#$BuildAdministrator = ($ENV{USER} || "cltbld") . "\@" . ($ENV{HOST} || "dhcp");
|
||||
$BuildAdministrator = "build\@mozilla.org";
|
||||
|
||||
#- You'll need to change these to suit your machine's needs
|
||||
#$DisplayServer = ':0.0';
|
||||
|
||||
#- Default values of command-line opts
|
||||
#-
|
||||
#$BuildDepend = 1; # Depend or Clobber
|
||||
#$BuildDebug = 0; # Debug or Opt (Darwin)
|
||||
#$ReportStatus = 1; # Send results to server, or not
|
||||
#$ReportFinalStatus = 1; # Finer control over $ReportStatus.
|
||||
$UseTimeStamp = 0; # Use the CVS 'pull-by-timestamp' option, or not
|
||||
#$BuildOnce = 0; # Build once, don't send results to server
|
||||
#$ConfigureOnly = 0; # Configure, but do not build.
|
||||
#$TestOnly = 0; # Only run tests, don't pull/build
|
||||
#$BuildEmbed = 0; # After building seamonkey, go build embed app.
|
||||
#$SkipMozilla = 0; # Use to debug post-mozilla.pl scripts.
|
||||
#$BuildLocales = 0; # Do l10n packaging?
|
||||
$BuildSDK = 1; # Build the SDK
|
||||
|
||||
# Only used when $BuildLocales = 1
|
||||
%WGetFiles = (); # Pull files from the web, URL => Location
|
||||
#$WGetTimeout = 360; # Wget timeout, in seconds
|
||||
#$BuildLocalesArgs = ""; # Extra attributes to add to the makefile command
|
||||
# which builds the "installers-<locale>" target.
|
||||
# Typically used to set ZIP_IN and WIN32_INSTALLER_IN
|
||||
|
||||
# Tests
|
||||
$CleanProfile = 1;
|
||||
#$ResetHomeDirForTests = 1;
|
||||
$ProductName = "XULRunner";
|
||||
$VendorName = 'Mozilla';
|
||||
|
||||
$RunMozillaTests = 0; # Allow turning off of all tests if needed.
|
||||
#$RegxpcomTest = 1;
|
||||
#$AliveTest = 1;
|
||||
#$JavaTest = 0;
|
||||
#$ViewerTest = 0;
|
||||
#$BloatTest = 0; # warren memory bloat test
|
||||
#$BloatTest2 = 0; # dbaron memory bloat test, require tracemalloc
|
||||
#$DomToTextConversionTest = 0;
|
||||
#$XpcomGlueTest = 0;
|
||||
#$CodesizeTest = 0; # Z, require mozilla/tools/codesighs
|
||||
#$EmbedCodesizeTest = 0; # mZ, require mozilla/tools/codesigns
|
||||
#$MailBloatTest = 0;
|
||||
#$EmbedTest = 0; # Assumes you wanted $BuildEmbed=1
|
||||
#$LayoutPerformanceTest = 0; # Tp
|
||||
#$DHTMLPerformanceTest = 0; # Tdhtml
|
||||
#$QATest = 0;
|
||||
#$XULWindowOpenTest = 0; # Txul
|
||||
#$StartupPerformanceTest = 0; # Ts
|
||||
#@CompareLocaleDirs = (); # Run compare-locales test on these directories
|
||||
# ("network","dom","toolkit","security/manager");
|
||||
#$CompareLocalesAviary = 0; # Should the compare-locales commands use the
|
||||
# aviary directory structure?
|
||||
|
||||
#$TestsPhoneHome = 0; # Should test report back to server?
|
||||
|
||||
# $results_server
|
||||
#----------------------------------------------------------------------------
|
||||
# Server on which test results will be accessible. This was originally tegu,
|
||||
# then became axolotl. Once we moved services from axolotl, it was time
|
||||
# to give this service its own hostname to make future transitions easier.
|
||||
# - cmp@mozilla.org
|
||||
#$results_server = "build-graphs.mozilla.org";
|
||||
|
||||
#$pageload_server = "spider"; # localhost
|
||||
|
||||
#
|
||||
# Timeouts, values are in seconds.
|
||||
#
|
||||
#$CVSCheckoutTimeout = 3600;
|
||||
#$CreateProfileTimeout = 45;
|
||||
#$RegxpcomTestTimeout = 120;
|
||||
|
||||
#$AliveTestTimeout = 45;
|
||||
#$ViewerTestTimeout = 45;
|
||||
#$EmbedTestTimeout = 45;
|
||||
#$BloatTestTimeout = 120; # seconds
|
||||
#$MailBloatTestTimeout = 120; # seconds
|
||||
#$JavaTestTimeout = 45;
|
||||
#$DomTestTimeout = 45; # seconds
|
||||
#$XpcomGlueTestTimeout = 15;
|
||||
#$CodesizeTestTimeout = 900; # seconds
|
||||
#$CodesizeTestType = "auto"; # {"auto"|"base"}
|
||||
#$LayoutPerformanceTestTimeout = 1200; # entire test, seconds
|
||||
#$DHTMLPerformanceTestTimeout = 1200; # entire test, seconds
|
||||
#$QATestTimeout = 1200; # entire test, seconds
|
||||
#$LayoutPerformanceTestPageTimeout = 30000; # each page, ms
|
||||
#$StartupPerformanceTestTimeout = 15; # seconds
|
||||
#$XULWindowOpenTestTimeout = 150; # seconds
|
||||
|
||||
|
||||
#$MozConfigFileName = 'mozconfig';
|
||||
|
||||
#$UseMozillaProfile = 1;
|
||||
#$MozProfileName = 'default';
|
||||
|
||||
#- Set these to what makes sense for your system
|
||||
#$Make = 'gmake'; # Must be GNU make
|
||||
#$MakeOverrides = '';
|
||||
#$mail = '/bin/mail';
|
||||
#$CVS = 'cvs -q';
|
||||
#$CVSCO = 'checkout -P';
|
||||
|
||||
# win32 usually doesn't have /bin/mail
|
||||
#$blat = 'c:/nstools/bin/blat';
|
||||
#$use_blat = 0;
|
||||
|
||||
# Set moz_cvsroot to something like:
|
||||
# :pserver:$ENV{USER}%netscape.com\@cvs.mozilla.org:/cvsroot
|
||||
# :pserver:anonymous\@cvs-mirror.mozilla.org:/cvsroot
|
||||
#
|
||||
# Note that win32 may not need \@, depends on ' or ".
|
||||
# :pserver:$ENV{USER}%netscape.com@cvs.mozilla.org:/cvsroot
|
||||
|
||||
#$moz_cvsroot = $ENV{CVSROOT};
|
||||
# CONFIG: $moz_cvsroot = '%mozillaCvsroot%';
|
||||
$moz_cvsroot = 'cltbld@cvs.mozilla.org:/cvsroot';
|
||||
|
||||
#- Set these proper values for your tinderbox server
|
||||
#$Tinderbox_server = 'tinderbox-daemon@tinderbox.mozilla.org';
|
||||
|
||||
# Allow for non-client builds, e.g. camino.
|
||||
#$moz_client_mk = 'client.mk';
|
||||
|
||||
#- Set if you want to build in a separate object tree
|
||||
$ObjDir = 'obj-xulrunner';
|
||||
|
||||
# Extra build name, if needed.
|
||||
$BuildNameExtra = 'Release';
|
||||
|
||||
# User comment, eg. ip address for dhcp builds.
|
||||
# ex: $UserComment = "ip = 208.12.36.108";
|
||||
#$UserComment = 0;
|
||||
|
||||
#-
|
||||
#- The rest should not need to be changed
|
||||
#-
|
||||
|
||||
#- Minimum wait period from start of build to start of next build in minutes.
|
||||
#$BuildSleep = 10;
|
||||
|
||||
#- Until you get the script working. When it works,
|
||||
#- change to the tree you're actually building
|
||||
# CONFIG: $BuildTree = '%buildTree%';
|
||||
$BuildTree = 'MozillaRelease';
|
||||
|
||||
#$BuildName = '';
|
||||
# CONFIG: $BuildTag = '%productTag%_RELEASE';
|
||||
$BuildTag = 'FIREFOX_3_0_17_RELEASE';
|
||||
#$BuildConfigDir = 'mozilla/config';
|
||||
#$Topsrcdir = 'mozilla';
|
||||
|
||||
$BinaryName = 'xulrunner-bin';
|
||||
|
||||
#
|
||||
# For embedding app, use:
|
||||
#$EmbedBinaryName = 'TestGtkEmbed';
|
||||
#$EmbedDistDir = 'dist/bin'
|
||||
|
||||
|
||||
#$ShellOverride = ''; # Only used if the default shell is too stupid
|
||||
#$ConfigureArgs = '';
|
||||
#$ConfigureEnvArgs = '';
|
||||
#$Compiler = 'gcc';
|
||||
#$NSPRArgs = '';
|
||||
#$ShellOverride = '';
|
||||
|
||||
# Release build options
|
||||
$ReleaseBuild = 1;
|
||||
#$LocaleProduct = "browser";
|
||||
$shiptalkback = 0;
|
||||
$ReleaseToLatest = 0; # Push the release to latest-<milestone>?
|
||||
$ReleaseToDated = 1; # Push the release to YYYY-MM-DD-HH-<milestone>?
|
||||
#$build_hour = "8";
|
||||
$package_creation_path = "/xulrunner/installer";
|
||||
# needs setting for mac + talkback: $mac_bundle_path = "/browser/app";
|
||||
$ssh_version = "2";
|
||||
# CONFIG: $ssh_user = "%sshUser%";
|
||||
$ssh_user = "cltbld";
|
||||
#$ssh_key = "$ENV{HOME}/.ssh/xrbld_dsa";
|
||||
# CONFIG: $ssh_server = "%sshServer%";
|
||||
$ssh_server = "stage-old.mozilla.org";
|
||||
$ReleaseGroup = "xulrunner";
|
||||
$ftp_path = "/home/ftp/pub/xulrunner/nightly";
|
||||
$url_path = "http://ftp.mozilla.org/pub/mozilla.org/xulrunner/nightly";
|
||||
$tbox_ftp_path = "/home/ftp/pub/xulrunner/tinderbox-builds";
|
||||
$tbox_url_path = "http://ftp.mozilla.org/pub/mozilla.org/xulrunner/tinderbox-builds";
|
||||
# CONFIG: $milestone = "xulrunner%version%";
|
||||
$milestone = "xulrunner1.9.0.17";
|
||||
$notify_list = "build-announce\@mozilla.org";
|
||||
$stub_installer = 0;
|
||||
$sea_installer = 0;
|
||||
$archive = 1;
|
||||
$push_raw_xpis = 0;
|
||||
$crashreporter_buildsymbols = 0;
|
||||
$crashreporter_pushsymbols = 0;
|
||||
# CONFIG: $ENV{'SYMBOL_SERVER_HOST'} = '%symbolServer%';
|
||||
$ENV{'SYMBOL_SERVER_HOST'} = 'stage-old.mozilla.org';
|
||||
# CONFIG: $ENV{'SYMBOL_SERVER_USER'} = '%symbolServerUser%';
|
||||
$ENV{'SYMBOL_SERVER_USER'} = 'xrbld';
|
||||
# CONFIG: $ENV{'SYMBOL_SERVER_PATH'} = '%symbolServerPath%';
|
||||
$ENV{'SYMBOL_SERVER_PATH'} = '/mnt/netapp/breakpad/symbols_xr';
|
||||
# CONFIG: $ENV{'SYMBOL_SERVER_SSH_KEY'} = '%symbolServerKey%';
|
||||
$ENV{'SYMBOL_SERVER_SSH_KEY'} = '/home/cltbld/.ssh/xrbld_dsa';
|
||||
|
||||
# Reboot the OS at the end of build-and-test cycle. This is primarily
|
||||
# intended for Win9x, which can't last more than a few cycles before
|
||||
# locking up (and testing would be suspect even after a couple of cycles).
|
||||
# Right now, there is only code to force the reboot for Win9x, so even
|
||||
# setting this to 1, will not have an effect on other platforms. Setting
|
||||
# up win9x to automatically logon and begin running tinderbox is left
|
||||
# as an exercise to the reader.
|
||||
#$RebootSystem = 0;
|
||||
|
||||
# LogCompression specifies the type of compression used on the log file.
|
||||
# Valid options are 'gzip', and 'bzip2'. Please make sure the binaries
|
||||
# for 'gzip' or 'bzip2' are in the user's path before setting this
|
||||
# option.
|
||||
#$LogCompression = '';
|
||||
|
||||
# LogEncoding specifies the encoding format used for the logs. Valid
|
||||
# options are 'base64', and 'uuencode'. If $LogCompression is set above,
|
||||
# this needs to be set to 'base64' or 'uuencode' to ensure that the
|
||||
# binary data is transferred properly.
|
||||
#$LogEncoding = '';
|
||||
|
||||
# Prevent Extension Manager from spawning child processes during tests
|
||||
# - processes that tbox scripts cannot kill.
|
||||
#$ENV{NO_EM_RESTART} = '1';
|
||||
@@ -1 +0,0 @@
|
||||
CLOBBERing to disable zipwriter from bug 379633
|
||||
@@ -1,20 +0,0 @@
|
||||
#
|
||||
## hostname: bm-xserve09.build.mozilla.org
|
||||
## uname: Darwin bm-xserve09.build.mozilla.org 8.8.4 Darwin Kernel Version 8.8.4: Sun Oct 29 15:26:54 PST 2006; root:xnu-792.16.4.obj~1/RELEASE_I386 i386 i386
|
||||
#
|
||||
|
||||
. $topsrcdir/build/macosx/universal/mozconfig
|
||||
|
||||
export MOZILLA_OFFICIAL=1
|
||||
export JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Home
|
||||
mk_add_options MOZILLA_OFFICIAL=1
|
||||
|
||||
mk_add_options MOZ_CO_PROJECT=xulrunner
|
||||
mk_add_options MOZ_MAKE_FLAGS="-j8"
|
||||
mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/../build/universal
|
||||
|
||||
ac_add_options --enable-application=xulrunner
|
||||
ac_add_options --disable-tests
|
||||
ac_add_options --enable-svg
|
||||
ac_add_options --enable-canvas
|
||||
ac_add_app_options ppc --enable-prebinding
|
||||
@@ -1,268 +0,0 @@
|
||||
#
|
||||
## hostname: bm-xserve09.build.mozilla.org
|
||||
## uname: Darwin bm-xserve09.build.mozilla.org 8.8.4 Darwin Kernel Version 8.8.4: Sun Oct 29 15:26:54 PST 2006; root:xnu-792.16.4.obj~1/RELEASE_I386 i386 i386
|
||||
#
|
||||
|
||||
#- tinder-config.pl - Tinderbox configuration file.
|
||||
#- Uncomment the variables you need to set.
|
||||
#- The default values are the same as the commented variables.
|
||||
|
||||
$MacUniversalBinary = 1;
|
||||
|
||||
$ENV{CHOWN_ROOT} = "/builds/tinderbox/bin/chown_root";
|
||||
$ENV{REVERT_ROOT} = "/builds/tinderbox/bin/revert_root";
|
||||
$ENV{CHOWN_REVERT} = $ENV{REVERT_ROOT};
|
||||
$ENV{MOZ_CRASHREPORTER_NO_REPORT} = '1';
|
||||
|
||||
# $ENV{MOZ_PACKAGE_MSI}
|
||||
#-----------------------------------------------------------------------------
|
||||
# Default: 0
|
||||
# Values: 0 | 1
|
||||
# Purpose: Controls whether a MSI package is made.
|
||||
# Requires: Windows and a local MakeMSI installation.
|
||||
#$ENV{MOZ_PACKAGE_MSI} = 0;
|
||||
|
||||
# $ENV{MOZ_SYMBOLS_TRANSFER_TYPE}
|
||||
#-----------------------------------------------------------------------------
|
||||
# Default: scp
|
||||
# Values: scp | rsync
|
||||
# Purpose: Use scp or rsync to transfer symbols to the Talkback server.
|
||||
# Requires: The selected type requires the command be available both locally
|
||||
# and on the Talkback server.
|
||||
#$ENV{MOZ_SYMBOLS_TRANSFER_TYPE} = "scp";
|
||||
|
||||
#- PLEASE FILL THIS IN WITH YOUR PROPER EMAIL ADDRESS
|
||||
#$BuildAdministrator = "$ENV{USER}\@$ENV{HOST}";
|
||||
#$BuildAdministrator = ($ENV{USER} || "cltbld") . "\@" . ($ENV{HOST} || "dhcp");
|
||||
$BuildAdministrator = "build\@mozilla.org";
|
||||
|
||||
#- You'll need to change these to suit your machine's needs
|
||||
#$DisplayServer = ':0.0';
|
||||
|
||||
#- Default values of command-line opts
|
||||
#-
|
||||
#$BuildDepend = 1; # Depend or Clobber
|
||||
#$BuildDebug = 0; # Debug or Opt (Darwin)
|
||||
#$ReportStatus = 1; # Send results to server, or not
|
||||
#$ReportFinalStatus = 1; # Finer control over $ReportStatus.
|
||||
$UseTimeStamp = 0; # Use the CVS 'pull-by-timestamp' option, or not
|
||||
#$BuildOnce = 0; # Build once, don't send results to server
|
||||
#$ConfigureOnly = 0; # Configure, but do not build.
|
||||
#$TestOnly = 0; # Only run tests, don't pull/build
|
||||
#$BuildEmbed = 0; # After building seamonkey, go build embed app.
|
||||
#$SkipMozilla = 0; # Use to debug post-mozilla.pl scripts.
|
||||
#$BuildLocales = 0; # Do l10n packaging?
|
||||
$BuildSDK = 1; # Build the SDK
|
||||
|
||||
# Only used when $BuildLocales = 1
|
||||
%WGetFiles = (); # Pull files from the web, URL => Location
|
||||
#$WGetTimeout = 360; # Wget timeout, in seconds
|
||||
#$BuildLocalesArgs = ""; # Extra attributes to add to the makefile command
|
||||
# which builds the "installers-<locale>" target.
|
||||
# Typically used to set ZIP_IN and WIN32_INSTALLER_IN
|
||||
|
||||
# Tests
|
||||
$CleanProfile = 1;
|
||||
#$ResetHomeDirForTests = 1;
|
||||
$ProductName = "XULRunner";
|
||||
$VendorName = 'Mozilla';
|
||||
|
||||
$RunMozillaTests = 0; # Allow turning off of all tests if needed.
|
||||
#$RegxpcomTest = 1;
|
||||
#$AliveTest = 1;
|
||||
#$JavaTest = 0;
|
||||
#$ViewerTest = 0;
|
||||
#$BloatTest = 0; # warren memory bloat test
|
||||
#$BloatTest2 = 0; # dbaron memory bloat test, require tracemalloc
|
||||
#$DomToTextConversionTest = 0;
|
||||
#$XpcomGlueTest = 0;
|
||||
#$CodesizeTest = 0; # Z, require mozilla/tools/codesighs
|
||||
#$EmbedCodesizeTest = 0; # mZ, require mozilla/tools/codesigns
|
||||
#$MailBloatTest = 0;
|
||||
#$EmbedTest = 0; # Assumes you wanted $BuildEmbed=1
|
||||
#$LayoutPerformanceTest = 0; # Tp
|
||||
#$DHTMLPerformanceTest = 0; # Tdhtml
|
||||
#$QATest = 0;
|
||||
#$XULWindowOpenTest = 0; # Txul
|
||||
#$StartupPerformanceTest = 0; # Ts
|
||||
#@CompareLocaleDirs = (); # Run compare-locales test on these directories
|
||||
# ("network","dom","toolkit","security/manager");
|
||||
#$CompareLocalesAviary = 0; # Should the compare-locales commands use the
|
||||
# aviary directory structure?
|
||||
|
||||
#$TestsPhoneHome = 0; # Should test report back to server?
|
||||
|
||||
# $results_server
|
||||
#----------------------------------------------------------------------------
|
||||
# Server on which test results will be accessible. This was originally tegu,
|
||||
# then became axolotl. Once we moved services from axolotl, it was time
|
||||
# to give this service its own hostname to make future transitions easier.
|
||||
# - cmp@mozilla.org
|
||||
#$results_server = "build-graphs.mozilla.org";
|
||||
|
||||
#$pageload_server = "spider"; # localhost
|
||||
|
||||
#
|
||||
# Timeouts, values are in seconds.
|
||||
#
|
||||
#$CVSCheckoutTimeout = 3600;
|
||||
#$CreateProfileTimeout = 45;
|
||||
#$RegxpcomTestTimeout = 120;
|
||||
|
||||
#$AliveTestTimeout = 45;
|
||||
#$ViewerTestTimeout = 45;
|
||||
#$EmbedTestTimeout = 45;
|
||||
#$BloatTestTimeout = 120; # seconds
|
||||
#$MailBloatTestTimeout = 120; # seconds
|
||||
#$JavaTestTimeout = 45;
|
||||
#$DomTestTimeout = 45; # seconds
|
||||
#$XpcomGlueTestTimeout = 15;
|
||||
#$CodesizeTestTimeout = 900; # seconds
|
||||
#$CodesizeTestType = "auto"; # {"auto"|"base"}
|
||||
#$LayoutPerformanceTestTimeout = 1200; # entire test, seconds
|
||||
#$DHTMLPerformanceTestTimeout = 1200; # entire test, seconds
|
||||
#$QATestTimeout = 1200; # entire test, seconds
|
||||
#$LayoutPerformanceTestPageTimeout = 30000; # each page, ms
|
||||
#$StartupPerformanceTestTimeout = 15; # seconds
|
||||
#$XULWindowOpenTestTimeout = 150; # seconds
|
||||
|
||||
|
||||
#$MozConfigFileName = 'mozconfig';
|
||||
|
||||
#$UseMozillaProfile = 1;
|
||||
#$MozProfileName = 'default';
|
||||
|
||||
#- Set these to what makes sense for your system
|
||||
#$Make = 'gmake'; # Must be GNU make
|
||||
#$MakeOverrides = '';
|
||||
#$mail = '/bin/mail';
|
||||
#$CVS = 'cvs -q';
|
||||
#$CVSCO = 'checkout -P';
|
||||
|
||||
# win32 usually doesn't have /bin/mail
|
||||
#$blat = 'c:/nstools/bin/blat';
|
||||
#$use_blat = 0;
|
||||
|
||||
# Set moz_cvsroot to something like:
|
||||
# :pserver:$ENV{USER}%netscape.com\@cvs.mozilla.org:/cvsroot
|
||||
# :pserver:anonymous\@cvs-mirror.mozilla.org:/cvsroot
|
||||
#
|
||||
# Note that win32 may not need \@, depends on ' or ".
|
||||
# :pserver:$ENV{USER}%netscape.com@cvs.mozilla.org:/cvsroot
|
||||
|
||||
# sharing bm-xserve09 with T'bird build, do all CVS pulls with that key
|
||||
# CONFIG: $moz_cvsroot = '%mozillaCvsroot%';
|
||||
$moz_cvsroot = 'cltbld@cvs.mozilla.org:/cvsroot';
|
||||
|
||||
#- Set these proper values for your tinderbox server
|
||||
#$Tinderbox_server = 'tinderbox-daemon@tinderbox.mozilla.org';
|
||||
|
||||
# Allow for non-client builds, e.g. camino.
|
||||
#$moz_client_mk = 'client.mk';
|
||||
|
||||
#- Set if you want to build in a separate object tree
|
||||
$ObjDir = '../build/universal';
|
||||
|
||||
# Extra build name, if needed.
|
||||
$BuildNameExtra = 'Release';
|
||||
|
||||
# User comment, eg. ip address for dhcp builds.
|
||||
# ex: $UserComment = "ip = 208.12.36.108";
|
||||
#$UserComment = 0;
|
||||
|
||||
#-
|
||||
#- The rest should not need to be changed
|
||||
#-
|
||||
|
||||
#- Minimum wait period from start of build to start of next build in minutes.
|
||||
#$BuildSleep = 10;
|
||||
|
||||
#- Until you get the script working. When it works,
|
||||
#- change to the tree you're actually building
|
||||
# CONFIG: $BuildTree = '%buildTree%';
|
||||
$BuildTree = 'MozillaRelease';
|
||||
|
||||
#$BuildName = '';
|
||||
# CONFIG: $BuildTag = '%productTag%_RELEASE';
|
||||
$BuildTag = 'FIREFOX_3_0_17_RELEASE';
|
||||
#$BuildConfigDir = 'mozilla/config';
|
||||
#$Topsrcdir = 'mozilla';
|
||||
|
||||
$BinaryName = 'xulrunner-bin';
|
||||
|
||||
#
|
||||
# For embedding app, use:
|
||||
#$EmbedBinaryName = 'TestGtkEmbed';
|
||||
#$EmbedDistDir = 'dist/bin'
|
||||
|
||||
|
||||
#$ShellOverride = ''; # Only used if the default shell is too stupid
|
||||
#$ConfigureArgs = '';
|
||||
#$ConfigureEnvArgs = '';
|
||||
#$Compiler = 'gcc';
|
||||
#$NSPRArgs = '';
|
||||
#$ShellOverride = '';
|
||||
|
||||
# Release build options
|
||||
$ReleaseBuild = 1;
|
||||
#$LocaleProduct = "browser";
|
||||
$shiptalkback = 0;
|
||||
$ReleaseToLatest = 0; # Push the release to latest-<milestone>?
|
||||
$ReleaseToDated = 1; # Push the release to YYYY-MM-DD-HH-<milestone>?
|
||||
#$build_hour = "8";
|
||||
$package_creation_path = "/xulrunner/installer";
|
||||
# needs setting for mac + talkback: $mac_bundle_path = "/browser/app";
|
||||
$mac_bundle_path = "/browser/app";
|
||||
$ssh_version = "2";
|
||||
# CONFIG: $ssh_user = "%sshUser%";
|
||||
$ssh_user = "cltbld";
|
||||
#$ssh_key = "$ENV{HOME}/.ssh/xrbld_dsa";
|
||||
# CONFIG: $ssh_server = "%sshServer%";
|
||||
$ssh_server = "stage-old.mozilla.org";
|
||||
$ReleaseGroup = "xulrunner";
|
||||
$ftp_path = "/home/ftp/pub/xulrunner/nightly";
|
||||
$url_path = "http://ftp.mozilla.org/pub/mozilla.org/xulrunner/nightly";
|
||||
$tbox_ftp_path = "/home/ftp/pub/xulrunner/tinderbox-builds";
|
||||
$tbox_url_path = "http://ftp.mozilla.org/pub/mozilla.org/xulrunner/tinderbox-builds";
|
||||
# CONFIG: $milestone = 'xulrunner%version%';
|
||||
$milestone = 'xulrunner1.9.0.17';
|
||||
$notify_list = "build-announce\@mozilla.org";
|
||||
$stub_installer = 0;
|
||||
$sea_installer = 0;
|
||||
$archive = 1;
|
||||
$push_raw_xpis = 0;
|
||||
$crashreporter_buildsymbols = 0;
|
||||
$crashreporter_pushsymbols = 0;
|
||||
# CONFIG: $ENV{'SYMBOL_SERVER_HOST'} = '%symbolServer%';
|
||||
$ENV{'SYMBOL_SERVER_HOST'} = 'stage-old.mozilla.org';
|
||||
# CONFIG: $ENV{'SYMBOL_SERVER_USER'} = '%symbolServerUser%';
|
||||
$ENV{'SYMBOL_SERVER_USER'} = 'xrbld';
|
||||
# CONFIG: $ENV{'SYMBOL_SERVER_PATH'} = '%symbolServerPath%';
|
||||
$ENV{'SYMBOL_SERVER_PATH'} = '/mnt/netapp/breakpad/symbols_xr';
|
||||
# CONFIG: $ENV{'SYMBOL_SERVER_SSH_KEY'} = '%symbolServerKey%';
|
||||
$ENV{'SYMBOL_SERVER_SSH_KEY'} = '/Users/cltbld/.ssh/xrbld_dsa';
|
||||
|
||||
# Reboot the OS at the end of build-and-test cycle. This is primarily
|
||||
# intended for Win9x, which can't last more than a few cycles before
|
||||
# locking up (and testing would be suspect even after a couple of cycles).
|
||||
# Right now, there is only code to force the reboot for Win9x, so even
|
||||
# setting this to 1, will not have an effect on other platforms. Setting
|
||||
# up win9x to automatically logon and begin running tinderbox is left
|
||||
# as an exercise to the reader.
|
||||
#$RebootSystem = 0;
|
||||
|
||||
# LogCompression specifies the type of compression used on the log file.
|
||||
# Valid options are 'gzip', and 'bzip2'. Please make sure the binaries
|
||||
# for 'gzip' or 'bzip2' are in the user's path before setting this
|
||||
# option.
|
||||
#$LogCompression = '';
|
||||
|
||||
# LogEncoding specifies the encoding format used for the logs. Valid
|
||||
# options are 'base64', and 'uuencode'. If $LogCompression is set above,
|
||||
# this needs to be set to 'base64' or 'uuencode' to ensure that the
|
||||
# binary data is transferred properly.
|
||||
#$LogEncoding = '';
|
||||
|
||||
# Prevent Extension Manager from spawning child processes during tests
|
||||
# - processes that tbox scripts cannot kill.
|
||||
#$ENV{NO_EM_RESTART} = '1';
|
||||
@@ -1 +0,0 @@
|
||||
Preemptive clobber for /README.txt merge conflict.
|
||||
@@ -1,18 +0,0 @@
|
||||
#
|
||||
# hostname: fxexp-win32-tbox
|
||||
# uname: CYGWIN_NT-5.2 fxexp-win32-tbox 1.5.19(0.150/4/2) 2006-01-20 13:28 i686 Cygwin
|
||||
#
|
||||
|
||||
export MOZILLA_OFFICIAL
|
||||
export JAVA_HOME=/d/jdk1.5.0_10
|
||||
|
||||
mk_add_options MOZILLA_OFFICIAL=1
|
||||
mk_add_options MOZ_CO_PROJECT=xulrunner
|
||||
mk_add_options MOZ_MAKE_FLAGS="-j2"
|
||||
|
||||
ac_add_options --enable-application=xulrunner
|
||||
ac_add_options --enable-jemalloc
|
||||
ac_add_options --disable-tests
|
||||
ac_add_options --enable-svg
|
||||
ac_add_options --enable-canvas
|
||||
ac_add_options --disable-installer
|
||||
@@ -1,255 +0,0 @@
|
||||
#
|
||||
# hostname: fxexp-win32-tbox
|
||||
# uname: CYGWIN_NT-5.2 fxexp-win32-tbox 1.5.19(0.150/4/2) 2006-01-20 13:28 i686 Cygwin
|
||||
#
|
||||
|
||||
#- tinder-config.pl - Tinderbox configuration file.
|
||||
#- Uncomment the variables you need to set.
|
||||
#- The default values are the same as the commented variables.
|
||||
|
||||
$ENV{NO_EM_RESTART} = "1";
|
||||
$ENV{MOZ_INSTALLER_USE_7ZIP} = "1";
|
||||
$ENV{CVS_RSH} = "ssh";
|
||||
$ENV{MOZ_CRASHREPORTER_NO_REPORT} = '1';
|
||||
# Both these two variables are for source server support
|
||||
$ENV{PDBSTR_PATH} = 'C:\\Program Files\\Debugging Tools for Windows\\sdk\\srcsrv\\pdbstr.exe';
|
||||
$ENV{SRCSRV_ROOT} = ':pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot';
|
||||
|
||||
# $ENV{MOZ_PACKAGE_MSI}
|
||||
#-----------------------------------------------------------------------------
|
||||
# Default: 0
|
||||
# Values: 0 | 1
|
||||
# Purpose: Controls whether a MSI package is made.
|
||||
# Requires: Windows and a local MakeMSI installation.
|
||||
#$ENV{MOZ_PACKAGE_MSI} = 0;
|
||||
|
||||
# $ENV{MOZ_SYMBOLS_TRANSFER_TYPE}
|
||||
#-----------------------------------------------------------------------------
|
||||
# Default: scp
|
||||
# Values: scp | rsync
|
||||
# Purpose: Use scp or rsync to transfer symbols to the Talkback server.
|
||||
# Requires: The selected type requires the command be available both locally
|
||||
# and on the Talkback server.
|
||||
#$ENV{MOZ_SYMBOLS_TRANSFER_TYPE} = "scp";
|
||||
|
||||
#- PLEASE FILL THIS IN WITH YOUR PROPER EMAIL ADDRESS
|
||||
#$BuildAdministrator = "$ENV{USER}\@$ENV{HOST}";
|
||||
#$BuildAdministrator = ($ENV{USER} || "cltbld") . "\@" . ($ENV{HOST} || "dhcp");
|
||||
$BuildAdministrator = 'build@mozilla.org';
|
||||
|
||||
#- You'll need to change these to suit your machine's needs
|
||||
#$DisplayServer = ':0.0';
|
||||
|
||||
#- Default values of command-line opts
|
||||
#-
|
||||
#$BuildDepend = 1; # Depend or Clobber
|
||||
#$BuildDebug = 0; # Debug or Opt (Darwin)
|
||||
#$ReportStatus = 1; # Send results to server, or not
|
||||
#$ReportFinalStatus = 1; # Finer control over $ReportStatus.
|
||||
$UseTimeStamp = 0; # Use the CVS 'pull-by-timestamp' option, or not
|
||||
#$BuildOnce = 0; # Build once, don't send results to server
|
||||
#$TestOnly = 0; # Only run tests, don't pull/build
|
||||
#$BuildEmbed = 0; # After building seamonkey, go build embed app.
|
||||
#$SkipMozilla = 0; # Use to debug post-mozilla.pl scripts.
|
||||
#$BuildLocales = 0; # Do l10n packaging?
|
||||
$BuildSDK = 1; # Build the SDK
|
||||
|
||||
# Tests
|
||||
#$CleanProfile = 0;
|
||||
#$ResetHomeDirForTests = 1;
|
||||
$ProductName = "XULRunner";
|
||||
$VendorName = 'Mozilla';
|
||||
|
||||
$RunMozillaTests = 0; # Allow turning off of all tests if needed.
|
||||
#$RegxpcomTest = 1;
|
||||
#$AliveTest = 1;
|
||||
#$JavaTest = 0;
|
||||
#$ViewerTest = 0;
|
||||
#$BloatTest = 0; # warren memory bloat test
|
||||
#$BloatTest2 = 0; # dbaron memory bloat test, require tracemalloc
|
||||
#$DomToTextConversionTest = 0;
|
||||
#$XpcomGlueTest = 0;
|
||||
#$CodesizeTest = 0; # Z, require mozilla/tools/codesighs
|
||||
#$EmbedCodesizeTest = 0; # mZ, require mozilla/tools/codesigns
|
||||
#$MailBloatTest = 0;
|
||||
#$EmbedTest = 0; # Assumes you wanted $BuildEmbed=1
|
||||
#$LayoutPerformanceTest = 0; # Tp
|
||||
#$DHTMLPerformanceTest = 0; # Tdhtml
|
||||
#$QATest = 0;
|
||||
#$XULWindowOpenTest = 0; # Txul
|
||||
#$StartupPerformanceTest = 0; # Ts
|
||||
|
||||
#$TestsPhoneHome = 0; # Should test report back to server?
|
||||
|
||||
# $results_server
|
||||
#----------------------------------------------------------------------------
|
||||
# Server on which test results will be accessible. This was originally tegu,
|
||||
# then became axolotl. Once we moved services from axolotl, it was time
|
||||
# to give this service its own hostname to make future transitions easier.
|
||||
# - cmp@mozilla.org
|
||||
#$results_server = "build-graphs.mozilla.org";
|
||||
|
||||
#$pageload_server = "spider"; # localhost
|
||||
|
||||
#
|
||||
# Timeouts, values are in seconds.
|
||||
#
|
||||
#$CVSCheckoutTimeout = 3600;
|
||||
#$CreateProfileTimeout = 45;
|
||||
#$RegxpcomTestTimeout = 120;
|
||||
|
||||
#$AliveTestTimeout = 45;
|
||||
#$ViewerTestTimeout = 45;
|
||||
#$EmbedTestTimeout = 45;
|
||||
#$BloatTestTimeout = 120; # seconds
|
||||
#$MailBloatTestTimeout = 120; # seconds
|
||||
#$JavaTestTimeout = 45;
|
||||
#$DomTestTimeout = 45; # seconds
|
||||
#$XpcomGlueTestTimeout = 15;
|
||||
#$CodesizeTestTimeout = 900; # seconds
|
||||
#$CodesizeTestType = "auto"; # {"auto"|"base"}
|
||||
#$LayoutPerformanceTestTimeout = 1200; # entire test, seconds
|
||||
#$DHTMLPerformanceTestTimeout = 1200; # entire test, seconds
|
||||
#$QATestTimeout = 1200; # entire test, seconds
|
||||
#$LayoutPerformanceTestPageTimeout = 30000; # each page, ms
|
||||
#$StartupPerformanceTestTimeout = 15; # seconds
|
||||
#$XULWindowOpenTestTimeout = 150; # seconds
|
||||
|
||||
|
||||
#$MozConfigFileName = 'mozconfig';
|
||||
|
||||
#$UseMozillaProfile = 1;
|
||||
#$MozProfileName = 'default';
|
||||
|
||||
#- Set these to what makes sense for your system
|
||||
$Make = 'make'; # Must be GNU make
|
||||
#$MakeOverrides = '';
|
||||
#$mail = '/bin/mail';
|
||||
#$CVS = 'cvs -q';
|
||||
#$CVSCO = 'checkout -P';
|
||||
|
||||
# win32 usually doesn't have /bin/mail
|
||||
$blat = '/d/mozilla-build/blat261/full/blat';
|
||||
$use_blat = 1;
|
||||
|
||||
# Set moz_cvsroot to something like:
|
||||
# :pserver:$ENV{USER}%netscape.com\@cvs.mozilla.org:/cvsroot
|
||||
# :pserver:anonymous\@cvs-mirror.mozilla.org:/cvsroot
|
||||
#
|
||||
# Note that win32 may not need \@, depends on ' or ".
|
||||
# :pserver:$ENV{USER}%netscape.com@cvs.mozilla.org:/cvsroot
|
||||
|
||||
#$moz_cvsroot = $ENV{CVSROOT};
|
||||
# CONFIG: $moz_cvsroot = '%mozillaCvsroot%';
|
||||
$moz_cvsroot = 'cltbld@cvs.mozilla.org:/cvsroot';
|
||||
|
||||
#- Set these proper values for your tinderbox server
|
||||
#$Tinderbox_server = 'tinderbox-daemon@tinderbox.mozilla.org';
|
||||
|
||||
# Allow for non-client builds, e.g. camino.
|
||||
#$moz_client_mk = 'client.mk';
|
||||
|
||||
#- Set if you want to build in a separate object tree
|
||||
$ObjDir = 'obj-xulrunner';
|
||||
|
||||
# Extra build name, if needed.
|
||||
$BuildNameExtra = 'Release';
|
||||
|
||||
# User comment, eg. ip address for dhcp builds.
|
||||
# ex: $UserComment = "ip = 208.12.36.108";
|
||||
#$UserComment = 0;
|
||||
|
||||
#-
|
||||
#- The rest should not need to be changed
|
||||
#-
|
||||
|
||||
#- Minimum wait period from start of build to start of next build in minutes.
|
||||
#$BuildSleep = 10;
|
||||
|
||||
#- Until you get the script working. When it works,
|
||||
#- change to the tree you're actually building
|
||||
# CONFIG: $BuildTree = '%buildTree%';
|
||||
$BuildTree = 'MozillaRelease';
|
||||
|
||||
#$BuildName = '';
|
||||
# CONFIG: $BuildTag = '%productTag%_RELEASE';
|
||||
$BuildTag = 'FIREFOX_3_0_17_RELEASE';
|
||||
#$BuildConfigDir = 'mozilla/config';
|
||||
#$Topsrcdir = 'mozilla';
|
||||
|
||||
$BinaryName = 'xulrunner.exe';
|
||||
|
||||
#
|
||||
# For embedding app, use:
|
||||
#$EmbedBinaryName = 'TestGtkEmbed';
|
||||
#$EmbedDistDir = 'dist/bin'
|
||||
|
||||
|
||||
#$ShellOverride = ''; # Only used if the default shell is too stupid
|
||||
#$ConfigureArgs = '';
|
||||
#$ConfigureEnvArgs = '';
|
||||
#$Compiler = 'gcc';
|
||||
#$NSPRArgs = '';
|
||||
#$ShellOverride = '';
|
||||
|
||||
# Release build options
|
||||
$ReleaseBuild = 1;
|
||||
$shiptalkback = 0;
|
||||
$ReleaseToLatest = 0; # Push the release to latest-<milestone>?
|
||||
$ReleaseToDated = 1; # Push the release to YYYY-MM-DD-HH-<milestone>?
|
||||
#$build_hour = "8";
|
||||
$package_creation_path = "/xulrunner/installer";
|
||||
# needs setting for mac + talkback: $mac_bundle_path = "/browser/app";
|
||||
$ssh_version = "2";
|
||||
# CONFIG: $ssh_user = "%sshUser%";
|
||||
$ssh_user = "cltbld";
|
||||
#$ssh_key = "'$ENV{HOME}/.ssh/xrbld_dsa'";
|
||||
# CONFIG: $ssh_server = "%sshServer%";
|
||||
$ssh_server = "stage-old.mozilla.org";
|
||||
$ReleaseGroup = "xulrunner";
|
||||
$ftp_path = "/home/ftp/pub/xulrunner/nightly";
|
||||
$url_path = "http://ftp.mozilla.org/pub/mozilla.org/xulrunner/nightly";
|
||||
$tbox_ftp_path = "/home/ftp/pub/xulrunner/tinderbox-builds";
|
||||
$tbox_url_path = "http://ftp.mozilla.org/pub/mozilla.org/xulrunner/tinderbox-builds";
|
||||
# CONFIG: $milestone = 'xulrunner%version%';
|
||||
$milestone = 'xulrunner1.9.0.17';
|
||||
$notify_list = 'build-announce@mozilla.org';
|
||||
$stub_installer = 0;
|
||||
$sea_installer = 0;
|
||||
$archive = 1;
|
||||
$push_raw_xpis = 0;
|
||||
$crashreporter_buildsymbols = 1;
|
||||
$crashreporter_pushsymbols = 1;
|
||||
# CONFIG: $ENV{'SYMBOL_SERVER_HOST'} = '%symbolServer%';
|
||||
$ENV{'SYMBOL_SERVER_HOST'} = 'stage-old.mozilla.org';
|
||||
# CONFIG: $ENV{'SYMBOL_SERVER_USER'} = '%symbolServerUser%';
|
||||
$ENV{'SYMBOL_SERVER_USER'} = 'xrbld';
|
||||
# CONFIG: $ENV{'SYMBOL_SERVER_PATH'} = '%symbolServerPath%';
|
||||
$ENV{'SYMBOL_SERVER_PATH'} = '/mnt/netapp/breakpad/symbols_xr';
|
||||
# CONFIG: $ENV{'SYMBOL_SERVER_SSH_KEY'} = '%symbolServerKey%';
|
||||
$ENV{'SYMBOL_SERVER_SSH_KEY'} = '/c/Documents and Settings/cltbld/.ssh/xrbld_dsa';
|
||||
|
||||
# Reboot the OS at the end of build-and-test cycle. This is primarily
|
||||
# intended for Win9x, which can't last more than a few cycles before
|
||||
# locking up (and testing would be suspect even after a couple of cycles).
|
||||
# Right now, there is only code to force the reboot for Win9x, so even
|
||||
# setting this to 1, will not have an effect on other platforms. Setting
|
||||
# up win9x to automatically logon and begin running tinderbox is left
|
||||
# as an exercise to the reader.
|
||||
#$RebootSystem = 0;
|
||||
|
||||
# LogCompression specifies the type of compression used on the log file.
|
||||
# Valid options are 'gzip', and 'bzip2'. Please make sure the binaries
|
||||
# for 'gzip' or 'bzip2' are in the user's path before setting this
|
||||
# option.
|
||||
#$LogCompression = '';
|
||||
|
||||
# LogEncoding specifies the encoding format used for the logs. Valid
|
||||
# options are 'base64', and 'uuencode'. If $LogCompression is set above,
|
||||
# this needs to be set to 'base64' or 'uuencode' to ensure that the
|
||||
# binary data is transferred properly.
|
||||
#$LogEncoding = '';
|
||||
|
||||
# Prevent Extension Manager from spawning child processes during tests
|
||||
# - processes that tbox scripts cannot kill.
|
||||
#$ENV{NO_EM_RESTART} = '1';
|
||||
Reference in New Issue
Block a user