summaryrefslogtreecommitdiff
path: root/indra/llmessage/llblowfishcipher.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llmessage/llblowfishcipher.cpp')
-rw-r--r--indra/llmessage/llblowfishcipher.cpp71
1 files changed, 16 insertions, 55 deletions
diff --git a/indra/llmessage/llblowfishcipher.cpp b/indra/llmessage/llblowfishcipher.cpp
index 7c9194d603..88aaf7c52a 100644
--- a/indra/llmessage/llblowfishcipher.cpp
+++ b/indra/llmessage/llblowfishcipher.cpp
@@ -2,39 +2,31 @@
* @file llblowfishcipher.cpp
* @brief Wrapper around OpenSSL Blowfish encryption algorithm.
*
- * We do not have OpenSSL headers or libraries on Windows, so this
- * class only works on Linux.
- *
- * $LicenseInfo:firstyear=2007&license=viewergpl$
- *
- * Copyright (c) 2007, Linden Research, Inc.
- *
+ * $LicenseInfo:firstyear=2007&license=viewerlgpl$
* Second Life Viewer Source Code
- * The source code in this file ("Source Code") is provided by Linden Lab
- * to you under the terms of the GNU General Public License, version 2.0
- * ("GPL"), unless you have obtained a separate licensing agreement
- * ("Other License"), formally executed by you and Linden Lab. Terms of
- * the GPL can be found in doc/GPL-license.txt in this distribution, or
- * online at http://secondlife.com/developers/opensource/gplv2
+ * Copyright (C) 2010, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
*
- * There are special exceptions to the terms and conditions of the GPL as
- * it is applied to this Source Code. View the full text of the exception
- * in the file doc/FLOSS-exception.txt in this software distribution, or
- * online at http://secondlife.com/developers/opensource/flossexception
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
*
- * By copying, modifying or distributing this software, you acknowledge
- * that you have read and understood your obligations described above,
- * and agree to abide by those obligations.
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
- * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
- * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
- * COMPLETENESS OR PERFORMANCE.
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
* $/LicenseInfo$
*/
#include "linden_common.h"
-
#include "llblowfishcipher.h"
+#include <openssl/evp.h>
LLBlowfishCipher::LLBlowfishCipher(const U8* secret, size_t secret_size)
@@ -53,11 +45,6 @@ LLBlowfishCipher::~LLBlowfishCipher()
mSecret = NULL;
}
-
-#if LL_LINUX
-
-#include <openssl/evp.h>
-
// virtual
U32 LLBlowfishCipher::encrypt(const U8* src, U32 src_len, U8* dst, U32 dst_len)
{
@@ -136,29 +123,3 @@ U32 LLBlowfishCipher::requiredEncryptionSpace(U32 len) const
len -= (len % BLOCK_SIZE);
return len;
}
-
-#else // !LL_LINUX
-
-// virtual
-U32 LLBlowfishCipher::encrypt(const U8* src, U32 src_len, U8* dst, U32 dst_len)
-{
- llerrs << "LLBlowfishCipher only supported on Linux" << llendl;
- return 0;
-}
-
-// virtual
-U32 LLBlowfishCipher::decrypt(const U8* src, U32 src_len, U8* dst, U32 dst_len)
-{
- llerrs << "LLBlowfishCipher only supported on Linux" << llendl;
- return 0;
-}
-
-// virtual
-U32 LLBlowfishCipher::requiredEncryptionSpace(U32 len) const
-{
- llerrs << "LLBlowfishCipher only supported on Linux" << llendl;
- return 0;
-}
-
-#endif
-