Update sha3's brg_endian.h, document provenance and version
The existing copyright notice gave me a name; github found me a file; but it doesn't match what we had before. Made some guesses at which parts of the change relative to upstream to keep, documented the diff as a patch and recorded details in qt_attribution.json Task-number: QTBUG-70008 Change-Id: I423724435eaeeda7237f8b3df8691b436fed8652 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
This commit is contained in:
parent
3f61873f49
commit
d16babf351
21
src/3rdparty/sha3/BRG_ENDIAN_LICENSE
vendored
21
src/3rdparty/sha3/BRG_ENDIAN_LICENSE
vendored
@ -1,21 +1,14 @@
|
||||
Copyright (c) 1998-2008, Brian Gladman, Worcester, UK. All rights reserved.
|
||||
|
||||
LICENSE TERMS
|
||||
Copyright (c) 1998-2013, Brian Gladman, Worcester, UK. All rights reserved.
|
||||
|
||||
The redistribution and use of this software (with or without changes)
|
||||
is allowed without the payment of fees or royalties provided that:
|
||||
|
||||
1. source code distributions include the above copyright notice, this
|
||||
list of conditions and the following disclaimer;
|
||||
source code distributions include the above copyright notice, this
|
||||
list of conditions and the following disclaimer;
|
||||
|
||||
2. binary distributions include the above copyright notice, this list
|
||||
of conditions and the following disclaimer in their documentation;
|
||||
|
||||
3. the name of the copyright holder is not used to endorse products
|
||||
built using this software without specific written permission.
|
||||
|
||||
DISCLAIMER
|
||||
binary distributions include the above copyright notice, this list
|
||||
of conditions and the following disclaimer in their documentation.
|
||||
|
||||
This software is provided 'as is' with no explicit or implied warranties
|
||||
in respect of its properties, including, but not limited to, correctness
|
||||
and/or fitness for purpose.
|
||||
in respect of its operation, including, but not limited to, correctness
|
||||
and fitness for purpose.
|
||||
|
47
src/3rdparty/sha3/brg_endian.h
vendored
47
src/3rdparty/sha3/brg_endian.h
vendored
@ -1,29 +1,22 @@
|
||||
/*
|
||||
---------------------------------------------------------------------------
|
||||
Copyright (c) 1998-2008, Brian Gladman, Worcester, UK. All rights reserved.
|
||||
---------------------------------------------------------------------------
|
||||
Copyright (c) 1998-2013, Brian Gladman, Worcester, UK. All rights reserved.
|
||||
|
||||
LICENSE TERMS
|
||||
The redistribution and use of this software (with or without changes)
|
||||
is allowed without the payment of fees or royalties provided that:
|
||||
|
||||
The redistribution and use of this software (with or without changes)
|
||||
is allowed without the payment of fees or royalties provided that:
|
||||
source code distributions include the above copyright notice, this
|
||||
list of conditions and the following disclaimer;
|
||||
|
||||
1. source code distributions include the above copyright notice, this
|
||||
list of conditions and the following disclaimer;
|
||||
binary distributions include the above copyright notice, this list
|
||||
of conditions and the following disclaimer in their documentation.
|
||||
|
||||
2. binary distributions include the above copyright notice, this list
|
||||
of conditions and the following disclaimer in their documentation;
|
||||
|
||||
3. the name of the copyright holder is not used to endorse products
|
||||
built using this software without specific written permission.
|
||||
|
||||
DISCLAIMER
|
||||
|
||||
This software is provided 'as is' with no explicit or implied warranties
|
||||
in respect of its properties, including, but not limited to, correctness
|
||||
and/or fitness for purpose.
|
||||
---------------------------------------------------------------------------
|
||||
Issue Date: 20/12/2007
|
||||
Changes for ARM 9/9/2010
|
||||
This software is provided 'as is' with no explicit or implied warranties
|
||||
in respect of its operation, including, but not limited to, correctness
|
||||
and fitness for purpose.
|
||||
---------------------------------------------------------------------------
|
||||
Issue Date: 20/12/2007
|
||||
Changes for ARM 9/9/2010 [Downstream relative to Gladman's GitHub, upstream to Qt]
|
||||
*/
|
||||
|
||||
#ifndef _BRG_ENDIAN_H
|
||||
@ -32,7 +25,12 @@
|
||||
#define IS_BIG_ENDIAN 4321 /* byte 0 is most significant (mc68k) */
|
||||
#define IS_LITTLE_ENDIAN 1234 /* byte 0 is least significant (i386) */
|
||||
|
||||
#if 0
|
||||
/* This is needed when using clang with MSVC to avoid including */
|
||||
/* endian.h and byteswap.h which are not present on Windows */
|
||||
#if defined( _MSC_VER ) && defined( __clang__ )
|
||||
# undef __GNUC__
|
||||
#endif
|
||||
|
||||
/* Include files where endian defines and byteswap functions may reside */
|
||||
#if defined( __sun )
|
||||
# include <sys/isa_defs.h>
|
||||
@ -42,14 +40,13 @@
|
||||
defined( __CYGWIN32__ ) || defined( __DJGPP__ ) || defined( __osf__ )
|
||||
# include <machine/endian.h>
|
||||
#elif defined( __linux__ ) || defined( __GNUC__ ) || defined( __GNU_LIBRARY__ )
|
||||
# if !defined( __MINGW32__ ) && !defined( _AIX )
|
||||
# if !defined( __MINGW32__ ) && !defined( _AIX ) && !defined(Q_OS_QNX)
|
||||
# include <endian.h>
|
||||
# if !defined( __BEOS__ )
|
||||
# include <byteswap.h>
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/* Now attempt to set the define for platform byte order using any */
|
||||
/* of the four forms SYMBOL, _SYMBOL, __SYMBOL & __SYMBOL__, which */
|
||||
@ -134,7 +131,7 @@
|
||||
#elif 0 /* **** EDIT HERE IF NECESSARY **** */
|
||||
# define PLATFORM_BYTE_ORDER IS_BIG_ENDIAN
|
||||
#else
|
||||
# error Please edit lines 132 or 134 in brg_endian.h to set the platform byte order
|
||||
# error Please edit lines 129 or 131 in brg_endian.h to set the platform byte order
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
34
src/3rdparty/sha3/brg_endian.h.patch
vendored
Normal file
34
src/3rdparty/sha3/brg_endian.h.patch
vendored
Normal file
@ -0,0 +1,34 @@
|
||||
diff -ub /home/eddy/.sys/tmp/sha/brg_endian.h /home/eddy/work/Qt-5.12/qtbase/src/3rdparty/sha3/brg_endian.h
|
||||
--- upstream/sha/brg_endian.h 2018-10-22 16:27:04.106128670 +0200
|
||||
+++ qtbase/src/3rdparty/sha3/brg_endian.h 2018-10-22 16:30:35.098891562 +0200
|
||||
@@ -16,6 +16,7 @@
|
||||
and fitness for purpose.
|
||||
---------------------------------------------------------------------------
|
||||
Issue Date: 20/12/2007
|
||||
+Changes for ARM 9/9/2010 [Downstream relative to Gladman's GitHub, upstream to Qt]
|
||||
*/
|
||||
|
||||
#ifndef _BRG_ENDIAN_H
|
||||
@@ -119,12 +120,18 @@
|
||||
defined( THINK_C ) || defined( __VMCMS__ ) || defined( _AIX )
|
||||
# define PLATFORM_BYTE_ORDER IS_BIG_ENDIAN
|
||||
|
||||
-#elif 0 /* **** EDIT HERE IF NECESSARY **** */
|
||||
+#elif defined(__arm__)
|
||||
+# ifdef __BIG_ENDIAN
|
||||
+# define PLATFORM_BYTE_ORDER IS_BIG_ENDIAN
|
||||
+# else
|
||||
+# define PLATFORM_BYTE_ORDER IS_LITTLE_ENDIAN
|
||||
+# endif
|
||||
+#elif 1 /* **** EDIT HERE IF NECESSARY **** */
|
||||
# define PLATFORM_BYTE_ORDER IS_LITTLE_ENDIAN
|
||||
#elif 0 /* **** EDIT HERE IF NECESSARY **** */
|
||||
# define PLATFORM_BYTE_ORDER IS_BIG_ENDIAN
|
||||
#else
|
||||
-# error Please edit lines 126 or 128 in brg_endian.h to set the platform byte order
|
||||
+# error Please edit lines 129 or 131 in brg_endian.h to set the platform byte order
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
Diff finished. Mon Oct 22 16:31:46 2018
|
8
src/3rdparty/sha3/qt_attribution.json
vendored
8
src/3rdparty/sha3/qt_attribution.json
vendored
@ -4,13 +4,15 @@
|
||||
"Name": "Secure Hash Algorithm SHA-3 - brg_endian",
|
||||
"QDocModule": "qtcore",
|
||||
"QtUsage": "Used in Qt Core (QCryptographicHash).",
|
||||
"Files": "apply brg_endian.h.patch to upstream from https://github.com/BrianGladman/sha/",
|
||||
"Files": "brg_endian.h",
|
||||
|
||||
"Description": "SHA-3, originally known as Keccak, is a cryptographic hash function.",
|
||||
"License": "BSD 3-clause \"New\" or \"Revised\" License",
|
||||
"Version": "https://github.com/BrianGladman/sha/ commit 4b9e13ead2c5b5e41ca27c65de4dd69ae0bac228",
|
||||
"License": "BSD 2-clause \"Simplified\" License",
|
||||
"LicenseFile": "BRG_ENDIAN_LICENSE",
|
||||
"LicenseId": "BSD-3-Clause",
|
||||
"Copyright": "Copyright (c) 1998-2008, Brian Gladman, Worcester, UK. All rights reserved."
|
||||
"LicenseId": "BSD-2-Clause",
|
||||
"Copyright": "Copyright (c) 1998-2013, Brian Gladman, Worcester, UK. All rights reserved."
|
||||
},
|
||||
{
|
||||
"Id": "sha3_keccak",
|
||||
|
Loading…
x
Reference in New Issue
Block a user