diff options
author | beck <> | 2014-04-13 23:05:18 +0000 |
---|---|---|
committer | beck <> | 2014-04-13 23:05:18 +0000 |
commit | 9d346dca94e1cec09cd98f01e0431d371ef03467 (patch) | |
tree | d11b2c06b5b2070fa398ce63cae8305e666b9072 /src | |
parent | 837d17aa9cd1d51306cb29c073f22b3d55da8bb5 (diff) | |
download | openbsd-9d346dca94e1cec09cd98f01e0431d371ef03467.tar.gz openbsd-9d346dca94e1cec09cd98f01e0431d371ef03467.tar.bz2 openbsd-9d346dca94e1cec09cd98f01e0431d371ef03467.zip |
Flense a variety of windows support stuff, and a strange gettimeofday function.
ok deraadt@
Diffstat (limited to 'src')
-rw-r--r-- | src/lib/libcrypto/bio/bss_dgram.c | 12 | ||||
-rw-r--r-- | src/lib/libssl/d1_both.c | 7 | ||||
-rw-r--r-- | src/lib/libssl/dtls1.h | 11 | ||||
-rw-r--r-- | src/lib/libssl/s3_both.c | 7 | ||||
-rw-r--r-- | src/lib/libssl/src/crypto/bio/bss_dgram.c | 12 | ||||
-rw-r--r-- | src/lib/libssl/src/ssl/d1_both.c | 7 | ||||
-rw-r--r-- | src/lib/libssl/src/ssl/dtls1.h | 11 | ||||
-rw-r--r-- | src/lib/libssl/src/ssl/kssl.c | 699 | ||||
-rw-r--r-- | src/lib/libssl/src/ssl/s3_both.c | 7 | ||||
-rw-r--r-- | src/lib/libssl/src/ssl/ssl.h | 4 | ||||
-rw-r--r-- | src/lib/libssl/src/ssl/ssltest.c | 4 | ||||
-rw-r--r-- | src/lib/libssl/ssl.h | 4 |
12 files changed, 0 insertions, 785 deletions
diff --git a/src/lib/libcrypto/bio/bss_dgram.c b/src/lib/libcrypto/bio/bss_dgram.c index 54c012c47d..f39f94f7fe 100644 --- a/src/lib/libcrypto/bio/bss_dgram.c +++ b/src/lib/libcrypto/bio/bss_dgram.c | |||
@@ -1847,19 +1847,7 @@ int BIO_dgram_non_fatal_error(int err) | |||
1847 | 1847 | ||
1848 | static void get_current_time(struct timeval *t) | 1848 | static void get_current_time(struct timeval *t) |
1849 | { | 1849 | { |
1850 | #ifdef OPENSSL_SYS_WIN32 | ||
1851 | struct _timeb tb; | ||
1852 | _ftime(&tb); | ||
1853 | t->tv_sec = (long)tb.time; | ||
1854 | t->tv_usec = (long)tb.millitm * 1000; | ||
1855 | #elif defined(OPENSSL_SYS_VMS) | ||
1856 | struct timeb tb; | ||
1857 | ftime(&tb); | ||
1858 | t->tv_sec = (long)tb.time; | ||
1859 | t->tv_usec = (long)tb.millitm * 1000; | ||
1860 | #else | ||
1861 | gettimeofday(t, NULL); | 1850 | gettimeofday(t, NULL); |
1862 | #endif | ||
1863 | } | 1851 | } |
1864 | 1852 | ||
1865 | #endif | 1853 | #endif |
diff --git a/src/lib/libssl/d1_both.c b/src/lib/libssl/d1_both.c index 2e8cf681ed..a265fed22f 100644 --- a/src/lib/libssl/d1_both.c +++ b/src/lib/libssl/d1_both.c | |||
@@ -938,13 +938,6 @@ int dtls1_send_finished(SSL *s, int a, int b, const char *sender, int slen) | |||
938 | s->s3->previous_server_finished_len=i; | 938 | s->s3->previous_server_finished_len=i; |
939 | } | 939 | } |
940 | 940 | ||
941 | #ifdef OPENSSL_SYS_WIN16 | ||
942 | /* MSVC 1.5 does not clear the top bytes of the word unless | ||
943 | * I do this. | ||
944 | */ | ||
945 | l&=0xffff; | ||
946 | #endif | ||
947 | |||
948 | d = dtls1_set_message_header(s, d, SSL3_MT_FINISHED, l, 0, l); | 941 | d = dtls1_set_message_header(s, d, SSL3_MT_FINISHED, l, 0, l); |
949 | s->init_num=(int)l+DTLS1_HM_HEADER_LENGTH; | 942 | s->init_num=(int)l+DTLS1_HM_HEADER_LENGTH; |
950 | s->init_off=0; | 943 | s->init_off=0; |
diff --git a/src/lib/libssl/dtls1.h b/src/lib/libssl/dtls1.h index aa57e9aec4..3e0fe918a3 100644 --- a/src/lib/libssl/dtls1.h +++ b/src/lib/libssl/dtls1.h | |||
@@ -62,18 +62,7 @@ | |||
62 | 62 | ||
63 | #include <openssl/buffer.h> | 63 | #include <openssl/buffer.h> |
64 | #include <openssl/pqueue.h> | 64 | #include <openssl/pqueue.h> |
65 | #ifdef OPENSSL_SYS_WIN32 | ||
66 | /* Needed for struct timeval */ | ||
67 | #include <winsock.h> | ||
68 | #elif defined(OPENSSL_SYS_NETWARE) && !defined(_WINSOCK2API_) | ||
69 | #include <sys/timeval.h> | ||
70 | #else | ||
71 | #if defined(OPENSSL_SYS_VXWORKS) | ||
72 | #include <sys/times.h> | ||
73 | #else | ||
74 | #include <sys/time.h> | 65 | #include <sys/time.h> |
75 | #endif | ||
76 | #endif | ||
77 | 66 | ||
78 | #ifdef __cplusplus | 67 | #ifdef __cplusplus |
79 | extern "C" { | 68 | extern "C" { |
diff --git a/src/lib/libssl/s3_both.c b/src/lib/libssl/s3_both.c index 53b9390fdd..77f825af31 100644 --- a/src/lib/libssl/s3_both.c +++ b/src/lib/libssl/s3_both.c | |||
@@ -185,13 +185,6 @@ int ssl3_send_finished(SSL *s, int a, int b, const char *sender, int slen) | |||
185 | s->s3->previous_server_finished_len=i; | 185 | s->s3->previous_server_finished_len=i; |
186 | } | 186 | } |
187 | 187 | ||
188 | #ifdef OPENSSL_SYS_WIN16 | ||
189 | /* MSVC 1.5 does not clear the top bytes of the word unless | ||
190 | * I do this. | ||
191 | */ | ||
192 | l&=0xffff; | ||
193 | #endif | ||
194 | |||
195 | *(d++)=SSL3_MT_FINISHED; | 188 | *(d++)=SSL3_MT_FINISHED; |
196 | l2n3(l,d); | 189 | l2n3(l,d); |
197 | s->init_num=(int)l+4; | 190 | s->init_num=(int)l+4; |
diff --git a/src/lib/libssl/src/crypto/bio/bss_dgram.c b/src/lib/libssl/src/crypto/bio/bss_dgram.c index 54c012c47d..f39f94f7fe 100644 --- a/src/lib/libssl/src/crypto/bio/bss_dgram.c +++ b/src/lib/libssl/src/crypto/bio/bss_dgram.c | |||
@@ -1847,19 +1847,7 @@ int BIO_dgram_non_fatal_error(int err) | |||
1847 | 1847 | ||
1848 | static void get_current_time(struct timeval *t) | 1848 | static void get_current_time(struct timeval *t) |
1849 | { | 1849 | { |
1850 | #ifdef OPENSSL_SYS_WIN32 | ||
1851 | struct _timeb tb; | ||
1852 | _ftime(&tb); | ||
1853 | t->tv_sec = (long)tb.time; | ||
1854 | t->tv_usec = (long)tb.millitm * 1000; | ||
1855 | #elif defined(OPENSSL_SYS_VMS) | ||
1856 | struct timeb tb; | ||
1857 | ftime(&tb); | ||
1858 | t->tv_sec = (long)tb.time; | ||
1859 | t->tv_usec = (long)tb.millitm * 1000; | ||
1860 | #else | ||
1861 | gettimeofday(t, NULL); | 1850 | gettimeofday(t, NULL); |
1862 | #endif | ||
1863 | } | 1851 | } |
1864 | 1852 | ||
1865 | #endif | 1853 | #endif |
diff --git a/src/lib/libssl/src/ssl/d1_both.c b/src/lib/libssl/src/ssl/d1_both.c index 2e8cf681ed..a265fed22f 100644 --- a/src/lib/libssl/src/ssl/d1_both.c +++ b/src/lib/libssl/src/ssl/d1_both.c | |||
@@ -938,13 +938,6 @@ int dtls1_send_finished(SSL *s, int a, int b, const char *sender, int slen) | |||
938 | s->s3->previous_server_finished_len=i; | 938 | s->s3->previous_server_finished_len=i; |
939 | } | 939 | } |
940 | 940 | ||
941 | #ifdef OPENSSL_SYS_WIN16 | ||
942 | /* MSVC 1.5 does not clear the top bytes of the word unless | ||
943 | * I do this. | ||
944 | */ | ||
945 | l&=0xffff; | ||
946 | #endif | ||
947 | |||
948 | d = dtls1_set_message_header(s, d, SSL3_MT_FINISHED, l, 0, l); | 941 | d = dtls1_set_message_header(s, d, SSL3_MT_FINISHED, l, 0, l); |
949 | s->init_num=(int)l+DTLS1_HM_HEADER_LENGTH; | 942 | s->init_num=(int)l+DTLS1_HM_HEADER_LENGTH; |
950 | s->init_off=0; | 943 | s->init_off=0; |
diff --git a/src/lib/libssl/src/ssl/dtls1.h b/src/lib/libssl/src/ssl/dtls1.h index aa57e9aec4..3e0fe918a3 100644 --- a/src/lib/libssl/src/ssl/dtls1.h +++ b/src/lib/libssl/src/ssl/dtls1.h | |||
@@ -62,18 +62,7 @@ | |||
62 | 62 | ||
63 | #include <openssl/buffer.h> | 63 | #include <openssl/buffer.h> |
64 | #include <openssl/pqueue.h> | 64 | #include <openssl/pqueue.h> |
65 | #ifdef OPENSSL_SYS_WIN32 | ||
66 | /* Needed for struct timeval */ | ||
67 | #include <winsock.h> | ||
68 | #elif defined(OPENSSL_SYS_NETWARE) && !defined(_WINSOCK2API_) | ||
69 | #include <sys/timeval.h> | ||
70 | #else | ||
71 | #if defined(OPENSSL_SYS_VXWORKS) | ||
72 | #include <sys/times.h> | ||
73 | #else | ||
74 | #include <sys/time.h> | 65 | #include <sys/time.h> |
75 | #endif | ||
76 | #endif | ||
77 | 66 | ||
78 | #ifdef __cplusplus | 67 | #ifdef __cplusplus |
79 | extern "C" { | 68 | extern "C" { |
diff --git a/src/lib/libssl/src/ssl/kssl.c b/src/lib/libssl/src/ssl/kssl.c index 61d7e71d96..a90c90fa6e 100644 --- a/src/lib/libssl/src/ssl/kssl.c +++ b/src/lib/libssl/src/ssl/kssl.c | |||
@@ -84,702 +84,6 @@ | |||
84 | #define ENOMEM KRB5KRB_ERR_GENERIC | 84 | #define ENOMEM KRB5KRB_ERR_GENERIC |
85 | #endif | 85 | #endif |
86 | 86 | ||
87 | /* | ||
88 | * When OpenSSL is built on Windows, we do not want to require that | ||
89 | * the Kerberos DLLs be available in order for the OpenSSL DLLs to | ||
90 | * work. Therefore, all Kerberos routines are loaded at run time | ||
91 | * and we do not link to a .LIB file. | ||
92 | */ | ||
93 | |||
94 | #if defined(OPENSSL_SYS_WINDOWS) || defined(OPENSSL_SYS_WIN32) | ||
95 | /* | ||
96 | * The purpose of the following pre-processor statements is to provide | ||
97 | * compatibility with different releases of MIT Kerberos for Windows. | ||
98 | * All versions up to 1.2 used macros. But macros do not allow for | ||
99 | * a binary compatible interface for DLLs. Therefore, all macros are | ||
100 | * being replaced by function calls. The following code will allow | ||
101 | * an OpenSSL DLL built on Windows to work whether or not the macro | ||
102 | * or function form of the routines are utilized. | ||
103 | */ | ||
104 | #ifdef krb5_cc_get_principal | ||
105 | #define NO_DEF_KRB5_CCACHE | ||
106 | #undef krb5_cc_get_principal | ||
107 | #endif | ||
108 | #define krb5_cc_get_principal kssl_krb5_cc_get_principal | ||
109 | |||
110 | #define krb5_free_data_contents kssl_krb5_free_data_contents | ||
111 | #define krb5_free_context kssl_krb5_free_context | ||
112 | #define krb5_auth_con_free kssl_krb5_auth_con_free | ||
113 | #define krb5_free_principal kssl_krb5_free_principal | ||
114 | #define krb5_mk_req_extended kssl_krb5_mk_req_extended | ||
115 | #define krb5_get_credentials kssl_krb5_get_credentials | ||
116 | #define krb5_cc_default kssl_krb5_cc_default | ||
117 | #define krb5_sname_to_principal kssl_krb5_sname_to_principal | ||
118 | #define krb5_init_context kssl_krb5_init_context | ||
119 | #define krb5_free_ticket kssl_krb5_free_ticket | ||
120 | #define krb5_rd_req kssl_krb5_rd_req | ||
121 | #define krb5_kt_default kssl_krb5_kt_default | ||
122 | #define krb5_kt_resolve kssl_krb5_kt_resolve | ||
123 | /* macros in mit 1.2.2 and earlier; functions in mit 1.2.3 and greater */ | ||
124 | #ifndef krb5_kt_close | ||
125 | #define krb5_kt_close kssl_krb5_kt_close | ||
126 | #endif /* krb5_kt_close */ | ||
127 | #ifndef krb5_kt_get_entry | ||
128 | #define krb5_kt_get_entry kssl_krb5_kt_get_entry | ||
129 | #endif /* krb5_kt_get_entry */ | ||
130 | #define krb5_auth_con_init kssl_krb5_auth_con_init | ||
131 | |||
132 | #define krb5_principal_compare kssl_krb5_principal_compare | ||
133 | #define krb5_decrypt_tkt_part kssl_krb5_decrypt_tkt_part | ||
134 | #define krb5_timeofday kssl_krb5_timeofday | ||
135 | #define krb5_rc_default kssl_krb5_rc_default | ||
136 | |||
137 | #ifdef krb5_rc_initialize | ||
138 | #undef krb5_rc_initialize | ||
139 | #endif | ||
140 | #define krb5_rc_initialize kssl_krb5_rc_initialize | ||
141 | |||
142 | #ifdef krb5_rc_get_lifespan | ||
143 | #undef krb5_rc_get_lifespan | ||
144 | #endif | ||
145 | #define krb5_rc_get_lifespan kssl_krb5_rc_get_lifespan | ||
146 | |||
147 | #ifdef krb5_rc_destroy | ||
148 | #undef krb5_rc_destroy | ||
149 | #endif | ||
150 | #define krb5_rc_destroy kssl_krb5_rc_destroy | ||
151 | |||
152 | #define valid_cksumtype kssl_valid_cksumtype | ||
153 | #define krb5_checksum_size kssl_krb5_checksum_size | ||
154 | #define krb5_kt_free_entry kssl_krb5_kt_free_entry | ||
155 | #define krb5_auth_con_setrcache kssl_krb5_auth_con_setrcache | ||
156 | #define krb5_auth_con_getrcache kssl_krb5_auth_con_getrcache | ||
157 | #define krb5_get_server_rcache kssl_krb5_get_server_rcache | ||
158 | |||
159 | /* Prototypes for built in stubs */ | ||
160 | void kssl_krb5_free_data_contents(krb5_context, krb5_data *); | ||
161 | void kssl_krb5_free_principal(krb5_context, krb5_principal ); | ||
162 | krb5_error_code kssl_krb5_kt_resolve(krb5_context, | ||
163 | krb5_const char *, | ||
164 | krb5_keytab *); | ||
165 | krb5_error_code kssl_krb5_kt_default(krb5_context, | ||
166 | krb5_keytab *); | ||
167 | krb5_error_code kssl_krb5_free_ticket(krb5_context, krb5_ticket *); | ||
168 | krb5_error_code kssl_krb5_rd_req(krb5_context, krb5_auth_context *, | ||
169 | krb5_const krb5_data *, | ||
170 | krb5_const_principal, krb5_keytab, | ||
171 | krb5_flags *,krb5_ticket **); | ||
172 | |||
173 | krb5_boolean kssl_krb5_principal_compare(krb5_context, krb5_const_principal, | ||
174 | krb5_const_principal); | ||
175 | krb5_error_code kssl_krb5_mk_req_extended(krb5_context, | ||
176 | krb5_auth_context *, | ||
177 | krb5_const krb5_flags, | ||
178 | krb5_data *, | ||
179 | krb5_creds *, | ||
180 | krb5_data * ); | ||
181 | krb5_error_code kssl_krb5_init_context(krb5_context *); | ||
182 | void kssl_krb5_free_context(krb5_context); | ||
183 | krb5_error_code kssl_krb5_cc_default(krb5_context,krb5_ccache *); | ||
184 | krb5_error_code kssl_krb5_sname_to_principal(krb5_context, | ||
185 | krb5_const char *, | ||
186 | krb5_const char *, | ||
187 | krb5_int32, | ||
188 | krb5_principal *); | ||
189 | krb5_error_code kssl_krb5_get_credentials(krb5_context, | ||
190 | krb5_const krb5_flags, | ||
191 | krb5_ccache, | ||
192 | krb5_creds *, | ||
193 | krb5_creds * *); | ||
194 | krb5_error_code kssl_krb5_auth_con_init(krb5_context, | ||
195 | krb5_auth_context *); | ||
196 | krb5_error_code kssl_krb5_cc_get_principal(krb5_context context, | ||
197 | krb5_ccache cache, | ||
198 | krb5_principal *principal); | ||
199 | krb5_error_code kssl_krb5_auth_con_free(krb5_context,krb5_auth_context); | ||
200 | size_t kssl_krb5_checksum_size(krb5_context context,krb5_cksumtype ctype); | ||
201 | krb5_boolean kssl_valid_cksumtype(krb5_cksumtype ctype); | ||
202 | krb5_error_code krb5_kt_free_entry(krb5_context,krb5_keytab_entry FAR * ); | ||
203 | krb5_error_code kssl_krb5_auth_con_setrcache(krb5_context, | ||
204 | krb5_auth_context, | ||
205 | krb5_rcache); | ||
206 | krb5_error_code kssl_krb5_get_server_rcache(krb5_context, | ||
207 | krb5_const krb5_data *, | ||
208 | krb5_rcache *); | ||
209 | krb5_error_code kssl_krb5_auth_con_getrcache(krb5_context, | ||
210 | krb5_auth_context, | ||
211 | krb5_rcache *); | ||
212 | |||
213 | /* Function pointers (almost all Kerberos functions are _stdcall) */ | ||
214 | static void (_stdcall *p_krb5_free_data_contents)(krb5_context, krb5_data *) | ||
215 | =NULL; | ||
216 | static void (_stdcall *p_krb5_free_principal)(krb5_context, krb5_principal ) | ||
217 | =NULL; | ||
218 | static krb5_error_code(_stdcall *p_krb5_kt_resolve) | ||
219 | (krb5_context, krb5_const char *, krb5_keytab *)=NULL; | ||
220 | static krb5_error_code (_stdcall *p_krb5_kt_default)(krb5_context, | ||
221 | krb5_keytab *)=NULL; | ||
222 | static krb5_error_code (_stdcall *p_krb5_free_ticket)(krb5_context, | ||
223 | krb5_ticket *)=NULL; | ||
224 | static krb5_error_code (_stdcall *p_krb5_rd_req)(krb5_context, | ||
225 | krb5_auth_context *, | ||
226 | krb5_const krb5_data *, | ||
227 | krb5_const_principal, | ||
228 | krb5_keytab, krb5_flags *, | ||
229 | krb5_ticket **)=NULL; | ||
230 | static krb5_error_code (_stdcall *p_krb5_mk_req_extended) | ||
231 | (krb5_context, krb5_auth_context *, | ||
232 | krb5_const krb5_flags, krb5_data *, krb5_creds *, | ||
233 | krb5_data * )=NULL; | ||
234 | static krb5_error_code (_stdcall *p_krb5_init_context)(krb5_context *)=NULL; | ||
235 | static void (_stdcall *p_krb5_free_context)(krb5_context)=NULL; | ||
236 | static krb5_error_code (_stdcall *p_krb5_cc_default)(krb5_context, | ||
237 | krb5_ccache *)=NULL; | ||
238 | static krb5_error_code (_stdcall *p_krb5_sname_to_principal) | ||
239 | (krb5_context, krb5_const char *, krb5_const char *, | ||
240 | krb5_int32, krb5_principal *)=NULL; | ||
241 | static krb5_error_code (_stdcall *p_krb5_get_credentials) | ||
242 | (krb5_context, krb5_const krb5_flags, krb5_ccache, | ||
243 | krb5_creds *, krb5_creds **)=NULL; | ||
244 | static krb5_error_code (_stdcall *p_krb5_auth_con_init) | ||
245 | (krb5_context, krb5_auth_context *)=NULL; | ||
246 | static krb5_error_code (_stdcall *p_krb5_cc_get_principal) | ||
247 | (krb5_context context, krb5_ccache cache, | ||
248 | krb5_principal *principal)=NULL; | ||
249 | static krb5_error_code (_stdcall *p_krb5_auth_con_free) | ||
250 | (krb5_context, krb5_auth_context)=NULL; | ||
251 | static krb5_error_code (_stdcall *p_krb5_decrypt_tkt_part) | ||
252 | (krb5_context, krb5_const krb5_keyblock *, | ||
253 | krb5_ticket *)=NULL; | ||
254 | static krb5_error_code (_stdcall *p_krb5_timeofday) | ||
255 | (krb5_context context, krb5_int32 *timeret)=NULL; | ||
256 | static krb5_error_code (_stdcall *p_krb5_rc_default) | ||
257 | (krb5_context context, krb5_rcache *rc)=NULL; | ||
258 | static krb5_error_code (_stdcall *p_krb5_rc_initialize) | ||
259 | (krb5_context context, krb5_rcache rc, | ||
260 | krb5_deltat lifespan)=NULL; | ||
261 | static krb5_error_code (_stdcall *p_krb5_rc_get_lifespan) | ||
262 | (krb5_context context, krb5_rcache rc, | ||
263 | krb5_deltat *lifespan)=NULL; | ||
264 | static krb5_error_code (_stdcall *p_krb5_rc_destroy) | ||
265 | (krb5_context context, krb5_rcache rc)=NULL; | ||
266 | static krb5_boolean (_stdcall *p_krb5_principal_compare) | ||
267 | (krb5_context, krb5_const_principal, krb5_const_principal)=NULL; | ||
268 | static size_t (_stdcall *p_krb5_checksum_size)(krb5_context context,krb5_cksumtype ctype)=NULL; | ||
269 | static krb5_boolean (_stdcall *p_valid_cksumtype)(krb5_cksumtype ctype)=NULL; | ||
270 | static krb5_error_code (_stdcall *p_krb5_kt_free_entry) | ||
271 | (krb5_context,krb5_keytab_entry * )=NULL; | ||
272 | static krb5_error_code (_stdcall * p_krb5_auth_con_setrcache)(krb5_context, | ||
273 | krb5_auth_context, | ||
274 | krb5_rcache)=NULL; | ||
275 | static krb5_error_code (_stdcall * p_krb5_get_server_rcache)(krb5_context, | ||
276 | krb5_const krb5_data *, | ||
277 | krb5_rcache *)=NULL; | ||
278 | static krb5_error_code (* p_krb5_auth_con_getrcache)(krb5_context, | ||
279 | krb5_auth_context, | ||
280 | krb5_rcache *)=NULL; | ||
281 | static krb5_error_code (_stdcall * p_krb5_kt_close)(krb5_context context, | ||
282 | krb5_keytab keytab)=NULL; | ||
283 | static krb5_error_code (_stdcall * p_krb5_kt_get_entry)(krb5_context context, | ||
284 | krb5_keytab keytab, | ||
285 | krb5_const_principal principal, krb5_kvno vno, | ||
286 | krb5_enctype enctype, krb5_keytab_entry *entry)=NULL; | ||
287 | static int krb5_loaded = 0; /* only attempt to initialize func ptrs once */ | ||
288 | |||
289 | /* Function to Load the Kerberos 5 DLL and initialize function pointers */ | ||
290 | void | ||
291 | load_krb5_dll(void) | ||
292 | { | ||
293 | HANDLE hKRB5_32; | ||
294 | |||
295 | krb5_loaded++; | ||
296 | hKRB5_32 = LoadLibrary(TEXT("KRB5_32")); | ||
297 | if (!hKRB5_32) | ||
298 | return; | ||
299 | |||
300 | (FARPROC) p_krb5_free_data_contents = | ||
301 | GetProcAddress( hKRB5_32, "krb5_free_data_contents" ); | ||
302 | (FARPROC) p_krb5_free_context = | ||
303 | GetProcAddress( hKRB5_32, "krb5_free_context" ); | ||
304 | (FARPROC) p_krb5_auth_con_free = | ||
305 | GetProcAddress( hKRB5_32, "krb5_auth_con_free" ); | ||
306 | (FARPROC) p_krb5_free_principal = | ||
307 | GetProcAddress( hKRB5_32, "krb5_free_principal" ); | ||
308 | (FARPROC) p_krb5_mk_req_extended = | ||
309 | GetProcAddress( hKRB5_32, "krb5_mk_req_extended" ); | ||
310 | (FARPROC) p_krb5_get_credentials = | ||
311 | GetProcAddress( hKRB5_32, "krb5_get_credentials" ); | ||
312 | (FARPROC) p_krb5_cc_get_principal = | ||
313 | GetProcAddress( hKRB5_32, "krb5_cc_get_principal" ); | ||
314 | (FARPROC) p_krb5_cc_default = | ||
315 | GetProcAddress( hKRB5_32, "krb5_cc_default" ); | ||
316 | (FARPROC) p_krb5_sname_to_principal = | ||
317 | GetProcAddress( hKRB5_32, "krb5_sname_to_principal" ); | ||
318 | (FARPROC) p_krb5_init_context = | ||
319 | GetProcAddress( hKRB5_32, "krb5_init_context" ); | ||
320 | (FARPROC) p_krb5_free_ticket = | ||
321 | GetProcAddress( hKRB5_32, "krb5_free_ticket" ); | ||
322 | (FARPROC) p_krb5_rd_req = | ||
323 | GetProcAddress( hKRB5_32, "krb5_rd_req" ); | ||
324 | (FARPROC) p_krb5_principal_compare = | ||
325 | GetProcAddress( hKRB5_32, "krb5_principal_compare" ); | ||
326 | (FARPROC) p_krb5_decrypt_tkt_part = | ||
327 | GetProcAddress( hKRB5_32, "krb5_decrypt_tkt_part" ); | ||
328 | (FARPROC) p_krb5_timeofday = | ||
329 | GetProcAddress( hKRB5_32, "krb5_timeofday" ); | ||
330 | (FARPROC) p_krb5_rc_default = | ||
331 | GetProcAddress( hKRB5_32, "krb5_rc_default" ); | ||
332 | (FARPROC) p_krb5_rc_initialize = | ||
333 | GetProcAddress( hKRB5_32, "krb5_rc_initialize" ); | ||
334 | (FARPROC) p_krb5_rc_get_lifespan = | ||
335 | GetProcAddress( hKRB5_32, "krb5_rc_get_lifespan" ); | ||
336 | (FARPROC) p_krb5_rc_destroy = | ||
337 | GetProcAddress( hKRB5_32, "krb5_rc_destroy" ); | ||
338 | (FARPROC) p_krb5_kt_default = | ||
339 | GetProcAddress( hKRB5_32, "krb5_kt_default" ); | ||
340 | (FARPROC) p_krb5_kt_resolve = | ||
341 | GetProcAddress( hKRB5_32, "krb5_kt_resolve" ); | ||
342 | (FARPROC) p_krb5_auth_con_init = | ||
343 | GetProcAddress( hKRB5_32, "krb5_auth_con_init" ); | ||
344 | (FARPROC) p_valid_cksumtype = | ||
345 | GetProcAddress( hKRB5_32, "valid_cksumtype" ); | ||
346 | (FARPROC) p_krb5_checksum_size = | ||
347 | GetProcAddress( hKRB5_32, "krb5_checksum_size" ); | ||
348 | (FARPROC) p_krb5_kt_free_entry = | ||
349 | GetProcAddress( hKRB5_32, "krb5_kt_free_entry" ); | ||
350 | (FARPROC) p_krb5_auth_con_setrcache = | ||
351 | GetProcAddress( hKRB5_32, "krb5_auth_con_setrcache" ); | ||
352 | (FARPROC) p_krb5_get_server_rcache = | ||
353 | GetProcAddress( hKRB5_32, "krb5_get_server_rcache" ); | ||
354 | (FARPROC) p_krb5_auth_con_getrcache = | ||
355 | GetProcAddress( hKRB5_32, "krb5_auth_con_getrcache" ); | ||
356 | (FARPROC) p_krb5_kt_close = | ||
357 | GetProcAddress( hKRB5_32, "krb5_kt_close" ); | ||
358 | (FARPROC) p_krb5_kt_get_entry = | ||
359 | GetProcAddress( hKRB5_32, "krb5_kt_get_entry" ); | ||
360 | } | ||
361 | |||
362 | /* Stubs for each function to be dynamicly loaded */ | ||
363 | void | ||
364 | kssl_krb5_free_data_contents(krb5_context CO, krb5_data * data) | ||
365 | { | ||
366 | if (!krb5_loaded) | ||
367 | load_krb5_dll(); | ||
368 | |||
369 | if ( p_krb5_free_data_contents ) | ||
370 | p_krb5_free_data_contents(CO,data); | ||
371 | } | ||
372 | |||
373 | krb5_error_code | ||
374 | kssl_krb5_mk_req_extended (krb5_context CO, | ||
375 | krb5_auth_context * pACO, | ||
376 | krb5_const krb5_flags F, | ||
377 | krb5_data * pD1, | ||
378 | krb5_creds * pC, | ||
379 | krb5_data * pD2) | ||
380 | { | ||
381 | if (!krb5_loaded) | ||
382 | load_krb5_dll(); | ||
383 | |||
384 | if ( p_krb5_mk_req_extended ) | ||
385 | return(p_krb5_mk_req_extended(CO,pACO,F,pD1,pC,pD2)); | ||
386 | else | ||
387 | return KRB5KRB_ERR_GENERIC; | ||
388 | } | ||
389 | krb5_error_code | ||
390 | kssl_krb5_auth_con_init(krb5_context CO, | ||
391 | krb5_auth_context * pACO) | ||
392 | { | ||
393 | if (!krb5_loaded) | ||
394 | load_krb5_dll(); | ||
395 | |||
396 | if ( p_krb5_auth_con_init ) | ||
397 | return(p_krb5_auth_con_init(CO,pACO)); | ||
398 | else | ||
399 | return KRB5KRB_ERR_GENERIC; | ||
400 | } | ||
401 | krb5_error_code | ||
402 | kssl_krb5_auth_con_free (krb5_context CO, | ||
403 | krb5_auth_context ACO) | ||
404 | { | ||
405 | if (!krb5_loaded) | ||
406 | load_krb5_dll(); | ||
407 | |||
408 | if ( p_krb5_auth_con_free ) | ||
409 | return(p_krb5_auth_con_free(CO,ACO)); | ||
410 | else | ||
411 | return KRB5KRB_ERR_GENERIC; | ||
412 | } | ||
413 | krb5_error_code | ||
414 | kssl_krb5_get_credentials(krb5_context CO, | ||
415 | krb5_const krb5_flags F, | ||
416 | krb5_ccache CC, | ||
417 | krb5_creds * pCR, | ||
418 | krb5_creds ** ppCR) | ||
419 | { | ||
420 | if (!krb5_loaded) | ||
421 | load_krb5_dll(); | ||
422 | |||
423 | if ( p_krb5_get_credentials ) | ||
424 | return(p_krb5_get_credentials(CO,F,CC,pCR,ppCR)); | ||
425 | else | ||
426 | return KRB5KRB_ERR_GENERIC; | ||
427 | } | ||
428 | krb5_error_code | ||
429 | kssl_krb5_sname_to_principal(krb5_context CO, | ||
430 | krb5_const char * pC1, | ||
431 | krb5_const char * pC2, | ||
432 | krb5_int32 I, | ||
433 | krb5_principal * pPR) | ||
434 | { | ||
435 | if (!krb5_loaded) | ||
436 | load_krb5_dll(); | ||
437 | |||
438 | if ( p_krb5_sname_to_principal ) | ||
439 | return(p_krb5_sname_to_principal(CO,pC1,pC2,I,pPR)); | ||
440 | else | ||
441 | return KRB5KRB_ERR_GENERIC; | ||
442 | } | ||
443 | |||
444 | krb5_error_code | ||
445 | kssl_krb5_cc_default(krb5_context CO, | ||
446 | krb5_ccache * pCC) | ||
447 | { | ||
448 | if (!krb5_loaded) | ||
449 | load_krb5_dll(); | ||
450 | |||
451 | if ( p_krb5_cc_default ) | ||
452 | return(p_krb5_cc_default(CO,pCC)); | ||
453 | else | ||
454 | return KRB5KRB_ERR_GENERIC; | ||
455 | } | ||
456 | |||
457 | krb5_error_code | ||
458 | kssl_krb5_init_context(krb5_context * pCO) | ||
459 | { | ||
460 | if (!krb5_loaded) | ||
461 | load_krb5_dll(); | ||
462 | |||
463 | if ( p_krb5_init_context ) | ||
464 | return(p_krb5_init_context(pCO)); | ||
465 | else | ||
466 | return KRB5KRB_ERR_GENERIC; | ||
467 | } | ||
468 | |||
469 | void | ||
470 | kssl_krb5_free_context(krb5_context CO) | ||
471 | { | ||
472 | if (!krb5_loaded) | ||
473 | load_krb5_dll(); | ||
474 | |||
475 | if ( p_krb5_free_context ) | ||
476 | p_krb5_free_context(CO); | ||
477 | } | ||
478 | |||
479 | void | ||
480 | kssl_krb5_free_principal(krb5_context c, krb5_principal p) | ||
481 | { | ||
482 | if (!krb5_loaded) | ||
483 | load_krb5_dll(); | ||
484 | |||
485 | if ( p_krb5_free_principal ) | ||
486 | p_krb5_free_principal(c,p); | ||
487 | } | ||
488 | |||
489 | krb5_error_code | ||
490 | kssl_krb5_kt_resolve(krb5_context con, | ||
491 | krb5_const char * sz, | ||
492 | krb5_keytab * kt) | ||
493 | { | ||
494 | if (!krb5_loaded) | ||
495 | load_krb5_dll(); | ||
496 | |||
497 | if ( p_krb5_kt_resolve ) | ||
498 | return(p_krb5_kt_resolve(con,sz,kt)); | ||
499 | else | ||
500 | return KRB5KRB_ERR_GENERIC; | ||
501 | } | ||
502 | |||
503 | krb5_error_code | ||
504 | kssl_krb5_kt_default(krb5_context con, | ||
505 | krb5_keytab * kt) | ||
506 | { | ||
507 | if (!krb5_loaded) | ||
508 | load_krb5_dll(); | ||
509 | |||
510 | if ( p_krb5_kt_default ) | ||
511 | return(p_krb5_kt_default(con,kt)); | ||
512 | else | ||
513 | return KRB5KRB_ERR_GENERIC; | ||
514 | } | ||
515 | |||
516 | krb5_error_code | ||
517 | kssl_krb5_free_ticket(krb5_context con, | ||
518 | krb5_ticket * kt) | ||
519 | { | ||
520 | if (!krb5_loaded) | ||
521 | load_krb5_dll(); | ||
522 | |||
523 | if ( p_krb5_free_ticket ) | ||
524 | return(p_krb5_free_ticket(con,kt)); | ||
525 | else | ||
526 | return KRB5KRB_ERR_GENERIC; | ||
527 | } | ||
528 | |||
529 | krb5_error_code | ||
530 | kssl_krb5_rd_req(krb5_context con, krb5_auth_context * pacon, | ||
531 | krb5_const krb5_data * data, | ||
532 | krb5_const_principal princ, krb5_keytab keytab, | ||
533 | krb5_flags * flags, krb5_ticket ** pptkt) | ||
534 | { | ||
535 | if (!krb5_loaded) | ||
536 | load_krb5_dll(); | ||
537 | |||
538 | if ( p_krb5_rd_req ) | ||
539 | return(p_krb5_rd_req(con,pacon,data,princ,keytab,flags,pptkt)); | ||
540 | else | ||
541 | return KRB5KRB_ERR_GENERIC; | ||
542 | } | ||
543 | |||
544 | krb5_boolean | ||
545 | krb5_principal_compare(krb5_context con, krb5_const_principal princ1, | ||
546 | krb5_const_principal princ2) | ||
547 | { | ||
548 | if (!krb5_loaded) | ||
549 | load_krb5_dll(); | ||
550 | |||
551 | if ( p_krb5_principal_compare ) | ||
552 | return(p_krb5_principal_compare(con,princ1,princ2)); | ||
553 | else | ||
554 | return KRB5KRB_ERR_GENERIC; | ||
555 | } | ||
556 | |||
557 | krb5_error_code | ||
558 | krb5_decrypt_tkt_part(krb5_context con, krb5_const krb5_keyblock *keys, | ||
559 | krb5_ticket *ticket) | ||
560 | { | ||
561 | if (!krb5_loaded) | ||
562 | load_krb5_dll(); | ||
563 | |||
564 | if ( p_krb5_decrypt_tkt_part ) | ||
565 | return(p_krb5_decrypt_tkt_part(con,keys,ticket)); | ||
566 | else | ||
567 | return KRB5KRB_ERR_GENERIC; | ||
568 | } | ||
569 | |||
570 | krb5_error_code | ||
571 | krb5_timeofday(krb5_context con, krb5_int32 *timeret) | ||
572 | { | ||
573 | if (!krb5_loaded) | ||
574 | load_krb5_dll(); | ||
575 | |||
576 | if ( p_krb5_timeofday ) | ||
577 | return(p_krb5_timeofday(con,timeret)); | ||
578 | else | ||
579 | return KRB5KRB_ERR_GENERIC; | ||
580 | } | ||
581 | |||
582 | krb5_error_code | ||
583 | krb5_rc_default(krb5_context con, krb5_rcache *rc) | ||
584 | { | ||
585 | if (!krb5_loaded) | ||
586 | load_krb5_dll(); | ||
587 | |||
588 | if ( p_krb5_rc_default ) | ||
589 | return(p_krb5_rc_default(con,rc)); | ||
590 | else | ||
591 | return KRB5KRB_ERR_GENERIC; | ||
592 | } | ||
593 | |||
594 | krb5_error_code | ||
595 | krb5_rc_initialize(krb5_context con, krb5_rcache rc, krb5_deltat lifespan) | ||
596 | { | ||
597 | if (!krb5_loaded) | ||
598 | load_krb5_dll(); | ||
599 | |||
600 | if ( p_krb5_rc_initialize ) | ||
601 | return(p_krb5_rc_initialize(con, rc, lifespan)); | ||
602 | else | ||
603 | return KRB5KRB_ERR_GENERIC; | ||
604 | } | ||
605 | |||
606 | krb5_error_code | ||
607 | krb5_rc_get_lifespan(krb5_context con, krb5_rcache rc, krb5_deltat *lifespanp) | ||
608 | { | ||
609 | if (!krb5_loaded) | ||
610 | load_krb5_dll(); | ||
611 | |||
612 | if ( p_krb5_rc_get_lifespan ) | ||
613 | return(p_krb5_rc_get_lifespan(con, rc, lifespanp)); | ||
614 | else | ||
615 | return KRB5KRB_ERR_GENERIC; | ||
616 | } | ||
617 | |||
618 | krb5_error_code | ||
619 | krb5_rc_destroy(krb5_context con, krb5_rcache rc) | ||
620 | { | ||
621 | if (!krb5_loaded) | ||
622 | load_krb5_dll(); | ||
623 | |||
624 | if ( p_krb5_rc_destroy ) | ||
625 | return(p_krb5_rc_destroy(con, rc)); | ||
626 | else | ||
627 | return KRB5KRB_ERR_GENERIC; | ||
628 | } | ||
629 | |||
630 | size_t | ||
631 | krb5_checksum_size(krb5_context context,krb5_cksumtype ctype) | ||
632 | { | ||
633 | if (!krb5_loaded) | ||
634 | load_krb5_dll(); | ||
635 | |||
636 | if ( p_krb5_checksum_size ) | ||
637 | return(p_krb5_checksum_size(context, ctype)); | ||
638 | else | ||
639 | return KRB5KRB_ERR_GENERIC; | ||
640 | } | ||
641 | |||
642 | krb5_boolean | ||
643 | valid_cksumtype(krb5_cksumtype ctype) | ||
644 | { | ||
645 | if (!krb5_loaded) | ||
646 | load_krb5_dll(); | ||
647 | |||
648 | if ( p_valid_cksumtype ) | ||
649 | return(p_valid_cksumtype(ctype)); | ||
650 | else | ||
651 | return KRB5KRB_ERR_GENERIC; | ||
652 | } | ||
653 | |||
654 | krb5_error_code | ||
655 | krb5_kt_free_entry(krb5_context con,krb5_keytab_entry * entry) | ||
656 | { | ||
657 | if (!krb5_loaded) | ||
658 | load_krb5_dll(); | ||
659 | |||
660 | if ( p_krb5_kt_free_entry ) | ||
661 | return(p_krb5_kt_free_entry(con,entry)); | ||
662 | else | ||
663 | return KRB5KRB_ERR_GENERIC; | ||
664 | } | ||
665 | |||
666 | /* Structure definitions */ | ||
667 | #ifndef NO_DEF_KRB5_CCACHE | ||
668 | #ifndef krb5_x | ||
669 | #define krb5_x(ptr,args) ((ptr)?((*(ptr)) args):(abort(),1)) | ||
670 | #define krb5_xc(ptr,args) ((ptr)?((*(ptr)) args):(abort(),(char*)0)) | ||
671 | #endif | ||
672 | |||
673 | typedef krb5_pointer krb5_cc_cursor; /* cursor for sequential lookup */ | ||
674 | |||
675 | typedef struct _krb5_ccache | ||
676 | { | ||
677 | krb5_magic magic; | ||
678 | struct _krb5_cc_ops FAR *ops; | ||
679 | krb5_pointer data; | ||
680 | } *krb5_ccache; | ||
681 | |||
682 | typedef struct _krb5_cc_ops | ||
683 | { | ||
684 | krb5_magic magic; | ||
685 | char *prefix; | ||
686 | char * (KRB5_CALLCONV *get_name) | ||
687 | (krb5_context, krb5_ccache); | ||
688 | krb5_error_code (KRB5_CALLCONV *resolve) | ||
689 | (krb5_context, krb5_ccache *, const char *); | ||
690 | krb5_error_code (KRB5_CALLCONV *gen_new) | ||
691 | (krb5_context, krb5_ccache *); | ||
692 | krb5_error_code (KRB5_CALLCONV *init) | ||
693 | (krb5_context, krb5_ccache, krb5_principal); | ||
694 | krb5_error_code (KRB5_CALLCONV *destroy) | ||
695 | (krb5_context, krb5_ccache); | ||
696 | krb5_error_code (KRB5_CALLCONV *close) | ||
697 | (krb5_context, krb5_ccache); | ||
698 | krb5_error_code (KRB5_CALLCONV *store) | ||
699 | (krb5_context, krb5_ccache, krb5_creds *); | ||
700 | krb5_error_code (KRB5_CALLCONV *retrieve) | ||
701 | (krb5_context, krb5_ccache, | ||
702 | krb5_flags, krb5_creds *, krb5_creds *); | ||
703 | krb5_error_code (KRB5_CALLCONV *get_princ) | ||
704 | (krb5_context, krb5_ccache, krb5_principal *); | ||
705 | krb5_error_code (KRB5_CALLCONV *get_first) | ||
706 | (krb5_context, krb5_ccache, krb5_cc_cursor *); | ||
707 | krb5_error_code (KRB5_CALLCONV *get_next) | ||
708 | (krb5_context, krb5_ccache, | ||
709 | krb5_cc_cursor *, krb5_creds *); | ||
710 | krb5_error_code (KRB5_CALLCONV *end_get) | ||
711 | (krb5_context, krb5_ccache, krb5_cc_cursor *); | ||
712 | krb5_error_code (KRB5_CALLCONV *remove_cred) | ||
713 | (krb5_context, krb5_ccache, | ||
714 | krb5_flags, krb5_creds *); | ||
715 | krb5_error_code (KRB5_CALLCONV *set_flags) | ||
716 | (krb5_context, krb5_ccache, krb5_flags); | ||
717 | } krb5_cc_ops; | ||
718 | #endif /* NO_DEF_KRB5_CCACHE */ | ||
719 | |||
720 | krb5_error_code | ||
721 | kssl_krb5_cc_get_principal | ||
722 | (krb5_context context, krb5_ccache cache, | ||
723 | krb5_principal *principal) | ||
724 | { | ||
725 | if ( p_krb5_cc_get_principal ) | ||
726 | return(p_krb5_cc_get_principal(context,cache,principal)); | ||
727 | else | ||
728 | return(krb5_x | ||
729 | ((cache)->ops->get_princ,(context, cache, principal))); | ||
730 | } | ||
731 | |||
732 | krb5_error_code | ||
733 | kssl_krb5_auth_con_setrcache(krb5_context con, krb5_auth_context acon, | ||
734 | krb5_rcache rcache) | ||
735 | { | ||
736 | if ( p_krb5_auth_con_setrcache ) | ||
737 | return(p_krb5_auth_con_setrcache(con,acon,rcache)); | ||
738 | else | ||
739 | return KRB5KRB_ERR_GENERIC; | ||
740 | } | ||
741 | |||
742 | krb5_error_code | ||
743 | kssl_krb5_get_server_rcache(krb5_context con, krb5_const krb5_data * data, | ||
744 | krb5_rcache * rcache) | ||
745 | { | ||
746 | if ( p_krb5_get_server_rcache ) | ||
747 | return(p_krb5_get_server_rcache(con,data,rcache)); | ||
748 | else | ||
749 | return KRB5KRB_ERR_GENERIC; | ||
750 | } | ||
751 | |||
752 | krb5_error_code | ||
753 | kssl_krb5_auth_con_getrcache(krb5_context con, krb5_auth_context acon, | ||
754 | krb5_rcache * prcache) | ||
755 | { | ||
756 | if ( p_krb5_auth_con_getrcache ) | ||
757 | return(p_krb5_auth_con_getrcache(con,acon, prcache)); | ||
758 | else | ||
759 | return KRB5KRB_ERR_GENERIC; | ||
760 | } | ||
761 | |||
762 | krb5_error_code | ||
763 | kssl_krb5_kt_close(krb5_context context, krb5_keytab keytab) | ||
764 | { | ||
765 | if ( p_krb5_kt_close ) | ||
766 | return(p_krb5_kt_close(context,keytab)); | ||
767 | else | ||
768 | return KRB5KRB_ERR_GENERIC; | ||
769 | } | ||
770 | |||
771 | krb5_error_code | ||
772 | kssl_krb5_kt_get_entry(krb5_context context, krb5_keytab keytab, | ||
773 | krb5_const_principal principal, krb5_kvno vno, | ||
774 | krb5_enctype enctype, krb5_keytab_entry *entry) | ||
775 | { | ||
776 | if ( p_krb5_kt_get_entry ) | ||
777 | return(p_krb5_kt_get_entry(context,keytab,principal,vno,enctype,entry)); | ||
778 | else | ||
779 | return KRB5KRB_ERR_GENERIC; | ||
780 | } | ||
781 | #endif /* OPENSSL_SYS_WINDOWS || OPENSSL_SYS_WIN32 */ | ||
782 | |||
783 | 87 | ||
784 | /* memory allocation functions for non-temporary storage | 88 | /* memory allocation functions for non-temporary storage |
785 | * (e.g. stuff that gets saved into the kssl context) */ | 89 | * (e.g. stuff that gets saved into the kssl context) */ |
@@ -1877,7 +1181,6 @@ kssl_tgt_is_available(KSSL_CTX *kssl_ctx) | |||
1877 | return(rc); | 1181 | return(rc); |
1878 | } | 1182 | } |
1879 | 1183 | ||
1880 | #if !defined(OPENSSL_SYS_WINDOWS) && !defined(OPENSSL_SYS_WIN32) | ||
1881 | void kssl_krb5_free_data_contents(krb5_context context, krb5_data *data) | 1184 | void kssl_krb5_free_data_contents(krb5_context context, krb5_data *data) |
1882 | { | 1185 | { |
1883 | #ifdef KRB5_HEIMDAL | 1186 | #ifdef KRB5_HEIMDAL |
@@ -1893,8 +1196,6 @@ void kssl_krb5_free_data_contents(krb5_context context, krb5_data *data) | |||
1893 | krb5_free_data_contents(NULL, data); | 1196 | krb5_free_data_contents(NULL, data); |
1894 | #endif | 1197 | #endif |
1895 | } | 1198 | } |
1896 | #endif /* !OPENSSL_SYS_WINDOWS && !OPENSSL_SYS_WIN32 */ | ||
1897 | |||
1898 | 1199 | ||
1899 | /* Given pointers to KerberosTime and struct tm structs, convert the | 1200 | /* Given pointers to KerberosTime and struct tm structs, convert the |
1900 | ** KerberosTime string to struct tm. Note that KerberosTime is a | 1201 | ** KerberosTime string to struct tm. Note that KerberosTime is a |
diff --git a/src/lib/libssl/src/ssl/s3_both.c b/src/lib/libssl/src/ssl/s3_both.c index 53b9390fdd..77f825af31 100644 --- a/src/lib/libssl/src/ssl/s3_both.c +++ b/src/lib/libssl/src/ssl/s3_both.c | |||
@@ -185,13 +185,6 @@ int ssl3_send_finished(SSL *s, int a, int b, const char *sender, int slen) | |||
185 | s->s3->previous_server_finished_len=i; | 185 | s->s3->previous_server_finished_len=i; |
186 | } | 186 | } |
187 | 187 | ||
188 | #ifdef OPENSSL_SYS_WIN16 | ||
189 | /* MSVC 1.5 does not clear the top bytes of the word unless | ||
190 | * I do this. | ||
191 | */ | ||
192 | l&=0xffff; | ||
193 | #endif | ||
194 | |||
195 | *(d++)=SSL3_MT_FINISHED; | 188 | *(d++)=SSL3_MT_FINISHED; |
196 | l2n3(l,d); | 189 | l2n3(l,d); |
197 | s->init_num=(int)l+4; | 190 | s->init_num=(int)l+4; |
diff --git a/src/lib/libssl/src/ssl/ssl.h b/src/lib/libssl/src/ssl/ssl.h index 0aec299c7a..81a1483974 100644 --- a/src/lib/libssl/src/ssl/ssl.h +++ b/src/lib/libssl/src/ssl/ssl.h | |||
@@ -733,11 +733,7 @@ int SRP_generate_client_master_secret(SSL *s,unsigned char *master_key); | |||
733 | 733 | ||
734 | #endif | 734 | #endif |
735 | 735 | ||
736 | #if defined(OPENSSL_SYS_MSDOS) && !defined(OPENSSL_SYS_WIN32) | ||
737 | #define SSL_MAX_CERT_LIST_DEFAULT 1024*30 /* 30k max cert list :-) */ | ||
738 | #else | ||
739 | #define SSL_MAX_CERT_LIST_DEFAULT 1024*100 /* 100k max cert list :-) */ | 736 | #define SSL_MAX_CERT_LIST_DEFAULT 1024*100 /* 100k max cert list :-) */ |
740 | #endif | ||
741 | 737 | ||
742 | #define SSL_SESSION_CACHE_MAX_SIZE_DEFAULT (1024*20) | 738 | #define SSL_SESSION_CACHE_MAX_SIZE_DEFAULT (1024*20) |
743 | 739 | ||
diff --git a/src/lib/libssl/src/ssl/ssltest.c b/src/lib/libssl/src/ssl/ssltest.c index 00d47974e2..f1fdabad5f 100644 --- a/src/lib/libssl/src/ssl/ssltest.c +++ b/src/lib/libssl/src/ssl/ssltest.c | |||
@@ -193,11 +193,7 @@ | |||
193 | get screwed... | 193 | get screwed... |
194 | */ | 194 | */ |
195 | 195 | ||
196 | #ifdef OPENSSL_SYS_WINDOWS | ||
197 | #include <winsock.h> | ||
198 | #else | ||
199 | #include OPENSSL_UNISTD | 196 | #include OPENSSL_UNISTD |
200 | #endif | ||
201 | 197 | ||
202 | # define TEST_SERVER_CERT "../apps/server.pem" | 198 | # define TEST_SERVER_CERT "../apps/server.pem" |
203 | # define TEST_CLIENT_CERT "../apps/client.pem" | 199 | # define TEST_CLIENT_CERT "../apps/client.pem" |
diff --git a/src/lib/libssl/ssl.h b/src/lib/libssl/ssl.h index 0aec299c7a..81a1483974 100644 --- a/src/lib/libssl/ssl.h +++ b/src/lib/libssl/ssl.h | |||
@@ -733,11 +733,7 @@ int SRP_generate_client_master_secret(SSL *s,unsigned char *master_key); | |||
733 | 733 | ||
734 | #endif | 734 | #endif |
735 | 735 | ||
736 | #if defined(OPENSSL_SYS_MSDOS) && !defined(OPENSSL_SYS_WIN32) | ||
737 | #define SSL_MAX_CERT_LIST_DEFAULT 1024*30 /* 30k max cert list :-) */ | ||
738 | #else | ||
739 | #define SSL_MAX_CERT_LIST_DEFAULT 1024*100 /* 100k max cert list :-) */ | 736 | #define SSL_MAX_CERT_LIST_DEFAULT 1024*100 /* 100k max cert list :-) */ |
740 | #endif | ||
741 | 737 | ||
742 | #define SSL_SESSION_CACHE_MAX_SIZE_DEFAULT (1024*20) | 738 | #define SSL_SESSION_CACHE_MAX_SIZE_DEFAULT (1024*20) |
743 | 739 | ||