[tcp] Enable AF_INET6 transport for tcp connections
[gpxe.git] / src / crypto / axtls / os_port.h
blobbabdbfad833862ca9c093a71940e2de2c9e62b94
1 /**
2 * @file os_port.h
4 * Trick the axtls code into building within our build environment.
5 */
7 #ifndef HEADER_OS_PORT_H
8 #define HEADER_OS_PORT_H
10 #include <stdint.h>
11 #include <stddef.h>
12 #include <stdlib.h>
13 #include <time.h>
14 #include <sys/time.h>
15 #include <byteswap.h>
17 #define STDCALL
18 #define EXP_FUNC
19 #define TTY_FLUSH()
21 /** We can't actually abort, since we are effectively a kernel... */
22 #define abort() assert ( 0 )
24 /** crypto_misc.c has a bad #ifdef */
25 static inline void close ( int fd __unused ) {
26 /* Do nothing */
29 typedef void FILE;
31 static inline FILE * fopen ( const char *filename __unused,
32 const char *mode __unused ) {
33 return NULL;
36 static inline int fseek ( FILE *stream __unused, long offset __unused,
37 int whence __unused ) {
38 return -1;
41 static inline long ftell ( FILE *stream __unused ) {
42 return -1;
45 static inline size_t fread ( void *ptr __unused, size_t size __unused,
46 size_t nmemb __unused, FILE *stream __unused ) {
47 return -1;
50 static inline int fclose ( FILE *stream __unused ) {
51 return -1;
54 #define CONFIG_SSL_CERT_VERIFICATION 1
55 #define CONFIG_SSL_MAX_CERTS 1
56 #define CONFIG_X509_MAX_CA_CERTS 1
57 #define CONFIG_SSL_EXPIRY_TIME 24
58 #define CONFIG_SSL_ENABLE_CLIENT 1
59 #define CONFIG_BIGINT_CLASSICAL 1
61 #endif