diff --git a/services/crypto/IWeaveCrypto.h b/services/crypto/IWeaveCrypto.h deleted file mode 100644 index 8b8886ca98e..00000000000 --- a/services/crypto/IWeaveCrypto.h +++ /dev/null @@ -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__ */ diff --git a/services/crypto/IWeaveCrypto.xpt b/services/crypto/IWeaveCrypto.xpt deleted file mode 100644 index 2ed7438b519..00000000000 Binary files a/services/crypto/IWeaveCrypto.xpt and /dev/null differ diff --git a/services/crypto/Makefile b/services/crypto/Makefile deleted file mode 100644 index 7257b438212..00000000000 --- a/services/crypto/Makefile +++ /dev/null @@ -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 (original author) -# Justin Dolske -# -# 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 diff --git a/services/sync/Weave.js b/services/sync/Weave.js index 4057d7f5b0d..e4bcad3a2d9 100755 --- a/services/sync/Weave.js +++ b/services/sync/Weave.js @@ -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; } diff --git a/services/sync/locales/en-US/fennec-firstrun.dtd b/services/sync/locales/en-US/fennec-firstrun.dtd deleted file mode 100644 index b3c56936f63..00000000000 --- a/services/sync/locales/en-US/fennec-firstrun.dtd +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - diff --git a/services/sync/locales/en-US/fennec-tabs.dtd b/services/sync/locales/en-US/fennec-tabs.dtd deleted file mode 100644 index 41387be9c39..00000000000 --- a/services/sync/locales/en-US/fennec-tabs.dtd +++ /dev/null @@ -1 +0,0 @@ - diff --git a/services/sync/locales/en-US/fx-prefs.dtd b/services/sync/locales/en-US/fx-prefs.dtd deleted file mode 100644 index b1ff0f51cbf..00000000000 --- a/services/sync/locales/en-US/fx-prefs.dtd +++ /dev/null @@ -1,133 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/services/sync/locales/en-US/fx-prefs.properties b/services/sync/locales/en-US/fx-prefs.properties deleted file mode 100644 index fb7a8dddcc9..00000000000 --- a/services/sync/locales/en-US/fx-prefs.properties +++ /dev/null @@ -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 diff --git a/services/sync/locales/en-US/fx-tabs.dtd b/services/sync/locales/en-US/fx-tabs.dtd deleted file mode 100644 index 76f3eacd728..00000000000 --- a/services/sync/locales/en-US/fx-tabs.dtd +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - diff --git a/services/sync/locales/en-US/generic-change.properties b/services/sync/locales/en-US/generic-change.properties deleted file mode 100644 index fbe969c2e2e..00000000000 --- a/services/sync/locales/en-US/generic-change.properties +++ /dev/null @@ -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. \ No newline at end of file diff --git a/services/sync/locales/en-US/sync.dtd b/services/sync/locales/en-US/sync.dtd deleted file mode 100644 index bc2e08976fb..00000000000 --- a/services/sync/locales/en-US/sync.dtd +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - - - - - - - - - - - - diff --git a/services/sync/modules/util.js b/services/sync/modules/util.js index 56a8f922fb8..386645e224c 100644 --- a/services/sync/modules/util.js +++ b/services/sync/modules/util.js @@ -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); }, diff --git a/services/sync/tests/unit/Makefile b/services/sync/tests/unit/Makefile deleted file mode 100644 index 346940183b3..00000000000 --- a/services/sync/tests/unit/Makefile +++ /dev/null @@ -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 /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