Bug 569355 - source code reorg, redux [r=mconnor]

Split the code structure to service/{crypto,sync} and ui/{fennec,firefox}. Update the top level makefile to build the addon staging directory to merge various parts of directories.
This commit is contained in:
Edward Lee 2010-06-09 17:03:31 -07:00
Родитель 1d9a29c0dd
Коммит 587c8c9d4c
13 изменённых файлов: 2 добавлений и 758 удалений

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

@ -1,359 +0,0 @@
/*
* DO NOT EDIT. THIS FILE IS GENERATED FROM IWeaveCrypto.idl
*/
#ifndef __gen_IWeaveCrypto_h__
#define __gen_IWeaveCrypto_h__
#ifndef __gen_nsISupports_h__
#include "nsISupports.h"
#endif
/* For IDL files that don't want to include root IDL files. */
#ifndef NS_NO_VTABLE
#define NS_NO_VTABLE
#endif
/* starting interface: IWeaveCrypto */
#define IWEAVECRYPTO_IID_STR "f4463043-315e-41f3-b779-82e900e6fffa"
#define IWEAVECRYPTO_IID \
{0xf4463043, 0x315e, 0x41f3, \
{ 0xb7, 0x79, 0x82, 0xe9, 0x00, 0xe6, 0xff, 0xfa }}
class NS_NO_VTABLE NS_SCRIPTABLE IWeaveCrypto : public nsISupports {
public:
NS_DECLARE_STATIC_IID_ACCESSOR(IWEAVECRYPTO_IID)
/**
* Shortcuts for some algorithm SEC OIDs. Full list available here:
* http://lxr.mozilla.org/seamonkey/source/security/nss/lib/util/secoidt.h
*/
enum { DES_EDE3_CBC = 156U };
enum { AES_128_CBC = 184U };
enum { AES_192_CBC = 186U };
enum { AES_256_CBC = 188U };
/**
* One of the above constants. Used as the mechanism for encrypting bulk
* data and wrapping keys.
*
* Default is AES_256_CBC.
*/
/* attribute unsigned long algorithm; */
NS_SCRIPTABLE NS_IMETHOD GetAlgorithm(PRUint32 *aAlgorithm) = 0;
NS_SCRIPTABLE NS_IMETHOD SetAlgorithm(PRUint32 aAlgorithm) = 0;
/**
* The size of the RSA key to create with generateKeypair().
*
* Default is 2048.
*/
/* attribute unsigned long keypairBits; */
NS_SCRIPTABLE NS_IMETHOD GetKeypairBits(PRUint32 *aKeypairBits) = 0;
NS_SCRIPTABLE NS_IMETHOD SetKeypairBits(PRUint32 aKeypairBits) = 0;
/**
* Encrypt data using a symmetric key.
* The algorithm attribute specifies how the encryption is performed.
*
* @param clearText
* The data to be encrypted (not base64 encoded).
* @param symmetricKey
* A base64-encoded symmetric key (eg, one from generateRandomKey).
* @param iv
* A base64-encoded initialization vector
* @returns Encrypted data, base64 encoded
*/
/* ACString encrypt (in AUTF8String clearText, in ACString symmetricKey, in ACString iv); */
NS_SCRIPTABLE NS_IMETHOD Encrypt(const nsACString & clearText, const nsACString & symmetricKey, const nsACString & iv, nsACString & _retval NS_OUTPARAM) = 0;
/**
* Encrypt data using a symmetric key.
* The algorithm attribute specifies how the encryption is performed.
*
* @param cipherText
* The base64-encoded data to be decrypted
* @param symmetricKey
* A base64-encoded symmetric key (eg, one from unwrapSymmetricKey)
* @param iv
* A base64-encoded initialization vector
* @returns Decrypted data (not base64-encoded)
*/
/* AUTF8String decrypt (in ACString cipherText, in ACString symmetricKey, in ACString iv); */
NS_SCRIPTABLE NS_IMETHOD Decrypt(const nsACString & cipherText, const nsACString & symmetricKey, const nsACString & iv, nsACString & _retval NS_OUTPARAM) = 0;
/**
* Generate a RSA public/private keypair.
*
* @param aPassphrase
* User's passphrase. Used with PKCS#5 to generate a symmetric key
* for wrapping the private key.
* @param aSalt
* Salt for the user's passphrase.
* @param aIV
* Random IV, used when wrapping the private key.
* @param aEncodedPublicKey
* The public key, base-64 encoded.
* @param aWrappedPrivateKey
* The public key, encrypted with the user's passphrase, and base-64 encoded.
*/
/* void generateKeypair (in ACString aPassphrase, in ACString aSalt, in ACString aIV, out ACString aEncodedPublicKey, out ACString aWrappedPrivateKey); */
NS_SCRIPTABLE NS_IMETHOD GenerateKeypair(const nsACString & aPassphrase, const nsACString & aSalt, const nsACString & aIV, nsACString & aEncodedPublicKey NS_OUTPARAM, nsACString & aWrappedPrivateKey NS_OUTPARAM) = 0;
/* ACString generateRandomKey (); */
NS_SCRIPTABLE NS_IMETHOD GenerateRandomKey(nsACString & _retval NS_OUTPARAM) = 0;
/* ACString generateRandomIV (); */
NS_SCRIPTABLE NS_IMETHOD GenerateRandomIV(nsACString & _retval NS_OUTPARAM) = 0;
/* ACString generateRandomBytes (in unsigned long aByteCount); */
NS_SCRIPTABLE NS_IMETHOD GenerateRandomBytes(PRUint32 aByteCount, nsACString & _retval NS_OUTPARAM) = 0;
/**
* Encrypts a symmetric key with a user's public key.
*
* @param aSymmetricKey
* The base64 encoded string holding a symmetric key.
* @param aEncodedPublicKey
* The base64 encoded string holding a public key.
* @returns The wrapped symmetric key, base64 encoded
*
* For RSA, the unencoded public key is a PKCS#1 object.
*/
/* ACString wrapSymmetricKey (in ACString aSymmetricKey, in ACString aEncodedPublicKey); */
NS_SCRIPTABLE NS_IMETHOD WrapSymmetricKey(const nsACString & aSymmetricKey, const nsACString & aEncodedPublicKey, nsACString & _retval NS_OUTPARAM) = 0;
/**
* Decrypts a symmetric key with a user's private key.
*
* @param aWrappedSymmetricKey
* The base64 encoded string holding an encrypted symmetric key.
* @param aWrappedPrivateKey
* The base64 encoded string holdering an encrypted private key.
* @param aPassphrase
* The passphrase to decrypt the private key.
* @param aSalt
* The salt for the passphrase.
* @param aIV
* The random IV used when unwrapping the private key.
* @returns The unwrapped symmetric key, base64 encoded
*
* For RSA, the unencoded, decrypted key is a PKCS#1 object.
*/
/* ACString unwrapSymmetricKey (in ACString aWrappedSymmetricKey, in ACString aWrappedPrivateKey, in ACString aPassphrase, in ACString aSalt, in ACString aIV); */
NS_SCRIPTABLE NS_IMETHOD UnwrapSymmetricKey(const nsACString & aWrappedSymmetricKey, const nsACString & aWrappedPrivateKey, const nsACString & aPassphrase, const nsACString & aSalt, const nsACString & aIV, nsACString & _retval NS_OUTPARAM) = 0;
/**
* Rewrap a private key with a new user passphrase.
*
* @param aWrappedPrivateKey
* The base64 encoded string holding an encrypted private key.
* @param aPassphrase
* The passphrase to decrypt the private key.
* @param aSalt
* The salt for the passphrase.
* @param aIV
* The random IV used when unwrapping the private key.
* @param aNewPassphrase
* The new passphrase to wrap the private key with.
* @returns The (re)wrapped private key, base64 encoded
*
*/
/* ACString rewrapPrivateKey (in ACString aWrappedPrivateKey, in ACString aPassphrase, in ACString aSalt, in ACString aIV, in ACString aNewPassphrase); */
NS_SCRIPTABLE NS_IMETHOD RewrapPrivateKey(const nsACString & aWrappedPrivateKey, const nsACString & aPassphrase, const nsACString & aSalt, const nsACString & aIV, const nsACString & aNewPassphrase, nsACString & _retval NS_OUTPARAM) = 0;
/**
* Verify a user's passphrase against a private key.
*
* @param aWrappedPrivateKey
* The base64 encoded string holding an encrypted private key.
* @param aPassphrase
* The passphrase to decrypt the private key.
* @param aSalt
* The salt for the passphrase.
* @param aIV
* The random IV used when unwrapping the private key.
* @returns Boolean true if the passphrase decrypted the key correctly.
*
*/
/* boolean verifyPassphrase (in ACString aWrappedPrivateKey, in ACString aPassphrase, in ACString aSalt, in ACString aIV); */
NS_SCRIPTABLE NS_IMETHOD VerifyPassphrase(const nsACString & aWrappedPrivateKey, const nsACString & aPassphrase, const nsACString & aSalt, const nsACString & aIV, PRBool *_retval NS_OUTPARAM) = 0;
};
NS_DEFINE_STATIC_IID_ACCESSOR(IWeaveCrypto, IWEAVECRYPTO_IID)
/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_IWEAVECRYPTO \
NS_SCRIPTABLE NS_IMETHOD GetAlgorithm(PRUint32 *aAlgorithm); \
NS_SCRIPTABLE NS_IMETHOD SetAlgorithm(PRUint32 aAlgorithm); \
NS_SCRIPTABLE NS_IMETHOD GetKeypairBits(PRUint32 *aKeypairBits); \
NS_SCRIPTABLE NS_IMETHOD SetKeypairBits(PRUint32 aKeypairBits); \
NS_SCRIPTABLE NS_IMETHOD Encrypt(const nsACString & clearText, const nsACString & symmetricKey, const nsACString & iv, nsACString & _retval NS_OUTPARAM); \
NS_SCRIPTABLE NS_IMETHOD Decrypt(const nsACString & cipherText, const nsACString & symmetricKey, const nsACString & iv, nsACString & _retval NS_OUTPARAM); \
NS_SCRIPTABLE NS_IMETHOD GenerateKeypair(const nsACString & aPassphrase, const nsACString & aSalt, const nsACString & aIV, nsACString & aEncodedPublicKey NS_OUTPARAM, nsACString & aWrappedPrivateKey NS_OUTPARAM); \
NS_SCRIPTABLE NS_IMETHOD GenerateRandomKey(nsACString & _retval NS_OUTPARAM); \
NS_SCRIPTABLE NS_IMETHOD GenerateRandomIV(nsACString & _retval NS_OUTPARAM); \
NS_SCRIPTABLE NS_IMETHOD GenerateRandomBytes(PRUint32 aByteCount, nsACString & _retval NS_OUTPARAM); \
NS_SCRIPTABLE NS_IMETHOD WrapSymmetricKey(const nsACString & aSymmetricKey, const nsACString & aEncodedPublicKey, nsACString & _retval NS_OUTPARAM); \
NS_SCRIPTABLE NS_IMETHOD UnwrapSymmetricKey(const nsACString & aWrappedSymmetricKey, const nsACString & aWrappedPrivateKey, const nsACString & aPassphrase, const nsACString & aSalt, const nsACString & aIV, nsACString & _retval NS_OUTPARAM); \
NS_SCRIPTABLE NS_IMETHOD RewrapPrivateKey(const nsACString & aWrappedPrivateKey, const nsACString & aPassphrase, const nsACString & aSalt, const nsACString & aIV, const nsACString & aNewPassphrase, nsACString & _retval NS_OUTPARAM); \
NS_SCRIPTABLE NS_IMETHOD VerifyPassphrase(const nsACString & aWrappedPrivateKey, const nsACString & aPassphrase, const nsACString & aSalt, const nsACString & aIV, PRBool *_retval NS_OUTPARAM);
/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_IWEAVECRYPTO(_to) \
NS_SCRIPTABLE NS_IMETHOD GetAlgorithm(PRUint32 *aAlgorithm) { return _to GetAlgorithm(aAlgorithm); } \
NS_SCRIPTABLE NS_IMETHOD SetAlgorithm(PRUint32 aAlgorithm) { return _to SetAlgorithm(aAlgorithm); } \
NS_SCRIPTABLE NS_IMETHOD GetKeypairBits(PRUint32 *aKeypairBits) { return _to GetKeypairBits(aKeypairBits); } \
NS_SCRIPTABLE NS_IMETHOD SetKeypairBits(PRUint32 aKeypairBits) { return _to SetKeypairBits(aKeypairBits); } \
NS_SCRIPTABLE NS_IMETHOD Encrypt(const nsACString & clearText, const nsACString & symmetricKey, const nsACString & iv, nsACString & _retval NS_OUTPARAM) { return _to Encrypt(clearText, symmetricKey, iv, _retval); } \
NS_SCRIPTABLE NS_IMETHOD Decrypt(const nsACString & cipherText, const nsACString & symmetricKey, const nsACString & iv, nsACString & _retval NS_OUTPARAM) { return _to Decrypt(cipherText, symmetricKey, iv, _retval); } \
NS_SCRIPTABLE NS_IMETHOD GenerateKeypair(const nsACString & aPassphrase, const nsACString & aSalt, const nsACString & aIV, nsACString & aEncodedPublicKey NS_OUTPARAM, nsACString & aWrappedPrivateKey NS_OUTPARAM) { return _to GenerateKeypair(aPassphrase, aSalt, aIV, aEncodedPublicKey, aWrappedPrivateKey); } \
NS_SCRIPTABLE NS_IMETHOD GenerateRandomKey(nsACString & _retval NS_OUTPARAM) { return _to GenerateRandomKey(_retval); } \
NS_SCRIPTABLE NS_IMETHOD GenerateRandomIV(nsACString & _retval NS_OUTPARAM) { return _to GenerateRandomIV(_retval); } \
NS_SCRIPTABLE NS_IMETHOD GenerateRandomBytes(PRUint32 aByteCount, nsACString & _retval NS_OUTPARAM) { return _to GenerateRandomBytes(aByteCount, _retval); } \
NS_SCRIPTABLE NS_IMETHOD WrapSymmetricKey(const nsACString & aSymmetricKey, const nsACString & aEncodedPublicKey, nsACString & _retval NS_OUTPARAM) { return _to WrapSymmetricKey(aSymmetricKey, aEncodedPublicKey, _retval); } \
NS_SCRIPTABLE NS_IMETHOD UnwrapSymmetricKey(const nsACString & aWrappedSymmetricKey, const nsACString & aWrappedPrivateKey, const nsACString & aPassphrase, const nsACString & aSalt, const nsACString & aIV, nsACString & _retval NS_OUTPARAM) { return _to UnwrapSymmetricKey(aWrappedSymmetricKey, aWrappedPrivateKey, aPassphrase, aSalt, aIV, _retval); } \
NS_SCRIPTABLE NS_IMETHOD RewrapPrivateKey(const nsACString & aWrappedPrivateKey, const nsACString & aPassphrase, const nsACString & aSalt, const nsACString & aIV, const nsACString & aNewPassphrase, nsACString & _retval NS_OUTPARAM) { return _to RewrapPrivateKey(aWrappedPrivateKey, aPassphrase, aSalt, aIV, aNewPassphrase, _retval); } \
NS_SCRIPTABLE NS_IMETHOD VerifyPassphrase(const nsACString & aWrappedPrivateKey, const nsACString & aPassphrase, const nsACString & aSalt, const nsACString & aIV, PRBool *_retval NS_OUTPARAM) { return _to VerifyPassphrase(aWrappedPrivateKey, aPassphrase, aSalt, aIV, _retval); }
/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
#define NS_FORWARD_SAFE_IWEAVECRYPTO(_to) \
NS_SCRIPTABLE NS_IMETHOD GetAlgorithm(PRUint32 *aAlgorithm) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetAlgorithm(aAlgorithm); } \
NS_SCRIPTABLE NS_IMETHOD SetAlgorithm(PRUint32 aAlgorithm) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetAlgorithm(aAlgorithm); } \
NS_SCRIPTABLE NS_IMETHOD GetKeypairBits(PRUint32 *aKeypairBits) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetKeypairBits(aKeypairBits); } \
NS_SCRIPTABLE NS_IMETHOD SetKeypairBits(PRUint32 aKeypairBits) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetKeypairBits(aKeypairBits); } \
NS_SCRIPTABLE NS_IMETHOD Encrypt(const nsACString & clearText, const nsACString & symmetricKey, const nsACString & iv, nsACString & _retval NS_OUTPARAM) { return !_to ? NS_ERROR_NULL_POINTER : _to->Encrypt(clearText, symmetricKey, iv, _retval); } \
NS_SCRIPTABLE NS_IMETHOD Decrypt(const nsACString & cipherText, const nsACString & symmetricKey, const nsACString & iv, nsACString & _retval NS_OUTPARAM) { return !_to ? NS_ERROR_NULL_POINTER : _to->Decrypt(cipherText, symmetricKey, iv, _retval); } \
NS_SCRIPTABLE NS_IMETHOD GenerateKeypair(const nsACString & aPassphrase, const nsACString & aSalt, const nsACString & aIV, nsACString & aEncodedPublicKey NS_OUTPARAM, nsACString & aWrappedPrivateKey NS_OUTPARAM) { return !_to ? NS_ERROR_NULL_POINTER : _to->GenerateKeypair(aPassphrase, aSalt, aIV, aEncodedPublicKey, aWrappedPrivateKey); } \
NS_SCRIPTABLE NS_IMETHOD GenerateRandomKey(nsACString & _retval NS_OUTPARAM) { return !_to ? NS_ERROR_NULL_POINTER : _to->GenerateRandomKey(_retval); } \
NS_SCRIPTABLE NS_IMETHOD GenerateRandomIV(nsACString & _retval NS_OUTPARAM) { return !_to ? NS_ERROR_NULL_POINTER : _to->GenerateRandomIV(_retval); } \
NS_SCRIPTABLE NS_IMETHOD GenerateRandomBytes(PRUint32 aByteCount, nsACString & _retval NS_OUTPARAM) { return !_to ? NS_ERROR_NULL_POINTER : _to->GenerateRandomBytes(aByteCount, _retval); } \
NS_SCRIPTABLE NS_IMETHOD WrapSymmetricKey(const nsACString & aSymmetricKey, const nsACString & aEncodedPublicKey, nsACString & _retval NS_OUTPARAM) { return !_to ? NS_ERROR_NULL_POINTER : _to->WrapSymmetricKey(aSymmetricKey, aEncodedPublicKey, _retval); } \
NS_SCRIPTABLE NS_IMETHOD UnwrapSymmetricKey(const nsACString & aWrappedSymmetricKey, const nsACString & aWrappedPrivateKey, const nsACString & aPassphrase, const nsACString & aSalt, const nsACString & aIV, nsACString & _retval NS_OUTPARAM) { return !_to ? NS_ERROR_NULL_POINTER : _to->UnwrapSymmetricKey(aWrappedSymmetricKey, aWrappedPrivateKey, aPassphrase, aSalt, aIV, _retval); } \
NS_SCRIPTABLE NS_IMETHOD RewrapPrivateKey(const nsACString & aWrappedPrivateKey, const nsACString & aPassphrase, const nsACString & aSalt, const nsACString & aIV, const nsACString & aNewPassphrase, nsACString & _retval NS_OUTPARAM) { return !_to ? NS_ERROR_NULL_POINTER : _to->RewrapPrivateKey(aWrappedPrivateKey, aPassphrase, aSalt, aIV, aNewPassphrase, _retval); } \
NS_SCRIPTABLE NS_IMETHOD VerifyPassphrase(const nsACString & aWrappedPrivateKey, const nsACString & aPassphrase, const nsACString & aSalt, const nsACString & aIV, PRBool *_retval NS_OUTPARAM) { return !_to ? NS_ERROR_NULL_POINTER : _to->VerifyPassphrase(aWrappedPrivateKey, aPassphrase, aSalt, aIV, _retval); }
#if 0
/* Use the code below as a template for the implementation class for this interface. */
/* Header file */
class _MYCLASS_ : public IWeaveCrypto
{
public:
NS_DECL_ISUPPORTS
NS_DECL_IWEAVECRYPTO
_MYCLASS_();
private:
~_MYCLASS_();
protected:
/* additional members */
};
/* Implementation file */
NS_IMPL_ISUPPORTS1(_MYCLASS_, IWeaveCrypto)
_MYCLASS_::_MYCLASS_()
{
/* member initializers and constructor code */
}
_MYCLASS_::~_MYCLASS_()
{
/* destructor code */
}
/* attribute unsigned long algorithm; */
NS_IMETHODIMP _MYCLASS_::GetAlgorithm(PRUint32 *aAlgorithm)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP _MYCLASS_::SetAlgorithm(PRUint32 aAlgorithm)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* attribute unsigned long keypairBits; */
NS_IMETHODIMP _MYCLASS_::GetKeypairBits(PRUint32 *aKeypairBits)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP _MYCLASS_::SetKeypairBits(PRUint32 aKeypairBits)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* ACString encrypt (in AUTF8String clearText, in ACString symmetricKey, in ACString iv); */
NS_IMETHODIMP _MYCLASS_::Encrypt(const nsACString & clearText, const nsACString & symmetricKey, const nsACString & iv, nsACString & _retval NS_OUTPARAM)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* AUTF8String decrypt (in ACString cipherText, in ACString symmetricKey, in ACString iv); */
NS_IMETHODIMP _MYCLASS_::Decrypt(const nsACString & cipherText, const nsACString & symmetricKey, const nsACString & iv, nsACString & _retval NS_OUTPARAM)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* void generateKeypair (in ACString aPassphrase, in ACString aSalt, in ACString aIV, out ACString aEncodedPublicKey, out ACString aWrappedPrivateKey); */
NS_IMETHODIMP _MYCLASS_::GenerateKeypair(const nsACString & aPassphrase, const nsACString & aSalt, const nsACString & aIV, nsACString & aEncodedPublicKey NS_OUTPARAM, nsACString & aWrappedPrivateKey NS_OUTPARAM)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* ACString generateRandomKey (); */
NS_IMETHODIMP _MYCLASS_::GenerateRandomKey(nsACString & _retval NS_OUTPARAM)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* ACString generateRandomIV (); */
NS_IMETHODIMP _MYCLASS_::GenerateRandomIV(nsACString & _retval NS_OUTPARAM)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* ACString generateRandomBytes (in unsigned long aByteCount); */
NS_IMETHODIMP _MYCLASS_::GenerateRandomBytes(PRUint32 aByteCount, nsACString & _retval NS_OUTPARAM)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* ACString wrapSymmetricKey (in ACString aSymmetricKey, in ACString aEncodedPublicKey); */
NS_IMETHODIMP _MYCLASS_::WrapSymmetricKey(const nsACString & aSymmetricKey, const nsACString & aEncodedPublicKey, nsACString & _retval NS_OUTPARAM)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* ACString unwrapSymmetricKey (in ACString aWrappedSymmetricKey, in ACString aWrappedPrivateKey, in ACString aPassphrase, in ACString aSalt, in ACString aIV); */
NS_IMETHODIMP _MYCLASS_::UnwrapSymmetricKey(const nsACString & aWrappedSymmetricKey, const nsACString & aWrappedPrivateKey, const nsACString & aPassphrase, const nsACString & aSalt, const nsACString & aIV, nsACString & _retval NS_OUTPARAM)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* ACString rewrapPrivateKey (in ACString aWrappedPrivateKey, in ACString aPassphrase, in ACString aSalt, in ACString aIV, in ACString aNewPassphrase); */
NS_IMETHODIMP _MYCLASS_::RewrapPrivateKey(const nsACString & aWrappedPrivateKey, const nsACString & aPassphrase, const nsACString & aSalt, const nsACString & aIV, const nsACString & aNewPassphrase, nsACString & _retval NS_OUTPARAM)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* boolean verifyPassphrase (in ACString aWrappedPrivateKey, in ACString aPassphrase, in ACString aSalt, in ACString aIV); */
NS_IMETHODIMP _MYCLASS_::VerifyPassphrase(const nsACString & aWrappedPrivateKey, const nsACString & aPassphrase, const nsACString & aSalt, const nsACString & aIV, PRBool *_retval NS_OUTPARAM)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* End of implementation class template. */
#endif
#endif /* __gen_IWeaveCrypto_h__ */

Двоичные данные
services/crypto/IWeaveCrypto.xpt

Двоичный файл не отображается.

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

@ -1,100 +0,0 @@
#
# ***** BEGIN LICENSE BLOCK *****
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
#
# 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 Weave code.
#
# The Initial Developer of the Original Code is Mozilla Foundation.
# Portions created by the Initial Developer are Copyright (C) 2008
# the Initial Developer. All Rights Reserved.
#
# Contributor(s):
# Dan Mills <thunder@mozilla.com> (original author)
# Justin Dolske <dolske@mozilla.com>
#
# Alternatively, the contents of this file may be used under the terms of
# either the GNU General Public License Version 2 or later (the "GPL"), or
# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
# in which case the provisions of the GPL or the LGPL are applicable instead
# of those above. If you wish to allow use of your version of this file only
# under the terms of either the GPL or the LGPL, and not to allow others to
# use your version of this file under the terms of the MPL, indicate your
# decision by deleting the provisions above and replace them with the notice
# and other provisions required by the GPL or the LGPL. If you do not delete
# the provisions above, a recipient may use your version of this file under
# the terms of any one of the MPL, the GPL or the LGPL.
#
# ***** END LICENSE BLOCK *****
stage_dir=../dist/stage
sdkdir ?= ${MOZSDKDIR}
idl = IWeaveCrypto.idl
idl_typelib = $(idl:.idl=.xpt)
idl_header = $(idl:.idl=.h)
#
# The only thing to actually build here is the IDL's .xpt/.h form, which
# requires an SDK. So don't do that unless explicitly requested, and use
# the files checked into Mercurial instead.
#
all: stage
build: $(idl_typelib) $(idl_header) stage
# No SDK is needed unless you're modifying the IDL interface, in which
# case we'll need to rebuild the .h and .xpt files.
xpidl = $(sdkdir)/bin/xpidl
ifdef CROSS_COMPILE
xpidl = $(sdkdir)/host/bin/host_xpidl
endif
$(idl_typelib): $(idl)
ifeq ($(sdkdir),)
$(warning No 'sdkdir' variable given)
$(warning It should point to the location of the Gecko SDK)
$(warning For example: "make sdkdir=/foo/bar/baz")
$(warning Or set the MOZSDKDIR environment variable to point to it)
$(error)
else
$(xpidl) -m typelib -I$(sdkdir)/idl $(@:.xpt=.idl)
endif
$(idl_header): $(idl)
ifeq ($(sdkdir),)
$(warning No 'sdkdir' variable given)
$(warning It should point to the location of the Gecko SDK)
$(warning For example: "make sdkdir=/foo/bar/baz")
$(warning Or set the MOZSDKDIR environment variable to point to it)
$(error)
else
$(xpidl) -m header -I$(sdkdir)/idl $(@:.h=.idl)
endif
stage:
mkdir -p $(stage_dir)/components
ifdef NO_SYMLINK
cp -v $(idl_typelib) $(stage_dir)/components
cp -v $(idl_header) $(TOPSRCDIR)/crypto-obsolete/src
cp -v WeaveCrypto.js $(stage_dir)/components
else
ln -vsf `pwd`/$(idl_typelib) $(stage_dir)/components
ln -vsf `pwd`/$(idl_header) $(TOPSRCDIR)/crypto-obsolete/src
ln -vsf `pwd`/WeaveCrypto.js $(stage_dir)/components
endif
clean:
rm -f $(TOPSRCDIR)/crypto-obsolete/src/$(idl_header)
# maybe hg revert the .xpt/.h?
.PHONY: all build stage clean

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

@ -87,7 +87,7 @@ AboutWeaveTabs.prototype = {
newChannel: function(aURI) {
let ios = Cc["@mozilla.org/network/io-service;1"]
.getService(Ci.nsIIOService);
let ch = ios.newChannel("chrome://weave/content/fx-tabs.xul", null, null);
let ch = ios.newChannel("chrome://weave/content/firefox/tabs.xul", null, null);
ch.originalURI = aURI;
return ch;
}

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

@ -1,9 +0,0 @@
<!ENTITY syncBrand.shortName.label "Sync">
<!ENTITY syncBrand.fullName.label "Firefox Sync">
<!ENTITY firstrun.title "&syncBrand.fullName.label; Installed">
<!ENTITY intro.description "You're almost ready to share your browsing history, passwords, bookmarks and more between your PC and mobile.">
<!ENTITY step1.description "Make sure you've installed &syncBrand.fullName.label; on your PC Firefox and created a &syncBrand.shortName.label; account.">
<!ENTITY step2.description "After syncing your PC, return here to Connect to &syncBrand.shortName.label;.">
<!ENTITY step3.description "Once you've connected, your PC will know about this mobile after it syncs again.">
<!ENTITY connect.label "Connect to &syncBrand.shortName.label;">

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

@ -1 +0,0 @@
<!ENTITY remoteTabs.title "Tabs from my other computers">

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

@ -1,133 +0,0 @@
<!ENTITY syncBrand.shortName.label "Sync">
<!ENTITY syncBrand.fullName.label "Firefox Sync">
<!ENTITY weavePrefPane.label "&syncBrand.shortName.label;">
<!ENTITY accountSetupTitle.label "&syncBrand.fullName.label; Setup">
<!ENTITY connectTo.label "Connect to">
<!ENTITY serverType.main.label "&syncBrand.fullName.label; Server">
<!ENTITY serverType.custom.label "Use a custom server">
<!ENTITY signIn.username.label "User Name">
<!ENTITY signIn.username.accesskey "U">
<!ENTITY signIn.password.label "Password">
<!ENTITY signIn.password.accesskey "P">
<!ENTITY signIn.serverURL.label "Server URL">
<!ENTITY signIn.serverURL.accesskey "L">
<!ENTITY setup.confirmPassword.label "Confirm Password">
<!ENTITY setup.confirmPassword.accesskey "m">
<!ENTITY setup.emailAddress.label "Email Address">
<!ENTITY setup.emailAddress.accesskey "E">
<!ENTITY setup.tosAgree1.label "I agree to the">
<!ENTITY setup.tosAgree1.accesskey "a">
<!ENTITY setup.tosLink.label "Terms of Service">
<!ENTITY setup.tosAgree2.label "and the">
<!ENTITY setup.ppLink.label "Privacy Policy">
<!ENTITY setup.tosAgree3.label "">
<!ENTITY setup.tosAgree2.accesskey "">
<!ENTITY prefs.tosLink.label "Terms of Service">
<!ENTITY prefs.ppLink.label "Privacy Policy">
<!ENTITY weaveDesc.label "&syncBrand.fullName.label; lets you access your history, bookmarks, passwords and open tabs across all your devices.">
<!ENTITY setup.choicePage.title.label "Have you used &syncBrand.fullName.label; before?">
<!ENTITY setup.choicePage.new.label "I've never used &syncBrand.shortName.label; before">
<!ENTITY setup.choicePage.existing.label "I'm already using &syncBrand.shortName.label; on another computer">
<!ENTITY setup.newAccountPage.title.label "Create your &syncBrand.shortName.label; Account">
<!ENTITY setup.newPPPage.title.label "Enter your Secret Phrase">
<!ENTITY setup.newAccountPrefs.title.label "What do you want &brandShortName; to sync?">
<!ENTITY setup.captchaPage.title.label "Please confirm you're not a robot ;)">
<!ENTITY setup.mergeChoicePage.title.label "How do you want to start off?">
<!ENTITY setup.existingAccount.title.label "Enter Account Information">
<!ENTITY setup.successPage.title.label "Setup Complete!">
<!ENTITY setup.successPage.desc.label "Congratulations! &brandShortName; is now set up to automatically sync your
information. Don't forget to install &syncBrand.fullName.label; on all your devices.
You can now continue using &brandShortName;.">
<!ENTITY signIn.button.label "Sign In">
<!ENTITY signIn.button.accesskey "S">
<!ENTITY setupButton.label "Set Up &syncBrand.fullName.label;">
<!ENTITY setupButton.accesskey "S">
<!ENTITY goBack.label "Back">
<!ENTITY goBack.accesskey "B">
<!ENTITY continue.label "Continue">
<!ENTITY continue.accesskey "C">
<!ENTITY passphraseGroupbox.label "Enter Secret Phrase">
<!ENTITY passphraseEntry.label "Secret Phrase">
<!ENTITY passphraseEntry.accesskey "S">
<!ENTITY passphraseConfirm.label "Confirm">
<!ENTITY passphraseConfirm.accesskey "m">
<!ENTITY passphraseDesc.label "Please enter a secret phrase. This will be used to encrypt all your data so only you can access it. It is never stored on the server, so don't lose this!">
<!ENTITY passphraseDesc2.label "This must be at least 12 characters long and cannot match your account password.">
<!ENTITY passphraseDesc3.label "Please enter your secret phrase. This must be the same secret phrase that you used to encrypt your data.">
<!ENTITY passphraseHelp.label "Your secret phrase is at least 12 characters long and is not your password. You can find your saved secret phrase by going to your other computer and checking the Saved Passwords under Security. If you still cannot get the correct secret phrase, you can choose to reset it, but you will lose any data stored on the server.">
<!ENTITY connecting.label "Connecting…">
<!ENTITY verifying.label "Verifying…">
<!ENTITY choice.caption.label "Choose what you want to happen to this computer">
<!ENTITY choice.merge.main.label "Merge this computer's data with your &syncBrand.shortName.label; data">
<!ENTITY choice.merge.secondary.label "This will combine the data from this computer with the devices already syncing with &syncBrand.shortName.label;.">
<!ENTITY choice.merge.recommend.label "This option is strongly recommended by Mozilla for all users.">
<!ENTITY choice.client.main.label "Replace all data on this computer with your &syncBrand.fullName.label; data">
<!ENTITY choice.client.secondary.label "All of your local data will be deleted and replaced by your &syncBrand.fullName.label; data.">
<!ENTITY choice.server.main.label "Replace all other devices with your local data">
<!ENTITY choice.server.secondary.label "All data on your devices using &syncBrand.fullName.label; will be replaced with your local data.">
<!ENTITY confirm.caption.label "Confirm your choice">
<!ENTITY confirm.merge.label "You have chosen to merge your data on this computer with the data on your other devices running &syncBrand.fullName.label;.">
<!ENTITY confirm.merge.start.label "Start Syncing Now">
<!ENTITY confirm.client.label "All &brandShortName; data on this computer will be deleted, including the following:">
<!ENTITY confirm.client.moreinfo.label "&brandShortName; will then copy your &syncBrand.fullName.label; data to this computer.">
<!ENTITY confirm.client.warning.label "WARNING: This will result in all &brandShortName; data on this computer being replaced!">
<!ENTITY confirm.client.start.label "Delete and Replace Local Data">
<!ENTITY confirm.server.label "The following devices will be overwritten with your local data:">
<!ENTITY confirm.server.warning.label "WARNING: Your local data will replace all &brandShortName; data on these devices!">
<!ENTITY confirm.server.start.label "Replace Everything on These Devices">
<!ENTITY accountGroupboxCaption.label "&syncBrand.fullName.label; Account">
<!ENTITY currentUser.label "Current User:">
<!ENTITY manageAccount.label "Manage Account">
<!ENTITY manageAccount.accesskey "A">
<!ENTITY changePassword.label "Change Password">
<!ENTITY resetPassword.label "Reset Password">
<!ENTITY updatePass.label "Update">
<!ENTITY resetPass.label "Reset">
<!ENTITY changePassphrase.label "Change Secret Phrase">
<!ENTITY resetSync.label "Reset Sync">
<!ENTITY cancelResetSync.label "Cancel Reset Sync">
<!ENTITY differentAccount.label "Use a Different Account">
<!ENTITY startOver.label "Start Over">
<!ENTITY syncPrefsCaption.label "Browser Sync">
<!ENTITY syncModeSwitchDesc.label "&brandShortName; will: ">
<!ENTITY syncModeSwitchDesc.accesskey "w">
<!ENTITY syncEverything.label "Sync Everything">
<!ENTITY customSync.label "Use my custom settings">
<!ENTITY syncEverythingDescription.label "Your bookmarks, history, passwords, preferences, and tabs will be synced.">
<!ENTITY syncItem.bookmarks.label "Sync Bookmarks">
<!ENTITY syncItem.bookmarks.accesskey "m">
<!ENTITY syncItem.tabs.label "Sync Tabs">
<!ENTITY syncItem.tabs.accesskey "T">
<!ENTITY syncItem.history.label "Sync History">
<!ENTITY syncItem.history.accesskey "r">
<!ENTITY syncItem.passwords.label "Sync Passwords">
<!ENTITY syncItem.passwords.accesskey "P">
<!ENTITY syncItem.prefs.label "Sync Preferences">
<!ENTITY syncItem.prefs.accesskey "S">

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

@ -1,35 +0,0 @@
connect.label = Connect
disconnect.label = Disconnect
startSyncing.label = Start Syncing
usernameNotAvailable.label = Already in use
later.label = Later
cancelSetup.label = Cancel Setup
passwordMismatch.label = Passwords do not match
passwordTooWeak.label = Password is too weak
entriesMustMatch.label = Phrases do not match
cannotMatchPassword.label = Secret phrase cannot match password
invalidEmail.label = Invalid email address
errorCreatingAccount.title = Error Creating Account
serverInvalid.label = Please enter a valid server URL
loginFailed = Login failed: %1$S
recoverPasswordSuccess.title = Recover Password Success!
recoverPasswordSuccess.label = We've sent you an email to your address on file. Please check it and follow the instructions to reset your password.
additionalClients.label = and %S additional devices
bookmarkCount.label = %S bookmarks
historyCount.label = %S days of history
passwordCount.label = %S passwords
differentAccount.title = Use a Different Account?
differentAccount.label = This will reset all of your sync account information and preferences.
differentAccountConfirm.label = Reset All Information

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

@ -1,9 +0,0 @@
<!ENTITY tabs.otherComputers.label "Tabs from Other Computers">
<!ENTITY tabs.searchText.label "Type here to find tabs…">
<!ENTITY tabs.context.openTab.label "Open This Tab">
<!ENTITY tabs.context.openMultipleTabs.label "Open Selected Tabs">
<!ENTITY tabs.context.bookmarkSingleTab.label "Bookmark This Tab…">
<!ENTITY tabs.context.bookmarkMultipleTabs.label "Bookmark Selected Tabs…">
<!ENTITY tabs.context.refreshList.label "Refresh List">

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

@ -1,34 +0,0 @@
change.password.title = Change your Password
change.password.acceptButton = Change Password
change.password.status.active = Changing your password…
change.password.status.success = Your password has been changed.
change.password.status.error = There was an error changing your password.
change.password.introText = Your password must be at least 8 characters long. It cannot be the same as either your user name or your secret phrase.
change.password.warningText = Note: All of your other devices will be unable to connect to your account once you change this password.
change.passphrase.title = Change your Secret Phrase
change.passphrase.acceptButton = Change Secret Phrase
change.passphrase.label = Changing secret phrase and uploading local data, please wait…
change.passphrase.error = There was an error while changing your secret phrase!
change.passphrase.success = Your secret phrase was successfully changed!
new.passphrase.label = New secret phrase
new.passphrase.confirm = Confirm secret phrase
change.passphrase.introText = Your secret phrase must be at least 12 characters long. Sync uses this phrase as part of encrypting your data.
change.passphrase.introText2 = You may wish to write this down, as this is never sent over the Internet and is not backed up or synced by Firefox Sync for your security.
change.passphrase.warningText = Note: This will erase all data stored on the Sync server and upload new data secured by this phrase. Your other devices will not sync until the secret phrase is entered for that device.
new.password.label = Enter your new password
new.password.confirm = Confirm your new password
new.password.title = Update Password
new.password.introText = Your password was rejected by the server, please update your password.
new.password.acceptButton = Update Password
new.password.status.incorrect = Password incorrect, please try again.
new.passphrase.title = Update Secret Phrase
new.passphrase.introText = Your secret phrase has changed, please enter your new secret phrase
new.passphrase.acceptButton = Update Secret Phrase
new.passphrase.status.incorrect = Secret phrase incorrect, please try again.

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

@ -1,18 +0,0 @@
<!ENTITY syncBrand.shortName.label "Sync">
<!ENTITY syncMenu.label "&syncBrand.shortName.label;">
<!ENTITY logInItem.label "Connect">
<!ENTITY logOutItem.label "Disconnect">
<!ENTITY syncNowItem.label "Sync Now">
<!ENTITY openPrefsItem.label "Preferences…">
<!ENTITY openLogItem.label "Activity Log">
<!ENTITY status.offline.label "Offline">
<!ENTITY username.label "Username">
<!ENTITY password.label "Password">
<!ENTITY secretPhrase.label "Secret Phrase">
<!ENTITY connect.label "Connect">
<!ENTITY disconnect.label "Disconnect">
<!ENTITY syncNow.label "Sync Now">
<!ENTITY syncTabsMenu.label "Tabs From Other Computers">

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

@ -370,7 +370,7 @@ let Utils = {
},
lazyStrings: function Weave_lazyStrings(name) {
let bundle = "chrome://weave/locale/" + name + ".properties";
let bundle = "chrome://weave/locale/services/" + name + ".properties";
return function() new StringBundle(bundle);
},

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

@ -1,58 +0,0 @@
# profiledir needs to be an absolute path on Mac OS X (FIXME: file bug).
profiledir = $(abspath ../profile)
sys := $(shell uname -s)
# OS detection
ifeq ($(sys), Darwin)
os = Darwin
else
ifeq ($(sys), Linux)
os = Linux
else
ifeq ($(sys), MINGW32_NT-6.1)
os = WINNT
else
ifeq ($(sys), MINGW32_NT-5.1)
os = WINNT
else
ifeq ($(sys), SunOS)
os = SunOS
else
$(error Sorry, your os is unknown/unsupported: $(sys))
endif
endif
endif
endif
endif
topsrcdir ?= ${TOPSRCDIR}
native_topsrcdir ?= ${NATIVE_TOPSRCDIR}
ifeq ($(topsrcdir),)
topsrcdir = ../..
endif
ifeq ($(native_topsrcdir),)
ifeq ($(os), WINNT)
native_topsrcdir = ..\..
else
native_topsrcdir = ../..
endif
endif
# The path to the extension, in the native format, as required by the extension
# manager when it installs an extension via a file in the <profile>/extensions/
# directory that contains the path to the extension.
ifeq ($(os), WINNT)
extensiondir = $(native_topsrcdir)\dist\stage
else
extensiondir = $(topsrcdir)/dist/stage
endif
# A command that installs the extension into the profile when the harness
# creates a new profile.
configure_profile = echo "$(extensiondir)" > $(profiledir)/extensions/\{340c2bbc-ce74-4362-90b5-7c26312808ef\};
include ../harness/Makefile