diff options
Diffstat (limited to 'src/lib/libssl/src/apps/s_apps.h')
-rw-r--r-- | src/lib/libssl/src/apps/s_apps.h | 51 |
1 files changed, 26 insertions, 25 deletions
diff --git a/src/lib/libssl/src/apps/s_apps.h b/src/lib/libssl/src/apps/s_apps.h index ba320946be..1a0e9f9f92 100644 --- a/src/lib/libssl/src/apps/s_apps.h +++ b/src/lib/libssl/src/apps/s_apps.h | |||
@@ -56,13 +56,36 @@ | |||
56 | * [including the GNU Public Licence.] | 56 | * [including the GNU Public Licence.] |
57 | */ | 57 | */ |
58 | 58 | ||
59 | #include <sys/types.h> | ||
60 | #if (defined(VMS) || defined(__VMS)) && !defined(FD_SET) | ||
61 | /* VAX C does not defined fd_set and friends, but it's actually quite simple */ | ||
62 | /* These definitions are borrowed from SOCKETSHR. /Richard Levitte */ | ||
63 | #define MAX_NOFILE 32 | ||
64 | #define NBBY 8 /* number of bits in a byte */ | ||
65 | |||
66 | #ifndef FD_SETSIZE | ||
67 | #define FD_SETSIZE MAX_NOFILE | ||
68 | #endif /* FD_SETSIZE */ | ||
69 | |||
70 | /* How many things we'll allow select to use. 0 if unlimited */ | ||
71 | #define MAXSELFD MAX_NOFILE | ||
72 | typedef int fd_mask; /* int here! VMS prototypes int, not long */ | ||
73 | #define NFDBITS (sizeof(fd_mask) * NBBY) /* bits per mask (power of 2!)*/ | ||
74 | #define NFDSHIFT 5 /* Shift based on above */ | ||
75 | |||
76 | typedef fd_mask fd_set; | ||
77 | #define FD_SET(n, p) (*(p) |= (1 << ((n) % NFDBITS))) | ||
78 | #define FD_CLR(n, p) (*(p) &= ~(1 << ((n) % NFDBITS))) | ||
79 | #define FD_ISSET(n, p) (*(p) & (1 << ((n) % NFDBITS))) | ||
80 | #define FD_ZERO(p) memset((char *)(p), 0, sizeof(*(p))) | ||
81 | #endif | ||
82 | |||
59 | #define PORT 4433 | 83 | #define PORT 4433 |
60 | #define PORT_STR "4433" | 84 | #define PORT_STR "4433" |
61 | #define PROTOCOL "tcp" | 85 | #define PROTOCOL "tcp" |
62 | 86 | ||
63 | #ifndef NOPROTO | ||
64 | int do_accept(int acc_sock, int *sock, char **host); | 87 | int do_accept(int acc_sock, int *sock, char **host); |
65 | int do_server(int port, int *ret, int (*cb) ()); | 88 | int do_server(int port, int *ret, int (*cb) (), char *context); |
66 | #ifdef HEADER_X509_H | 89 | #ifdef HEADER_X509_H |
67 | int MS_CALLBACK verify_callback(int ok, X509_STORE_CTX *ctx); | 90 | int MS_CALLBACK verify_callback(int ok, X509_STORE_CTX *ctx); |
68 | #else | 91 | #else |
@@ -86,7 +109,7 @@ int extract_port(char *str, short *port_ptr); | |||
86 | int extract_host_port(char *str,char **host_ptr,unsigned char *ip,short *p); | 109 | int extract_host_port(char *str,char **host_ptr,unsigned char *ip,short *p); |
87 | int host_ip(char *str, unsigned char ip[4]); | 110 | int host_ip(char *str, unsigned char ip[4]); |
88 | 111 | ||
89 | long MS_CALLBACK bio_dump_cb(BIO *bio, int cmd, char *argp, | 112 | long MS_CALLBACK bio_dump_cb(BIO *bio, int cmd, const char *argp, |
90 | int argi, long argl, long ret); | 113 | int argi, long argl, long ret); |
91 | 114 | ||
92 | #ifdef HEADER_SSL_H | 115 | #ifdef HEADER_SSL_H |
@@ -95,25 +118,3 @@ void MS_CALLBACK apps_ssl_info_callback(SSL *s, int where, int ret); | |||
95 | void MS_CALLBACK apps_ssl_info_callback(char *s, int where, int ret); | 118 | void MS_CALLBACK apps_ssl_info_callback(char *s, int where, int ret); |
96 | #endif | 119 | #endif |
97 | 120 | ||
98 | #else | ||
99 | int do_accept(); | ||
100 | int do_server(); | ||
101 | int MS_CALLBACK verify_callback(); | ||
102 | int set_cert_stuff(); | ||
103 | int init_client(); | ||
104 | int init_client_ip(); | ||
105 | int nbio_init_client_ip(); | ||
106 | int nbio_sock_error(); | ||
107 | int spawn(); | ||
108 | int init_server(); | ||
109 | int should_retry(); | ||
110 | void sock_cleanup(); | ||
111 | int extract_port(); | ||
112 | int extract_host_port(); | ||
113 | int host_ip(); | ||
114 | |||
115 | long MS_CALLBACK bio_dump_cb(); | ||
116 | void MS_CALLBACK apps_ssl_info_callback(); | ||
117 | |||
118 | #endif | ||
119 | |||