/*
- * Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved.
+ * Copyright 1995-2017 The OpenSSL Project Authors. All Rights Reserved.
*
* Licensed under the OpenSSL license (the "License"). You may not use
* this file except in compliance with the License. You can obtain a copy
# include <openssl/e_os2.h>
# include <openssl/crypto.h>
+# include <internal/nelem.h>
+
/*
* <openssl/e_os2.h> contains what we can justify to make visible to the
* outside; this file e_os.h is not part of the exported interface.
# endif
/* end vxworks */
-#define OSSL_NELEM(x) (sizeof(x)/sizeof((x)[0]))
-
#ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
# define CRYPTO_memcmp memcmp
#endif
--- /dev/null
+/*
+ * Copyright 2017 The OpenSSL Project Authors. All Rights Reserved.
+ *
+ * Licensed under the OpenSSL license (the "License"). You may not use
+ * this file except in compliance with the License. You can obtain a copy
+ * in the file LICENSE in the source distribution or at
+ * https://www.openssl.org/source/license.html
+ */
+
+#ifndef HEADER_NELEM_H
+# define HEADER_NELEM_H
+
+# define OSSL_NELEM(x) (sizeof(x)/sizeof((x)[0]))
+#endif
#include <openssl/evp.h>
#include <openssl/objects.h>
#include "testutil.h"
-#include "e_os.h"
+#include <internal/nelem.h>
/**********************************************************************
*
#include <openssl/evp.h>
#include <openssl/objects.h>
#include "testutil.h"
-#include "e_os.h"
+#include <internal/nelem.h>
struct testdata {
char *data; /* TIME string value */
#include <openssl/kdf.h>
#include "../ssl/packet_locl.h"
-#include "../e_os.h" /* for OSSL_NELEM() */
+#include <internal/nelem.h>
#include "testutil.h"
#include "testutil.h"
-#include "../e_os.h"
+#include <internal/nelem.h>
#ifndef OPENSSL_NO_BF
# include <openssl/blowfish.h>
#include <string.h>
#include <ctype.h>
-#include "e_os.h"
+#include <internal/nelem.h>
#include <internal/numbers.h>
#include <openssl/bn.h>
#include <openssl/crypto.h>
#include <stdlib.h>
#include <openssl/opensslconf.h> /* To see if OPENSSL_NO_CAST is defined */
-#include "e_os.h"
+#include <internal/nelem.h>
#include "testutil.h"
#ifndef OPENSSL_NO_CAST
* https://www.openssl.org/source/license.html
*/
-#include "e_os.h"
+#include <internal/nelem.h>
#include "testutil.h"
#ifdef __VMS
#include <openssl/ssl3.h>
#include <openssl/tls1.h>
-#include "e_os.h"
+#include <internal/nelem.h>
#include "testutil.h"
static SSL_CTX *ctx;
#include <openssl/ssl3.h>
#include <openssl/tls1.h>
-#include "e_os.h"
+#include <internal/nelem.h>
#include "testutil.h"
typedef struct cipherlist_test_fixture {
#include <openssl/ssl3.h>
#include <openssl/tls1.h>
-#include "e_os.h"
+#include <internal/nelem.h>
#include "testutil.h"
typedef struct cipher_id_name {
#include <stdio.h>
#include <stdlib.h>
-#include "e_os.h"
+#include <internal/nelem.h>
#include "internal/constant_time_locl.h"
#include "testutil.h"
#include "internal/numbers.h"
* https://www.openssl.org/source/license.html
*/
-#include "../e_os.h"
+#include <internal/nelem.h>
#include <string.h>
#include <openssl/bio.h>
#include <openssl/crypto.h>
#include <openssl/err.h>
#include <openssl/x509.h>
#include <openssl/x509v3.h>
-#include "e_os.h"
+#include <internal/nelem.h>
static const ASN1_ITEM *item_type;
static const char *test_file;
#endif
#include "testutil.h"
-#include "e_os.h"
+#include <internal/nelem.h>
#define _UC(c) ((unsigned char)(c))
#include <stdlib.h>
#include <string.h>
-#include "e_os.h"
+#include <internal/nelem.h>
#include <openssl/crypto.h>
#include <openssl/bio.h>
#include <openssl/bn.h>
*/
#include <string.h>
-#include "e_os.h"
+#include <internal/nelem.h>
#include <openssl/crypto.h>
#include <openssl/err.h>
#include <openssl/rand.h>
#include <openssl/dsa.h>
#include "testutil.h"
-#include "e_os.h"
+#include <internal/nelem.h>
#ifndef OPENSSL_NO_DSA
static int dsa_cb(int p, int n, BN_GENCB *arg);
#include <openssl/bio.h>
#include <openssl/err.h>
#include <openssl/conf.h>
-#include "e_os.h"
+#include <internal/nelem.h>
#include "testutil.h"
#ifndef OPENSSL_NO_SOCK
* or in the file LICENSE in the source distribution.
*/
-#include "e_os.h"
+#include <internal/nelem.h>
#include "testutil.h"
#include <stdio.h>
* https://www.openssl.org/source/license.html
*/
-#include "e_os.h"
+#include <internal/nelem.h>
#include "testutil.h"
#ifndef OPENSSL_NO_EC
#include <openssl/rsa.h>
#include <openssl/x509.h>
#include "testutil.h"
-#include "e_os.h"
+#include <internal/nelem.h>
/*
* kExampleRSAKeyDER is an RSA private key in ASN.1, DER format. Of course, you
#include <stdlib.h>
#include <string.h>
-#include "../e_os.h"
+#include <internal/nelem.h>
#include <openssl/bio.h>
#include <openssl/bn.h>
#ifndef OPENSSL_NO_SOCK
# define USE_SOCKETS
-# include "e_os.h"
+# include <internal/nelem.h>
#endif
#include "handshake_helper.h"
#include <string.h>
#include <stdlib.h>
-#include "../e_os.h"
+#include <internal/nelem.h>
# include <openssl/hmac.h>
# include <openssl/sha.h>
#include <string.h>
-#include "../e_os.h"
+#include <internal/nelem.h>
#include "testutil.h"
#ifndef OPENSSL_NO_IDEA
#include <openssl/rand.h>
#include <stdio.h>
#include <string.h>
-#include "e_os.h"
+#include <internal/nelem.h>
#include "testutil.h"
#define TEST_SIZE 128
#include <openssl/err.h>
#include <openssl/crypto.h>
-#include "e_os.h"
+#include <internal/nelem.h>
#include "testutil.h"
/*
#include <string.h>
-#include "../e_os.h"
+#include <internal/nelem.h>
#include "testutil.h"
#ifndef OPENSSL_NO_MD2
#include <openssl/mdc2.h>
#include "testutil.h"
-#include "e_os.h"
+#include <internal/nelem.h>
typedef struct {
const char *input;
#include <string.h>
-#include "../e_os.h"
+#include <internal/nelem.h>
#include "testutil.h"
#if defined(OPENSSL_NO_DES) && !defined(OPENSSL_NO_MDC2)
#include <openssl/modes.h>
#include "../crypto/modes/modes_lcl.h"
#include "testutil.h"
-#include "e_os.h"
+#include <internal/nelem.h>
typedef struct {
size_t size;
#include "testutil.h"
#include "internal/poly1305.h"
#include "../crypto/poly1305/poly1305_local.h"
-#include "e_os.h"
+#include <internal/nelem.h>
typedef struct {
size_t size;
* https://www.openssl.org/source/license.html
*/
-#include "../e_os.h"
+#include <internal/nelem.h>
#include "testutil.h"
#ifndef OPENSSL_NO_RC2
#include <string.h>
-#include "../e_os.h"
+#include <internal/nelem.h>
#include "testutil.h"
#ifndef OPENSSL_NO_RC4
#include <string.h>
-#include "../e_os.h"
+#include <internal/nelem.h>
#include "testutil.h"
#ifndef OPENSSL_NO_RC5
#include <stdio.h>
#include <string.h>
-#include "e_os.h"
+#include <internal/nelem.h>
#include <openssl/crypto.h>
#include <openssl/err.h>
#include "../ssl/packet_locl.h"
#include "testutil.h"
-#include "e_os.h"
+#include <internal/nelem.h>
#define CLIENT_VERSION_LEN 2
#include "testutil.h"
#include "internal/siphash.h"
#include "../crypto/siphash/siphash_local.h"
-#include "e_os.h"
+#include <internal/nelem.h>
static BIO* b_stderr = NULL;
static BIO* b_stdout = NULL;
#include <openssl/ssl.h>
#include "testutil.h"
-#include "e_os.h"
+#include <internal/nelem.h>
#ifdef __VMS
# pragma names save
#include <openssl/e_os2.h>
#include <openssl/crypto.h>
-#include "e_os.h"
+#include <internal/nelem.h>
#include "ssl_test_ctx.h"
#include "testutil.h"
#include <stdio.h>
#include <string.h>
-#include "e_os.h"
+#include <internal/nelem.h>
#include "ssl_test_ctx.h"
#include "testutil.h"
#include <openssl/e_os2.h>
#include "ssltestlib.h"
#include "testutil.h"
-#include "e_os.h"
+#include <internal/nelem.h>
#include "../ssl/ssl_locl.h"
static char *cert = NULL;
#include <string.h>
#include <time.h>
+#include <internal/nelem.h>
+
#define USE_SOCKETS
#include "e_os.h"
#include <string.h>
-#include "e_os.h"
+#include <internal/nelem.h>
#include "ssltestlib.h"
#include "testutil.h"
#include <openssl/err.h>
#include <openssl/crypto.h>
-#include "e_os.h"
+#include <internal/nelem.h>
#include "testutil.h"
/* The macros below generate unused functions which error out one of the clang
#include <openssl/crypto.h>
#include <openssl/bn.h>
-#include "e_os.h"
+#include <internal/nelem.h>
#include "testutil.h"
#define TEST(expected, test) test_case((expected), #test, (test))
#include <string.h>
#include <assert.h>
-#include "../../e_os.h"
+#include <internal/nelem.h>
#include <openssl/bio.h>
/*
#include <string.h>
#include <ctype.h>
-#include "../../e_os.h"
+#include <internal/nelem.h>
/* The size of memory buffers to display on failure */
#define MEM_BUFFER_SIZE (2000)
*/
#include "../testutil.h"
-#include "../../e_os.h"
+#include <internal/nelem.h>
#include "output.h"
#include "tu_local.h"
#include <string.h>
#include <ctype.h>
-#include "e_os.h"
+#include "internal/nelem.h"
#include "../testutil.h"
#include "tu_local.h"
#include <errno.h>
#include <string.h>
#include <ctype.h>
-#include "../../e_os.h"
+#include <internal/nelem.h>
/*
* Output a failed test first line.
#include <openssl/asn1.h>
#include <openssl/x509.h>
#include "testutil.h"
-#include "e_os.h"
+#include <internal/nelem.h>
typedef struct {
const char *data;
*/
#include <string.h>
-#include "e_os.h"
+#include <internal/nelem.h>
#include <openssl/x509.h>
#include <openssl/x509v3.h>
#include "testutil.h"
#include <openssl/x509.h>
#include <openssl/x509v3.h>
#include "testutil.h"
-#include "e_os.h"
+#include <internal/nelem.h>
/**********************************************************************
*
#include <openssl/asn1.h>
#include <openssl/x509.h>
#include "testutil.h"
-#include "e_os.h"
+#include <internal/nelem.h>
typedef struct {
const char *data;
#include <openssl/pem.h>
#include <openssl/conf.h>
#include <openssl/err.h>
-#include "e_os.h"
+#include <internal/nelem.h>
#include "testutil.h"
static int test_certs(int num)