union {
struct sockaddr sa;
struct sockaddr_in sa_in;
-#if OPENSSL_USE_IPV6
struct sockaddr_in6 sa_in6;
-#endif
} server, client;
int s = -1, cs, addrlen;
unsigned char ip[4];
if (strchr(h, ':')) {
if (h[1] == '\0')
h = NULL;
-#if OPENSSL_USE_IPV6
hint.ai_family = AF_INET6;
-#else
- h = NULL;
-#endif
} else if (h[0] == '*' && h[1] == '\0') {
hint.ai_family = AF_INET;
h = NULL;
(err_num == EADDRINUSE)) {
client = server;
if (h == NULL || strcmp(h, "*") == 0) {
-#if OPENSSL_USE_IPV6
if (client.sa.sa_family == AF_INET6) {
memset(&client.sa_in6.sin6_addr, 0, sizeof(client.sa_in6.sin6_addr));
client.sa_in6.sin6_addr.s6_addr[15] = 1;
- } else
-#endif
- if (client.sa.sa_family == AF_INET) {
+ } else if (client.sa.sa_family == AF_INET) {
client.sa_in.sin_addr.s_addr = htonl(0x7F000001);
} else
goto err;
union {
struct sockaddr sa;
struct sockaddr_in sa_in;
-#if OPENSSL_USE_IPV6
struct sockaddr_in6 sa_in6;
-#endif
} from;
} sa;
#include <openssl/err.h>
#include <openssl/crypto.h>
-#include "e_os.h"
-
static int bio_new(BIO *bio);
static int bio_free(BIO *bio);
static int bio_read(BIO *bio, char *buf, int size);
union {
struct sockaddr sa;
struct sockaddr_in sa_in;
-#if OPENSSL_USE_IPV6
struct sockaddr_in6 sa_in6;
-#endif
} peer;
unsigned int connected;
unsigned int _errno;
union {
struct sockaddr sa;
struct sockaddr_in sa_in;
-#if OPENSSL_USE_IPV6
struct sockaddr_in6 sa_in6;
-#endif
} peer;
unsigned int connected;
unsigned int _errno;
union {
struct sockaddr sa;
struct sockaddr_in sa_in;
-#if OPENSSL_USE_IPV6
struct sockaddr_in6 sa_in6;
-#endif
} peer;
} sa;
if (data->peer.sa.sa_family == AF_INET)
peerlen = sizeof(data->peer.sa_in);
-#if OPENSSL_USE_IPV6
else if (data->peer.sa.sa_family == AF_INET6)
peerlen = sizeof(data->peer.sa_in6);
-#endif
ret = sendto(b->num, in, inl, 0, &data->peer.sa, peerlen);
}
union {
struct sockaddr sa;
struct sockaddr_in s4;
-#if OPENSSL_USE_IPV6
struct sockaddr_in6 s6;
-#endif
} addr;
#endif
case AF_INET:
memcpy(&data->peer, to, sizeof(data->peer.sa_in));
break;
-#if OPENSSL_USE_IPV6
case AF_INET6:
memcpy(&data->peer, to, sizeof(data->peer.sa_in6));
break;
-#endif
default:
memcpy(&data->peer, to, sizeof(data->peer.sa));
break;
sizeof(sockopt_val))) < 0)
perror("setsockopt");
break;
-#if OPENSSL_USE_IPV6 && defined(IPV6_MTU_DISCOVER) && defined(IPV6_PMTUDISC_DO)
+#if defined(IPV6_MTU_DISCOVER) && defined(IPV6_PMTUDISC_DO)
case AF_INET6:
sockopt_val = IPV6_PMTUDISC_DO;
if ((ret = setsockopt(b->num, IPPROTO_IPV6,
ret = data->mtu;
}
break;
-#if OPENSSL_USE_IPV6 && defined(IPV6_MTU)
+#if defined(IPV6_MTU)
case AF_INET6:
if ((ret = getsockopt(b->num, IPPROTO_IPV6, IPV6_MTU,
(void *)&sockopt_val, &sockopt_len)) < 0 ||
case AF_INET:
ret = 576 - 20 - 8;
break;
-#if OPENSSL_USE_IPV6
case AF_INET6:
#ifdef IN6_IS_ADDR_V4MAPPED
if (IN6_IS_ADDR_V4MAPPED(&data->peer.sa_in6.sin6_addr))
#endif
ret = 1280 - 40 - 8;
break;
-#endif
default:
ret = 576 - 20 - 8;
break;
case AF_INET:
memcpy(&data->peer, to, sizeof(data->peer.sa_in));
break;
-#if OPENSSL_USE_IPV6
case AF_INET6:
memcpy(&data->peer, to, sizeof(data->peer.sa_in6));
break;
-#endif
default:
memcpy(&data->peer, to, sizeof(data->peer.sa));
break;
case AF_INET:
ret = sizeof(data->peer.sa_in);
break;
-#if OPENSSL_USE_IPV6
case AF_INET6:
ret = sizeof(data->peer.sa_in6);
break;
-#endif
default:
ret = sizeof(data->peer.sa);
break;
case AF_INET:
memcpy(&data->peer, to, sizeof(data->peer.sa_in));
break;
-#if OPENSSL_USE_IPV6
case AF_INET6:
memcpy(&data->peer, to, sizeof(data->peer.sa_in6));
break;
-#endif
default:
memcpy(&data->peer, to, sizeof(data->peer.sa));
break;
* [including the GNU Public Licence.]
*/
-
-#include "e_os.h"
-
#ifdef OPENSSL_SYS_WIN32
#include <stdlib.h>
#endif
#include <string.h>
#include <openssl/conf.h>
#include <openssl/conf_api.h>
-#include "e_os.h"
static void value_free_hash_doall_arg(CONF_VALUE *a,
LHASH_OF(CONF_VALUE) *conf);
#include <string.h>
#include <unistd.h>
-#include "e_os.h"
-
#include <openssl/crypto.h>
#include <openssl/buffer.h>
#include <openssl/bio.h>
*/
#include "des_locl.h"
-#include "e_os.h"
/* The input and output encrypted as though 64bit cfb mode is being
* used. The extra state information to record how much of the
* [including the GNU Public Licence.]
*/
-#include "e_os.h"
#include "des_locl.h"
#include <assert.h>
*/
#include <ctype.h>
-#include <e_os.h>
#include <string.h>
int OPENSSL_strcasecmp(const char *str1, const char *str2);
#include <stdlib.h>
#include <ctype.h>
#include <string.h>
-#include "e_os.h"
#include <openssl/asn1.h>
#include <openssl/ocsp.h>
#include <openssl/err.h>
#include <stdlib.h>
#include <string.h>
-#include "e_os.h"
#include <openssl/crypto.h>
#include <openssl/rand.h>
#include <openssl/buffer.h>
#include <string.h>
#include <stdlib.h>
-#include "../e_os.h"
-
#ifdef OPENSSL_NO_RC5
int main(int argc, char *argv[])
{
#ifndef HEADER_APPS_H
#define HEADER_APPS_H
-#include "e_os.h"
-
+#include <openssl/e_os2.h>
#include <openssl/bio.h>
#include <openssl/x509.h>
#include <openssl/lhash.h>
* `bio_e' is for error messages. */
void app_RAND_allow_write_file(void);
long app_RAND_load_files(char *file); /* `file' is a list of files to read,
- * separated by LIST_SEPARATOR_CHAR
- * (see e_os.h). The string is
- * destroyed! */
+ * separated by ':'. The string is destroyed! */
extern CONF *config;
extern char *default_config_file;
union {
struct sockaddr sa;
struct sockaddr_in s4;
-#if OPENSSL_USE_IPV6
struct sockaddr_in6 s6;
-#endif
} peer;
/* Initialize a random secret */
length += sizeof(struct in_addr);
length += sizeof(peer.s4.sin_port);
break;
-#if OPENSSL_USE_IPV6
case AF_INET6:
length += sizeof(struct in6_addr);
length += sizeof(peer.s6.sin6_port);
break;
-#endif
default:
OPENSSL_assert(0);
break;
memcpy(buffer + sizeof(peer.s4.sin_port),
&peer.s4.sin_addr, sizeof(struct in_addr));
break;
-#if OPENSSL_USE_IPV6
case AF_INET6:
memcpy(buffer, &peer.s6.sin6_port, sizeof(peer.s6.sin6_port));
memcpy(buffer + sizeof(peer.s6.sin6_port),
&peer.s6.sin6_addr, sizeof(struct in6_addr));
break;
-#endif
default:
OPENSSL_assert(0);
break;
union {
struct sockaddr sa;
struct sockaddr_in s4;
-#if OPENSSL_USE_IPV6
struct sockaddr_in6 s6;
-#endif
} peer;
/* If secret isn't initialized yet, the cookie can't be valid */
length += sizeof(struct in_addr);
length += sizeof(peer.s4.sin_port);
break;
-#if OPENSSL_USE_IPV6
case AF_INET6:
length += sizeof(struct in6_addr);
length += sizeof(peer.s6.sin6_port);
break;
-#endif
default:
OPENSSL_assert(0);
break;
memcpy(buffer + sizeof(peer.s4.sin_port),
&peer.s4.sin_addr, sizeof(struct in_addr));
break;
-#if OPENSSL_USE_IPV6
case AF_INET6:
memcpy(buffer, &peer.s6.sin6_port, sizeof(peer.s6.sin6_port));
memcpy(buffer + sizeof(peer.s6.sin6_port),
&peer.s6.sin6_addr, sizeof(struct in6_addr));
break;
-#endif
default:
OPENSSL_assert(0);
break;
#include <sys/socket.h>
#include <netinet/in.h>
-#ifdef FLAT_INC
-#include "e_os2.h"
-#else
-#include "../e_os2.h"
-#endif
+#include <openssl/e_os2.h>
#define NON_MAIN
#include "apps.h"
#include "s_apps.h"
#include <openssl/ssl.h>
-#ifdef FLAT_INC
-#include "e_os.h"
-#else
-#include "../e_os.h"
-#endif
-
#ifndef OPENSSL_NO_SOCK
union {
struct sockaddr sa;
struct sockaddr_in sa_in;
-#if OPENSSL_USE_IPV6
struct sockaddr_in6 sa_in6;
-#endif
} server, client;
int s = -1, cs, addrlen;
unsigned char ip[4];
if (strchr(h, ':')) {
if (h[1] == '\0')
h = NULL;
-#if OPENSSL_USE_IPV6
hint.ai_family = AF_INET6;
-#else
- h = NULL;
-#endif
} else if (h[0] == '*' && h[1] == '\0') {
hint.ai_family = AF_INET;
h = NULL;
(err_num == EADDRINUSE)) {
client = server;
if (h == NULL || strcmp(h, "*") == 0) {
-#if OPENSSL_USE_IPV6
if (client.sa.sa_family == AF_INET6) {
memset(&client.sa_in6.sin6_addr, 0, sizeof(client.sa_in6.sin6_addr));
client.sa_in6.sin6_addr.s6_addr[15] = 1;
- } else
-#endif
- if (client.sa.sa_family == AF_INET) {
+ } else if (client.sa.sa_family == AF_INET) {
client.sa_in.sin_addr.s_addr = htonl(0x7F000001);
} else
goto err;
union {
struct sockaddr sa;
struct sockaddr_in sa_in;
-#if OPENSSL_USE_IPV6
struct sockaddr_in6 sa_in6;
-#endif
} from;
} sa;
#include <openssl/err.h>
#include <openssl/crypto.h>
-#include "e_os.h"
-
static int bio_new(BIO *bio);
static int bio_free(BIO *bio);
static int bio_read(BIO *bio, char *buf, int size);
union {
struct sockaddr sa;
struct sockaddr_in sa_in;
-#if OPENSSL_USE_IPV6
struct sockaddr_in6 sa_in6;
-#endif
} peer;
unsigned int connected;
unsigned int _errno;
union {
struct sockaddr sa;
struct sockaddr_in sa_in;
-#if OPENSSL_USE_IPV6
struct sockaddr_in6 sa_in6;
-#endif
} peer;
unsigned int connected;
unsigned int _errno;
union {
struct sockaddr sa;
struct sockaddr_in sa_in;
-#if OPENSSL_USE_IPV6
struct sockaddr_in6 sa_in6;
-#endif
} peer;
} sa;
if (data->peer.sa.sa_family == AF_INET)
peerlen = sizeof(data->peer.sa_in);
-#if OPENSSL_USE_IPV6
else if (data->peer.sa.sa_family == AF_INET6)
peerlen = sizeof(data->peer.sa_in6);
-#endif
ret = sendto(b->num, in, inl, 0, &data->peer.sa, peerlen);
}
union {
struct sockaddr sa;
struct sockaddr_in s4;
-#if OPENSSL_USE_IPV6
struct sockaddr_in6 s6;
-#endif
} addr;
#endif
case AF_INET:
memcpy(&data->peer, to, sizeof(data->peer.sa_in));
break;
-#if OPENSSL_USE_IPV6
case AF_INET6:
memcpy(&data->peer, to, sizeof(data->peer.sa_in6));
break;
-#endif
default:
memcpy(&data->peer, to, sizeof(data->peer.sa));
break;
sizeof(sockopt_val))) < 0)
perror("setsockopt");
break;
-#if OPENSSL_USE_IPV6 && defined(IPV6_MTU_DISCOVER) && defined(IPV6_PMTUDISC_DO)
+#if defined(IPV6_MTU_DISCOVER) && defined(IPV6_PMTUDISC_DO)
case AF_INET6:
sockopt_val = IPV6_PMTUDISC_DO;
if ((ret = setsockopt(b->num, IPPROTO_IPV6,
ret = data->mtu;
}
break;
-#if OPENSSL_USE_IPV6 && defined(IPV6_MTU)
+#if defined(IPV6_MTU)
case AF_INET6:
if ((ret = getsockopt(b->num, IPPROTO_IPV6, IPV6_MTU,
(void *)&sockopt_val, &sockopt_len)) < 0 ||
case AF_INET:
ret = 576 - 20 - 8;
break;
-#if OPENSSL_USE_IPV6
case AF_INET6:
#ifdef IN6_IS_ADDR_V4MAPPED
if (IN6_IS_ADDR_V4MAPPED(&data->peer.sa_in6.sin6_addr))
#endif
ret = 1280 - 40 - 8;
break;
-#endif
default:
ret = 576 - 20 - 8;
break;
case AF_INET:
memcpy(&data->peer, to, sizeof(data->peer.sa_in));
break;
-#if OPENSSL_USE_IPV6
case AF_INET6:
memcpy(&data->peer, to, sizeof(data->peer.sa_in6));
break;
-#endif
default:
memcpy(&data->peer, to, sizeof(data->peer.sa));
break;
case AF_INET:
ret = sizeof(data->peer.sa_in);
break;
-#if OPENSSL_USE_IPV6
case AF_INET6:
ret = sizeof(data->peer.sa_in6);
break;
-#endif
default:
ret = sizeof(data->peer.sa);
break;
case AF_INET:
memcpy(&data->peer, to, sizeof(data->peer.sa_in));
break;
-#if OPENSSL_USE_IPV6
case AF_INET6:
memcpy(&data->peer, to, sizeof(data->peer.sa_in6));
break;
-#endif
default:
memcpy(&data->peer, to, sizeof(data->peer.sa));
break;
* [including the GNU Public Licence.]
*/
-
-#include "e_os.h"
-
#ifdef OPENSSL_SYS_WIN32
#include <stdlib.h>
#endif
#include <string.h>
#include <openssl/conf.h>
#include <openssl/conf_api.h>
-#include "e_os.h"
static void value_free_hash_doall_arg(CONF_VALUE *a,
LHASH_OF(CONF_VALUE) *conf);
#include <string.h>
#include <unistd.h>
-#include "e_os.h"
-
#include <openssl/crypto.h>
#include <openssl/buffer.h>
#include <openssl/bio.h>
*/
#include "des_locl.h"
-#include "e_os.h"
/* The input and output encrypted as though 64bit cfb mode is being
* used. The extra state information to record how much of the
* [including the GNU Public Licence.]
*/
-#include "e_os.h"
#include "des_locl.h"
#include <assert.h>
*/
#include <ctype.h>
-#include <e_os.h>
#include <string.h>
int OPENSSL_strcasecmp(const char *str1, const char *str2);
#include <stdlib.h>
#include <ctype.h>
#include <string.h>
-#include "e_os.h"
#include <openssl/asn1.h>
#include <openssl/ocsp.h>
#include <openssl/err.h>
#include <stdlib.h>
#include <string.h>
-#include "e_os.h"
#include <openssl/crypto.h>
#include <openssl/rand.h>
#include <openssl/buffer.h>
#include <string.h>
#include <stdlib.h>
-#include "../e_os.h"
-
#ifdef OPENSSL_NO_RC5
int main(int argc, char *argv[])
{
+++ /dev/null
-/* e_os.h */
-/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
- * All rights reserved.
- *
- * This package is an SSL implementation written
- * by Eric Young (eay@cryptsoft.com).
- * The implementation was written so as to conform with Netscapes SSL.
- *
- * This library is free for commercial and non-commercial use as long as
- * the following conditions are aheared to. The following conditions
- * apply to all code found in this distribution, be it the RC4, RSA,
- * lhash, DES, etc., code; not just the SSL code. The SSL documentation
- * included with this distribution is covered by the same copyright terms
- * except that the holder is Tim Hudson (tjh@cryptsoft.com).
- *
- * Copyright remains Eric Young's, and as such any Copyright notices in
- * the code are not to be removed.
- * If this package is used in a product, Eric Young should be given attribution
- * as the author of the parts of the library used.
- * This can be in the form of a textual message at program startup or
- * in documentation (online or textual) provided with the package.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the copyright
- * 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 the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * "This product includes cryptographic software written by
- * Eric Young (eay@cryptsoft.com)"
- * The word 'cryptographic' can be left out if the rouines from the library
- * being used are not cryptographic related :-).
- * 4. If you include any Windows specific code (or a derivative thereof) from
- * the apps directory (application code) you must include an acknowledgement:
- * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
- *
- * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * The licence and distribution terms for any publically available version or
- * derivative of this code cannot be changed. i.e. this code cannot simply be
- * copied and put under another distribution licence
- * [including the GNU Public Licence.]
- */
-
-#ifndef HEADER_E_OS_H
-#define HEADER_E_OS_H
-
-#include <openssl/opensslconf.h>
-
-/*
- * <openssl/e_os2.h> contains what we can justify to make visible
- * to the outside
- * <openssl/e_os2.h> is not exported interface (except to the openssl
- * command)
- */
-
-#include <openssl/e_os2.h>
-
-#define OPENSSL_CONF "openssl.cnf"
-
-#define OPENSSL_USE_IPV6 1
-
-#endif
-