summaryrefslogtreecommitdiff
path: root/src/lib/libssl/src/apps/s_apps.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libssl/src/apps/s_apps.h')
-rw-r--r--src/lib/libssl/src/apps/s_apps.h51
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
72typedef 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
76typedef 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
64int do_accept(int acc_sock, int *sock, char **host); 87int do_accept(int acc_sock, int *sock, char **host);
65int do_server(int port, int *ret, int (*cb) ()); 88int do_server(int port, int *ret, int (*cb) (), char *context);
66#ifdef HEADER_X509_H 89#ifdef HEADER_X509_H
67int MS_CALLBACK verify_callback(int ok, X509_STORE_CTX *ctx); 90int 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);
86int extract_host_port(char *str,char **host_ptr,unsigned char *ip,short *p); 109int extract_host_port(char *str,char **host_ptr,unsigned char *ip,short *p);
87int host_ip(char *str, unsigned char ip[4]); 110int host_ip(char *str, unsigned char ip[4]);
88 111
89long MS_CALLBACK bio_dump_cb(BIO *bio, int cmd, char *argp, 112long 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);
95void MS_CALLBACK apps_ssl_info_callback(char *s, int where, int ret); 118void MS_CALLBACK apps_ssl_info_callback(char *s, int where, int ret);
96#endif 119#endif
97 120
98#else
99int do_accept();
100int do_server();
101int MS_CALLBACK verify_callback();
102int set_cert_stuff();
103int init_client();
104int init_client_ip();
105int nbio_init_client_ip();
106int nbio_sock_error();
107int spawn();
108int init_server();
109int should_retry();
110void sock_cleanup();
111int extract_port();
112int extract_host_port();
113int host_ip();
114
115long MS_CALLBACK bio_dump_cb();
116void MS_CALLBACK apps_ssl_info_callback();
117
118#endif
119