Use "GFp/" instead of "openssl/" for #includes.
Avoid any potential conflicts with OpenSSL header files by using a different namespace.
This commit is contained in:
parent
10831a4c2a
commit
ff71d521ff
@ -20,7 +20,7 @@ compatibility with existing OpenSSL consumers.
|
||||
## Forward declarations
|
||||
|
||||
Do not write `typedef struct foo_st FOO` or try otherwise to define BoringSSL's
|
||||
types. Including `openssl/base.h` (or `openssl/ossl_typ.h` for consumers who
|
||||
types. Including `GFp/base.h` (or `GFp/ossl_typ.h` for consumers who
|
||||
wish to be OpenSSL-compatible) will forward-declare each type without importing
|
||||
the rest of the library or invasive macros.
|
||||
|
||||
|
16
Cargo.toml
16
Cargo.toml
@ -235,14 +235,14 @@ include = [
|
||||
"crypto/test/file_test.cc",
|
||||
"crypto/test/file_test.h",
|
||||
"crypto/test/scoped_types.h",
|
||||
"include/openssl/aes.h",
|
||||
"include/openssl/arm_arch.h",
|
||||
"include/openssl/base.h",
|
||||
"include/openssl/bn.h",
|
||||
"include/openssl/cpu.h",
|
||||
"include/openssl/err.h",
|
||||
"include/openssl/mem.h",
|
||||
"include/openssl/type_check.h",
|
||||
"include/GFp/aes.h",
|
||||
"include/GFp/arm_arch.h",
|
||||
"include/GFp/base.h",
|
||||
"include/GFp/bn.h",
|
||||
"include/GFp/cpu.h",
|
||||
"include/GFp/err.h",
|
||||
"include/GFp/mem.h",
|
||||
"include/GFp/type_check.h",
|
||||
"examples/checkdigest.rs",
|
||||
"third-party/NIST/README.md",
|
||||
"third-party/NIST/sha256sums.txt",
|
||||
|
2
STYLE.md
2
STYLE.md
@ -330,7 +330,7 @@ instance, For instance:
|
||||
const uint8_t *in,
|
||||
size_t in_len,
|
||||
|
||||
Name public headers like `include/openssl/evp.h` with header guards like
|
||||
Name public headers like `include/GFp/evp.h` with header guards like
|
||||
`OPENSSL_HEADER_EVP_H`. Name internal headers like
|
||||
`crypto/ec/internal.h` with header guards like
|
||||
`OPENSSL_HEADER_EC_INTERNAL_H`.
|
||||
|
16
build.rs
16
build.rs
@ -193,14 +193,14 @@ const RING_INCLUDES: &'static [&'static str] =
|
||||
"crypto/test/bn_test_util.h",
|
||||
"crypto/test/file_test.h",
|
||||
"crypto/test/scoped_types.h",
|
||||
"include/openssl/aes.h",
|
||||
"include/openssl/arm_arch.h",
|
||||
"include/openssl/base.h",
|
||||
"include/openssl/bn.h",
|
||||
"include/openssl/cpu.h",
|
||||
"include/openssl/err.h",
|
||||
"include/openssl/mem.h",
|
||||
"include/openssl/type_check.h"];
|
||||
"include/GFp/aes.h",
|
||||
"include/GFp/arm_arch.h",
|
||||
"include/GFp/base.h",
|
||||
"include/GFp/bn.h",
|
||||
"include/GFp/cpu.h",
|
||||
"include/GFp/err.h",
|
||||
"include/GFp/mem.h",
|
||||
"include/GFp/type_check.h"];
|
||||
|
||||
#[cfg_attr(rustfmt, rustfmt_skip)]
|
||||
const RING_PERL_INCLUDES: &'static [&'static str] =
|
||||
|
@ -6,7 +6,7 @@
|
||||
* are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in
|
||||
@ -46,11 +46,11 @@
|
||||
* OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
* ==================================================================== */
|
||||
|
||||
#include <openssl/aes.h>
|
||||
#include <GFp/aes.h>
|
||||
|
||||
#include <assert.h>
|
||||
|
||||
#include <openssl/cpu.h>
|
||||
#include <GFp/cpu.h>
|
||||
|
||||
#include "../internal.h"
|
||||
|
||||
|
@ -64,7 +64,7 @@ $rounds="r12";
|
||||
|
||||
$code=<<___;
|
||||
#ifndef __KERNEL__
|
||||
# include <openssl/arm_arch.h>
|
||||
# include <GFp/arm_arch.h>
|
||||
#else
|
||||
# define __ARM_ARCH__ __LINUX_ARM_ARCH__
|
||||
#endif
|
||||
|
@ -45,7 +45,7 @@ open OUT,"| \"$^X\" $xlate $flavour $output";
|
||||
$prefix="aes_hw";
|
||||
|
||||
$code=<<___;
|
||||
#include <openssl/arm_arch.h>
|
||||
#include <GFp/arm_arch.h>
|
||||
|
||||
#if __ARM_MAX_ARCH__>=7
|
||||
.text
|
||||
|
@ -702,7 +702,7 @@ ___
|
||||
|
||||
$code.=<<___;
|
||||
#ifndef __KERNEL__
|
||||
# include <openssl/arm_arch.h>
|
||||
# include <GFp/arm_arch.h>
|
||||
|
||||
# define VFP_ABI_PUSH vstmdb sp!,{d8-d15}
|
||||
# define VFP_ABI_POP vldmia sp!,{d8-d15}
|
||||
|
@ -54,12 +54,12 @@
|
||||
* copied and put under another distribution licence
|
||||
* [including the GNU Public Licence.] */
|
||||
|
||||
#include <openssl/bn.h>
|
||||
#include <GFp/bn.h>
|
||||
|
||||
#include <string.h>
|
||||
|
||||
#include <openssl/err.h>
|
||||
#include <openssl/mem.h>
|
||||
#include <GFp/err.h>
|
||||
#include <GFp/mem.h>
|
||||
|
||||
#include "internal.h"
|
||||
|
||||
|
@ -88,7 +88,7 @@ $_n0="$num,#14*4";
|
||||
$_num="$num,#15*4"; $_bpend=$_num;
|
||||
|
||||
$code=<<___;
|
||||
#include <openssl/arm_arch.h>
|
||||
#include <GFp/arm_arch.h>
|
||||
|
||||
.text
|
||||
#if defined(__thumb2__)
|
||||
|
@ -54,13 +54,13 @@
|
||||
* copied and put under another distribution licence
|
||||
* [including the GNU Public Licence.] */
|
||||
|
||||
#include <openssl/bn.h>
|
||||
#include <GFp/bn.h>
|
||||
|
||||
#include <limits.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <openssl/err.h>
|
||||
#include <openssl/mem.h>
|
||||
#include <GFp/err.h>
|
||||
#include <GFp/mem.h>
|
||||
|
||||
#include "internal.h"
|
||||
|
||||
|
@ -82,9 +82,9 @@
|
||||
|
||||
#include <utility>
|
||||
|
||||
#include <openssl/bn.h>
|
||||
#include <openssl/err.h>
|
||||
#include <openssl/mem.h>
|
||||
#include <GFp/bn.h>
|
||||
#include <GFp/err.h>
|
||||
#include <GFp/mem.h>
|
||||
|
||||
#include "../test/bn_test_lib.h"
|
||||
#include "../crypto/test/file_test.h"
|
||||
|
@ -54,9 +54,9 @@
|
||||
* copied and put under another distribution licence
|
||||
* [including the GNU Public Licence.] */
|
||||
|
||||
#include <openssl/bn.h>
|
||||
#include <GFp/bn.h>
|
||||
|
||||
#include "openssl/mem.h"
|
||||
#include "GFp/mem.h"
|
||||
|
||||
#include "internal.h"
|
||||
|
||||
|
@ -54,7 +54,7 @@
|
||||
* copied and put under another distribution licence
|
||||
* [including the GNU Public Licence.] */
|
||||
|
||||
#include <openssl/bn.h>
|
||||
#include <GFp/bn.h>
|
||||
|
||||
#include <limits.h>
|
||||
#include <string.h>
|
||||
|
@ -54,11 +54,11 @@
|
||||
* copied and put under another distribution licence
|
||||
* [including the GNU Public Licence.] */
|
||||
|
||||
#include <openssl/bn.h>
|
||||
#include <GFp/bn.h>
|
||||
|
||||
#include <assert.h>
|
||||
#include <limits.h>
|
||||
#include <openssl/err.h>
|
||||
#include <GFp/err.h>
|
||||
|
||||
#include "internal.h"
|
||||
|
||||
|
@ -106,14 +106,14 @@
|
||||
* (eay@cryptsoft.com). This product includes software written by Tim
|
||||
* Hudson (tjh@cryptsoft.com). */
|
||||
|
||||
#include <openssl/bn.h>
|
||||
#include <GFp/bn.h>
|
||||
|
||||
#include <assert.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <openssl/cpu.h>
|
||||
#include <openssl/err.h>
|
||||
#include <openssl/mem.h>
|
||||
#include <GFp/cpu.h>
|
||||
#include <GFp/err.h>
|
||||
#include <GFp/mem.h>
|
||||
|
||||
#include "internal.h"
|
||||
|
||||
|
@ -106,9 +106,9 @@
|
||||
* (eay@cryptsoft.com). This product includes software written by Tim
|
||||
* Hudson (tjh@cryptsoft.com). */
|
||||
|
||||
#include <openssl/bn.h>
|
||||
#include <GFp/bn.h>
|
||||
|
||||
#include <openssl/err.h>
|
||||
#include <GFp/err.h>
|
||||
|
||||
#include "internal.h"
|
||||
|
||||
|
@ -54,7 +54,7 @@
|
||||
* copied and put under another distribution licence
|
||||
* [including the GNU Public Licence.] */
|
||||
|
||||
#include <openssl/bn.h>
|
||||
#include <GFp/bn.h>
|
||||
|
||||
#include <assert.h>
|
||||
|
||||
|
@ -123,7 +123,7 @@
|
||||
#ifndef OPENSSL_HEADER_BN_INTERNAL_H
|
||||
#define OPENSSL_HEADER_BN_INTERNAL_H
|
||||
|
||||
#include <openssl/base.h>
|
||||
#include <GFp/base.h>
|
||||
|
||||
#if defined(OPENSSL_X86_64) && defined(_MSC_VER)
|
||||
#pragma warning(push, 3)
|
||||
|
@ -106,14 +106,14 @@
|
||||
* (eay@cryptsoft.com). This product includes software written by Tim
|
||||
* Hudson (tjh@cryptsoft.com). */
|
||||
|
||||
#include <openssl/bn.h>
|
||||
#include <GFp/bn.h>
|
||||
|
||||
#include <assert.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <openssl/err.h>
|
||||
#include <openssl/mem.h>
|
||||
#include <openssl/type_check.h>
|
||||
#include <GFp/err.h>
|
||||
#include <GFp/mem.h>
|
||||
#include <GFp/type_check.h>
|
||||
|
||||
#include "internal.h"
|
||||
#include "../internal.h"
|
||||
|
@ -12,7 +12,7 @@
|
||||
* OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
|
||||
* CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */
|
||||
|
||||
#include <openssl/bn.h>
|
||||
#include <GFp/bn.h>
|
||||
|
||||
#include <assert.h>
|
||||
|
||||
|
@ -54,7 +54,7 @@
|
||||
* copied and put under another distribution licence
|
||||
* [including the GNU Public Licence.] */
|
||||
|
||||
#include <openssl/bn.h>
|
||||
#include <GFp/bn.h>
|
||||
|
||||
#include <assert.h>
|
||||
#include <string.h>
|
||||
|
@ -106,9 +106,9 @@
|
||||
* (eay@cryptsoft.com). This product includes software written by Tim
|
||||
* Hudson (tjh@cryptsoft.com). */
|
||||
|
||||
#include <openssl/bn.h>
|
||||
#include <GFp/bn.h>
|
||||
|
||||
#include <openssl/err.h>
|
||||
#include <GFp/err.h>
|
||||
|
||||
|
||||
int GFp_BN_rand_range_ex(BIGNUM *r, const BIGNUM *max_exclusive, RAND *rng) {
|
||||
|
@ -54,11 +54,11 @@
|
||||
* copied and put under another distribution licence
|
||||
* [including the GNU Public Licence.] */
|
||||
|
||||
#include <openssl/bn.h>
|
||||
#include <GFp/bn.h>
|
||||
|
||||
#include <string.h>
|
||||
|
||||
#include <openssl/err.h>
|
||||
#include <GFp/err.h>
|
||||
|
||||
#include "internal.h"
|
||||
|
||||
|
@ -162,7 +162,7 @@ my @ret;
|
||||
}
|
||||
|
||||
$code.=<<___;
|
||||
#include <openssl/arm_arch.h>
|
||||
#include <GFp/arm_arch.h>
|
||||
|
||||
.text
|
||||
#if defined(__thumb2__)
|
||||
|
@ -111,7 +111,7 @@ my ($a3,$b3,$c3,$d3)=map(($_&~3)+(($_+1)&3),($a2,$b2,$c2,$d2));
|
||||
}
|
||||
|
||||
$code.=<<___;
|
||||
#include <openssl/arm_arch.h>
|
||||
#include <GFp/arm_arch.h>
|
||||
|
||||
.text
|
||||
|
||||
|
@ -48,17 +48,17 @@
|
||||
|
||||
#include <string.h>
|
||||
|
||||
#include <openssl/aes.h>
|
||||
#include <openssl/cpu.h>
|
||||
#include <openssl/err.h>
|
||||
#include <openssl/mem.h>
|
||||
#include <GFp/aes.h>
|
||||
#include <GFp/cpu.h>
|
||||
#include <GFp/err.h>
|
||||
#include <GFp/mem.h>
|
||||
|
||||
#include "internal.h"
|
||||
#include "../internal.h"
|
||||
#include "../modes/internal.h"
|
||||
|
||||
#if defined(OPENSSL_ARM) || defined(OPENSSL_AARCH64)
|
||||
#include <openssl/arm_arch.h>
|
||||
#include <GFp/arm_arch.h>
|
||||
#endif
|
||||
|
||||
|
||||
|
@ -61,12 +61,12 @@
|
||||
#define __STDC_CONSTANT_MACROS
|
||||
#endif
|
||||
|
||||
#include <openssl/base.h>
|
||||
#include <GFp/base.h>
|
||||
|
||||
#include <assert.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#include <openssl/err.h>
|
||||
#include <GFp/err.h>
|
||||
|
||||
#include "../internal.h"
|
||||
|
||||
|
@ -12,13 +12,13 @@
|
||||
* OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
|
||||
* CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */
|
||||
|
||||
#include <openssl/cpu.h>
|
||||
#include <GFp/cpu.h>
|
||||
|
||||
#if defined(OPENSSL_AARCH64) && !defined(OPENSSL_STATIC_ARMCAP)
|
||||
|
||||
#include <sys/auxv.h>
|
||||
|
||||
#include <openssl/arm_arch.h>
|
||||
#include <GFp/arm_arch.h>
|
||||
|
||||
#include "internal.h"
|
||||
|
||||
|
@ -12,7 +12,7 @@
|
||||
* OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
|
||||
* CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */
|
||||
|
||||
#include <openssl/cpu.h>
|
||||
#include <GFp/cpu.h>
|
||||
|
||||
#if defined(OPENSSL_ARM) && !defined(OPENSSL_STATIC_ARMCAP)
|
||||
|
||||
@ -22,8 +22,8 @@
|
||||
#include <sys/types.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include <openssl/arm_arch.h>
|
||||
#include <openssl/mem.h>
|
||||
#include <GFp/arm_arch.h>
|
||||
#include <GFp/mem.h>
|
||||
|
||||
#include "internal.h"
|
||||
|
||||
|
@ -12,12 +12,12 @@
|
||||
* OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
|
||||
* CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */
|
||||
|
||||
#include <openssl/cpu.h>
|
||||
#include <GFp/cpu.h>
|
||||
|
||||
#if (defined(OPENSSL_ARM) || defined(OPENSSL_AARCH64)) && \
|
||||
!defined(OPENSSL_STATIC_ARMCAP)
|
||||
|
||||
#include <openssl/arm_arch.h>
|
||||
#include <GFp/arm_arch.h>
|
||||
|
||||
|
||||
extern uint32_t GFp_armcap_P;
|
||||
|
@ -54,7 +54,7 @@
|
||||
* copied and put under another distribution licence
|
||||
* [including the GNU Public Licence.] */
|
||||
|
||||
#include <openssl/cpu.h>
|
||||
#include <GFp/cpu.h>
|
||||
|
||||
|
||||
#if !defined(OPENSSL_NO_ASM) && (defined(OPENSSL_X86) || defined(OPENSSL_X86_64))
|
||||
|
@ -18,7 +18,7 @@
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#include <openssl/cpu.h>
|
||||
#include <GFp/cpu.h>
|
||||
|
||||
#if defined(__linux__)
|
||||
#include <sys/syscall.h>
|
||||
@ -52,7 +52,7 @@
|
||||
uint32_t GFp_ia32cap_P[4] = {0};
|
||||
#elif defined(OPENSSL_ARM) || defined(OPENSSL_AARCH64)
|
||||
|
||||
#include <openssl/arm_arch.h>
|
||||
#include <GFp/arm_arch.h>
|
||||
|
||||
#if defined(OPENSSL_STATIC_ARMCAP)
|
||||
|
||||
|
@ -21,8 +21,8 @@
|
||||
|
||||
#include <string.h>
|
||||
|
||||
#include <openssl/cpu.h>
|
||||
#include <openssl/mem.h>
|
||||
#include <GFp/cpu.h>
|
||||
#include <GFp/mem.h>
|
||||
|
||||
#include "../internal.h"
|
||||
|
||||
|
@ -15,7 +15,7 @@
|
||||
#ifndef OPENSSL_HEADER_CURVE25519_INTERNAL_H
|
||||
#define OPENSSL_HEADER_CURVE25519_INTERNAL_H
|
||||
|
||||
#include <openssl/base.h>
|
||||
#include <GFp/base.h>
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
|
@ -93,7 +93,7 @@ if ($flavour && $flavour ne "void") {
|
||||
}
|
||||
|
||||
$code.=<<___;
|
||||
#include <openssl/arm_arch.h>
|
||||
#include <GFp/arm_arch.h>
|
||||
|
||||
.text
|
||||
#if defined(__thumb2__)
|
||||
|
@ -95,7 +95,7 @@ my ($rp,$ap,$bp,$bi,$a0,$a1,$a2,$a3,$t0,$t1,$t2,$t3,$poly1,$poly3,
|
||||
my ($acc6,$acc7)=($ap,$bp); # used in __ecp_nistz256_sqr_mont
|
||||
|
||||
$code.=<<___;
|
||||
#include <openssl/arm_arch.h>
|
||||
#include <GFp/arm_arch.h>
|
||||
|
||||
.text
|
||||
.align 5
|
||||
|
@ -16,7 +16,7 @@
|
||||
|
||||
#include <assert.h>
|
||||
|
||||
#include <openssl/bn.h>
|
||||
#include <GFp/bn.h>
|
||||
|
||||
#include "../bn/internal.h"
|
||||
|
||||
|
@ -15,12 +15,12 @@
|
||||
#ifndef OPENSSL_HEADER_EC_ECP_NISTZ_H
|
||||
#define OPENSSL_HEADER_EC_ECP_NISTZ_H
|
||||
|
||||
#include <openssl/base.h>
|
||||
#include <GFp/base.h>
|
||||
|
||||
#include <assert.h>
|
||||
|
||||
#include <openssl/bn.h>
|
||||
#include <openssl/type_check.h>
|
||||
#include <GFp/bn.h>
|
||||
#include <GFp/type_check.h>
|
||||
|
||||
#include "../internal.h"
|
||||
|
||||
|
@ -27,8 +27,8 @@
|
||||
#include <stdint.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <openssl/bn.h>
|
||||
#include <openssl/err.h>
|
||||
#include <GFp/bn.h>
|
||||
#include <GFp/err.h>
|
||||
|
||||
#include "ecp_nistz.h"
|
||||
#include "../limbs/limbs.h"
|
||||
|
@ -15,7 +15,7 @@
|
||||
#ifndef OPENSSL_HEADER_EC_ECP_NISTZ256_H
|
||||
#define OPENSSL_HEADER_EC_ECP_NISTZ256_H
|
||||
|
||||
#include <openssl/bn.h>
|
||||
#include <GFp/bn.h>
|
||||
|
||||
#include "../limbs/limbs.h"
|
||||
|
||||
|
@ -15,7 +15,7 @@
|
||||
#ifndef OPENSSL_HEADER_EC_ECP_NISTZ384_H
|
||||
#define OPENSSL_HEADER_EC_ECP_NISTZ384_H
|
||||
|
||||
#include <openssl/bn.h>
|
||||
#include <GFp/bn.h>
|
||||
|
||||
#include "../limbs/limbs.h"
|
||||
|
||||
|
@ -117,8 +117,8 @@
|
||||
|
||||
#include <stddef.h>
|
||||
|
||||
#include <openssl/base.h>
|
||||
#include <openssl/type_check.h>
|
||||
#include <GFp/base.h>
|
||||
#include <GFp/type_check.h>
|
||||
|
||||
#if defined(_MSC_VER)
|
||||
#pragma warning(push, 3)
|
||||
|
@ -14,7 +14,7 @@
|
||||
|
||||
#include "limbs.h"
|
||||
|
||||
#include <openssl/type_check.h>
|
||||
#include <GFp/type_check.h>
|
||||
|
||||
#include "../internal.h"
|
||||
|
||||
|
@ -15,8 +15,8 @@
|
||||
#ifndef RING_LIMBS_H
|
||||
#define RING_LIMBS_H
|
||||
|
||||
#include <openssl/base.h>
|
||||
#include <openssl/bn.h>
|
||||
#include <GFp/base.h>
|
||||
#include <GFp/bn.h>
|
||||
|
||||
#include <stddef.h>
|
||||
|
||||
|
@ -54,7 +54,7 @@
|
||||
* copied and put under another distribution licence
|
||||
* [including the GNU Public Licence.] */
|
||||
|
||||
#include <openssl/mem.h>
|
||||
#include <GFp/mem.h>
|
||||
|
||||
int GFp_memcmp(const void *in_a, const void *in_b, size_t len) {
|
||||
const uint8_t *a = in_a;
|
||||
|
@ -133,7 +133,7 @@ ___
|
||||
}
|
||||
|
||||
$code=<<___;
|
||||
#include <openssl/arm_arch.h>
|
||||
#include <GFp/arm_arch.h>
|
||||
|
||||
.text
|
||||
#if defined(__thumb2__)
|
||||
|
@ -54,7 +54,7 @@ my ($Xl,$Xm,$Xh,$IN)=map("q$_",(0..3));
|
||||
my ($t0,$t1,$t2,$xC2,$H,$Hhl,$H2)=map("q$_",(8..14));
|
||||
|
||||
$code=<<___;
|
||||
#include <openssl/arm_arch.h>
|
||||
#include <GFp/arm_arch.h>
|
||||
|
||||
.text
|
||||
___
|
||||
|
@ -46,14 +46,14 @@
|
||||
* OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
* ==================================================================== */
|
||||
|
||||
#include <openssl/base.h>
|
||||
#include <GFp/base.h>
|
||||
|
||||
#include <assert.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <openssl/mem.h>
|
||||
#include <openssl/cpu.h>
|
||||
#include <openssl/type_check.h>
|
||||
#include <GFp/mem.h>
|
||||
#include <GFp/cpu.h>
|
||||
#include <GFp/type_check.h>
|
||||
|
||||
#include "internal.h"
|
||||
#include "../internal.h"
|
||||
@ -305,7 +305,7 @@ void GFp_gcm_ghash_4bit_mmx(uint8_t Xi[16], const u128 Htable[16],
|
||||
|
||||
#elif defined(OPENSSL_ARM) || defined(OPENSSL_AARCH64)
|
||||
|
||||
#include <openssl/arm_arch.h>
|
||||
#include <GFp/arm_arch.h>
|
||||
|
||||
#if __ARM_MAX_ARCH__ >= 8
|
||||
#define ARM_PMULL_ASM
|
||||
|
@ -49,7 +49,7 @@
|
||||
#ifndef OPENSSL_HEADER_MODES_INTERNAL_H
|
||||
#define OPENSSL_HEADER_MODES_INTERNAL_H
|
||||
|
||||
#include <openssl/aes.h>
|
||||
#include <GFp/aes.h>
|
||||
|
||||
#include "../internal.h"
|
||||
|
||||
@ -75,7 +75,7 @@ typedef void (*gcm128_ghash_f)(uint8_t Xi[16], const u128 Htable[16],
|
||||
#define GCM128_SERIALIZED_LEN (GCM128_HTABLE_LEN * 16)
|
||||
|
||||
/* This differs from OpenSSL's |gcm128_context| in that it does not have the
|
||||
* |key| pointer, in order to make it |memcpy|-friendly. See openssl/modes.h
|
||||
* |key| pointer, in order to make it |memcpy|-friendly. See GFp/modes.h
|
||||
* for more info. */
|
||||
struct gcm128_context {
|
||||
/* Following 6 names follow names in GCM specification */
|
||||
|
@ -39,7 +39,7 @@ if ($flavour && $flavour ne "void") {
|
||||
($ctx,$inp,$len,$padbit)=map("r$_",(0..3));
|
||||
|
||||
$code.=<<___;
|
||||
#include <openssl/arm_arch.h>
|
||||
#include <GFp/arm_arch.h>
|
||||
|
||||
.text
|
||||
#if defined(__thumb2__)
|
||||
|
@ -42,7 +42,7 @@ my ($mac,$nonce)=($inp,$len);
|
||||
my ($h0,$h1,$h2,$r0,$r1,$s1,$t0,$t1,$d0,$d1,$d2) = map("x$_",(4..14));
|
||||
|
||||
$code.=<<___;
|
||||
#include <openssl/arm_arch.h>
|
||||
#include <GFp/arm_arch.h>
|
||||
|
||||
.text
|
||||
|
||||
|
@ -168,7 +168,7 @@ ___
|
||||
|
||||
$code=<<___;
|
||||
#ifndef __KERNEL__
|
||||
# include <openssl/arm_arch.h>
|
||||
# include <GFp/arm_arch.h>
|
||||
#else
|
||||
# define __ARM_ARCH__ __LINUX_ARM_ARCH__
|
||||
# define __ARM_MAX_ARCH__ 7
|
||||
|
@ -191,7 +191,7 @@ ___
|
||||
}
|
||||
$code=<<___;
|
||||
#ifndef __KERNEL__
|
||||
# include <openssl/arm_arch.h>
|
||||
# include <GFp/arm_arch.h>
|
||||
# define VFP_ABI_PUSH vstmdb sp!,{d8-d15}
|
||||
# define VFP_ABI_POP vldmia sp!,{d8-d15}
|
||||
#else
|
||||
|
@ -158,7 +158,7 @@ ___
|
||||
}
|
||||
|
||||
$code.=<<___;
|
||||
#include <openssl/arm_arch.h>
|
||||
#include <GFp/arm_arch.h>
|
||||
|
||||
.text
|
||||
|
||||
|
@ -57,8 +57,8 @@
|
||||
#include "bn_test_util.h"
|
||||
#include "bn_test_lib.h"
|
||||
|
||||
#include <openssl/bn.h>
|
||||
#include <openssl/err.h>
|
||||
#include <GFp/bn.h>
|
||||
#include <GFp/err.h>
|
||||
|
||||
#include <ctype.h>
|
||||
#include <limits.h>
|
||||
|
@ -123,8 +123,8 @@
|
||||
#ifndef OPENSSL_HEADER_BN_TEST_LIB_H
|
||||
#define OPENSSL_HEADER_BN_TEST_LIB_H
|
||||
|
||||
#include <openssl/base.h>
|
||||
#include <openssl/bn.h>
|
||||
#include <GFp/base.h>
|
||||
#include <GFp/bn.h>
|
||||
|
||||
#if defined(__cplusplus)
|
||||
extern "C" {
|
||||
|
@ -54,12 +54,12 @@
|
||||
* copied and put under another distribution licence
|
||||
* [including the GNU Public Licence.] */
|
||||
|
||||
#include <openssl/bn.h>
|
||||
#include <GFp/bn.h>
|
||||
|
||||
#include <string.h>
|
||||
|
||||
#include <openssl/err.h>
|
||||
#include <openssl/mem.h>
|
||||
#include <GFp/err.h>
|
||||
#include <GFp/mem.h>
|
||||
|
||||
#include "../test/bn_test_lib.h"
|
||||
|
||||
|
@ -123,7 +123,7 @@
|
||||
#ifndef OPENSSL_HEADER_CRYPTO_TEST_BN_TEST_UTIL_H
|
||||
#define OPENSSL_HEADER_CRYPTO_TEST_BN_TEST_UTIL_H
|
||||
|
||||
#include <openssl/bn.h>
|
||||
#include <GFp/bn.h>
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
|
@ -25,7 +25,7 @@
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <openssl/err.h>
|
||||
#include <GFp/err.h>
|
||||
|
||||
|
||||
FileTest::FileTest(const char *path)
|
||||
|
@ -28,7 +28,7 @@
|
||||
#pragma warning(pop)
|
||||
#endif
|
||||
|
||||
#include <openssl/bn.h>
|
||||
#include <GFp/bn.h>
|
||||
|
||||
template<typename T, void (*func)(T*)>
|
||||
struct OpenSSLDeleter {
|
||||
|
@ -6,7 +6,7 @@
|
||||
* are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in
|
||||
@ -49,7 +49,7 @@
|
||||
#ifndef OPENSSL_HEADER_AES_H
|
||||
#define OPENSSL_HEADER_AES_H
|
||||
|
||||
#include <openssl/base.h>
|
||||
#include <GFp/base.h>
|
||||
|
||||
#if defined(__cplusplus)
|
||||
extern "C" {
|
@ -123,7 +123,7 @@
|
||||
#ifndef OPENSSL_HEADER_BN_H
|
||||
#define OPENSSL_HEADER_BN_H
|
||||
|
||||
#include <openssl/base.h>
|
||||
#include <GFp/base.h>
|
||||
|
||||
#include <inttypes.h> /* for PRIu64 and friends */
|
||||
|
@ -61,7 +61,7 @@
|
||||
#ifndef OPENSSL_HEADER_CPU_H
|
||||
#define OPENSSL_HEADER_CPU_H
|
||||
|
||||
#include <openssl/base.h>
|
||||
#include <GFp/base.h>
|
||||
|
||||
#if defined(__cplusplus)
|
||||
extern "C" {
|
@ -109,7 +109,7 @@
|
||||
#ifndef OPENSSL_HEADER_ERR_H
|
||||
#define OPENSSL_HEADER_ERR_H
|
||||
|
||||
#include <openssl/base.h>
|
||||
#include <GFp/base.h>
|
||||
|
||||
#if defined(__cplusplus)
|
||||
extern "C" {
|
@ -57,7 +57,7 @@
|
||||
#ifndef OPENSSL_HEADER_MEM_H
|
||||
#define OPENSSL_HEADER_MEM_H
|
||||
|
||||
#include <openssl/base.h>
|
||||
#include <GFp/base.h>
|
||||
|
||||
#include <stdlib.h>
|
||||
|
@ -57,7 +57,7 @@
|
||||
#ifndef OPENSSL_HEADER_TYPE_CHECK_H
|
||||
#define OPENSSL_HEADER_TYPE_CHECK_H
|
||||
|
||||
#include <openssl/base.h>
|
||||
#include <GFp/base.h>
|
||||
|
||||
|
||||
#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L
|
@ -18,7 +18,7 @@
|
||||
//! generic composition paradigm][AEAD] for an introduction to the concept of
|
||||
//! AEADs.
|
||||
//!
|
||||
//! C analog: `openssl/aead.h`
|
||||
//! C analog: `GFp/aead.h`
|
||||
//!
|
||||
//! Go analog: [`crypto.cipher.AEAD`]
|
||||
//!
|
||||
@ -638,7 +638,7 @@ mod tests {
|
||||
}
|
||||
{
|
||||
let mut in_out = Vec::from(to_open);
|
||||
assert!(aead::open_in_place(&o_key, &nonce[..1], &ad, prefix_len,
|
||||
assert!(aead::open_in_place(&o_key, &nonce[..1], &ad, prefix_len,
|
||||
&mut in_out).is_err());
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user